@wix/himalaya-cli 0.1821.0 → 0.1822.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/time/src/index.d.ts +22 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/display.d.ts +20 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +10 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/time.mjs +56 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +85 -33
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +14 -4
- package/dist/cli.mjs +61 -46
- package/guides/sdk-reference.json +52 -10
- package/guides/testing-himi-apps.md +8 -0
- package/package.json +2 -2
|
@@ -6426,11 +6426,18 @@
|
|
|
6426
6426
|
"decl": "export function isSameDay(a: DateLike, b: DateLike): boolean;",
|
|
6427
6427
|
"verificationChecked": true
|
|
6428
6428
|
},
|
|
6429
|
+
{
|
|
6430
|
+
"name": "TimeLabels",
|
|
6431
|
+
"kind": "interface",
|
|
6432
|
+
"jsdoc": "/** Words this module writes itself. Each is optional; an override wins over the engine's own. */",
|
|
6433
|
+
"decl": "export interface TimeLabels {\n /** Heading for undated items in {@link groupByDay} (`dropUndated: false`). Default \"Later\". */\n later?: string;\n /** Minutes unit in {@link durationLabel}. Default \"min\" (English) or `Intl` unit style. */\n minutes?: string;\n /** Hours unit in {@link durationLabel}. Default \"h\" (English) or `Intl` unit style. */\n hours?: string;\n}",
|
|
6434
|
+
"verificationChecked": true
|
|
6435
|
+
},
|
|
6429
6436
|
{
|
|
6430
6437
|
"name": "LabelOptions",
|
|
6431
6438
|
"kind": "interface",
|
|
6432
6439
|
"jsdoc": "",
|
|
6433
|
-
"decl": "export interface LabelOptions {\n /** BCP-47 locale. Defaults to the host's. */\n locale?: string;\n /** Anchor for the relative \"Today\"/\"Tomorrow\" window. Defaults to now. */\n now?: DateLike;\n /** Suppress the relative window and always format the date. */\n absolute?: boolean;\n /**\n * Override the relative day words. Supply these when the app already owns a\n * copy pack (e.g. the branded-lite `copyParam` packs) and must not have a\n * second, engine-derived translation of the same three strings.\n */\n relativeLabels?: { today?: string; tomorrow?: string; yesterday?: string };\n /**\n * How much of the date to spell out once the relative window is exhausted.\n *\n * `\"full\"` (default) is the agenda-heading form — \"Tue, Jun 9\". A heading owns\n * its own line, so naming the month is free and removes the ambiguity of a\n * bare weekday in a list that spans months.\n *\n * `\"compact\"` is the day-PILL form — \"Tue 9\". A horizontal strip pays for\n * every character: across a 14-day window the full form is ~84% more text,\n * which widens each chip and pushes days off-screen. Ambiguity is acceptable\n * there because a strip is a contiguous short window, not a scrolling agenda.\n */\n format?: \"full\" | \"compact\";\n}",
|
|
6440
|
+
"decl": "export interface LabelOptions {\n /** BCP-47 locale. Defaults to the app's `@himalaya/l10n` locale, else the host's. */\n locale?: string;\n /** Override the words this module writes (\"Later\", \"min\", \"h\"). */\n labels?: TimeLabels;\n /** Anchor for the relative \"Today\"/\"Tomorrow\" window. Defaults to now. */\n now?: DateLike;\n /** Suppress the relative window and always format the date. */\n absolute?: boolean;\n /**\n * Override the relative day words. Supply these when the app already owns a\n * copy pack (e.g. the branded-lite `copyParam` packs) and must not have a\n * second, engine-derived translation of the same three strings.\n */\n relativeLabels?: { today?: string; tomorrow?: string; yesterday?: string };\n /**\n * How much of the date to spell out once the relative window is exhausted.\n *\n * `\"full\"` (default) is the agenda-heading form — \"Tue, Jun 9\". A heading owns\n * its own line, so naming the month is free and removes the ambiguity of a\n * bare weekday in a list that spans months.\n *\n * `\"compact\"` is the day-PILL form — \"Tue 9\". A horizontal strip pays for\n * every character: across a 14-day window the full form is ~84% more text,\n * which widens each chip and pushes days off-screen. Ambiguity is acceptable\n * there because a strip is a contiguous short window, not a scrolling agenda.\n */\n format?: \"full\" | \"compact\";\n}",
|
|
6434
6441
|
"verificationChecked": true
|
|
6435
6442
|
},
|
|
6436
6443
|
{
|
|
@@ -6457,15 +6464,15 @@
|
|
|
6457
6464
|
{
|
|
6458
6465
|
"name": "timeRange",
|
|
6459
6466
|
"kind": "function",
|
|
6460
|
-
"jsdoc": "/**\n * \"09:00 – 09:45\", collapsing to just the start when there is no end (or the\n * end is not after the start). The separator is a space-padded en dash (U+2013),\n * matching how the booking screens already render ranges.\n */",
|
|
6461
|
-
"decl": "export function timeRange(start: DateLike, end: DateLike): string;",
|
|
6467
|
+
"jsdoc": "/**\n * \"09:00 – 09:45\", collapsing to just the start when there is no end (or the\n * end is not after the start). The separator is a space-padded en dash (U+2013),\n * matching how the booking screens already render ranges.\n *\n * Follows the locale's hour cycle: an English (or unknown) locale keeps the 24-hour\n * \"09:00\" this helper has always written, any other locale writes its own clock\n * (\"9:00 AM\" where it is 12-hour, \"09:00\" where it is 24-hour).\n */",
|
|
6468
|
+
"decl": "export function timeRange(start: DateLike, end: DateLike, opts: { locale?: string } = {}): string;",
|
|
6462
6469
|
"verificationChecked": true
|
|
6463
6470
|
},
|
|
6464
6471
|
{
|
|
6465
6472
|
"name": "durationLabel",
|
|
6466
6473
|
"kind": "function",
|
|
6467
|
-
"jsdoc": "/** \"45 min\" / \"1 h\" / \"1 h 30 min\". Empty when the span is absent or non-positive. */",
|
|
6468
|
-
"decl": "export function durationLabel(start: DateLike, end: DateLike): string;",
|
|
6474
|
+
"jsdoc": "/** \"45 min\" / \"1 h\" / \"1 h 30 min\". Empty when the span is absent or non-positive. Under a\n * non-English locale the units come from `Intl.NumberFormat` (unit style) when available. */",
|
|
6475
|
+
"decl": "export function durationLabel(start: DateLike, end: DateLike, opts: LabelOptions = {}): string;",
|
|
6469
6476
|
"verificationChecked": true
|
|
6470
6477
|
},
|
|
6471
6478
|
{
|
|
@@ -22981,6 +22988,27 @@
|
|
|
22981
22988
|
"decl": "export interface EventRow {\n id: string;\n title: string;\n day: string;\n month: string;\n dateLine: string;\n /** \"Past\" once the event has finished, else \"\". */\n statusLabel: string;\n /** Has the event finished? The SAME `eventIsPast` answer `statusLabel` reads — one call,\n * both fields — so a card can never say \"Past\" and still offer Register. */\n isPast: boolean;\n location: string;\n status: string;\n image: string;\n hasImage: boolean;\n noImage: boolean;\n detailScreenId: string;\n}",
|
|
22982
22989
|
"verificationChecked": true
|
|
22983
22990
|
},
|
|
22991
|
+
{
|
|
22992
|
+
"name": "EventLabels",
|
|
22993
|
+
"kind": "interface",
|
|
22994
|
+
"jsdoc": "/** The display copy a card shows. Keys are the runtime copy-catalog keys (`$t:` / `@himalaya/l10n`). */",
|
|
22995
|
+
"decl": "export interface EventLabels {\n \"events.past\": string;\n \"events.dateTba\": string;\n \"events.locationTba\": string;\n \"events.untitled\": string;\n}",
|
|
22996
|
+
"verificationChecked": true
|
|
22997
|
+
},
|
|
22998
|
+
{
|
|
22999
|
+
"name": "EVENT_LABEL_DEFAULTS",
|
|
23000
|
+
"kind": "const",
|
|
23001
|
+
"jsdoc": "/** Generated English defaults — the last stop before the key itself. */",
|
|
23002
|
+
"decl": "export const EVENT_LABEL_DEFAULTS: Readonly<EventLabels> = {\n \"events.past\": \"Past\",\n \"events.dateTba\": \"Date to be announced\",\n \"events.locationTba\": \"Location to be announced\",\n \"events.untitled\": \"Event\",\n};",
|
|
23003
|
+
"verificationChecked": true
|
|
23004
|
+
},
|
|
23005
|
+
{
|
|
23006
|
+
"name": "EventDisplayOptions",
|
|
23007
|
+
"kind": "interface",
|
|
23008
|
+
"jsdoc": "",
|
|
23009
|
+
"decl": "export interface EventDisplayOptions {\n /** BCP-47 tag. Defaults to the app's `@himalaya/l10n` `locale()`, else \"en\". */\n locale?: string;\n /** Per-key copy overrides; beat the served catalog and the English default. */\n labels?: Partial<EventLabels>;\n}",
|
|
23010
|
+
"verificationChecked": true
|
|
23011
|
+
},
|
|
22984
23012
|
{
|
|
22985
23013
|
"name": "titleCase",
|
|
22986
23014
|
"kind": "function",
|
|
@@ -23013,7 +23041,7 @@
|
|
|
23013
23041
|
"name": "eventLocation",
|
|
23014
23042
|
"kind": "function",
|
|
23015
23043
|
"jsdoc": "",
|
|
23016
|
-
"decl": "export function eventLocation(e: WixEvent): string;",
|
|
23044
|
+
"decl": "export function eventLocation(e: WixEvent, options?: EventDisplayOptions): string;",
|
|
23017
23045
|
"verificationChecked": true
|
|
23018
23046
|
},
|
|
23019
23047
|
{
|
|
@@ -23047,8 +23075,8 @@
|
|
|
23047
23075
|
{
|
|
23048
23076
|
"name": "eventWhen",
|
|
23049
23077
|
"kind": "function",
|
|
23050
|
-
"jsdoc": "/** The event's date line. The year is written only when it is not the current year, so a\n * past-year event can no longer pass for an upcoming one (\"Sat, Jul 18\"). `now` is injectable\n * for tests; it defaults to the wall clock. */",
|
|
23051
|
-
"decl": "export function eventWhen(e: WixEvent, now: number = Date.now()): string;",
|
|
23078
|
+
"jsdoc": "/** The event's date line. The year is written only when it is not the current year, so a\n * past-year event can no longer pass for an upcoming one (\"Sat, Jul 18\"). `now` is injectable\n * for tests; it defaults to the wall clock. Under a non-English locale with ECMA-402 the date and\n * time come from one locale-ordered formatter, so the English \" at \" never leaks in. */",
|
|
23079
|
+
"decl": "export function eventWhen(e: WixEvent, now: number = Date.now(), options?: EventDisplayOptions): string;",
|
|
23052
23080
|
"verificationChecked": true
|
|
23053
23081
|
},
|
|
23054
23082
|
{
|
|
@@ -23069,7 +23097,7 @@
|
|
|
23069
23097
|
"name": "normalizeEventAt",
|
|
23070
23098
|
"kind": "function",
|
|
23071
23099
|
"jsdoc": "/** {@link normalizeEvent} against an explicit clock (epoch ms): `now` decides whether the date\n * line carries the year and whether `statusLabel` reads \"Past\". Pure — no API call, any scope. */",
|
|
23072
|
-
"decl": "export function normalizeEventAt(e: WixEvent, now: number): EventRow;",
|
|
23100
|
+
"decl": "export function normalizeEventAt(e: WixEvent, now: number, options?: EventDisplayOptions): EventRow;",
|
|
23073
23101
|
"verificationChecked": true
|
|
23074
23102
|
},
|
|
23075
23103
|
{
|
|
@@ -31812,7 +31840,7 @@
|
|
|
31812
31840
|
"name": "productPrice",
|
|
31813
31841
|
"kind": "function",
|
|
31814
31842
|
"jsdoc": "",
|
|
31815
|
-
"decl": "export function productPrice(p: StoreProduct): string;",
|
|
31843
|
+
"decl": "export function productPrice(p: StoreProduct, options?: StoreDisplayOptions): string;",
|
|
31816
31844
|
"verificationChecked": true
|
|
31817
31845
|
},
|
|
31818
31846
|
{
|
|
@@ -32153,6 +32181,20 @@
|
|
|
32153
32181
|
"decl": "export function productGallery(p: StoreProduct, size: WixImageSize | null = WIX_LIST_IMAGE): string[];",
|
|
32154
32182
|
"verificationChecked": true
|
|
32155
32183
|
},
|
|
32184
|
+
{
|
|
32185
|
+
"name": "StoreDisplayOptions",
|
|
32186
|
+
"kind": "interface",
|
|
32187
|
+
"jsdoc": "/** Display options for the price helpers. Prices carry no copy, so there are no labels to override. */",
|
|
32188
|
+
"decl": "export interface StoreDisplayOptions {\n /** BCP-47 tag; callers pass their app locale. Defaults to \"en\". */\n locale?: string;\n}",
|
|
32189
|
+
"verificationChecked": true
|
|
32190
|
+
},
|
|
32191
|
+
{
|
|
32192
|
+
"name": "formatMoney",
|
|
32193
|
+
"kind": "function",
|
|
32194
|
+
"jsdoc": "/** Format a raw amount with a currency when one is known. Prefers a real symbol via\n * Intl; falls back to the bare amount when the catalog exposes no currency (e.g. a\n * visitor querying a store that only returns `amount`). */",
|
|
32195
|
+
"decl": "export function formatMoney(amount: string | number, currency: string, options?: StoreDisplayOptions): string;",
|
|
32196
|
+
"verificationChecked": true
|
|
32197
|
+
},
|
|
32156
32198
|
{
|
|
32157
32199
|
"name": "normalizeFormattedPrice",
|
|
32158
32200
|
"kind": "function",
|
|
@@ -457,6 +457,14 @@ The way in is to hand the app a session it already trusts.
|
|
|
457
457
|
| its CSRF partner | `injected-cookie-XSRF-TOKEN-<VALUE>` | `--es himalaya.xsrf <VALUE>` |
|
|
458
458
|
| full cookie jar | `injected-wix-cookies-<base64 JSON {name:value}>` **— `wix-native` (owner) only** | `--es himalaya.wixCookieJar <base64 …>` |
|
|
459
459
|
|
|
460
|
+
A jar never installs a plain `wixAT` / `wixRT`: those are manage.wix.com's host-only tokens and never
|
|
461
|
+
leave it. A host that needs its **own** host-only refresh token takes it under a host-qualified key,
|
|
462
|
+
`wixRT@<host>`, which iOS installs on that host alone and `authorize` sends back to that host only.
|
|
463
|
+
Today that is `wixRT@apps.wix.com`: the Nano services on apps.wix.com refuse `wixSession2` without it
|
|
464
|
+
(a `500 PERMISSION_DENIED: User is not authenticated`, or an empty 403). Copy it from the browser's
|
|
465
|
+
`wixRT` cookie whose domain is exactly `apps.wix.com`. **iOS only:** Android does not read the key yet,
|
|
466
|
+
so leave it out of an Android jar.
|
|
467
|
+
|
|
460
468
|
Read by [`WixSessionInjection`](../core/runtime/ios/HimalayaCore/Sources/HimalayaCore/WixSessionInjection.swift)
|
|
461
469
|
/ [`.kt`](../stdlib/auth-providers/wix/android/himalaya-wix-auth/src/main/kotlin/io/himalaya/wixauth/WixSessionInjection.kt),
|
|
462
470
|
consumed by `WixOwnerAuthProvider.bootstrap()` and by `WixNativeAuthProvider` (owner mode).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1822.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": "
|
|
85
|
+
"falconPackageHash": "ec29f5a7951fd790d37a80c37bdf58d5b21e6e1211b2959909948862"
|
|
86
86
|
}
|