@wix/himalaya-cli 0.1360.0 → 0.1361.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 +68 -7
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -7650,6 +7650,7 @@ function buttonVariant(style) {
|
|
|
7650
7650
|
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
|
|
7651
7651
|
var init_tokens = __esm({
|
|
7652
7652
|
"../../core/ts/src/tokens.ts"() {
|
|
7653
|
+
"use strict";
|
|
7653
7654
|
SYSTEM_FONT_FAMILY = "$system";
|
|
7654
7655
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
7655
7656
|
BUTTON_MIN_HIT_TARGET = 44;
|
|
@@ -7705,6 +7706,7 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
|
|
|
7705
7706
|
var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
|
|
7706
7707
|
var init_bindings = __esm({
|
|
7707
7708
|
"../../core/ts/src/bindings.ts"() {
|
|
7709
|
+
"use strict";
|
|
7708
7710
|
BINDING_SIGILS = ["service", "flag", "item", "t"];
|
|
7709
7711
|
BINDING_SIGIL_RE = new RegExp(
|
|
7710
7712
|
`^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
|
|
@@ -28055,6 +28057,7 @@ __export(capabilities_exports, {
|
|
|
28055
28057
|
capabilityConfigFindings: () => capabilityConfigFindings,
|
|
28056
28058
|
capabilityInfo: () => capabilityInfo,
|
|
28057
28059
|
capabilityIssues: () => capabilityIssues,
|
|
28060
|
+
capabilityRemedy: () => capabilityRemedy,
|
|
28058
28061
|
contentShell: () => contentShell,
|
|
28059
28062
|
envelopeSubsetIssues: () => envelopeSubsetIssues,
|
|
28060
28063
|
formatCapability: () => formatCapability,
|
|
@@ -28063,6 +28066,7 @@ __export(capabilities_exports, {
|
|
|
28063
28066
|
isShell: () => isShell,
|
|
28064
28067
|
lastDistFromJob: () => lastDistFromJob,
|
|
28065
28068
|
needsBinaryNotice: () => needsBinaryNotice,
|
|
28069
|
+
notInBinaryReason: () => notInBinaryReason,
|
|
28066
28070
|
readLastDist: () => readLastDist,
|
|
28067
28071
|
shellDistAdds: () => shellDistAdds,
|
|
28068
28072
|
shellServes: () => shellServes,
|
|
@@ -28107,6 +28111,8 @@ function capabilityInfo(rawId, sdkRef = []) {
|
|
|
28107
28111
|
const pkgs = PACKAGES[id] ?? [...new Set((CAPABILITY_IMPLIES[id] ?? []).flatMap((i2) => PACKAGES[i2] ?? []))];
|
|
28108
28112
|
const ios = iosPlanFor([id]);
|
|
28109
28113
|
const android = androidPlanFor([id]);
|
|
28114
|
+
const modules = modulesOf(id);
|
|
28115
|
+
const refusal = distAddRefusal(id);
|
|
28110
28116
|
return {
|
|
28111
28117
|
id,
|
|
28112
28118
|
import: [...pkgs],
|
|
@@ -28116,9 +28122,30 @@ function capabilityInfo(rawId, sdkRef = []) {
|
|
|
28116
28122
|
ios: { info: ios.info, entitlements: ios.entitlements },
|
|
28117
28123
|
android: { permissions: android.permissions, features: android.features.map((f2) => f2.name) },
|
|
28118
28124
|
shells: Object.fromEntries(SHELLS.map((s2) => [s2, shellSupport(s2, id)])),
|
|
28119
|
-
declare: DECLARE_HINT
|
|
28125
|
+
declare: DECLARE_HINT,
|
|
28126
|
+
description: summaryOf2(pkgs, sdkRef),
|
|
28127
|
+
implies: [...CAPABILITY_IMPLIES[id] ?? []],
|
|
28128
|
+
modules,
|
|
28129
|
+
components: Object.entries(COMPONENT_MODULES).filter(([, m2]) => modules.some((x2) => x2.id === m2)).map(([component]) => component).sort(),
|
|
28130
|
+
distAddable: refusal === null,
|
|
28131
|
+
distAddRefusal: refusal
|
|
28120
28132
|
};
|
|
28121
28133
|
}
|
|
28134
|
+
function modulesOf(id) {
|
|
28135
|
+
return NATIVE_MODULES.filter((m2) => {
|
|
28136
|
+
const caps = capabilitiesOfModule(m2);
|
|
28137
|
+
return caps.ios.includes(id) || caps.android.includes(id);
|
|
28138
|
+
}).map((m2) => ({
|
|
28139
|
+
id: m2.id,
|
|
28140
|
+
...m2.ios ? { ios: m2.ios.product } : {},
|
|
28141
|
+
...m2.android ? { android: m2.android.project } : {}
|
|
28142
|
+
}));
|
|
28143
|
+
}
|
|
28144
|
+
function summaryOf2(pkgs, sdkRef) {
|
|
28145
|
+
const d2 = pkgs.map((p2) => sdkRef.find((s2) => s2.name === p2)?.description ?? "").find((x2) => x2.trim()) ?? "";
|
|
28146
|
+
const first = /^[\s\S]*?[.!?](?=\s|$)/.exec(d2.trim())?.[0] ?? d2.trim();
|
|
28147
|
+
return first.replace(/\s+/g, " ").slice(0, 200);
|
|
28148
|
+
}
|
|
28122
28149
|
function allCapabilities(sdkRef = []) {
|
|
28123
28150
|
return KNOWN_CAPABILITY_IDS.map((id) => capabilityInfo(id, sdkRef));
|
|
28124
28151
|
}
|
|
@@ -28177,22 +28204,53 @@ function needsBinaryNotice(json6) {
|
|
|
28177
28204
|
function noImportLabel(id) {
|
|
28178
28205
|
return BRIDGE_CAPABILITY_IDS.includes(id) || id === "wix_platform" ? "a bridge capability (no @himalaya import of its own)" : "declare-only (no @himalaya import of its own)";
|
|
28179
28206
|
}
|
|
28180
|
-
function
|
|
28207
|
+
function notInBinaryReason(c2, shell) {
|
|
28208
|
+
const s2 = SHELL_CAPABILITIES[shell];
|
|
28209
|
+
if (s2 && !s2.extensible) {
|
|
28210
|
+
return `${s2.shared ? "one shared binary" : "a fixed binary"} \u2014 only a new ${shell} build adds it; a content package cannot`;
|
|
28211
|
+
}
|
|
28212
|
+
return c2.distAddRefusal ? `a dist build cannot add it: ${c2.id} ${c2.distAddRefusal}` : "a dist build would add it";
|
|
28213
|
+
}
|
|
28214
|
+
function capabilityRemedy(c2, shell) {
|
|
28215
|
+
const sel = shell ? SHELL_CAPABILITIES[shell] : void 0;
|
|
28216
|
+
if (shell && sel && !sel.extensible && c2.shells[shell] !== "serves") {
|
|
28217
|
+
return `${shell} is ${sel.shared ? "one shared binary" : "a fixed binary"} \u2014 only a new ${shell} build adds ${c2.id}; \`himi dist\` and an OTA push cannot. Or pick a shell whose binary already serves it (${SHELLS.filter((x2) => c2.shells[x2] === "serves").join(", ") || "none today"}).`;
|
|
28218
|
+
}
|
|
28219
|
+
if (!c2.distAddable) {
|
|
28220
|
+
const serves = SHELLS.filter((s2) => c2.shells[s2] === "serves");
|
|
28221
|
+
return `pick a shell whose binary already serves it (${serves.join(", ") || "none today"}) \u2014 a dist build cannot add it (${c2.id} ${c2.distAddRefusal}).`;
|
|
28222
|
+
}
|
|
28223
|
+
if (!c2.needsNativeBuild) return "declare it; `himi dist` registers it in an extensible shell that does not yet.";
|
|
28224
|
+
return "a NEW binary (`himi dist`) \u2014 declare it in config.ts `capabilities`, or list it in `capabilityEnvelope` to build it in now and turn it on later over the air. An OTA push alone cannot add it.";
|
|
28225
|
+
}
|
|
28226
|
+
function formatCapability(c2, shell) {
|
|
28181
28227
|
const lines = [`${c2.id} \u2014 ${c2.import.length ? `import from ${c2.import.join(" or ")}` : noImportLabel(c2.id)}`];
|
|
28228
|
+
if (c2.description) lines.push(` about: ${c2.description}`);
|
|
28182
28229
|
if (c2.exports.length) lines.push(` exports: ${c2.exports.join(", ")}`);
|
|
28183
28230
|
if (c2.verbs.length) lines.push(` verbs: ${c2.verbs.map((v2) => `capability.${c2.id}.${v2}`).join(", ")}`);
|
|
28231
|
+
if (c2.implies.length) lines.push(` implies: ${c2.implies.join(", ")} (declaring ${c2.id} grants it)`);
|
|
28184
28232
|
lines.push(` declare: ${c2.declare}`);
|
|
28185
28233
|
const iosKeys = [...Object.keys(c2.ios.info), ...Object.keys(c2.ios.entitlements)];
|
|
28186
28234
|
const androidKeys = [...c2.android.permissions, ...c2.android.features];
|
|
28187
28235
|
lines.push(
|
|
28188
28236
|
c2.needsNativeBuild ? ` binary: needs a NATIVE build \u2014 iOS ${iosKeys.join(", ") || "(nothing)"}; Android ${androidKeys.join(", ") || "(nothing)"}. An OTA push cannot add it.` : " binary: no native footprint \u2014 works in any shell that registers its handler."
|
|
28189
28237
|
);
|
|
28238
|
+
lines.push(
|
|
28239
|
+
c2.modules.length ? ` module: ${c2.modules.map((m2) => `${m2.id} (${[m2.ios && `iOS ${m2.ios}`, m2.android && `Android ${m2.android}`].filter(Boolean).join(", ")})`).join("; ")}` + (c2.components.length ? ` \u2014 also needed by the ${c2.components.join(", ")} component${c2.components.length === 1 ? "" : "s"}` : "") : " module: none \u2014 its native code is in the core runtime"
|
|
28240
|
+
);
|
|
28241
|
+
lines.push(` dist: ${c2.distAddable ? "a `himi dist` build can add it to an extensible shell" : `cannot be added at dist \u2014 ${c2.id} ${c2.distAddRefusal}`}`);
|
|
28190
28242
|
const serves = SHELLS.filter((s2) => c2.shells[s2] === "serves");
|
|
28191
28243
|
const adds = SHELLS.filter((s2) => c2.shells[s2] === "dist-adds");
|
|
28192
28244
|
const not = SHELLS.filter((s2) => c2.shells[s2] === "not-in-binary");
|
|
28245
|
+
const byReason = /* @__PURE__ */ new Map();
|
|
28246
|
+
for (const s2 of not) {
|
|
28247
|
+
const r2 = notInBinaryReason(c2, s2);
|
|
28248
|
+
byReason.set(r2, [...byReason.get(r2) ?? [], s2]);
|
|
28249
|
+
}
|
|
28193
28250
|
lines.push(
|
|
28194
|
-
` shells: served by ${serves.join(", ") || "none"}` + (adds.length ? `; \`himi dist\` adds it to ${adds.join(", ")}` : "") + (
|
|
28251
|
+
` shells: served by ${serves.join(", ") || "none"}` + (adds.length ? `; \`himi dist\` adds it to ${adds.join(", ")}` : "") + [...byReason].map(([r2, shells]) => `; NOT in the ${shells.join(", ")} binary (${r2})`).join("")
|
|
28195
28252
|
);
|
|
28253
|
+
if (adds.length || not.length) lines.push(` remedy: ${capabilityRemedy(c2, shell)}`);
|
|
28196
28254
|
return lines;
|
|
28197
28255
|
}
|
|
28198
28256
|
function formatCapabilityList(caps, shell) {
|
|
@@ -153530,7 +153588,7 @@ function rawTools() {
|
|
|
153530
153588
|
{
|
|
153531
153589
|
name: "himi_capabilities",
|
|
153532
153590
|
title: "Native capabilities (camera, location, push, \u2026)",
|
|
153533
|
-
description: "The native capabilities a worker can use: the @himalaya import, where to declare it (config.ts `capabilities` + the screen's logicBundle.declaredCapabilities), what the binary needs (usage strings, permissions), and which `himi dist --shell` binaries serve it. A capability with a native footprint only arrives with a new binary \u2014 an OTA push cannot add it. Offline.",
|
|
153591
|
+
description: "The native capabilities a worker can use: the @himalaya import, where to declare it (config.ts `capabilities` + the screen's logicBundle.declaredCapabilities), what the binary needs (usage strings, permissions), the native module it links (`modules`) and the components that need that module (`components`), and which `himi dist --shell` binaries serve it. A capability with a native footprint only arrives with a new binary \u2014 an OTA push cannot add it; list it in config.ts `capabilityEnvelope` to build it in now and turn it on later. `distAddable` / `distAddRefusal` say whether a `himi dist` build can add it to an extensible shell, and why not. Offline.",
|
|
153534
153592
|
annotations: LEARN,
|
|
153535
153593
|
inputSchema: z3.object({
|
|
153536
153594
|
id: z3.string().optional().describe("One capability, e.g. `camera`. Omit for all."),
|
|
@@ -178515,7 +178573,7 @@ Guides in your browser: ${idx.portalUrl}`);
|
|
|
178515
178573
|
return 0;
|
|
178516
178574
|
}
|
|
178517
178575
|
case "capabilities": {
|
|
178518
|
-
const { allCapabilities: allCapabilities2, capabilityInfo: capabilityInfo2, contentShell: contentShell2, formatCapability: formatCapability2, formatCapabilityList: formatCapabilityList2, isShell: isShell2, SHELLS: SHELLS2 } = await Promise.resolve().then(() => (init_capabilities(), capabilities_exports));
|
|
178576
|
+
const { allCapabilities: allCapabilities2, capabilityInfo: capabilityInfo2, contentShell: contentShell2, formatCapability: formatCapability2, formatCapabilityList: formatCapabilityList2, isShell: isShell2, notInBinaryReason: notInBinaryReason2, SHELLS: SHELLS2 } = await Promise.resolve().then(() => (init_capabilities(), capabilities_exports));
|
|
178519
178577
|
const sdkRef = loadSdkReference();
|
|
178520
178578
|
const shell = contentShell2(contentDir(flags), str9(flags.shell));
|
|
178521
178579
|
if (shell && !isShell2(shell)) {
|
|
@@ -178533,8 +178591,11 @@ Guides in your browser: ${idx.portalUrl}`);
|
|
|
178533
178591
|
print({ ok: true, ...c2, ...shell ? { shell, servedByShell: c2.shells[shell] === "serves" } : {} });
|
|
178534
178592
|
return 0;
|
|
178535
178593
|
}
|
|
178536
|
-
for (const line of formatCapability2(c2)) io2.log(line);
|
|
178537
|
-
if (shell)
|
|
178594
|
+
for (const line of formatCapability2(c2, shell ?? void 0)) io2.log(line);
|
|
178595
|
+
if (shell) {
|
|
178596
|
+
const v2 = c2.shells[shell];
|
|
178597
|
+
io2.log(` ${shell}: ${v2 === "serves" ? "serves it" : v2 === "dist-adds" ? "does not serve it yet \u2014 `himi dist` adds it" : `does NOT serve it \u2014 ${notInBinaryReason2(c2, shell)}`}`);
|
|
178598
|
+
}
|
|
178538
178599
|
return 0;
|
|
178539
178600
|
}
|
|
178540
178601
|
const caps = allCapabilities2(sdkRef);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1361.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": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "b5d19122c31f70fd18ec1b8a2e6d66e67ad3c2ffb5a4545a8bc432a1"
|
|
75
75
|
}
|