Add local iOS release pipeline, fix shortcuts, and improve invoice UX.
Enable App Store builds without EAS, iOS 18 App Intents plugins, and signing fixes for distribution export. Add mobile invoice PDF preview, compact line items, and more reliable shortcut deep-link handling. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+20
-8
@@ -13,6 +13,25 @@ function queryParam(value: string | string[] | undefined): string {
|
||||
return value ?? "";
|
||||
}
|
||||
|
||||
function normalizeShortcutPath(hostname: string | null, path: string | null): string | null {
|
||||
const host = (hostname ?? "").replace(/^\/+|\/+$/g, "");
|
||||
const segment = (path ?? "").replace(/^\/+|\/+$/g, "");
|
||||
|
||||
if (host === "shortcuts" && segment) {
|
||||
return segment;
|
||||
}
|
||||
|
||||
const combined = [host, segment].filter(Boolean).join("/");
|
||||
const match = combined.match(/(?:^|\/)shortcuts\/(clock-in|clock-out)$/);
|
||||
if (match?.[1]) return match[1];
|
||||
|
||||
if (combined === "clock-in" || combined === "clock-out") {
|
||||
return combined;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Parse `beenvoice://shortcuts/clock-in` and related URLs from Shortcuts / Siri. */
|
||||
export function parseShortcutUrl(url: string | null | undefined): ParsedShortcut | null {
|
||||
if (!url) return null;
|
||||
@@ -27,14 +46,7 @@ export function parseShortcutUrl(url: string | null | undefined): ParsedShortcut
|
||||
return { action: "open-timer", title: "", clientId: "" };
|
||||
}
|
||||
|
||||
let shortcutAction: string | null = null;
|
||||
if (host === "shortcuts" && path) {
|
||||
shortcutAction = path;
|
||||
} else {
|
||||
const match = path.match(/^shortcuts\/(clock-in|clock-out)$/);
|
||||
shortcutAction = match?.[1] ?? null;
|
||||
}
|
||||
|
||||
const shortcutAction = normalizeShortcutPath(host, path);
|
||||
if (shortcutAction === "clock-in" || shortcutAction === "clock-out") {
|
||||
return {
|
||||
action: shortcutAction,
|
||||
|
||||
Reference in New Issue
Block a user