@calo-design/cli 0.9.5 → 0.9.6
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/bin/mirror-push.js +14 -4
- package/package.json +1 -1
package/bin/mirror-push.js
CHANGED
|
@@ -489,18 +489,28 @@ function handleWarmUrl(url: string | null): void {
|
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
export function subscribeLauncherLinks(): { remove: () => void } {
|
|
492
|
-
// Seed with the URL that launched this context so the
|
|
493
|
-
//
|
|
492
|
+
// Seed with the URL that launched this context so the sweeps below don't
|
|
493
|
+
// replay it (+native-intent already handled the initial URL).
|
|
494
494
|
try { lastHandled = ExpoLinking.getLinkingURL() ?? null; } catch {}
|
|
495
|
+
const sweep = () => {
|
|
496
|
+
try { handleWarmUrl(ExpoLinking.getLinkingURL() ?? null); } catch {}
|
|
497
|
+
};
|
|
495
498
|
const linkSub = ExpoLinking.addEventListener("url", ({ url }) => handleWarmUrl(url));
|
|
496
499
|
const stateSub = AppState.addEventListener("change", (state) => {
|
|
497
|
-
if (state
|
|
498
|
-
try { handleWarmUrl(ExpoLinking.getLinkingURL() ?? null); } catch {}
|
|
500
|
+
if (state === "active") sweep();
|
|
499
501
|
});
|
|
502
|
+
// The load-bearing path: in a context created by Updates.reloadAsync() the
|
|
503
|
+
// native->JS EVENT bridge (RN Linking, AppState, expo-linking's emitter) is
|
|
504
|
+
// dead on Android, but expo-linking's native lifecycle listener still writes
|
|
505
|
+
// every incoming URL to a static that getLinkingURL() reads — and timers are
|
|
506
|
+
// pure JS. Poll it; the listeners above are kept for contexts where events
|
|
507
|
+
// do work (they win the race and lastHandled dedupes the poll).
|
|
508
|
+
const timer = setInterval(sweep, 1500);
|
|
500
509
|
return {
|
|
501
510
|
remove: () => {
|
|
502
511
|
linkSub.remove();
|
|
503
512
|
stateSub.remove();
|
|
513
|
+
clearInterval(timer);
|
|
504
514
|
},
|
|
505
515
|
};
|
|
506
516
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calo-design/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "One-line setup for Calo design tooling: logs in with your Calo email and installs the calo-design skill + design-system packages. No GitHub account needed.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"calo-design": "bin/cli.js"
|