@wix/himalaya-cli 0.1904.0 → 0.1905.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.
@@ -27,6 +27,14 @@ export interface PushRoute {
27
27
  * link space can fan out by template or topic. */
28
28
  templateId?: string;
29
29
  topic?: string;
30
+ /** #6434 — opt-in: append the incoming link's query params that the route did not
31
+ * consume to the produced link, as they arrived and in order (only characters a query
32
+ * may not hold are percent-encoded). A param is consumed when its key, compared decoded,
33
+ * names a `{placeholder}` in `link`, appears in `match`'s own query, or is set by `link`'s
34
+ * own query, so a passed param never overrides a value the route produced. The incoming
35
+ * `#fragment` is dropped. Only a link with a URI scheme gets them (never a
36
+ * `tier5.*`/`app.*` action id). Omitted ⇒ false, so no existing route changes behavior. */
37
+ passQuery?: boolean;
30
38
  }
31
39
  /** The payload facts a route may additionally condition on. */
32
40
  export interface PushPayloadContext {
package/dist/cli.mjs CHANGED
@@ -44405,7 +44405,6 @@ function shouldRevealError(args) {
44405
44405
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
44406
44406
  var init_validation = __esm({
44407
44407
  "../../core/ts/src/validation.ts"() {
44408
- "use strict";
44409
44408
  init_define_HHP_CATALOG();
44410
44409
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
44411
44410
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
@@ -272,6 +272,20 @@ routes: [
272
272
  A notification whose link matches no route opens the app without navigating. `himi validate`
273
273
  warns when a declared route names a screen the app does not declare.
274
274
 
275
+ A route fills only the `{name}` placeholders in its `link`, so by default any other query parameter
276
+ on the incoming link is dropped. To keep them, set `passQuery: true` on the route:
277
+
278
+ ```ts
279
+ routes: [{ match: "widget/:id", link: "<scheme>://widget/{id}", passQuery: true }],
280
+ ```
281
+
282
+ `widget/7?ref=push&color=red` then opens `<scheme>://widget/7?ref=push&color=red`. The parameters are
283
+ appended as they arrived, in order. Only characters a query can't hold, such as a raw space, are
284
+ percent-encoded. A parameter the route already uses is not repeated, so it can't override what the
285
+ route set: a `{name}` in `link`, a key in `match`'s query, or a key `link` sets in its own query. The
286
+ incoming link's `#fragment` is dropped. A route whose `link` is a worker action (`tier5.*`, `app.*`)
287
+ never gets them.
288
+
275
289
  #### Links from a legacy link space
276
290
 
277
291
  An app that replaces an older one may still receive that app's links: its old custom scheme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1904.0",
3
+ "version": "0.1905.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": "c2acf78a5a762a8d52925144a4cdb57da34c9595e8ea565a2eb34928"
85
+ "falconPackageHash": "e5351f05cf39dc844031c2c6b6fc9a5bec66a404b4a2f80f67296b8b"
86
86
  }