@wix/himalaya-cli 0.956.0 → 0.958.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/sdk/push/src/index.d.ts +43 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/push.mjs +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
- package/dist/cli.mjs +14 -14
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/headless-loop.md +12 -4
- package/guides/sdk-reference.json +9 -3
- package/package.json +2 -2
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/push/src/index.d.ts
CHANGED
|
@@ -18,7 +18,10 @@ export interface ScheduleLocalOptions {
|
|
|
18
18
|
link?: string;
|
|
19
19
|
/** Actionable category id (must match a `PushConfig.categories[].id`). */
|
|
20
20
|
category?: string;
|
|
21
|
-
/** App-icon badge number to set when this notification is delivered.
|
|
21
|
+
/** App-icon badge number to set when this notification is delivered. `0` clears
|
|
22
|
+
* it; omit to leave the current badge alone. Honored on iOS (`aps.badge`) and
|
|
23
|
+
* Android (the shared badge slot, see `setBadge`). Web cannot badge from a
|
|
24
|
+
* notification — call `setBadge` directly there. */
|
|
22
25
|
badge?: number;
|
|
23
26
|
/** Rich media: an image URL. iOS attaches it (UNNotificationAttachment),
|
|
24
27
|
* Android renders it as a BigPicture. Omit for a plain text notification. */
|
|
@@ -42,10 +45,47 @@ export declare function scheduleLocal(options: ScheduleLocalOptions): Promise<{
|
|
|
42
45
|
export declare function cancelLocal(id: string): Promise<void>;
|
|
43
46
|
/** Cancel every pending local notification this app scheduled. */
|
|
44
47
|
export declare function cancelAllLocal(): Promise<void>;
|
|
45
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Set the app-icon badge count ("the pimple"). `0` clears it; negatives and
|
|
50
|
+
* fractions are clamped/truncated. The badge persists until you change it — it is
|
|
51
|
+
* not tied to any notification, and nothing decrements it for you.
|
|
52
|
+
*
|
|
53
|
+
* How each surface draws it, because the differences are visible to users:
|
|
54
|
+
* - **iOS / macOS** — `UNUserNotificationCenter.setBadgeCount`. Needs the `.badge`
|
|
55
|
+
* notification authorization, so call `requestPermission()` first or the number
|
|
56
|
+
* is stored and never shown.
|
|
57
|
+
* - **Android** — stock Android has no set-count API and a third-party badger
|
|
58
|
+
* dependency is disallowed, so the count rides on ONE silent, low-importance
|
|
59
|
+
* notification in a dedicated `himalaya.badge` channel. Consequences worth
|
|
60
|
+
* designing around: it is **visible in the notification shade**, the user can
|
|
61
|
+
* turn that channel off, launchers that only do dots show a dot rather than the
|
|
62
|
+
* number, and without the API 33+ `POST_NOTIFICATIONS` grant it is a silent no-op.
|
|
63
|
+
* - **Web** — `navigator.setAppBadge`, which needs an installed PWA and notification
|
|
64
|
+
* permission; unsupported browsers no-op.
|
|
65
|
+
*
|
|
66
|
+
* Best-effort everywhere: this never throws when the platform refuses.
|
|
67
|
+
*/
|
|
46
68
|
export declare function setBadge(count: number): Promise<void>;
|
|
47
|
-
/** Clear the app-icon badge
|
|
69
|
+
/** Clear the app-icon badge — exactly `setBadge(0)`. On Android this cancels the
|
|
70
|
+
* badge-carrier notification, so it also disappears from the shade. */
|
|
48
71
|
export declare function clearBadge(): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Read the current app-icon badge count.
|
|
74
|
+
*
|
|
75
|
+
* What "current" means differs by surface, and the difference is worth knowing
|
|
76
|
+
* before you build an increment on top of it:
|
|
77
|
+
* - **iOS** — the real OS value, so it survives a cold start and reflects a badge a
|
|
78
|
+
* remote push set. (Read through `applicationIconBadgeNumber`: notifications has a
|
|
79
|
+
* `setBadgeCount` setter but no matching reader, so write and read are asymmetric.)
|
|
80
|
+
* - **macOS / Android / web** — the last value THIS PROCESS set. None of the three
|
|
81
|
+
* can read the badge back (macOS exposes only a display string, Android derives
|
|
82
|
+
* the badge from a notification, the web Badging API is write-only), so a cold
|
|
83
|
+
* start reports `0` even when the icon still shows a number.
|
|
84
|
+
*
|
|
85
|
+
* Because of that, prefer deriving the badge from your own state and calling
|
|
86
|
+
* `setBadge(total)` over a read-modify-write of this value.
|
|
87
|
+
*/
|
|
88
|
+
export declare function getBadge(): Promise<number>;
|
|
49
89
|
/** The registered remote device token (APNs hex / FCM token), or null if the
|
|
50
90
|
* app has not registered for remote notifications yet. */
|
|
51
91
|
export declare function getDeviceToken(): Promise<string | null>;
|
|
@@ -26,7 +26,7 @@ export declare const CAPABILITY_REGISTRY: {
|
|
|
26
26
|
readonly pdf: readonly ["isAvailable", "open"];
|
|
27
27
|
readonly photos: readonly ["getSavePermissionStatus", "pick", "saveToLibrary"];
|
|
28
28
|
readonly presigned_upload: readonly ["put", "putFile"];
|
|
29
|
-
readonly push: readonly ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"];
|
|
29
|
+
readonly push: readonly ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"];
|
|
30
30
|
readonly release_control: readonly ["active", "available", "list", "select"];
|
|
31
31
|
readonly secure_storage: readonly ["availability", "read", "remove", "write"];
|
|
32
32
|
readonly share: readonly ["availability", "share"];
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
|
@@ -50,6 +50,11 @@ async function setBadge(count) {
|
|
|
50
50
|
async function clearBadge() {
|
|
51
51
|
await dispatch("capability.push.setBadge", { count: 0 });
|
|
52
52
|
}
|
|
53
|
+
async function getBadge() {
|
|
54
|
+
const r = await dispatch("capability.push.getBadge");
|
|
55
|
+
const n = Number(r?.count);
|
|
56
|
+
return Number.isFinite(n) && n > 0 ? Math.trunc(n) : 0;
|
|
57
|
+
}
|
|
53
58
|
async function getDeviceToken() {
|
|
54
59
|
const r = await dispatch("capability.push.getDeviceToken");
|
|
55
60
|
return r?.token && r.token.length > 0 ? r.token : null;
|
|
@@ -70,6 +75,7 @@ export {
|
|
|
70
75
|
cancelLocal,
|
|
71
76
|
clearBadge,
|
|
72
77
|
clearDelivered,
|
|
78
|
+
getBadge,
|
|
73
79
|
getDeviceToken,
|
|
74
80
|
getPermissionStatus,
|
|
75
81
|
listDelivered,
|
|
@@ -26,7 +26,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
26
26
|
"pdf": ["isAvailable", "open"],
|
|
27
27
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
28
28
|
"presigned_upload": ["put", "putFile"],
|
|
29
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
29
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
30
30
|
"release_control": ["active", "available", "list", "select"],
|
|
31
31
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
32
32
|
"share": ["availability", "share"],
|
|
@@ -41,7 +41,7 @@ var CAPABILITY_REGISTRY = {
|
|
|
41
41
|
"pdf": ["isAvailable", "open"],
|
|
42
42
|
"photos": ["getSavePermissionStatus", "pick", "saveToLibrary"],
|
|
43
43
|
"presigned_upload": ["put", "putFile"],
|
|
44
|
-
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
44
|
+
"push": ["cancelAllLocal", "cancelLocal", "clearDelivered", "getBadge", "getDeviceToken", "getPermissionStatus", "listDelivered", "requestPermission", "scheduleLocal", "setBadge"],
|
|
45
45
|
"release_control": ["active", "available", "list", "select"],
|
|
46
46
|
"secure_storage": ["availability", "read", "remove", "write"],
|
|
47
47
|
"share": ["availability", "share"],
|
package/dist/cli.mjs
CHANGED
|
@@ -39201,7 +39201,7 @@ var init_preview_token = __esm({
|
|
|
39201
39201
|
SUBTLE_ALGO = { name: "HMAC", hash: "SHA-256" };
|
|
39202
39202
|
PREVIEW_TOKEN_VERSION = 1;
|
|
39203
39203
|
DEFAULT_PREVIEW_TOKEN_TTL_SECONDS = 5 * 60;
|
|
39204
|
-
WEB_PREVIEW_TOKEN_TTL_SECONDS =
|
|
39204
|
+
WEB_PREVIEW_TOKEN_TTL_SECONDS = 45 * 60;
|
|
39205
39205
|
}
|
|
39206
39206
|
});
|
|
39207
39207
|
|
|
@@ -43359,19 +43359,19 @@ var init_preview_assets_generated = __esm({
|
|
|
43359
43359
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
43360
43360
|
init_preview_assets_format();
|
|
43361
43361
|
PREVIEW_ASSET_MANIFEST = [
|
|
43362
|
-
{ key: "assets/index-
|
|
43363
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
43364
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
43365
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
43366
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
43367
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
43368
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
43369
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
43370
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
43371
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
43372
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
43373
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
43374
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
43362
|
+
{ key: "assets/index-BdjUMoXo.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 985049, sha256: "f401b5ebead76d81b1f3d1d401b77925b53123856ababfc4d2d407656c10601d" },
|
|
43363
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 985057, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
43364
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1075981, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
43365
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1166965, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
43366
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1257945, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
43367
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1348817, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
43368
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1439797, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
43369
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1548433, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
43370
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1657517, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
43371
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1766565, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
43372
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1874265, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
43373
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 1962373, length: 4448, sha256: "03bf2b6c0fec31fec522df8100cdc53a195a5fe4b792d9dc2888476cb5226624" },
|
|
43374
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1966821, length: 13784, sha256: "cfb9465254fab84f0e084bb4542c282758ea29774b5f172840cc0b9e4194ef89" }
|
|
43375
43375
|
];
|
|
43376
43376
|
}
|
|
43377
43377
|
});
|
|
Binary file
|
package/guides/headless-loop.md
CHANGED
|
@@ -252,10 +252,18 @@ The push JSON includes:
|
|
|
252
252
|
- `next` — suggested `himi context` / `himi screens` follow-ups
|
|
253
253
|
|
|
254
254
|
The browser-preview token embedded in `previewWeb` is scoped to this app + draft release and
|
|
255
|
-
expires after **
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
255
|
+
expires after **45 minutes**. The JSON also includes `previewTokenExpiresAt` — read that rather
|
|
256
|
+
than this number when you are talking to a plane you did not start. If review takes longer, run
|
|
257
|
+
`himi preview --app my-app --release <id> --target wix`: it renews the browser token without
|
|
258
|
+
promoting the draft. For header-only function calls against the same draft, pass the separately
|
|
259
|
+
issued short-lived function token as `--preview-token <token>`.
|
|
260
|
+
|
|
261
|
+
**When you hand `previewWeb` to a person, the expiry is theirs, not yours.** Renewing it needs
|
|
262
|
+
this CLI and your credentials, so a link handed over near the end of a session leaves the
|
|
263
|
+
recipient with a deadline and no way to extend it. Re-mint immediately before handing it over
|
|
264
|
+
rather than passing on a link minted earlier, and say the expiry in their timezone. If they sign
|
|
265
|
+
in to the Wix account that owns the app, its own owner page previews it for them
|
|
266
|
+
without this CLI and without you — that, not the link, is the durable way back in.
|
|
259
267
|
|
|
260
268
|
## 5b. Agent preview (machine-readable, no browser scrape)
|
|
261
269
|
|
|
@@ -2410,7 +2410,7 @@
|
|
|
2410
2410
|
"name": "ScheduleLocalOptions",
|
|
2411
2411
|
"kind": "interface",
|
|
2412
2412
|
"jsdoc": "",
|
|
2413
|
-
"decl": "export interface ScheduleLocalOptions {\n /** Stable identifier. Reusing an id replaces the pending notification. Omit ⇒\n * the platform generates a UUID and returns it. */\n id?: string;\n title: string;\n body: string;\n /** Fire this many seconds from now (min 1). Mutually exclusive with `at`;\n * if both are set `at` wins. */\n afterSeconds?: number;\n /** Absolute fire time, epoch milliseconds. Mutually exclusive with `afterSeconds`. */\n at?: number;\n /** Repeat at the `afterSeconds` interval (iOS requires interval ≥ 60 to repeat). */\n repeats?: boolean;\n /** Deeplink routed on tap — same resolver as a remote push `link`\n * (`<scheme>://screen/<id>` or a curated pattern). Omit ⇒ just opens the app. */\n link?: string;\n /** Actionable category id (must match a `PushConfig.categories[].id`). */\n category?: string;\n /** App-icon badge number to set when this notification is delivered. */\n badge?: number;\n /** Rich media: an image URL. iOS attaches it (UNNotificationAttachment),\n * Android renders it as a BigPicture. Omit for a plain text notification. */\n image?: string;\n}"
|
|
2413
|
+
"decl": "export interface ScheduleLocalOptions {\n /** Stable identifier. Reusing an id replaces the pending notification. Omit ⇒\n * the platform generates a UUID and returns it. */\n id?: string;\n title: string;\n body: string;\n /** Fire this many seconds from now (min 1). Mutually exclusive with `at`;\n * if both are set `at` wins. */\n afterSeconds?: number;\n /** Absolute fire time, epoch milliseconds. Mutually exclusive with `afterSeconds`. */\n at?: number;\n /** Repeat at the `afterSeconds` interval (iOS requires interval ≥ 60 to repeat). */\n repeats?: boolean;\n /** Deeplink routed on tap — same resolver as a remote push `link`\n * (`<scheme>://screen/<id>` or a curated pattern). Omit ⇒ just opens the app. */\n link?: string;\n /** Actionable category id (must match a `PushConfig.categories[].id`). */\n category?: string;\n /** App-icon badge number to set when this notification is delivered. `0` clears\n * it; omit to leave the current badge alone. Honored on iOS (`aps.badge`) and\n * Android (the shared badge slot, see `setBadge`). Web cannot badge from a\n * notification — call `setBadge` directly there. */\n badge?: number;\n /** Rich media: an image URL. iOS attaches it (UNNotificationAttachment),\n * Android renders it as a BigPicture. Omit for a plain text notification. */\n image?: string;\n}"
|
|
2414
2414
|
},
|
|
2415
2415
|
{
|
|
2416
2416
|
"name": "DeliveredNotification",
|
|
@@ -2451,15 +2451,21 @@
|
|
|
2451
2451
|
{
|
|
2452
2452
|
"name": "setBadge",
|
|
2453
2453
|
"kind": "function",
|
|
2454
|
-
"jsdoc": "
|
|
2454
|
+
"jsdoc": "/**\n * Set the app-icon badge count (\"the pimple\"). `0` clears it; negatives and\n * fractions are clamped/truncated. The badge persists until you change it — it is\n * not tied to any notification, and nothing decrements it for you.\n *\n * How each surface draws it, because the differences are visible to users:\n * - **iOS / macOS** — `UNUserNotificationCenter.setBadgeCount`. Needs the `.badge`\n * notification authorization, so call `requestPermission()` first or the number\n * is stored and never shown.\n * - **Android** — stock Android has no set-count API and a third-party badger\n * dependency is disallowed, so the count rides on ONE silent, low-importance\n * notification in a dedicated `himalaya.badge` channel. Consequences worth\n * designing around: it is **visible in the notification shade**, the user can\n * turn that channel off, launchers that only do dots show a dot rather than the\n * number, and without the API 33+ `POST_NOTIFICATIONS` grant it is a silent no-op.\n * - **Web** — `navigator.setAppBadge`, which needs an installed PWA and notification\n * permission; unsupported browsers no-op.\n *\n * Best-effort everywhere: this never throws when the platform refuses.\n */",
|
|
2455
2455
|
"decl": "export async function setBadge(count: number): Promise<void>;"
|
|
2456
2456
|
},
|
|
2457
2457
|
{
|
|
2458
2458
|
"name": "clearBadge",
|
|
2459
2459
|
"kind": "function",
|
|
2460
|
-
"jsdoc": "/** Clear the app-icon badge
|
|
2460
|
+
"jsdoc": "/** Clear the app-icon badge — exactly `setBadge(0)`. On Android this cancels the\n * badge-carrier notification, so it also disappears from the shade. */",
|
|
2461
2461
|
"decl": "export async function clearBadge(): Promise<void>;"
|
|
2462
2462
|
},
|
|
2463
|
+
{
|
|
2464
|
+
"name": "getBadge",
|
|
2465
|
+
"kind": "function",
|
|
2466
|
+
"jsdoc": "/**\n * Read the current app-icon badge count.\n *\n * What \"current\" means differs by surface, and the difference is worth knowing\n * before you build an increment on top of it:\n * - **iOS** — the real OS value, so it survives a cold start and reflects a badge a\n * remote push set. (Read through `applicationIconBadgeNumber`: notifications has a\n * `setBadgeCount` setter but no matching reader, so write and read are asymmetric.)\n * - **macOS / Android / web** — the last value THIS PROCESS set. None of the three\n * can read the badge back (macOS exposes only a display string, Android derives\n * the badge from a notification, the web Badging API is write-only), so a cold\n * start reports `0` even when the icon still shows a number.\n *\n * Because of that, prefer deriving the badge from your own state and calling\n * `setBadge(total)` over a read-modify-write of this value.\n */",
|
|
2467
|
+
"decl": "export async function getBadge(): Promise<number>;"
|
|
2468
|
+
},
|
|
2463
2469
|
{
|
|
2464
2470
|
"name": "getDeviceToken",
|
|
2465
2471
|
"kind": "function",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.958.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": [
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"artifactId": "himalaya-cli"
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
"falconPackageHash": "
|
|
67
|
+
"falconPackageHash": "d7801908694db877e53dbcdb28836a858399f835aec0a43b73c80bec"
|
|
68
68
|
}
|