@wix/himalaya-cli 0.1090.0 → 0.1092.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/app-link.d.ts
CHANGED
|
@@ -102,5 +102,15 @@ export declare function extractAppId(url: string): AppLinkSelection;
|
|
|
102
102
|
* First occurrence wins; the value is percent-decoded. Pure; never throws.
|
|
103
103
|
*/
|
|
104
104
|
export declare function extractReleasePin(query: string): string | null;
|
|
105
|
+
/**
|
|
106
|
+
* Extract a preview HANDOVER code (`?h=`) from an app-link residual query (#3423).
|
|
107
|
+
*
|
|
108
|
+
* A handover is a single-use, opaque 22-character code the plane trades for a draft's preview
|
|
109
|
+
* bearer (`core/serve-runtime/src/preview-handover.ts`) — the form a customer-facing link or a
|
|
110
|
+
* connector QR carries instead of an inline `pvt` (#2400). The shape is checked here so a malformed
|
|
111
|
+
* value never becomes a network call. EXACTLY one `h` is accepted: two would leave the app to guess
|
|
112
|
+
* which code the link meant, and a guess spends one of them. Pure; never throws.
|
|
113
|
+
*/
|
|
114
|
+
export declare function extractHandoverCode(query: string): string | null;
|
|
105
115
|
/** Extract the short-lived preview bearer from an app-link residual query. */
|
|
106
116
|
export declare function extractPreviewToken(query: string): string | null;
|
|
@@ -12803,11 +12803,13 @@ var LINK_MOUNT_PATHS = [
|
|
|
12803
12803
|
function underLinkMount(path, marker) {
|
|
12804
12804
|
const clean = path.replace(/\/+$/, "");
|
|
12805
12805
|
for (const mount of LINK_MOUNT_PATHS) {
|
|
12806
|
-
const
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12806
|
+
const prefixes = marker === "a" ? [`${mount}/a/`, `${mount}/preview/a/`] : [`${mount}/${marker}/`];
|
|
12807
|
+
for (const prefix of prefixes) {
|
|
12808
|
+
if (!clean.startsWith(prefix)) continue;
|
|
12809
|
+
const rest = clean.slice(prefix.length);
|
|
12810
|
+
if (rest === "") return null;
|
|
12811
|
+
return rest.split("/");
|
|
12812
|
+
}
|
|
12811
12813
|
}
|
|
12812
12814
|
return null;
|
|
12813
12815
|
}
|
|
@@ -12910,6 +12912,18 @@ function extractReleasePin(query) {
|
|
|
12910
12912
|
}
|
|
12911
12913
|
return null;
|
|
12912
12914
|
}
|
|
12915
|
+
function extractHandoverCode(query) {
|
|
12916
|
+
if (!query) return null;
|
|
12917
|
+
let found = null;
|
|
12918
|
+
for (const pair of query.split("&")) {
|
|
12919
|
+
const eq = pair.indexOf("=");
|
|
12920
|
+
const key = eq < 0 ? pair : pair.slice(0, eq);
|
|
12921
|
+
if (key !== "h") continue;
|
|
12922
|
+
if (found !== null) return null;
|
|
12923
|
+
found = eq < 0 ? "" : pair.slice(eq + 1);
|
|
12924
|
+
}
|
|
12925
|
+
return found !== null && /^[A-Za-z0-9_-]{22}$/.test(found) ? found : null;
|
|
12926
|
+
}
|
|
12913
12927
|
function extractPreviewToken(query) {
|
|
12914
12928
|
if (!query) return null;
|
|
12915
12929
|
try {
|
|
@@ -13345,6 +13359,7 @@ export {
|
|
|
13345
13359
|
evaluate,
|
|
13346
13360
|
evaluateAll,
|
|
13347
13361
|
extractAppId,
|
|
13362
|
+
extractHandoverCode,
|
|
13348
13363
|
extractPackageShareId,
|
|
13349
13364
|
extractPreviewToken,
|
|
13350
13365
|
extractReleasePin,
|