@wix/himalaya-cli 0.2031.0 → 0.2032.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.
@@ -86,9 +86,14 @@ export interface ServedWixApiRule {
86
86
  fields: Record<string, string | number>;
87
87
  /** #6880 — see `WixApiBiRule.when`; a rule carrying one is served only under `frog.apiRulesV2`. */
88
88
  when?: Record<string, string | boolean>;
89
+ /** Source only, never served: the frog `mobileAppId`s a `when` rule is served to. `apiRulesV2` repeats
90
+ * every rule, so an app no `when` rule names is served none (#6926: owner-lite's release app-config
91
+ * went over serve-control's 64 KiB item cap with a copy of rules only Nano calls). */
92
+ mobileAppIds?: string[];
89
93
  }
90
- export declare function servedWixApiRules(): ServedWixApiRule[];
91
- export declare function servedWixApiRulesV2(): ServedWixApiRule[] | undefined;
94
+ export declare function servedWixApiRules(modules?: readonly string[]): ServedWixApiRule[];
95
+ export declare function servedWixApiRulesV2(mobileAppId?: string | null, modules?: readonly string[]): ServedWixApiRule[] | undefined;
96
+ export declare function mobileAppIdMatches(scope: string, mobileAppId: string): boolean;
92
97
  export declare function splitServedWixApiRules(rules: readonly ServedWixApiRule[]): {
93
98
  apiRules: ServedWixApiRule[];
94
99
  apiRulesV2?: ServedWixApiRule[];
@@ -234,6 +239,10 @@ export interface WixPlatformConfig {
234
239
  mobileAppId?: string;
235
240
  /** oneapp: logger version `_lv`. Default `1.0.0|Himi`. */
236
241
  lv?: string;
242
+ /** oneapp: serve only the Wix API bridge rules (`core/schema/bi/wix-api-rules.json`) of these RN logger
243
+ * `module`s, for an app whose calls never reach the shared verticals (Nano: `["nano"]`). Default: every
244
+ * rule. Keeps the app-config under serve-control's 64 KiB item cap (#6926). */
245
+ apiRuleModules?: string[];
237
246
  };
238
247
  /** Petri experiment scope (the conduction namespace for this app). */
239
248
  experiments?: {
package/dist/cli.mjs CHANGED
@@ -42929,6 +42929,48 @@ var init_wix_api_rules = __esm({
42929
42929
  needs: ["submitValues (which of first name, last name, nickname and avatar changed, against the profile the screen opened with: the call carries only the new profile)"],
42930
42930
  differs: "The 2xx twin of nano.profile-update-failed-*: only the edit-profile save writes this profile PUT. RN logs after updateCurrentUserProfile resolves, which is this write."
42931
42931
  },
42932
+ {
42933
+ id: "nano.widget-pinned",
42934
+ method: "POST",
42935
+ path: "/_api/nano-user-widgets/v1/user-widgets/toggle-widget-pinned-for-current-user",
42936
+ src: 191,
42937
+ endpoint: "oneapp",
42938
+ evid: 202,
42939
+ module: "nano",
42940
+ when: { "$req.pinned": "true" },
42941
+ mobileAppIds: ["nano"],
42942
+ fields: {
42943
+ widgetId: "$req.widgetId",
42944
+ originScreen: "nano.myWidgets",
42945
+ viewName: "nano.myWidgets.actionSheet",
42946
+ buttonName: "nano.myWidgets.actionSheet.pin",
42947
+ value: "pinned"
42948
+ },
42949
+ rn: "genericClick 191:202 (@wix/bi-logger-wix-nano-data 1.8.0, endpoint ''): wix-private/nano packages/mobile-apps-nano-platform src/common/components/WidgetActionSheet/widgetActionUtils.ts:231",
42950
+ needs: [],
42951
+ differs: "RN logs this click after changeWidgetPin succeeds, which is this write; the pin's Undo snackbar makes the same call, so it is covered too. The value comes from the request's `pinned`, so one rule per direction (#6880 `when`)."
42952
+ },
42953
+ {
42954
+ id: "nano.widget-unpinned",
42955
+ method: "POST",
42956
+ path: "/_api/nano-user-widgets/v1/user-widgets/toggle-widget-pinned-for-current-user",
42957
+ src: 191,
42958
+ endpoint: "oneapp",
42959
+ evid: 202,
42960
+ module: "nano",
42961
+ when: { "$req.pinned": "false" },
42962
+ mobileAppIds: ["nano"],
42963
+ fields: {
42964
+ widgetId: "$req.widgetId",
42965
+ originScreen: "nano.myWidgets",
42966
+ viewName: "nano.myWidgets.actionSheet",
42967
+ buttonName: "nano.myWidgets.actionSheet.pin",
42968
+ value: "unpinned"
42969
+ },
42970
+ rn: "genericClick 191:202 (@wix/bi-logger-wix-nano-data 1.8.0, endpoint ''): wix-private/nano packages/mobile-apps-nano-platform src/common/components/WidgetActionSheet/widgetActionUtils.ts:231",
42971
+ needs: [],
42972
+ differs: "The unpin half of nano.widget-pinned: the same write with `pinned: false`, Undo included."
42973
+ },
42932
42974
  {
42933
42975
  id: "nano.widget-info-update-failed-4xx",
42934
42976
  method: "PUT",
@@ -45241,11 +45283,24 @@ function servedActionMapEntry(e2) {
45241
45283
  fields: e2.fields
45242
45284
  };
45243
45285
  }
45244
- function servedWixApiRules() {
45245
- return splitServedWixApiRules(wix_api_rules_default.rules).apiRules;
45286
+ function servedWixApiRules(modules) {
45287
+ return splitServedWixApiRules(rulesOfModules(modules)).apiRules;
45288
+ }
45289
+ function servedWixApiRulesV2(mobileAppId, modules) {
45290
+ const rules = rulesOfModules(modules);
45291
+ const scoped = mobileAppId === void 0 ? rules : rules.filter((r3) => !r3.when || mobileAppId !== null && (r3.mobileAppIds ?? []).some((s5) => mobileAppIdMatches(s5, mobileAppId)));
45292
+ return splitServedWixApiRules(scoped).apiRulesV2;
45246
45293
  }
45247
- function servedWixApiRulesV2() {
45248
- return splitServedWixApiRules(wix_api_rules_default.rules).apiRulesV2;
45294
+ function mobileAppIdMatches(scope3, mobileAppId) {
45295
+ const at2 = scope3.indexOf("{msid}");
45296
+ if (at2 < 0) return scope3 === mobileAppId;
45297
+ const prefix = scope3.slice(0, at2);
45298
+ const suffix = scope3.slice(at2 + "{msid}".length);
45299
+ return mobileAppId.length > prefix.length + suffix.length && mobileAppId.startsWith(prefix) && mobileAppId.endsWith(suffix);
45300
+ }
45301
+ function rulesOfModules(modules) {
45302
+ const rules = wix_api_rules_default.rules;
45303
+ return modules ? rules.filter((r3) => r3.module !== void 0 && modules.includes(r3.module)) : rules;
45249
45304
  }
45250
45305
  function splitServedWixApiRules(rules) {
45251
45306
  const served = rules.map((r3) => ({
@@ -45295,8 +45350,8 @@ function deriveTelemetryConfig(app2) {
45295
45350
  cfg.frog.lv = wp.bi.lv || "1.0.0|Himi";
45296
45351
  const screenMap = servedScreenMap(app2.name);
45297
45352
  if (screenMap) cfg.frog.screenMap = screenMap;
45298
- cfg.frog.apiRules = servedWixApiRules();
45299
- const apiRulesV2 = servedWixApiRulesV2();
45353
+ cfg.frog.apiRules = servedWixApiRules(wp.bi.apiRuleModules);
45354
+ const apiRulesV2 = servedWixApiRulesV2(cfg.frog.mobileAppId ?? null, wp.bi.apiRuleModules);
45300
45355
  if (apiRulesV2) cfg.frog.apiRulesV2 = apiRulesV2;
45301
45356
  assignServedActionMaps(cfg.frog, sourceActionMap(app2.name));
45302
45357
  const pushMap = servedPushMap(app2.name);
@@ -45988,7 +46043,6 @@ function resolveIdiom(tokens2, ctx = {}) {
45988
46043
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
45989
46044
  var init_idiom = __esm({
45990
46045
  "../../core/ts/src/idiom.ts"() {
45991
- "use strict";
45992
46046
  init_define_HHP_CATALOG();
45993
46047
  IDIOM_CONTEXTS = {
45994
46048
  ios: { native: ["ios"] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.2031.0",
3
+ "version": "0.2032.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "256bd16687b704416ff50096e22ccccc7e285b213b01b85799f6ce4f"
85
+ "falconPackageHash": "87dcf073ae3e1aa58b3816975d668789242f2683be038e1cc36d0118"
86
86
  }