@wix/himalaya-cli 0.1860.0 → 0.1862.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 +195 -70
- package/guides/release-notes.md +11 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -11309,6 +11309,100 @@ var init_css = __esm({
|
|
|
11309
11309
|
}
|
|
11310
11310
|
});
|
|
11311
11311
|
|
|
11312
|
+
// ../html-to-t5/src/v2/nano-actions.ts
|
|
11313
|
+
function depthOf(value2) {
|
|
11314
|
+
let max = 0;
|
|
11315
|
+
const stack = [[value2, 0]];
|
|
11316
|
+
while (stack.length) {
|
|
11317
|
+
const [v2, d2] = stack.pop();
|
|
11318
|
+
if (d2 > max) max = d2;
|
|
11319
|
+
if (max > MAX_BLOCK_DEPTH) return max;
|
|
11320
|
+
if (v2 && typeof v2 === "object") for (const x2 of Object.values(v2)) stack.push([x2, d2 + 1]);
|
|
11321
|
+
}
|
|
11322
|
+
return max;
|
|
11323
|
+
}
|
|
11324
|
+
function analyzeNanoActions(source2, file2, diagnostics, seedComputed) {
|
|
11325
|
+
const err = (code3, message5, hint) => diagnostics.push({ file: file2, line: 1, column: 1, code: code3, severity: "error", message: message5, ...hint ? { hint } : {} });
|
|
11326
|
+
let raw;
|
|
11327
|
+
try {
|
|
11328
|
+
raw = JSON.parse(source2);
|
|
11329
|
+
} catch (e2) {
|
|
11330
|
+
err("HHP-NANO-JSON", `The nano-actions block is not valid JSON: ${e2.message}.`, "Emit one JSON object; no comments or trailing commas.");
|
|
11331
|
+
return;
|
|
11332
|
+
}
|
|
11333
|
+
if (!isRecord(raw)) {
|
|
11334
|
+
err("HHP-NANO-SHAPE", "The nano-actions block must be a JSON object.");
|
|
11335
|
+
return;
|
|
11336
|
+
}
|
|
11337
|
+
if (depthOf(raw) > MAX_BLOCK_DEPTH) {
|
|
11338
|
+
err("HHP-NANO-SHAPE", `The nano-actions block nests deeper than ${MAX_BLOCK_DEPTH} levels.`, "Keep state flat: lists of small objects.");
|
|
11339
|
+
return;
|
|
11340
|
+
}
|
|
11341
|
+
for (const key4 of Object.keys(raw)) if (!KEYS.has(key4)) err("HHP-NANO-SHAPE", `Unknown nano-actions key "${key4}".`, "Allowed keys: state, computed, persist, onOpen, actions.");
|
|
11342
|
+
if (!isRecord(raw.state)) {
|
|
11343
|
+
err("HHP-NANO-SHAPE", "nano-actions.state must be an object of JSON values.");
|
|
11344
|
+
return;
|
|
11345
|
+
}
|
|
11346
|
+
if (!isRecord(raw.actions)) {
|
|
11347
|
+
err("HHP-NANO-SHAPE", "nano-actions.actions must map action names to op lists.");
|
|
11348
|
+
return;
|
|
11349
|
+
}
|
|
11350
|
+
const computed = raw.computed ?? {};
|
|
11351
|
+
if (!isRecord(computed) || Object.values(computed).some((v2) => typeof v2 !== "string")) {
|
|
11352
|
+
err("HHP-NANO-SHAPE", "nano-actions.computed must map names to expression strings.");
|
|
11353
|
+
return;
|
|
11354
|
+
}
|
|
11355
|
+
const block = raw;
|
|
11356
|
+
const handlers = /* @__PURE__ */ new Set();
|
|
11357
|
+
for (const [name, ops] of Object.entries(block.actions)) {
|
|
11358
|
+
if (!NAME.test(name) || name.startsWith("__hhp") || unsafe2.has(name)) err("HHP-NANO-SHAPE", `Invalid action name "${name}".`);
|
|
11359
|
+
else if (!Array.isArray(ops)) err("HHP-NANO-SHAPE", `Action "${name}" must be a list of ops.`);
|
|
11360
|
+
else handlers.add(name);
|
|
11361
|
+
}
|
|
11362
|
+
const state = { ...block.state };
|
|
11363
|
+
let seeds = {};
|
|
11364
|
+
if (seedComputed) {
|
|
11365
|
+
try {
|
|
11366
|
+
seeds = seedComputed(block) ?? {};
|
|
11367
|
+
} catch {
|
|
11368
|
+
seeds = {};
|
|
11369
|
+
}
|
|
11370
|
+
}
|
|
11371
|
+
for (const key4 of Object.keys(state)) if (!NAME.test(key4) || key4.startsWith("__hhp") || unsafe2.has(key4)) err("HHP-NANO-SHAPE", `Invalid state key "${key4}".`);
|
|
11372
|
+
for (const key4 of Object.keys(computed)) {
|
|
11373
|
+
if (!NAME.test(key4) || key4.startsWith("__hhp") || unsafe2.has(key4)) err("HHP-NANO-SHAPE", `Invalid computed key "${key4}".`);
|
|
11374
|
+
else if (Object.hasOwn(state, key4)) err("HHP-NANO-SHAPE", `"${key4}" is both state and computed.`);
|
|
11375
|
+
else state[key4] = Object.hasOwn(seeds, key4) && seeds[key4] !== void 0 && seeds[key4] !== null ? seeds[key4] : "";
|
|
11376
|
+
}
|
|
11377
|
+
if (block.onOpen != null && (typeof block.onOpen !== "string" || !handlers.has(block.onOpen)))
|
|
11378
|
+
err("HHP-NANO-ACTION", `onOpen names unknown action "${String(block.onOpen)}".`);
|
|
11379
|
+
if (block.persist !== void 0) {
|
|
11380
|
+
if (!Array.isArray(block.persist)) err("HHP-NANO-SHAPE", "nano-actions.persist must be a list of state keys.");
|
|
11381
|
+
else for (const key4 of block.persist) if (typeof key4 !== "string" || !Object.hasOwn(block.state, key4)) err("HHP-NANO-ACTION", `persist names unknown state key "${String(key4)}".`);
|
|
11382
|
+
}
|
|
11383
|
+
const paths2 = /* @__PURE__ */ new Map();
|
|
11384
|
+
const collect2 = (value2, prefix = "") => {
|
|
11385
|
+
for (const [key4, v2] of Object.entries(value2)) {
|
|
11386
|
+
const path2 = prefix ? `${prefix}.${key4}` : key4;
|
|
11387
|
+
paths2.set(path2, v2);
|
|
11388
|
+
if (isRecord(v2)) collect2(v2, path2);
|
|
11389
|
+
}
|
|
11390
|
+
};
|
|
11391
|
+
collect2(state);
|
|
11392
|
+
return { info: { state, paths: paths2, handlers }, block };
|
|
11393
|
+
}
|
|
11394
|
+
var KEYS, MAX_BLOCK_DEPTH, NAME, unsafe2, isRecord;
|
|
11395
|
+
var init_nano_actions = __esm({
|
|
11396
|
+
"../html-to-t5/src/v2/nano-actions.ts"() {
|
|
11397
|
+
init_define_HHP_CATALOG();
|
|
11398
|
+
KEYS = /* @__PURE__ */ new Set(["state", "computed", "persist", "onOpen", "actions"]);
|
|
11399
|
+
MAX_BLOCK_DEPTH = 32;
|
|
11400
|
+
NAME = /^[a-zA-Z_]\w*$/;
|
|
11401
|
+
unsafe2 = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
11402
|
+
isRecord = (v2) => typeof v2 === "object" && v2 !== null && !Array.isArray(v2);
|
|
11403
|
+
}
|
|
11404
|
+
});
|
|
11405
|
+
|
|
11312
11406
|
// ../../core/ts/src/worker-subtree-safe-types.generated.ts
|
|
11313
11407
|
var WORKER_SUBTREE_SAFE_TYPE_RULES, WORKER_SUBTREE_COMMON_ACTION_PATHS;
|
|
11314
11408
|
var init_worker_subtree_safe_types_generated = __esm({
|
|
@@ -11450,20 +11544,20 @@ var init_worker_subtree_safe_types_generated = __esm({
|
|
|
11450
11544
|
});
|
|
11451
11545
|
|
|
11452
11546
|
// ../../core/ts/src/worker-subtree.ts
|
|
11453
|
-
function
|
|
11547
|
+
function isRecord2(value2) {
|
|
11454
11548
|
return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
|
|
11455
11549
|
}
|
|
11456
11550
|
function valueAtPath(value2, path2) {
|
|
11457
11551
|
let current = value2;
|
|
11458
11552
|
for (const segment3 of path2.split(".")) {
|
|
11459
|
-
if (!
|
|
11553
|
+
if (!isRecord2(current)) return void 0;
|
|
11460
11554
|
current = current[segment3];
|
|
11461
11555
|
}
|
|
11462
11556
|
return current;
|
|
11463
11557
|
}
|
|
11464
11558
|
function componentShape(value2) {
|
|
11465
|
-
if (!
|
|
11466
|
-
return typeof value2.body.package === "string" && typeof value2.body.type === "string" &&
|
|
11559
|
+
if (!isRecord2(value2) || typeof value2.id !== "string" || !isRecord2(value2.body)) return false;
|
|
11560
|
+
return typeof value2.body.package === "string" && typeof value2.body.type === "string" && isRecord2(value2.body.props);
|
|
11467
11561
|
}
|
|
11468
11562
|
function rotateRight(value2, count3) {
|
|
11469
11563
|
return value2 >>> count3 | value2 << 32 - count3;
|
|
@@ -11621,7 +11715,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
11621
11715
|
let rejection = null;
|
|
11622
11716
|
const checkAction = (value2) => {
|
|
11623
11717
|
if (value2 == null || rejection) return;
|
|
11624
|
-
if (!
|
|
11718
|
+
if (!isRecord2(value2) || typeof value2.actionId !== "string") {
|
|
11625
11719
|
rejection = "typed_decode";
|
|
11626
11720
|
return;
|
|
11627
11721
|
}
|
|
@@ -11752,10 +11846,25 @@ function compileV2(html, profile, options2) {
|
|
|
11752
11846
|
if (!title) error(null, "HHP-TITLE", "Provide a document title.");
|
|
11753
11847
|
let controller = options2.controller;
|
|
11754
11848
|
let directService;
|
|
11849
|
+
let nanoActions;
|
|
11850
|
+
let nanoActionsSeen = false;
|
|
11755
11851
|
const scripts = $2("script").toArray();
|
|
11756
11852
|
for (const script2 of scripts) {
|
|
11757
11853
|
const type2 = $2(script2).attr("type"), src = $2(script2).attr("src");
|
|
11758
11854
|
if (type2 === "application/himalaya-props") continue;
|
|
11855
|
+
if (options2.declarativeLogic && type2 !== "application/nano-actions") {
|
|
11856
|
+
error(script2, "HHP-SCRIPT", "HHP-N documents carry no JavaScript; use exactly one application/nano-actions block.");
|
|
11857
|
+
continue;
|
|
11858
|
+
}
|
|
11859
|
+
if (type2 === "application/nano-actions" && options2.declarativeLogic && !controller && !directService && !src) {
|
|
11860
|
+
if (nanoActionsSeen) {
|
|
11861
|
+
error(script2, "HHP-NANO-SHAPE", "Use exactly one application/nano-actions block.");
|
|
11862
|
+
continue;
|
|
11863
|
+
}
|
|
11864
|
+
nanoActionsSeen = true;
|
|
11865
|
+
nanoActions = analyzeNanoActions($2(script2).text(), options2.file, diagnostics, typeof options2.declarativeLogic === "object" ? options2.declarativeLogic.seedComputed : void 0);
|
|
11866
|
+
continue;
|
|
11867
|
+
}
|
|
11759
11868
|
if (type2 === "application/himalaya-service" && !controller && !directService) {
|
|
11760
11869
|
try {
|
|
11761
11870
|
directService = src && options2.readLocal ? { ...options2.readLocal(src, options2.file), external: true } : { source: $2(script2).text(), file: options2.file, external: false };
|
|
@@ -11771,7 +11880,7 @@ function compileV2(html, profile, options2) {
|
|
|
11771
11880
|
}
|
|
11772
11881
|
} else error(script2, "HHP-SCRIPT", "Use one external application/himalaya-controller script. Inline/page JavaScript is unavailable.");
|
|
11773
11882
|
}
|
|
11774
|
-
let info4;
|
|
11883
|
+
let info4 = nanoActions?.info;
|
|
11775
11884
|
for (const cap2 of moduleCapabilities(controller?.source ?? directService?.source ?? "", controller?.file ?? options2.file, profile)) requiredCapabilities2.add(cap2);
|
|
11776
11885
|
if (controller) {
|
|
11777
11886
|
dependencies.push(controller.file);
|
|
@@ -11810,6 +11919,7 @@ function compileV2(html, profile, options2) {
|
|
|
11810
11919
|
const tags = new Map(Object.entries(profile.components).map(([name, spec]) => [spec.tag, name]));
|
|
11811
11920
|
const ids2 = /* @__PURE__ */ new Set(), bindings = /* @__PURE__ */ new Map();
|
|
11812
11921
|
const textProjections = [];
|
|
11922
|
+
const keyedLists = /* @__PURE__ */ new Set();
|
|
11813
11923
|
let subtreeCount = 0;
|
|
11814
11924
|
const own6 = (record5, key4) => Object.hasOwn(record5, key4) ? record5[key4] : void 0;
|
|
11815
11925
|
function structured(el2, value2) {
|
|
@@ -11939,7 +12049,7 @@ function compileV2(html, profile, options2) {
|
|
|
11939
12049
|
if (matches2.length) {
|
|
11940
12050
|
if (matches2.length === 1 && matches2[0][0] === text32 && type2 === "Text") {
|
|
11941
12051
|
props2.text = path2(el2, matches2[0][1], row2);
|
|
11942
|
-
} else if (controller && type2 === "Text") {
|
|
12052
|
+
} else if ((controller || nanoActions) && type2 === "Text") {
|
|
11943
12053
|
for (const match of matches2) path2(el2, match[1], row2);
|
|
11944
12054
|
const key4 = `t${textProjections.length}`;
|
|
11945
12055
|
const normalized2 = text32.replace(/{{\s*([\w.$]+)\s*}}/g, (_match, raw) => `{{${raw.startsWith("$item.") ? raw : statePath(raw)}}}`);
|
|
@@ -12058,6 +12168,10 @@ function compileV2(html, profile, options2) {
|
|
|
12058
12168
|
error(el2, "HHP-EVENT", `Unknown or unsupported ${event} handler ${raw}.`);
|
|
12059
12169
|
continue;
|
|
12060
12170
|
}
|
|
12171
|
+
if (attrs["data-action-args"] !== void 0) {
|
|
12172
|
+
error(el2, "HHP-ACTION-ARGS", `data-action-args is ignored on ${attr3}; the handler would receive no args.`, `Use data-action="${raw}" with data-action-args instead.`);
|
|
12173
|
+
continue;
|
|
12174
|
+
}
|
|
12061
12175
|
(spec.fields[field2] ? props2 : mods)[field2] = { actionId: `tier5.${serviceName2}.${raw}` };
|
|
12062
12176
|
continue;
|
|
12063
12177
|
}
|
|
@@ -12173,6 +12287,7 @@ function compileV2(html, profile, options2) {
|
|
|
12173
12287
|
else keys2.add(item2.id);
|
|
12174
12288
|
}
|
|
12175
12289
|
props2.itemsPath = path2(el2, each, false);
|
|
12290
|
+
if (!each.startsWith("$item.")) keyedLists.add(statePath(each));
|
|
12176
12291
|
}
|
|
12177
12292
|
}
|
|
12178
12293
|
const childField = Object.entries(spec.fields).find(([, f2]) => f2.kind === "children")?.[0];
|
|
@@ -12250,14 +12365,14 @@ function compileV2(html, profile, options2) {
|
|
|
12250
12365
|
let payload;
|
|
12251
12366
|
if (roots2.length === 1) payload = compile(roots2[0], "root");
|
|
12252
12367
|
else error(null, "HHP-ROOT", "Use exactly one root layout element.");
|
|
12253
|
-
const bundleName = info4 ? `hhp-${screenId?.replace(/[._]/g, "-")}` : void 0;
|
|
12368
|
+
const bundleName = info4 && !nanoActions ? `hhp-${screenId?.replace(/[._]/g, "-")}` : void 0;
|
|
12254
12369
|
const descriptor = payload && screenId ? {
|
|
12255
12370
|
screenId,
|
|
12256
12371
|
renderer: "sdui_layout",
|
|
12257
12372
|
schemaVersion: 1,
|
|
12258
12373
|
title,
|
|
12259
12374
|
payload,
|
|
12260
|
-
...info4 ? { logicBundle: { url: `/v1/bundles/${bundleName}`, integrity: "", contentType: "application/javascript+ts-bundle", declaredCapabilities: profile.declaredCapabilities, minBinaryVersion: "0.1.0", bundleVersion: "0.0.1" } } : {}
|
|
12375
|
+
...info4 && !nanoActions ? { logicBundle: { url: `/v1/bundles/${bundleName}`, integrity: "", contentType: "application/javascript+ts-bundle", declaredCapabilities: profile.declaredCapabilities, minBinaryVersion: "0.1.0", bundleVersion: "0.0.1" } } : {}
|
|
12261
12376
|
} : void 0;
|
|
12262
12377
|
const worker = info4 && controller ? controllerWorker(serviceName2, controller.workerImport, info4, bindings, textProjections) : directService ? directService.external ? `// GENERATED HHP v2 worker.
|
|
12263
12378
|
import ${JSON.stringify(directService.file)};
|
|
@@ -12272,7 +12387,16 @@ ${directService.source}
|
|
|
12272
12387
|
bundleName,
|
|
12273
12388
|
sourceMap: sourceMap2,
|
|
12274
12389
|
dependencies,
|
|
12275
|
-
manifest: {
|
|
12390
|
+
manifest: {
|
|
12391
|
+
profileVersion: "hhp/2",
|
|
12392
|
+
catalogVersion: profile.catalogVersion,
|
|
12393
|
+
screenId,
|
|
12394
|
+
bundleName,
|
|
12395
|
+
serviceName: info4 ? serviceName2 : null,
|
|
12396
|
+
requiredCapabilities: [...requiredCapabilities2].sort(),
|
|
12397
|
+
inputSha256: createHash4("sha256").update(html).digest("hex"),
|
|
12398
|
+
...nanoActions ? { logic: "nano-actions", nanoLogic: { service: serviceName2, bindings: Object.fromEntries(bindings), projections: textProjections, keyed: [...keyedLists], block: nanoActions.block } } : {}
|
|
12399
|
+
}
|
|
12276
12400
|
};
|
|
12277
12401
|
}
|
|
12278
12402
|
var camel, semantic, attributeAliases, typographyStyled, actionAliases, ajv, validators;
|
|
@@ -12282,6 +12406,7 @@ var init_compile = __esm({
|
|
|
12282
12406
|
init_controller();
|
|
12283
12407
|
init_catalog();
|
|
12284
12408
|
init_css();
|
|
12409
|
+
init_nano_actions();
|
|
12285
12410
|
init_worker_subtree();
|
|
12286
12411
|
init_implications();
|
|
12287
12412
|
camel = (s5) => s5.replace(/-([a-z])/g, (_2, c2) => c2.toUpperCase());
|
|
@@ -18296,8 +18421,8 @@ function componentNodes(descriptor) {
|
|
|
18296
18421
|
if (!value2 || typeof value2 !== "object") continue;
|
|
18297
18422
|
let childAncestors = ancestors;
|
|
18298
18423
|
let childConditional = conditional2;
|
|
18299
|
-
if (
|
|
18300
|
-
const mods =
|
|
18424
|
+
if (isRecord3(value2) && isRecord3(value2.body) && typeof value2.body.type === "string" && typeof value2.body.package === "string") {
|
|
18425
|
+
const mods = isRecord3(value2.modifiers) ? value2.modifiers : void 0;
|
|
18301
18426
|
const hiddenHere = mods !== void 0 && (mods.hidden === true || typeof mods.hiddenPath === "string" && mods.hiddenPath !== "");
|
|
18302
18427
|
const selfConditional = conditional2 || hiddenHere;
|
|
18303
18428
|
out2.push({ node: value2, path: path2, ancestors, conditional: selfConditional });
|
|
@@ -18447,10 +18572,10 @@ function motionBindingIssues(descriptor) {
|
|
|
18447
18572
|
const byTransitionId = /* @__PURE__ */ new Map();
|
|
18448
18573
|
for (const visit of componentNodes(descriptor)) {
|
|
18449
18574
|
const mods = visit.node.modifiers;
|
|
18450
|
-
if (!
|
|
18575
|
+
if (!isRecord3(mods)) continue;
|
|
18451
18576
|
const at2 = visit.path ? `${visit.path}.modifiers` : "modifiers";
|
|
18452
18577
|
out2.push(...transformPathIssues(mods, at2));
|
|
18453
|
-
if (
|
|
18578
|
+
if (isRecord3(mods.scrollLinked)) out2.push(...scrollLinkedIssues(visit, mods.scrollLinked, at2));
|
|
18454
18579
|
const tid2 = mods.transitionId;
|
|
18455
18580
|
if (typeof tid2 === "string" && tid2 !== "" && !tid2.includes("$") && !visit.conditional) {
|
|
18456
18581
|
byTransitionId.set(tid2, [...byTransitionId.get(tid2) ?? [], `${at2}.transitionId`]);
|
|
@@ -18468,7 +18593,7 @@ function motionBindingIssues(descriptor) {
|
|
|
18468
18593
|
}
|
|
18469
18594
|
return out2;
|
|
18470
18595
|
}
|
|
18471
|
-
var TRANSFORM_PATH_KEYS, SCROLL_LINKED_OUTPUTS, SCROLL_CONTAINER_TYPES, CONDITIONAL_CONTAINER_TYPES,
|
|
18596
|
+
var TRANSFORM_PATH_KEYS, SCROLL_LINKED_OUTPUTS, SCROLL_CONTAINER_TYPES, CONDITIONAL_CONTAINER_TYPES, isRecord3, issue, finiteNumbers;
|
|
18472
18597
|
var init_motion_bindings_lint = __esm({
|
|
18473
18598
|
"../../core/dev-server/src/motion-bindings-lint.ts"() {
|
|
18474
18599
|
init_define_HHP_CATALOG();
|
|
@@ -18495,7 +18620,7 @@ var init_motion_bindings_lint = __esm({
|
|
|
18495
18620
|
"Tooltip",
|
|
18496
18621
|
"DisclosureGroup"
|
|
18497
18622
|
]);
|
|
18498
|
-
|
|
18623
|
+
isRecord3 = (v2) => !!v2 && typeof v2 === "object" && !Array.isArray(v2);
|
|
18499
18624
|
issue = (severity, pass, code3, path2, message5) => ({ severity, pass, code: code3, ruleCode: code3, path: path2, message: message5 });
|
|
18500
18625
|
finiteNumbers = (v2) => Array.isArray(v2) && v2.every((n2) => typeof n2 === "number" && Number.isFinite(n2));
|
|
18501
18626
|
}
|
|
@@ -41208,15 +41333,15 @@ function authored(overlays, name) {
|
|
|
41208
41333
|
function selectIdiomOverlay(doc, ctx = {}) {
|
|
41209
41334
|
const policy = doc.idiomPolicy;
|
|
41210
41335
|
const overlays = doc.idiom;
|
|
41211
|
-
const
|
|
41212
|
-
if (!
|
|
41336
|
+
const isRecord7 = (v2) => !!v2 && typeof v2 === "object" && !Array.isArray(v2);
|
|
41337
|
+
if (!isRecord7(policy) || !isRecord7(overlays)) return void 0;
|
|
41213
41338
|
const kind = policy.policy ?? "follow-surface";
|
|
41214
41339
|
if (kind === "none") return void 0;
|
|
41215
41340
|
if (kind === "pinned") return authored(overlays, policy.pin) ? policy.pin : void 0;
|
|
41216
41341
|
if (kind !== "follow-surface") return void 0;
|
|
41217
41342
|
const surfaces = policy.surfaces;
|
|
41218
41343
|
const candidates = [
|
|
41219
|
-
ctx.surface !== void 0 &&
|
|
41344
|
+
ctx.surface !== void 0 && isRecord7(surfaces) && Object.hasOwn(surfaces, ctx.surface) ? surfaces[ctx.surface] : void 0,
|
|
41220
41345
|
...ctx.native ?? [],
|
|
41221
41346
|
policy.fallback
|
|
41222
41347
|
];
|
|
@@ -42327,7 +42452,7 @@ var init_store2 = __esm({
|
|
|
42327
42452
|
});
|
|
42328
42453
|
|
|
42329
42454
|
// ../../core/ts/src/stream-policy.ts
|
|
42330
|
-
function
|
|
42455
|
+
function isRecord4(value2) {
|
|
42331
42456
|
return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
|
|
42332
42457
|
}
|
|
42333
42458
|
function isLoopback(host) {
|
|
@@ -42335,7 +42460,7 @@ function isLoopback(host) {
|
|
|
42335
42460
|
}
|
|
42336
42461
|
function endpointErrors(endpoint, index, options2) {
|
|
42337
42462
|
const at2 = `streamPolicy.endpoints[${index}]`;
|
|
42338
|
-
if (!
|
|
42463
|
+
if (!isRecord4(endpoint)) return [`${at2} must be an object`];
|
|
42339
42464
|
const errors = [];
|
|
42340
42465
|
let origin;
|
|
42341
42466
|
if (typeof endpoint.origin !== "string") {
|
|
@@ -42383,7 +42508,7 @@ function endpointErrors(endpoint, index, options2) {
|
|
|
42383
42508
|
return errors;
|
|
42384
42509
|
}
|
|
42385
42510
|
function validateStreamPolicy(policy, options2) {
|
|
42386
|
-
if (!
|
|
42511
|
+
if (!isRecord4(policy)) return ["streamPolicy must be an object"];
|
|
42387
42512
|
const errors = [];
|
|
42388
42513
|
if (policy.version !== STREAM_POLICY_VERSION) errors.push(`streamPolicy.version must equal ${STREAM_POLICY_VERSION}`);
|
|
42389
42514
|
if (!Array.isArray(policy.endpoints)) {
|
|
@@ -42400,7 +42525,7 @@ function validateNavigationStreamPolicyConfig(appConfig, options2) {
|
|
|
42400
42525
|
} catch {
|
|
42401
42526
|
return ["appConfig must be valid JSON"];
|
|
42402
42527
|
}
|
|
42403
|
-
if (!
|
|
42528
|
+
if (!isRecord4(config)) return ["appConfig must be an object"];
|
|
42404
42529
|
if (config.streamPolicy === void 0) return [];
|
|
42405
42530
|
return validateStreamPolicy(config.streamPolicy, options2);
|
|
42406
42531
|
}
|
|
@@ -58000,7 +58125,7 @@ var init_pdf = __esm({
|
|
|
58000
58125
|
var TYPED_ARRAY_CONSTRUCTOR = "TypedArrayConstructor";
|
|
58001
58126
|
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(globalThis2.opera) !== "Opera";
|
|
58002
58127
|
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
58003
|
-
var
|
|
58128
|
+
var NAME3, Constructor, Prototype;
|
|
58004
58129
|
var TypedArrayConstructorsList = {
|
|
58005
58130
|
Int8Array: 1,
|
|
58006
58131
|
Uint8Array: 1,
|
|
@@ -58082,14 +58207,14 @@ var init_pdf = __esm({
|
|
|
58082
58207
|
}
|
|
58083
58208
|
}
|
|
58084
58209
|
};
|
|
58085
|
-
for (
|
|
58086
|
-
Constructor = globalThis2[
|
|
58210
|
+
for (NAME3 in TypedArrayConstructorsList) {
|
|
58211
|
+
Constructor = globalThis2[NAME3];
|
|
58087
58212
|
Prototype = Constructor && Constructor.prototype;
|
|
58088
58213
|
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
|
|
58089
58214
|
else NATIVE_ARRAY_BUFFER_VIEWS = false;
|
|
58090
58215
|
}
|
|
58091
|
-
for (
|
|
58092
|
-
Constructor = globalThis2[
|
|
58216
|
+
for (NAME3 in BigIntArrayConstructorsList) {
|
|
58217
|
+
Constructor = globalThis2[NAME3];
|
|
58093
58218
|
Prototype = Constructor && Constructor.prototype;
|
|
58094
58219
|
if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
|
|
58095
58220
|
}
|
|
@@ -58097,14 +58222,14 @@ var init_pdf = __esm({
|
|
|
58097
58222
|
TypedArray = function TypedArray2() {
|
|
58098
58223
|
throw new TypeError2("Incorrect invocation");
|
|
58099
58224
|
};
|
|
58100
|
-
if (NATIVE_ARRAY_BUFFER_VIEWS) for (
|
|
58101
|
-
if (globalThis2[
|
|
58225
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME3 in TypedArrayConstructorsList) {
|
|
58226
|
+
if (globalThis2[NAME3]) setPrototypeOf(globalThis2[NAME3], TypedArray);
|
|
58102
58227
|
}
|
|
58103
58228
|
}
|
|
58104
58229
|
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
|
|
58105
58230
|
TypedArrayPrototype = TypedArray.prototype;
|
|
58106
|
-
if (NATIVE_ARRAY_BUFFER_VIEWS) for (
|
|
58107
|
-
if (globalThis2[
|
|
58231
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME3 in TypedArrayConstructorsList) {
|
|
58232
|
+
if (globalThis2[NAME3]) setPrototypeOf(globalThis2[NAME3].prototype, TypedArrayPrototype);
|
|
58108
58233
|
}
|
|
58109
58234
|
}
|
|
58110
58235
|
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
|
|
@@ -58118,8 +58243,8 @@ var init_pdf = __esm({
|
|
|
58118
58243
|
return isObject6(this) ? this[TYPED_ARRAY_TAG] : void 0;
|
|
58119
58244
|
}
|
|
58120
58245
|
});
|
|
58121
|
-
for (
|
|
58122
|
-
createNonEnumerableProperty(globalThis2[
|
|
58246
|
+
for (NAME3 in TypedArrayConstructorsList) if (globalThis2[NAME3]) {
|
|
58247
|
+
createNonEnumerableProperty(globalThis2[NAME3].prototype, TYPED_ARRAY_TAG, NAME3);
|
|
58123
58248
|
}
|
|
58124
58249
|
}
|
|
58125
58250
|
module.exports = {
|
|
@@ -150385,7 +150510,7 @@ function bakeBootState(bundleJs, input, opts = {}) {
|
|
|
150385
150510
|
const omitted = [];
|
|
150386
150511
|
for (const [name, state] of Object.entries(services2)) {
|
|
150387
150512
|
const probe2 = probed[name];
|
|
150388
|
-
if (name === BOOT_STATE_STORAGE_KEYS || drifting.includes(name) || !
|
|
150513
|
+
if (name === BOOT_STATE_STORAGE_KEYS || drifting.includes(name) || !isRecord5(state) || !isRecord5(probe2)) {
|
|
150389
150514
|
omitted.push(name);
|
|
150390
150515
|
continue;
|
|
150391
150516
|
}
|
|
@@ -150412,7 +150537,7 @@ function steadyPart(state, probe2, at2, omitted) {
|
|
|
150412
150537
|
for (const [key4, value2] of Object.entries(state)) {
|
|
150413
150538
|
const other = probe2[key4];
|
|
150414
150539
|
if (sameJson3(value2, other)) steady[key4] = value2;
|
|
150415
|
-
else if (
|
|
150540
|
+
else if (isRecord5(value2) && isRecord5(other)) {
|
|
150416
150541
|
const part5 = steadyPart(value2, other, `${at2}.${key4}`, omitted);
|
|
150417
150542
|
if (Object.keys(part5).length > 0) steady[key4] = part5;
|
|
150418
150543
|
} else omitted.push(`${at2}.${key4}`);
|
|
@@ -150432,9 +150557,9 @@ function gatesUnbakedPath(descriptor, state, services2) {
|
|
|
150432
150557
|
}
|
|
150433
150558
|
function withoutClosedSheets(node3, state) {
|
|
150434
150559
|
if (Array.isArray(node3)) return node3.map((v2) => withoutClosedSheets(v2, state));
|
|
150435
|
-
if (!
|
|
150560
|
+
if (!isRecord5(node3)) return node3;
|
|
150436
150561
|
const body = node3.body;
|
|
150437
|
-
if (
|
|
150562
|
+
if (isRecord5(body) && body.type === "BottomSheet" && isRecord5(body.props) && typeof body.props.presentedPath === "string") {
|
|
150438
150563
|
const m2 = /^\$service:([A-Za-z0-9_-]+)\.(.+)$/.exec(body.props.presentedPath);
|
|
150439
150564
|
if (m2 && valueAt3(state[m2[1]], m2[2]) === false) {
|
|
150440
150565
|
const { content: _closed, footer: _closedFooter, ...props2 } = body.props;
|
|
@@ -150451,7 +150576,7 @@ function valueAt3(root, path2) {
|
|
|
150451
150576
|
}
|
|
150452
150577
|
return v2;
|
|
150453
150578
|
}
|
|
150454
|
-
function
|
|
150579
|
+
function isRecord5(v2) {
|
|
150455
150580
|
return v2 !== null && typeof v2 === "object" && !Array.isArray(v2);
|
|
150456
150581
|
}
|
|
150457
150582
|
function sameJson3(a3, b3) {
|
|
@@ -175228,7 +175353,7 @@ function optHttpsUrl(obj19, key4) {
|
|
|
175228
175353
|
return url.href;
|
|
175229
175354
|
}
|
|
175230
175355
|
function parseAppSpec(raw, specDir = process.cwd()) {
|
|
175231
|
-
if (!
|
|
175356
|
+
if (!isRecord6(raw)) invalid("must be a JSON object");
|
|
175232
175357
|
onlyKeys(raw, [...TOP_KEYS2], "the spec");
|
|
175233
175358
|
const spec = {};
|
|
175234
175359
|
const url = optString(raw, "url");
|
|
@@ -175256,14 +175381,14 @@ function parseAppSpec(raw, specDir = process.cwd()) {
|
|
|
175256
175381
|
}
|
|
175257
175382
|
}
|
|
175258
175383
|
if (raw.colors !== void 0) {
|
|
175259
|
-
if (!
|
|
175384
|
+
if (!isRecord6(raw.colors)) invalid("colors must be an object");
|
|
175260
175385
|
onlyKeys(raw.colors, ["primary", "secondary"], "colors");
|
|
175261
175386
|
const primary = optHex(raw.colors, "primary", "colors.primary");
|
|
175262
175387
|
const secondary = optHex(raw.colors, "secondary", "colors.secondary");
|
|
175263
175388
|
spec.colors = { ...primary ? { primary } : {}, ...secondary ? { secondary } : {} };
|
|
175264
175389
|
}
|
|
175265
175390
|
if (raw.splash !== void 0) {
|
|
175266
|
-
if (!
|
|
175391
|
+
if (!isRecord6(raw.splash)) invalid("splash must be an object");
|
|
175267
175392
|
onlyKeys(raw.splash, ["backgroundColor", "caption"], "splash");
|
|
175268
175393
|
const splash = {};
|
|
175269
175394
|
const bg = optString(raw.splash, "backgroundColor", "splash.backgroundColor");
|
|
@@ -175282,7 +175407,7 @@ function parseAppSpec(raw, specDir = process.cwd()) {
|
|
|
175282
175407
|
if (raw.base44 !== void 0) {
|
|
175283
175408
|
if (raw.base44 === false) spec.base44 = false;
|
|
175284
175409
|
else {
|
|
175285
|
-
if (!
|
|
175410
|
+
if (!isRecord6(raw.base44)) invalid("base44 must be an object or false");
|
|
175286
175411
|
onlyKeys(raw.base44, ["appId"], "base44");
|
|
175287
175412
|
const appId3 = optString(raw.base44, "appId", "base44.appId");
|
|
175288
175413
|
if (appId3 !== void 0 && !BASE44_ID.test(appId3)) invalid(`base44.appId must be 8-64 letters and digits (the id in https://app.base44.com/apps/<id>), got ${JSON.stringify(appId3)}`);
|
|
@@ -175294,7 +175419,7 @@ function parseAppSpec(raw, specDir = process.cwd()) {
|
|
|
175294
175419
|
const seen = /* @__PURE__ */ new Set();
|
|
175295
175420
|
spec.pages = raw.pages.map((p2, i2) => {
|
|
175296
175421
|
const where = `pages[${i2}]`;
|
|
175297
|
-
if (!
|
|
175422
|
+
if (!isRecord6(p2)) invalid(`${where} must be an object`);
|
|
175298
175423
|
onlyKeys(p2, ["id", "title", "path", "icon", "placement"], where);
|
|
175299
175424
|
const id = optString(p2, "id", `${where}.id`);
|
|
175300
175425
|
const title = optString(p2, "title", `${where}.title`);
|
|
@@ -175351,7 +175476,7 @@ function normalized(u2) {
|
|
|
175351
175476
|
return u2;
|
|
175352
175477
|
}
|
|
175353
175478
|
}
|
|
175354
|
-
var FromUrlError, HEX2, BASE44_ID, PAGE_ID2, TOP_KEYS2,
|
|
175479
|
+
var FromUrlError, HEX2, BASE44_ID, PAGE_ID2, TOP_KEYS2, isRecord6;
|
|
175355
175480
|
var init_spec = __esm({
|
|
175356
175481
|
"src/from-url/spec.ts"() {
|
|
175357
175482
|
init_define_HHP_CATALOG();
|
|
@@ -175367,7 +175492,7 @@ var init_spec = __esm({
|
|
|
175367
175492
|
BASE44_ID = /^[A-Za-z0-9]{8,64}$/;
|
|
175368
175493
|
PAGE_ID2 = /^[a-z][a-z0-9_]*$/;
|
|
175369
175494
|
TOP_KEYS2 = /* @__PURE__ */ new Set(["$schema", "url", "name", "description", "icon", "colors", "splash", "base44", "pages", "supportUrl", "privacyUrl", "termsUrl"]);
|
|
175370
|
-
|
|
175495
|
+
isRecord6 = (v2) => v2 !== null && typeof v2 === "object" && !Array.isArray(v2);
|
|
175371
175496
|
}
|
|
175372
175497
|
});
|
|
175373
175498
|
|
|
@@ -180999,17 +181124,17 @@ function gatherReleaseEntries(appDir3) {
|
|
|
180999
181124
|
wanted.delete(HIMI_PACKAGE_MANIFEST_PATH);
|
|
181000
181125
|
wanted.delete(HIMI_PACKAGE_HEADER_PATH);
|
|
181001
181126
|
for (const singleton of SINGLETONS) wanted.delete(singleton);
|
|
181002
|
-
const
|
|
181127
|
+
const unsafe3 = [
|
|
181003
181128
|
...Object.keys(manifest2.screens ?? {}).filter((id) => !isSafePackageSegment(id)).map((id) => `screen "${id}"`),
|
|
181004
181129
|
...Object.keys(manifest2.widgets ?? {}).filter((id) => !isSafePackageSegment(id)).map((id) => `widget "${id}"`),
|
|
181005
181130
|
...Object.entries(manifest2.bundles ?? {}).filter(([, m2]) => !m2?.sha256 || !/^[a-f0-9]{64}$/.test(m2.sha256)).map(([name]) => `bundle "${name}"`),
|
|
181006
181131
|
...Object.entries(manifest2.assets ?? {}).filter(([, r3]) => !r3?.sha256 || !/^[a-f0-9]{64}$/.test(r3.sha256)).map(([name]) => `asset "${name}"`),
|
|
181007
181132
|
...handlerRecords(manifest2).filter((h2) => !h2?.bundleHash || !/^[a-f0-9]{64}$/.test(h2.bundleHash)).map((h2) => `handler "${h2?.id ?? "?"}"`)
|
|
181008
181133
|
];
|
|
181009
|
-
if (
|
|
181134
|
+
if (unsafe3.length) {
|
|
181010
181135
|
throw new Error(
|
|
181011
|
-
`release at ${appDir3} names ${
|
|
181012
|
-
${
|
|
181136
|
+
`release at ${appDir3} names ${unsafe3.length} entr${unsafe3.length === 1 ? "y" : "ies"} whose id is not a safe file name \u2014 refusing to pack it:
|
|
181137
|
+
${unsafe3.slice(0, 10).join("\n ")}`
|
|
181013
181138
|
);
|
|
181014
181139
|
}
|
|
181015
181140
|
const missing4 = [];
|
|
@@ -183517,18 +183642,18 @@ function configuredTokensPath(dir) {
|
|
|
183517
183642
|
}
|
|
183518
183643
|
function tokenNumericIssues(tokens2, tokensPath = "tokens.json") {
|
|
183519
183644
|
const issues = [];
|
|
183520
|
-
const
|
|
183521
|
-
if (!
|
|
183645
|
+
const isRecord7 = (v2) => v2 !== null && typeof v2 === "object" && !Array.isArray(v2);
|
|
183646
|
+
if (!isRecord7(tokens2)) return issues;
|
|
183522
183647
|
const shown3 = (v2) => typeof v2 === "string" ? JSON.stringify(v2) : JSON.stringify(v2) ?? String(v2);
|
|
183523
183648
|
const bad4 = (v2) => !(typeof v2 === "number" && Number.isInteger(v2));
|
|
183524
183649
|
const check = (layer, where) => {
|
|
183525
|
-
if (!
|
|
183650
|
+
if (!isRecord7(layer)) return;
|
|
183526
183651
|
const loses = where ? `the ${where.slice(0, -1)} overlay is dropped on device and the base look is used instead` : 'iOS and Android reject the WHOLE tokens.json otherwise ("Theme unavailable" on iOS, the default palette and fonts on Android)';
|
|
183527
183652
|
for (const { group, field, unit } of INTEGER_TOKEN_FIELDS) {
|
|
183528
183653
|
const entries = layer[group];
|
|
183529
|
-
if (!
|
|
183654
|
+
if (!isRecord7(entries)) continue;
|
|
183530
183655
|
for (const [name, token] of Object.entries(entries)) {
|
|
183531
|
-
if (!
|
|
183656
|
+
if (!isRecord7(token) || !(field in token)) continue;
|
|
183532
183657
|
const value2 = token[field];
|
|
183533
183658
|
if (!bad4(value2)) continue;
|
|
183534
183659
|
const path2 = `${where}${group}.${name}.${field}`;
|
|
@@ -183544,7 +183669,7 @@ function tokenNumericIssues(tokens2, tokensPath = "tokens.json") {
|
|
|
183544
183669
|
}
|
|
183545
183670
|
for (const group of INTEGER_TOKEN_MAPS) {
|
|
183546
183671
|
const entries = layer[group];
|
|
183547
|
-
if (!
|
|
183672
|
+
if (!isRecord7(entries)) continue;
|
|
183548
183673
|
for (const [name, value2] of Object.entries(entries)) {
|
|
183549
183674
|
if (!bad4(value2)) continue;
|
|
183550
183675
|
const fix = typeof value2 === "number" && Number.isFinite(value2) ? ` Write ${Math.round(value2)}.` : "";
|
|
@@ -183560,7 +183685,7 @@ function tokenNumericIssues(tokens2, tokensPath = "tokens.json") {
|
|
|
183560
183685
|
};
|
|
183561
183686
|
check(tokens2, "");
|
|
183562
183687
|
const idiom = tokens2.idiom;
|
|
183563
|
-
if (
|
|
183688
|
+
if (isRecord7(idiom)) {
|
|
183564
183689
|
for (const [overlay, layer] of Object.entries(idiom)) check(layer, `idiom.${overlay}.`);
|
|
183565
183690
|
}
|
|
183566
183691
|
return issues;
|
|
@@ -197358,7 +197483,7 @@ function createFunctionCallCapability(options2) {
|
|
|
197358
197483
|
if (options2.signal?.aborted) {
|
|
197359
197484
|
throw new FunctionCallError("function_call_canceled", "parent invocation was canceled");
|
|
197360
197485
|
}
|
|
197361
|
-
if (!
|
|
197486
|
+
if (!NAME2.test(name)) {
|
|
197362
197487
|
throw new FunctionCallError("function_not_found", "target function does not exist");
|
|
197363
197488
|
}
|
|
197364
197489
|
const target = targets.get(name);
|
|
@@ -197404,7 +197529,7 @@ function createFunctionCallCapability(options2) {
|
|
|
197404
197529
|
}
|
|
197405
197530
|
};
|
|
197406
197531
|
}
|
|
197407
|
-
var FunctionCallError,
|
|
197532
|
+
var FunctionCallError, NAME2;
|
|
197408
197533
|
var init_calls = __esm({
|
|
197409
197534
|
"../../core/functions-runtime/src/calls.ts"() {
|
|
197410
197535
|
init_define_HHP_CATALOG();
|
|
@@ -197415,7 +197540,7 @@ var init_calls = __esm({
|
|
|
197415
197540
|
this.name = "FunctionCallError";
|
|
197416
197541
|
}
|
|
197417
197542
|
};
|
|
197418
|
-
|
|
197543
|
+
NAME2 = /^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$/;
|
|
197419
197544
|
}
|
|
197420
197545
|
});
|
|
197421
197546
|
|
|
@@ -208237,7 +208362,7 @@ function checkPolicy(doc, source2 = "asc-policy.yml") {
|
|
|
208237
208362
|
throw new PolicyError(["the document must be a mapping"], source2);
|
|
208238
208363
|
const d2 = doc;
|
|
208239
208364
|
for (const key4 of Object.keys(d2))
|
|
208240
|
-
if (!
|
|
208365
|
+
if (!KEYS2.has(key4))
|
|
208241
208366
|
problems.push(`unknown key "${key4}"`);
|
|
208242
208367
|
if (d2.version !== 1)
|
|
208243
208368
|
problems.push("version must be 1");
|
|
@@ -208309,12 +208434,12 @@ function checkPolicy(doc, source2 = "asc-policy.yml") {
|
|
|
208309
208434
|
function gplayPolicy() {
|
|
208310
208435
|
return checkPolicy({ version: 1, default: "one", reads: "auto", actions: { ...GPLAY_POLICY_ACTIONS }, fleet: { twoApprovalsOverApps: 20, twoApprovalsAcrossAccounts: true }, agents: { mayApproveOwnJobs: false } }, "the gplay policy");
|
|
208311
208436
|
}
|
|
208312
|
-
var LEVELS,
|
|
208437
|
+
var LEVELS, KEYS2, PolicyError, GPLAY_POLICY_ACTIONS;
|
|
208313
208438
|
var init_policy_check = __esm({
|
|
208314
208439
|
"../../node_modules/@wix/asc-jobs/dist/policy-check.js"() {
|
|
208315
208440
|
init_define_HHP_CATALOG();
|
|
208316
208441
|
LEVELS = /* @__PURE__ */ new Set(["auto", "one", "two", "never"]);
|
|
208317
|
-
|
|
208442
|
+
KEYS2 = /* @__PURE__ */ new Set(["version", "default", "reads", "actions", "fleet", "agents", "testApps"]);
|
|
208318
208443
|
PolicyError = class extends Error {
|
|
208319
208444
|
problems;
|
|
208320
208445
|
constructor(problems, source2) {
|
|
@@ -253795,7 +253920,7 @@ async function printRenderBatch(ctx, o2) {
|
|
|
253795
253920
|
const entries = [];
|
|
253796
253921
|
const ownShots = {};
|
|
253797
253922
|
const ownFiles = [];
|
|
253798
|
-
let
|
|
253923
|
+
let unsafe3 = false;
|
|
253799
253924
|
const missing4 = [];
|
|
253800
253925
|
for (const screenId of asked) {
|
|
253801
253926
|
const rendered = built.renders.filter((r3) => r3.screenId === screenId).sort((a3, b3) => variantIndex(a3) - variantIndex(b3));
|
|
@@ -253813,7 +253938,7 @@ async function printRenderBatch(ctx, o2) {
|
|
|
253813
253938
|
if (wantPng && r3.pngBase64) {
|
|
253814
253939
|
const own6 = shotKit.writeScreenShot(dir, r3.screenId, r3.pngBase64);
|
|
253815
253940
|
if (own6 === null) {
|
|
253816
|
-
|
|
253941
|
+
unsafe3 = true;
|
|
253817
253942
|
return [{ ok: false, code: "unsafe_screen_id", screenId: r3.screenId, ...v2.width ? { width: v2.width } : {}, error: `screen id "${r3.screenId}" would write outside .himi/renders and .himi/shots, so no PNG was written` }];
|
|
253818
253943
|
}
|
|
253819
253944
|
pngFile = own6;
|
|
@@ -253835,7 +253960,7 @@ async function printRenderBatch(ctx, o2) {
|
|
|
253835
253960
|
}
|
|
253836
253961
|
const renderedScreens = [...new Set(built.renders.map((r3) => r3.screenId))];
|
|
253837
253962
|
const findings = renderedScreens.flatMap((id) => lintOf(id));
|
|
253838
|
-
const ok5 = entries.length > 0 && entries.every((e2) => e2.ok === true) && !
|
|
253963
|
+
const ok5 = entries.length > 0 && entries.every((e2) => e2.ok === true) && !unsafe3;
|
|
253839
253964
|
const failedEntries = entries.filter((e2) => e2.ok !== true).length;
|
|
253840
253965
|
const legacy = {
|
|
253841
253966
|
ok: ok5,
|
|
@@ -299636,14 +299761,14 @@ async function l10nCommand(ctx) {
|
|
|
299636
299761
|
}
|
|
299637
299762
|
const { convertOneApp: convertOneApp2, undeclaredLocales: undeclaredLocales2 } = await Promise.resolve().then(() => (init_import_oneapp(), import_oneapp_exports));
|
|
299638
299763
|
const existing = {};
|
|
299639
|
-
let
|
|
299764
|
+
let unsafe3;
|
|
299640
299765
|
try {
|
|
299641
|
-
|
|
299766
|
+
unsafe3 = unsafeDestination(appDir3, requested);
|
|
299642
299767
|
} catch (e2) {
|
|
299643
299768
|
return fail16("catalog_write_failed", { error: `cannot inspect ${relative37(process.cwd(), join188(appDir3, "l10n"))}: ${e2.message}`, written: [] }, 1);
|
|
299644
299769
|
}
|
|
299645
|
-
if (
|
|
299646
|
-
return fail16("unsafe_path", { error: `${
|
|
299770
|
+
if (unsafe3 !== void 0) {
|
|
299771
|
+
return fail16("unsafe_path", { error: `${unsafe3} \u2014 the import does not read or write through links`, hint: "replace the link with a real directory/file inside the app, then re-run" }, 1);
|
|
299647
299772
|
}
|
|
299648
299773
|
for (const tag of requested) {
|
|
299649
299774
|
const path2 = join188(appDir3, "l10n", `${tag}.json`);
|
package/guides/release-notes.md
CHANGED
|
@@ -27,6 +27,17 @@ areas, always in the same order, so you can skim for the one you care about.
|
|
|
27
27
|
and the call exits 1 when any entry failed. `himi_render` in the MCP server takes the same lists and returns
|
|
28
28
|
up to 12 images. Options a batch cannot honour are refused with a typed `code`. (#6401)
|
|
29
29
|
|
|
30
|
+
### Preview, push & release
|
|
31
|
+
|
|
32
|
+
- **Your AI tool can read what happened when your app ran, with no CLI.** The hosted connector (the one you add
|
|
33
|
+
to Claude, ChatGPT or Cursor) has four new read tools. `himi_telemetry` returns a draft release's events
|
|
34
|
+
(screen views, failed actions, logged errors, crashes) and the worker console lines; `himi_logs` returns the
|
|
35
|
+
console lines alone. Both read drafts only: once a release is live, its events and console lines come from
|
|
36
|
+
your app's users and the tools refuse them. `himi_screens` lists the screens a pushed release contains and
|
|
37
|
+
`himi_deeplinks` the links that open it at each screen. All four read the latest draft unless a release is
|
|
38
|
+
named, return at most 200 rows a call, and need no new sign-in approval. If your AI tool does not list them,
|
|
39
|
+
disconnect and reconnect the connector. (#6436)
|
|
40
|
+
|
|
30
41
|
## 2026-11-22
|
|
31
42
|
|
|
32
43
|
### Authoring screens
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1862.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": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "e214a5b200f410398725a2dfd3fc30b5059076faaf3ebfa548716932"
|
|
86
86
|
}
|