@wix/himalaya-cli 0.920.0 → 0.922.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.
|
@@ -13,20 +13,22 @@ function effectiveZone(ianaZone) {
|
|
|
13
13
|
return hasIntl() ? ianaZone : "UTC";
|
|
14
14
|
}
|
|
15
15
|
function offsetMinutes(utcDate, zone) {
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
if (hasIntl()) {
|
|
17
|
+
const parts = new Intl.DateTimeFormat("en-US", {
|
|
18
|
+
timeZone: zone,
|
|
19
|
+
hour12: false,
|
|
20
|
+
year: "numeric",
|
|
21
|
+
month: "2-digit",
|
|
22
|
+
day: "2-digit",
|
|
23
|
+
hour: "2-digit",
|
|
24
|
+
minute: "2-digit",
|
|
25
|
+
second: "2-digit"
|
|
26
|
+
}).formatToParts(utcDate);
|
|
27
|
+
const get = (t) => Number(parts.find((p) => p.type === t)?.value);
|
|
28
|
+
const asUTC = Date.UTC(get("year"), get("month") - 1, get("day"), get("hour") % 24, get("minute"), get("second"));
|
|
29
|
+
return (asUTC - utcDate.getTime()) / 6e4;
|
|
30
|
+
}
|
|
31
|
+
return 0;
|
|
30
32
|
}
|
|
31
33
|
function localMidnightUtc(localDate, ianaZone) {
|
|
32
34
|
const m = YMD.exec(localDate);
|
|
@@ -44,15 +46,17 @@ function localMidnightUtc(localDate, ianaZone) {
|
|
|
44
46
|
return new Date(ms).toISOString();
|
|
45
47
|
}
|
|
46
48
|
function localDateOf(instant, ianaZone) {
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
if (hasIntl()) {
|
|
50
|
+
const parts = new Intl.DateTimeFormat("en-CA", {
|
|
51
|
+
timeZone: ianaZone,
|
|
52
|
+
year: "numeric",
|
|
53
|
+
month: "2-digit",
|
|
54
|
+
day: "2-digit"
|
|
55
|
+
}).formatToParts(instant);
|
|
56
|
+
const get = (t) => parts.find((p) => p.type === t)?.value ?? "";
|
|
57
|
+
return `${get("year")}-${get("month")}-${get("day")}`;
|
|
58
|
+
}
|
|
59
|
+
return instant.toISOString().slice(0, 10);
|
|
56
60
|
}
|
|
57
61
|
function intervalForDays(days, ianaZone, today = /* @__PURE__ */ new Date()) {
|
|
58
62
|
if (!Number.isInteger(days) || days <= 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.922.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": "15e0a60d0b98015276fd26077eda66f581bb8561129d8e787f49fcb8"
|
|
68
68
|
}
|