@wix/himalaya-cli 0.1384.0 → 0.1386.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.
@@ -122,6 +122,12 @@ export interface NotificationEvent {
122
122
  /** True only when the user TAPPED. A foreground receipt is `false` and must
123
123
  * not be treated as intent to navigate. */
124
124
  tapped: boolean;
125
+ /** The id of the notification ACTION BUTTON pressed (a `PushConfig.categories` action,
126
+ * #4353), or `""` for an ordinary receipt or tap. Non-empty means a RESPONSE to a
127
+ * notification the worker was already told about, so it must not count as a new arrival. */
128
+ notificationAction: string;
129
+ /** The inline-reply text for an `input: true` action, or `""`. */
130
+ notificationText: string;
125
131
  }
126
132
  /**
127
133
  * Read the params a dispatched `observerAction` receives.
@@ -91,7 +91,9 @@ function readNotificationEvent(params) {
91
91
  resolvedLink: str("resolvedLink"),
92
92
  // Absent or unrecognized ⇒ a RECEIPT. Guessing "tap" would navigate a user
93
93
  // who never asked to go anywhere.
94
- tapped: raw === "true" || raw === "1"
94
+ tapped: raw === "true" || raw === "1",
95
+ notificationAction: str("notificationAction"),
96
+ notificationText: str("notificationText")
95
97
  };
96
98
  }
97
99
  export {
package/dist/cli.mjs CHANGED
@@ -7708,7 +7708,6 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
7708
7708
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
7709
7709
  var init_bindings = __esm({
7710
7710
  "../../core/ts/src/bindings.ts"() {
7711
- "use strict";
7712
7711
  BINDING_SIGILS = ["service", "flag", "item", "t"];
7713
7712
  BINDING_SIGIL_RE = new RegExp(
7714
7713
  `^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
@@ -176510,8 +176509,16 @@ var ServeCliClient = class {
176510
176509
  const { bytes: bytes2, gzip } = encodePublishBody(publishReleaseBody(payload, meta, draft));
176511
176510
  const headers2 = { ...this.ctrlHeaders(), ...gzip ? { "content-encoding": "gzip" } : {} };
176512
176511
  const res = await this.request("control", "POST", "/v1/admin/release", { rawBody: bytes2, headers: headers2 });
176513
- if (gzip && res.status === 400 && res.json?.error === "bad_json") {
176514
- const json6 = { code: "compressed_publish_unsupported", error: "compressed_publish_unsupported", hint: "this body is over the plain publish cap, and the plane did not accept it compressed: either the plane predates gzip publish bodies (it needs a serve deploy), or this is a self-serve credential, which keeps the plain 8 MB cap" };
176512
+ const refusal = res.json;
176513
+ const decodedOverPlainCap = res.status === 413 && refusal?.error === "payload_too_large" && refusal.limit === MAX_PUBLISH_BODY_BYTES && bytes2.byteLength <= MAX_PUBLISH_BODY_BYTES;
176514
+ if (gzip && (res.status === 400 && refusal?.error === "bad_json" || decodedOverPlainCap)) {
176515
+ const json6 = {
176516
+ code: "compressed_publish_unsupported",
176517
+ error: "compressed_publish_unsupported",
176518
+ hint: "this body is over the plain publish cap, and the plane did not accept it compressed: either the plane predates compressed publish bodies (it needs a serve deploy), or this is a self-serve credential, which keeps the plain 8 MB cap",
176519
+ sentBytes: bytes2.byteLength,
176520
+ ...typeof refusal?.bytes === "number" ? { planeCountedBytes: refusal.bytes } : {}
176521
+ };
176515
176522
  return { ...res, json: json6, text: JSON.stringify(json6) };
176516
176523
  }
176517
176524
  return res;
@@ -135,7 +135,7 @@ whole body gzip-encoded because it is over the plain 8 MB cap:
135
135
 
136
136
  | Code | Meaning |
137
137
  |---|---|
138
- | `compressed_publish_unsupported` | The publish body went out gzipped and the publishing service did not accept it compressed, so it read the bytes as malformed JSON. Either the service does not accept compressed bodies yet, or the credential is a self-serve one, which keeps the 8 MB uncompressed limit. Nothing was written. |
138
+ | `compressed_publish_unsupported` | The publish body went out gzipped and the publishing service did not accept it compressed. It either read the bytes as malformed JSON, or measured the decompressed body against the 8 MB uncompressed limit (HTTP 413). Either the service does not accept compressed bodies yet, or the credential is a self-serve one, which keeps the 8 MB uncompressed limit. Nothing was written. |
139
139
 
140
140
  ## `himi site member-app` codes
141
141
 
@@ -3767,7 +3767,7 @@
3767
3767
  "name": "NotificationEvent",
3768
3768
  "kind": "interface",
3769
3769
  "jsdoc": "/** One notification, as a worker sees it. Every field is always present; an\n * absent one reads as `\"\"` rather than `undefined`, so a `$service:` binding at\n * a field this payload omitted renders nothing instead of the text \"undefined\". */",
3770
- "decl": "export interface NotificationEvent {\n /** Ping template that produced it, e.g. \"stores.order_shipped\". */\n templateId: string;\n /** Ping topic, e.g. \"stores\". */\n topic: string;\n /** The site the payload named, when it named one. */\n metaSiteId: string;\n /** Stable per-notification id — the key to deduplicate on. */\n notificationId: string;\n /** The link exactly as delivered, before any route translation. */\n link: string;\n /** What the route table translated `link` into, or `\"\"` when no route\n * matched. Empty is NOT an error: the notification still arrived, and a\n * worker may want to count one it cannot open. */\n resolvedLink: string;\n /** True only when the user TAPPED. A foreground receipt is `false` and must\n * not be treated as intent to navigate. */\n tapped: boolean;\n}"
3770
+ "decl": "export interface NotificationEvent {\n /** Ping template that produced it, e.g. \"stores.order_shipped\". */\n templateId: string;\n /** Ping topic, e.g. \"stores\". */\n topic: string;\n /** The site the payload named, when it named one. */\n metaSiteId: string;\n /** Stable per-notification id — the key to deduplicate on. */\n notificationId: string;\n /** The link exactly as delivered, before any route translation. */\n link: string;\n /** What the route table translated `link` into, or `\"\"` when no route\n * matched. Empty is NOT an error: the notification still arrived, and a\n * worker may want to count one it cannot open. */\n resolvedLink: string;\n /** True only when the user TAPPED. A foreground receipt is `false` and must\n * not be treated as intent to navigate. */\n tapped: boolean;\n /** The id of the notification ACTION BUTTON pressed (a `PushConfig.categories` action,\n * #4353), or `\"\"` for an ordinary receipt or tap. Non-empty means a RESPONSE to a\n * notification the worker was already told about, so it must not count as a new arrival. */\n notificationAction: string;\n /** The inline-reply text for an `input: true` action, or `\"\"`. */\n notificationText: string;\n}"
3771
3771
  },
3772
3772
  {
3773
3773
  "name": "readNotificationEvent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1384.0",
3
+ "version": "0.1386.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "3417218b8a343184cc3d53f78c7a33615e79fc87778ce68ef648388b"
74
+ "falconPackageHash": "e3ab011108d918e98ce9eef090fd3e84e58228b81b990dce0393b625"
75
75
  }