@wix/himalaya-cli 0.1620.0 → 0.1622.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 +25 -14
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -15601,7 +15601,6 @@ function webViewOriginAllowed(url, origins) {
|
|
|
15601
15601
|
}
|
|
15602
15602
|
var init_webview_origin = __esm({
|
|
15603
15603
|
"../../core/ts/src/webview-origin.ts"() {
|
|
15604
|
-
"use strict";
|
|
15605
15604
|
init_define_HHP_CATALOG();
|
|
15606
15605
|
}
|
|
15607
15606
|
});
|
|
@@ -29373,6 +29372,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
29373
29372
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
29374
29373
|
var init_idiom = __esm({
|
|
29375
29374
|
"../../core/ts/src/idiom.ts"() {
|
|
29375
|
+
"use strict";
|
|
29376
29376
|
init_define_HHP_CATALOG();
|
|
29377
29377
|
IDIOM_CONTEXTS = {
|
|
29378
29378
|
ios: { native: ["ios"] },
|
|
@@ -140194,8 +140194,12 @@ function createDevServer(opts = {}) {
|
|
|
140194
140194
|
if (url.startsWith("/v1/app-config/") && req.method === "GET") {
|
|
140195
140195
|
const override = effectiveAppConfigOverride(state);
|
|
140196
140196
|
return handleAppConfigRequest(req, res, state.app.meta, override, {
|
|
140197
|
-
//
|
|
140198
|
-
|
|
140197
|
+
// The host the client used, as for screens and `/v1/boot`: an emulator on an
|
|
140198
|
+
// `adb reverse` tunnel asks for `127.0.0.1`, and the configured `localhost` base
|
|
140199
|
+
// is rewritten to `10.0.2.2` there, which some AVDs cannot reach. The nav worker
|
|
140200
|
+
// never loaded, and every chrome slot bound to it failed open. A tenant host's
|
|
140201
|
+
// proxy and an explicit public base still win (requestServerBaseUrl).
|
|
140202
|
+
serverBaseUrl: requestServerBaseUrl(req, state.serverBaseUrl),
|
|
140199
140203
|
bundleIntegrity: (name) => bundleIntegritySync(name, state.tier5Dir)
|
|
140200
140204
|
}, deviceNetMocks(state));
|
|
140201
140205
|
}
|
|
@@ -145752,7 +145756,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
145752
145756
|
));
|
|
145753
145757
|
const cfgRes = await devFetch(`${base}/v1/app-config/${encodeURIComponent(app)}`, { headers: { "X-Himalaya-App": app } });
|
|
145754
145758
|
if (cfgRes.ok) {
|
|
145755
|
-
const served = await cfgRes.text();
|
|
145759
|
+
const served = pinBakedServerBaseUrl(await cfgRes.text(), base);
|
|
145756
145760
|
const prodText = withProdServeAppConfig(
|
|
145757
145761
|
opts.keepDevOnlyAppConfig ? served : withoutDevOnlyAppConfig(served),
|
|
145758
145762
|
config.environments?.prod
|
|
@@ -208647,13 +208651,19 @@ import { copyFileSync as copyFileSync3, mkdtempSync as mkdtempSync12, readFileSy
|
|
|
208647
208651
|
import { tmpdir as tmpdir13 } from "node:os";
|
|
208648
208652
|
import { basename as basename29, dirname as dirname66, join as join131, resolve as resolve93 } from "node:path";
|
|
208649
208653
|
import { fileURLToPath as fileURLToPath39 } from "node:url";
|
|
208650
|
-
function parseVerdict(value2) {
|
|
208654
|
+
function parseVerdict(value2, captured) {
|
|
208651
208655
|
const v2 = value2;
|
|
208652
208656
|
if (!v2 || !VERDICTS.has(v2.design) || !VERDICTS.has(v2.parity) || !CONFIDENCE.has(v2.confidence) || !Array.isArray(v2.findings)) return null;
|
|
208653
208657
|
for (const f2 of v2.findings) {
|
|
208654
|
-
if (!f2 || !PANES.has(f2.surface) || typeof f2.region !== "string" || typeof f2.what !== "string") return null;
|
|
208658
|
+
if (!f2 || !PANES.has(f2.surface) || !KINDS2.has(f2.kind) || typeof f2.region !== "string" || typeof f2.what !== "string") return null;
|
|
208655
208659
|
}
|
|
208656
|
-
|
|
208660
|
+
const findings = captured ? v2.findings.filter((f2) => captured.has(f2.surface)) : v2.findings;
|
|
208661
|
+
const blank = (panes) => findings.some((f2) => f2.kind === "blank" && panes.includes(f2.surface));
|
|
208662
|
+
const onlySkipped = (panes) => findings.length < v2.findings.length && v2.findings.some((f2) => panes.includes(f2.surface)) && !findings.some((f2) => panes.includes(f2.surface));
|
|
208663
|
+
const own6 = (said, panes) => (said === "partial" || said === "mismatch") && onlySkipped(panes) ? "match" : said;
|
|
208664
|
+
const design = blank(["web"]) ? worse(v2.design, "mismatch") : own6(v2.design, ["web"]);
|
|
208665
|
+
const parity = blank(["ios", "android"]) ? worse(v2.parity, "mismatch") : own6(v2.parity, ["ios", "android"]);
|
|
208666
|
+
return { verdict: worse(design, parity), design, parity, findings, confidence: v2.confidence };
|
|
208657
208667
|
}
|
|
208658
208668
|
function judgeArgs(schema2) {
|
|
208659
208669
|
return [
|
|
@@ -208709,14 +208719,14 @@ async function judgeStrip(strip3, screen, variant, opts = {}) {
|
|
|
208709
208719
|
} catch {
|
|
208710
208720
|
return cannotTell("the judge's answer was not JSON");
|
|
208711
208721
|
}
|
|
208712
|
-
return parseVerdict(parsed) ?? cannotTell("the judge's answer did not match tools/judges/fidelity/verdict.schema.json");
|
|
208722
|
+
return parseVerdict(parsed, opts.captured) ?? cannotTell("the judge's answer did not match tools/judges/fidelity/verdict.schema.json");
|
|
208713
208723
|
}
|
|
208714
|
-
var SOURCE_JUDGE_DIR, JUDGE_MODEL, spawnProcess, cannotTell, SEVERITY, worse, VERDICTS, CONFIDENCE, PANES;
|
|
208724
|
+
var SOURCE_JUDGE_DIR, JUDGE_MODEL, spawnProcess, cannotTell, SEVERITY, worse, VERDICTS, CONFIDENCE, PANES, KINDS2;
|
|
208715
208725
|
var init_judge = __esm({
|
|
208716
208726
|
"src/fidelity/judge.ts"() {
|
|
208717
208727
|
init_define_HHP_CATALOG();
|
|
208718
208728
|
SOURCE_JUDGE_DIR = resolve93(dirname66(fileURLToPath39(import.meta.url)), "../../../judges/fidelity");
|
|
208719
|
-
JUDGE_MODEL = "sonnet";
|
|
208729
|
+
JUDGE_MODEL = "claude-sonnet-5-5";
|
|
208720
208730
|
spawnProcess = (cmd, args, { cwd, input, timeoutMs }) => new Promise((done) => {
|
|
208721
208731
|
let stdout = "", stderr = "", timedOut = false;
|
|
208722
208732
|
const child = spawn7(cmd, args, { cwd, stdio: ["pipe", "pipe", "pipe"] });
|
|
@@ -208744,6 +208754,7 @@ var init_judge = __esm({
|
|
|
208744
208754
|
VERDICTS = /* @__PURE__ */ new Set(["match", "partial", "mismatch", "cannot_tell"]);
|
|
208745
208755
|
CONFIDENCE = /* @__PURE__ */ new Set(["low", "medium", "high"]);
|
|
208746
208756
|
PANES = /* @__PURE__ */ new Set(["web", "ios", "android"]);
|
|
208757
|
+
KINDS2 = /* @__PURE__ */ new Set(["blank", "missing", "colour", "clipping", "order", "type_scale"]);
|
|
208747
208758
|
}
|
|
208748
208759
|
});
|
|
208749
208760
|
|
|
@@ -209004,8 +209015,8 @@ async function runFidelity(root, opts = {}) {
|
|
|
209004
209015
|
verdict = skippedJudge(!w2?.file ? "no web render, and web is the reference for both design and parity" : frames.some((f2) => f2.noReference) ? `the mockup does not style ${variant}, and there is no native pane to compare with web` : "fewer than two captured panes, so there is nothing to compare");
|
|
209005
209016
|
} else {
|
|
209006
209017
|
stripFile = await strip3(judged2, stripPath2);
|
|
209007
|
-
verdict = await judge(stripFile, screen, variant, opts.judgeDir ? { judgeDir: opts.judgeDir } : {});
|
|
209008
209018
|
const captured = new Set(frames.filter((f2) => f2.file).map((f2) => f2.surface));
|
|
209019
|
+
verdict = await judge(stripFile, screen, variant, { captured, ...opts.judgeDir ? { judgeDir: opts.judgeDir } : {} });
|
|
209009
209020
|
const parity = captured.has("ios") || captured.has("android") ? verdict.parity : "cannot_tell";
|
|
209010
209021
|
verdict = { ...verdict, parity, verdict: worse(verdict.design, parity), findings: verdict.findings.filter((f2) => captured.has(f2.surface)) };
|
|
209011
209022
|
}
|
|
@@ -215587,16 +215598,16 @@ WHAT A PATCH DOES NOT CARRY \u2014 all reported in the output, never silent
|
|
|
215587
215598
|
async function patchCommand(ctx) {
|
|
215588
215599
|
const { io: io2, pos, flags, client: client2, runReleasePatch, patchBlastRadius } = ctx;
|
|
215589
215600
|
const PATCH_USAGE = "himi patch screen <id> --file <d.json> | bundle --file <b.js> (--for-screen <id>[,<id>]|--no-rebind) | tokens --file <t.json> | app-config --file <c.json> ; --app <a> (--draft|--live) [--from-release <id>] [--accept-regressions] [--notes <t>]";
|
|
215590
|
-
const
|
|
215601
|
+
const KINDS3 = ["screen", "bundle", "tokens", "app-config"];
|
|
215591
215602
|
if (flags.help === true) {
|
|
215592
215603
|
io2.log(PATCH_HELP);
|
|
215593
215604
|
return 0;
|
|
215594
215605
|
}
|
|
215595
215606
|
const kind = pos[1];
|
|
215596
|
-
if (!kind || !
|
|
215607
|
+
if (!kind || !KINDS3.includes(kind)) {
|
|
215597
215608
|
io2.error(JSON.stringify({
|
|
215598
215609
|
error: kind ? `unknown patch kind "${kind}"` : "patch needs a <kind>",
|
|
215599
|
-
kinds:
|
|
215610
|
+
kinds: KINDS3,
|
|
215600
215611
|
usage: PATCH_USAGE
|
|
215601
215612
|
}));
|
|
215602
215613
|
return 2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1622.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": [
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"artifactId": "himalaya-cli"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
"falconPackageHash": "
|
|
75
|
+
"falconPackageHash": "8493c132a80fa7832da317fe9ee68a3a247dd79165b74cbcc352855c"
|
|
76
76
|
}
|