@wix/himalaya-cli 0.1349.0 → 0.1350.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +14 -4
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -136074,17 +136074,26 @@ async function bakeCatalogs(app, locale, fetchCatalog, putDoc) {
136074
136074
  const out2 = {};
136075
136075
  if (!putDoc) return out2;
136076
136076
  const declared = locale?.translations ?? [];
136077
- if (!declared.length) return out2;
136078
- const tags = [.../* @__PURE__ */ new Set([...locale?.default ? [locale.default] : [], ...declared])];
136077
+ const source = locale?.default ?? "en";
136078
+ const tags = [.../* @__PURE__ */ new Set([source, ...declared])];
136079
136079
  for (const tag of tags) {
136080
136080
  const text9 = await fetchCatalog(tag);
136081
136081
  if (!text9) continue;
136082
+ if (!declared.length && !servesMessages(text9)) continue;
136082
136083
  const hash2 = sha2564(text9);
136083
136084
  await putDoc(app, hash2, text9);
136084
136085
  out2[tag] = hash2;
136085
136086
  }
136086
136087
  return out2;
136087
136088
  }
136089
+ function servesMessages(text9) {
136090
+ try {
136091
+ const m2 = JSON.parse(text9).messages;
136092
+ return !!m2 && typeof m2 === "object" && Object.keys(m2).length > 0;
136093
+ } catch {
136094
+ return false;
136095
+ }
136096
+ }
136088
136097
  function sha2564(buf) {
136089
136098
  return createHash24("sha256").update(buf).digest("hex");
136090
136099
  }
@@ -137131,8 +137140,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
137131
137140
  bundles,
137132
137141
  tokensHash,
137133
137142
  appConfigHash,
137134
- // Omitted entirely when the app declares no translations, so a release built for a
137135
- // single-locale app is byte-identical to one built before WS2 existed.
137143
+ // Omitted entirely when nothing was baked: an app with no translations AND no keyed
137144
+ // source copy stays byte-identical to one built before WS2 existed. A single-locale app
137145
+ // whose source catalog serves copy (native screens, #4221/#4250) now carries `en` here.
137136
137146
  ...Object.keys(catalogs).length ? { catalogs } : {},
137137
137147
  playerRequirements: {
137138
137148
  capabilities: [...requiredCapabilities].sort(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1349.0",
3
+ "version": "0.1350.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "9279a00f8a3383291b5d42997cd4086dac34b4ccf1c4b62d3869dd44"
74
+ "falconPackageHash": "d981bf37f0b886e4b2348f867e3514fb1f389475d9dfcd3857e8f87c"
75
75
  }