@wix/himalaya-cli 0.980.0 → 0.981.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 +28 -1
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -5290,6 +5290,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
|
|
|
5290
5290
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
5291
5291
|
var init_bindings = __esm({
|
|
5292
5292
|
"../../core/ts/src/bindings.ts"() {
|
|
5293
|
+
"use strict";
|
|
5293
5294
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
5294
5295
|
BINDING_SIGIL_RE = new RegExp(
|
|
5295
5296
|
`^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -7273,9 +7274,10 @@ function pathCrossesOpaqueAuthorJson(path) {
|
|
|
7273
7274
|
function nativeRequiredFindings(descriptor) {
|
|
7274
7275
|
const out = [];
|
|
7275
7276
|
const shapeOf = (ref) => ref.startsWith("list:") ? "an array" : ref.startsWith("map:") ? "an object keyed by name" : "an object";
|
|
7277
|
+
const kindOf = (value) => Array.isArray(value) ? "an array" : value === null ? "null" : typeof value === "object" ? "an object" : `a ${typeof value} (${JSON.stringify(value)})`;
|
|
7276
7278
|
const reportKind = (ref, value, path, from) => {
|
|
7277
7279
|
const cls = bareNestedClass(ref);
|
|
7278
|
-
const got =
|
|
7280
|
+
const got = kindOf(value);
|
|
7279
7281
|
const expected = ref.startsWith("list:") ? "Expected JsonArray" : `Expected JsonObject for type with serial name 'io.himalaya.core.${cls}'`;
|
|
7280
7282
|
out.push({
|
|
7281
7283
|
path,
|
|
@@ -7321,6 +7323,25 @@ function nativeRequiredFindings(descriptor) {
|
|
|
7321
7323
|
const inner = own(bag, name);
|
|
7322
7324
|
if (inner !== void 0 && inner !== null) checkNested(inner, sub, `${path}.${name}`, from);
|
|
7323
7325
|
}
|
|
7326
|
+
if (cls === "Action") checkActionParams(own(bag, "params"), `${path}.params`, from);
|
|
7327
|
+
};
|
|
7328
|
+
const checkActionParams = (params, path, from) => {
|
|
7329
|
+
if (params === void 0 || params === null) return;
|
|
7330
|
+
const cost = "Native decode rejects it and drops the WHOLE screen from the seed, while web renders it fine";
|
|
7331
|
+
if (typeof params !== "object" || Array.isArray(params)) {
|
|
7332
|
+
out.push({
|
|
7333
|
+
path,
|
|
7334
|
+
message: `Action.params must be an object of strings, but the descriptor has ${kindOf(params)} ("Expected JsonObject"). ${cost} (reached from ${from})`
|
|
7335
|
+
});
|
|
7336
|
+
return;
|
|
7337
|
+
}
|
|
7338
|
+
for (const [key2, value] of Object.entries(params)) {
|
|
7339
|
+
if (typeof value === "string" || value === void 0) continue;
|
|
7340
|
+
out.push({
|
|
7341
|
+
path: `${path}.${key2}`,
|
|
7342
|
+
message: `Action.params values must be strings, but params.${key2} is ${kindOf(value)} ("Expected JsonPrimitive at ${key2}" on Android, typeMismatch on iOS). ${cost}. Flatten it into string keys of params, or move structured data to Action.args (reached from ${from})`
|
|
7343
|
+
});
|
|
7344
|
+
}
|
|
7324
7345
|
};
|
|
7325
7346
|
const walk2 = (node, at) => {
|
|
7326
7347
|
if (Array.isArray(node)) {
|
|
@@ -7422,6 +7443,7 @@ function componentPropFindings(descriptor) {
|
|
|
7422
7443
|
out.push({
|
|
7423
7444
|
path,
|
|
7424
7445
|
kind: "decode",
|
|
7446
|
+
...inArray ? { authoringOnly: true } : {},
|
|
7425
7447
|
// TWO different defects share this branch, and they need DIFFERENT prose.
|
|
7426
7448
|
//
|
|
7427
7449
|
// For an ordinary typed slot the sentinel really is a screen-killer: kotlinx
|
|
@@ -8060,6 +8082,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8060
8082
|
if (!node || typeof node !== "object") return;
|
|
8061
8083
|
for (const [k, val] of Object.entries(node)) {
|
|
8062
8084
|
if (isOpaqueAuthorJson(k, val, at === "")) continue;
|
|
8085
|
+
if (k === "params" && typeof node.actionId === "string") continue;
|
|
8063
8086
|
const here = at ? `${at}.${k}` : k;
|
|
8064
8087
|
const allowed2 = own(NATIVE_PROP_ENUMS, k);
|
|
8065
8088
|
if (typeof val === "string" && enums.has(k) && DYNAMIC_PLACEHOLDER.test(val)) {
|
|
@@ -8067,6 +8090,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8067
8090
|
severity: "error",
|
|
8068
8091
|
pass: "strict-enum",
|
|
8069
8092
|
path: here,
|
|
8093
|
+
nativeDecode: true,
|
|
8070
8094
|
message: `enum field "${k}" carries a dynamic placeholder ("${val}") \u2014 native decode fails BEFORE substitution and kills the screen; use a literal (e.g. the spacer leadFill pattern for per-row alignment)`
|
|
8071
8095
|
});
|
|
8072
8096
|
} else if (allowed2 && val != null && typeof val !== "string") {
|
|
@@ -8074,6 +8098,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8074
8098
|
severity: "error",
|
|
8075
8099
|
pass: "strict-enum",
|
|
8076
8100
|
path: here,
|
|
8101
|
+
nativeDecode: true,
|
|
8077
8102
|
message: `enum field "${k}" has non-string value ${JSON.stringify(val)} \u2014 native decode rejects it (allowed: ${[...allowed2].join("|")}) and drops the whole screen`
|
|
8078
8103
|
});
|
|
8079
8104
|
} else if (typeof val === "string" && !DYNAMIC_PLACEHOLDER.test(val)) {
|
|
@@ -8082,6 +8107,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8082
8107
|
severity: "error",
|
|
8083
8108
|
pass: "strict-enum",
|
|
8084
8109
|
path: here,
|
|
8110
|
+
nativeDecode: true,
|
|
8085
8111
|
message: `enum field "${k}" has unknown value "${val}" \u2014 native decode rejects it (allowed: ${[...allowed2].join("|")}) and drops the whole screen; use one of those literals (HStack/VStack alignment: leading = top)`
|
|
8086
8112
|
});
|
|
8087
8113
|
}
|
|
@@ -8105,6 +8131,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8105
8131
|
issue2.pass = "strict-enum";
|
|
8106
8132
|
issue2.path = finding.path;
|
|
8107
8133
|
issue2.message = finding.message;
|
|
8134
|
+
if (!("authoringOnly" in finding && finding.authoringOnly)) issue2.nativeDecode = true;
|
|
8108
8135
|
if (!duplicate) issues.push(issue2);
|
|
8109
8136
|
for (const extra of alsoAboutThisField) if (!consumed.has(extra)) superseded.add(extra);
|
|
8110
8137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.981.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": "8c6c57df555495fb76153e6101f19971862f487629e302e57aa4fdc0"
|
|
68
68
|
}
|