@wix/himalaya-cli 0.824.0 → 0.826.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 +69 -3
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -33841,6 +33841,17 @@ function buildRenderTree(node, path = "$", provider = null, itemScope = void 0,
|
|
|
33841
33841
|
if (r !== void 0 && r !== null) values[key2] = typeof r === "object" ? JSON.stringify(r) : String(r);
|
|
33842
33842
|
}
|
|
33843
33843
|
}
|
|
33844
|
+
const valuePath = props.valuePath;
|
|
33845
|
+
const asText3 = VALUE_PATH_TEXT.get(type);
|
|
33846
|
+
if (typeof valuePath === "string" && asText3 && (valuePath.startsWith("$service:") || /^\$item\.[^.]/.test(valuePath))) {
|
|
33847
|
+
const r = resolveTreeScalar(valuePath, provider, itemScope);
|
|
33848
|
+
const text2 = asText3(r, props);
|
|
33849
|
+
if (text2 !== void 0) values.value = text2;
|
|
33850
|
+
else if (r !== void 0 && r !== null) {
|
|
33851
|
+
delete values.value;
|
|
33852
|
+
}
|
|
33853
|
+
}
|
|
33854
|
+
if (type === "OtpInput" && props.secure === true) delete values.value;
|
|
33844
33855
|
collectComponentMediaValues(type, props, { provider, itemScope, values, insideMediaProperty: false });
|
|
33845
33856
|
collectResolvedMediaValues(modifiers, "modifiers", {
|
|
33846
33857
|
provider,
|
|
@@ -34048,13 +34059,27 @@ async function renderPngBatch(items) {
|
|
|
34048
34059
|
});
|
|
34049
34060
|
}
|
|
34050
34061
|
}
|
|
34051
|
-
var TREE_TEXT_VALUE_PROPS, MEDIA_PLAYER_QUEUE_PROPERTIES, NATIVE_ONLY_TYPES;
|
|
34062
|
+
var TREE_TEXT_VALUE_PROPS, asStringOrNumber, asStringOnly, asOtpCode, VALUE_PATH_TEXT, MEDIA_PLAYER_QUEUE_PROPERTIES, NATIVE_ONLY_TYPES;
|
|
34052
34063
|
var init_render_descriptor = __esm({
|
|
34053
34064
|
"../../core/dev-server/src/render-descriptor.ts"() {
|
|
34054
34065
|
init_FakeServiceProvider();
|
|
34055
34066
|
init_env();
|
|
34056
34067
|
init_media_value();
|
|
34057
34068
|
TREE_TEXT_VALUE_PROPS = /* @__PURE__ */ new Set(["text", "title", "label", "value", "placeholder", "message"]);
|
|
34069
|
+
asStringOrNumber = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : void 0;
|
|
34070
|
+
asStringOnly = (v) => typeof v === "string" ? v : void 0;
|
|
34071
|
+
asOtpCode = (v, props) => {
|
|
34072
|
+
const whole = asStringOrNumber(v, props);
|
|
34073
|
+
if (whole === void 0) return void 0;
|
|
34074
|
+
const len = typeof props.length === "number" ? props.length : 6;
|
|
34075
|
+
return whole.slice(0, Math.max(0, len));
|
|
34076
|
+
};
|
|
34077
|
+
VALUE_PATH_TEXT = /* @__PURE__ */ new Map([
|
|
34078
|
+
["TextField", asStringOrNumber],
|
|
34079
|
+
["RichTextField", asStringOrNumber],
|
|
34080
|
+
["OtpInput", asOtpCode],
|
|
34081
|
+
["ColorPicker", asStringOnly]
|
|
34082
|
+
]);
|
|
34058
34083
|
MEDIA_PLAYER_QUEUE_PROPERTIES = /* @__PURE__ */ new Set(["items", "itemsPath", "items_path"]);
|
|
34059
34084
|
NATIVE_ONLY_TYPES = /* @__PURE__ */ new Set(["Map", "Video", "Lottie", "Rive", "WebView"]);
|
|
34060
34085
|
}
|
|
@@ -59785,7 +59810,7 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
59785
59810
|
return 1;
|
|
59786
59811
|
}
|
|
59787
59812
|
payload.source = { files, meta };
|
|
59788
|
-
const { collectAppSource: collectAppSource2, secretFindings: secretFindings2, zipAppSource: zipAppSource2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
|
|
59813
|
+
const { collectAppSource: collectAppSource2, secretFindings: secretFindings2, zipAppSource: zipAppSource2, MAX_APP_SOURCE_BYTES: MAX_APP_SOURCE_BYTES2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
|
|
59789
59814
|
const templateArchive = collectAppSource2(sourceDir);
|
|
59790
59815
|
const templateSecrets = secretFindings2(templateArchive.entries);
|
|
59791
59816
|
if (templateSecrets.length > 0) {
|
|
@@ -59796,7 +59821,27 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
59796
59821
|
}));
|
|
59797
59822
|
return 1;
|
|
59798
59823
|
}
|
|
59799
|
-
|
|
59824
|
+
const templateZip = zipAppSource2(templateArchive.entries);
|
|
59825
|
+
const templateSourceB64 = templateZip.toString("base64");
|
|
59826
|
+
if (templateSourceB64.length > MAX_APP_SOURCE_BYTES2) {
|
|
59827
|
+
io.error(JSON.stringify({
|
|
59828
|
+
ok: false,
|
|
59829
|
+
template: name,
|
|
59830
|
+
app: templateAppId,
|
|
59831
|
+
published: false,
|
|
59832
|
+
error: "app_source_too_large",
|
|
59833
|
+
archivedBytes: templateZip.length,
|
|
59834
|
+
encodedBytes: templateSourceB64.length,
|
|
59835
|
+
limit: MAX_APP_SOURCE_BYTES2,
|
|
59836
|
+
files: templateArchive.entries.length,
|
|
59837
|
+
// No `--no-source` here, deliberately: a template's archive is not optional the way
|
|
59838
|
+
// a push's is. `himi pull` restores templates through it, so a flag that dropped it
|
|
59839
|
+
// would publish a template nobody can restore — the failure #2423 exists to prevent.
|
|
59840
|
+
hint: "trim the template's source tree (build output and dependencies are already excluded) \u2014 a template's archive is not optional, so there is no flag that publishes without it"
|
|
59841
|
+
}));
|
|
59842
|
+
return 1;
|
|
59843
|
+
}
|
|
59844
|
+
payload.appSource = templateSourceB64;
|
|
59800
59845
|
const tplVis = visibilityFlag(flags, io);
|
|
59801
59846
|
if (!tplVis) return 2;
|
|
59802
59847
|
const publishMeta = {
|
|
@@ -59804,6 +59849,27 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
59804
59849
|
...str5(flags.notes) ? { notes: str5(flags.notes) } : {},
|
|
59805
59850
|
...tplVis.value ? { visibility: tplVis.value } : {}
|
|
59806
59851
|
};
|
|
59852
|
+
const templateBodyBytes = publishReleaseBodyBytes(payload, publishMeta);
|
|
59853
|
+
if (templateBodyBytes > MAX_PUBLISH_BODY_BYTES) {
|
|
59854
|
+
io.error(JSON.stringify({
|
|
59855
|
+
ok: false,
|
|
59856
|
+
template: name,
|
|
59857
|
+
app: templateAppId,
|
|
59858
|
+
published: false,
|
|
59859
|
+
error: "publish_body_too_large",
|
|
59860
|
+
bodyBytes: templateBodyBytes,
|
|
59861
|
+
limit: MAX_PUBLISH_BODY_BYTES,
|
|
59862
|
+
// Both halves, because "the body is too big" does not say which one to cut, and the
|
|
59863
|
+
// two answer to different edits: `sourceChars` shrinks by removing FILES from the
|
|
59864
|
+
// tree, `appSourceBytes` by removing bytes (an image, a fixture) that may not be
|
|
59865
|
+
// text at all. They overlap by design — the same tree, twice — so they are reported
|
|
59866
|
+
// separately rather than summed into a figure that double-counts it.
|
|
59867
|
+
sourceChars: JSON.stringify(payload.source).length,
|
|
59868
|
+
appSourceBytes: templateSourceB64.length,
|
|
59869
|
+
hint: "trim the template's source tree \u2014 a template carries its tree twice (the public catalog view and the private archive), and neither is optional, so there is no flag that publishes without them"
|
|
59870
|
+
}));
|
|
59871
|
+
return 1;
|
|
59872
|
+
}
|
|
59807
59873
|
let r;
|
|
59808
59874
|
try {
|
|
59809
59875
|
r = await client3().publishRelease(payload, publishMeta);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.826.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": [
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"artifactId": "himalaya-cli"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"falconPackageHash": "
|
|
66
|
+
"falconPackageHash": "b3bc4ec44896b4a76de319d7e7785fdec50e5682c47183f97304d771"
|
|
67
67
|
}
|