@wix/himalaya-cli 0.920.0 → 0.921.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 (!hasIntl()) return 0;
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;
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 (!hasIntl()) return instant.toISOString().slice(0, 10);
48
- const parts = new Intl.DateTimeFormat("en-CA", {
49
- timeZone: ianaZone,
50
- year: "numeric",
51
- month: "2-digit",
52
- day: "2-digit"
53
- }).formatToParts(instant);
54
- const get = (t) => parts.find((p) => p.type === t)?.value ?? "";
55
- return `${get("year")}-${get("month")}-${get("day")}`;
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/dist/cli.mjs CHANGED
@@ -5241,6 +5241,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
5241
5241
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
5242
5242
  var init_bindings = __esm({
5243
5243
  "../../core/ts/src/bindings.ts"() {
5244
+ "use strict";
5244
5245
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5245
5246
  BINDING_SIGIL_RE = new RegExp(
5246
5247
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.920.0",
3
+ "version": "0.921.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": "02701ed28e86199561ae6efc9801bef1522514c433bfa097de2ddf1b"
67
+ "falconPackageHash": "8ff5527fdb266357a96ed5695f24660f584de2630e7584ff2d7a3e70"
68
68
  }