@wix/himalaya-cli 0.1348.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.
- package/dist/cli.mjs +14 -5
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -7706,7 +7706,6 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
|
|
|
7706
7706
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
7707
7707
|
var init_bindings = __esm({
|
|
7708
7708
|
"../../core/ts/src/bindings.ts"() {
|
|
7709
|
-
"use strict";
|
|
7710
7709
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
7711
7710
|
BINDING_SIGIL_RE = new RegExp(
|
|
7712
7711
|
`^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -136075,17 +136074,26 @@ async function bakeCatalogs(app, locale, fetchCatalog, putDoc) {
|
|
|
136075
136074
|
const out2 = {};
|
|
136076
136075
|
if (!putDoc) return out2;
|
|
136077
136076
|
const declared = locale?.translations ?? [];
|
|
136078
|
-
|
|
136079
|
-
const tags = [.../* @__PURE__ */ new Set([
|
|
136077
|
+
const source = locale?.default ?? "en";
|
|
136078
|
+
const tags = [.../* @__PURE__ */ new Set([source, ...declared])];
|
|
136080
136079
|
for (const tag of tags) {
|
|
136081
136080
|
const text9 = await fetchCatalog(tag);
|
|
136082
136081
|
if (!text9) continue;
|
|
136082
|
+
if (!declared.length && !servesMessages(text9)) continue;
|
|
136083
136083
|
const hash2 = sha2564(text9);
|
|
136084
136084
|
await putDoc(app, hash2, text9);
|
|
136085
136085
|
out2[tag] = hash2;
|
|
136086
136086
|
}
|
|
136087
136087
|
return out2;
|
|
136088
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
|
+
}
|
|
136089
136097
|
function sha2564(buf) {
|
|
136090
136098
|
return createHash24("sha256").update(buf).digest("hex");
|
|
136091
136099
|
}
|
|
@@ -137132,8 +137140,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
137132
137140
|
bundles,
|
|
137133
137141
|
tokensHash,
|
|
137134
137142
|
appConfigHash,
|
|
137135
|
-
// Omitted entirely when
|
|
137136
|
-
//
|
|
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.
|
|
137137
137146
|
...Object.keys(catalogs).length ? { catalogs } : {},
|
|
137138
137147
|
playerRequirements: {
|
|
137139
137148
|
capabilities: [...requiredCapabilities].sort(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "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": "
|
|
74
|
+
"falconPackageHash": "d981bf37f0b886e4b2348f867e3514fb1f389475d9dfcd3857e8f87c"
|
|
75
75
|
}
|