@wix/himalaya-cli 0.979.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 +27 -1
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -7274,9 +7274,10 @@ function pathCrossesOpaqueAuthorJson(path) {
|
|
|
7274
7274
|
function nativeRequiredFindings(descriptor) {
|
|
7275
7275
|
const out = [];
|
|
7276
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)})`;
|
|
7277
7278
|
const reportKind = (ref, value, path, from) => {
|
|
7278
7279
|
const cls = bareNestedClass(ref);
|
|
7279
|
-
const got =
|
|
7280
|
+
const got = kindOf(value);
|
|
7280
7281
|
const expected = ref.startsWith("list:") ? "Expected JsonArray" : `Expected JsonObject for type with serial name 'io.himalaya.core.${cls}'`;
|
|
7281
7282
|
out.push({
|
|
7282
7283
|
path,
|
|
@@ -7322,6 +7323,25 @@ function nativeRequiredFindings(descriptor) {
|
|
|
7322
7323
|
const inner = own(bag, name);
|
|
7323
7324
|
if (inner !== void 0 && inner !== null) checkNested(inner, sub, `${path}.${name}`, from);
|
|
7324
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
|
+
}
|
|
7325
7345
|
};
|
|
7326
7346
|
const walk2 = (node, at) => {
|
|
7327
7347
|
if (Array.isArray(node)) {
|
|
@@ -7423,6 +7443,7 @@ function componentPropFindings(descriptor) {
|
|
|
7423
7443
|
out.push({
|
|
7424
7444
|
path,
|
|
7425
7445
|
kind: "decode",
|
|
7446
|
+
...inArray ? { authoringOnly: true } : {},
|
|
7426
7447
|
// TWO different defects share this branch, and they need DIFFERENT prose.
|
|
7427
7448
|
//
|
|
7428
7449
|
// For an ordinary typed slot the sentinel really is a screen-killer: kotlinx
|
|
@@ -8061,6 +8082,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8061
8082
|
if (!node || typeof node !== "object") return;
|
|
8062
8083
|
for (const [k, val] of Object.entries(node)) {
|
|
8063
8084
|
if (isOpaqueAuthorJson(k, val, at === "")) continue;
|
|
8085
|
+
if (k === "params" && typeof node.actionId === "string") continue;
|
|
8064
8086
|
const here = at ? `${at}.${k}` : k;
|
|
8065
8087
|
const allowed2 = own(NATIVE_PROP_ENUMS, k);
|
|
8066
8088
|
if (typeof val === "string" && enums.has(k) && DYNAMIC_PLACEHOLDER.test(val)) {
|
|
@@ -8068,6 +8090,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8068
8090
|
severity: "error",
|
|
8069
8091
|
pass: "strict-enum",
|
|
8070
8092
|
path: here,
|
|
8093
|
+
nativeDecode: true,
|
|
8071
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)`
|
|
8072
8095
|
});
|
|
8073
8096
|
} else if (allowed2 && val != null && typeof val !== "string") {
|
|
@@ -8075,6 +8098,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8075
8098
|
severity: "error",
|
|
8076
8099
|
pass: "strict-enum",
|
|
8077
8100
|
path: here,
|
|
8101
|
+
nativeDecode: true,
|
|
8078
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`
|
|
8079
8103
|
});
|
|
8080
8104
|
} else if (typeof val === "string" && !DYNAMIC_PLACEHOLDER.test(val)) {
|
|
@@ -8083,6 +8107,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8083
8107
|
severity: "error",
|
|
8084
8108
|
pass: "strict-enum",
|
|
8085
8109
|
path: here,
|
|
8110
|
+
nativeDecode: true,
|
|
8086
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)`
|
|
8087
8112
|
});
|
|
8088
8113
|
}
|
|
@@ -8106,6 +8131,7 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
8106
8131
|
issue2.pass = "strict-enum";
|
|
8107
8132
|
issue2.path = finding.path;
|
|
8108
8133
|
issue2.message = finding.message;
|
|
8134
|
+
if (!("authoringOnly" in finding && finding.authoringOnly)) issue2.nativeDecode = true;
|
|
8109
8135
|
if (!duplicate) issues.push(issue2);
|
|
8110
8136
|
for (const extra of alsoAboutThisField) if (!consumed.has(extra)) superseded.add(extra);
|
|
8111
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
|
}
|