@wix/himalaya-cli 0.1156.0 → 0.1157.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +14 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +8 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +4 -1
- package/dist/cli.mjs +84 -28
- package/package.json +2 -2
|
@@ -137,6 +137,8 @@ export interface WebViewConfig {
|
|
|
137
137
|
coverBandColor?: string;
|
|
138
138
|
hideWixAds?: boolean;
|
|
139
139
|
hideHostedSiteFooter?: boolean;
|
|
140
|
+
sessionBridge?: boolean;
|
|
141
|
+
hostedSiteAdapter?: "" | "wix" | "base44";
|
|
140
142
|
}
|
|
141
143
|
export declare function vstack(props: {
|
|
142
144
|
spacing?: number;
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts
CHANGED
|
@@ -3036,6 +3036,14 @@ export interface WebViewConfig {
|
|
|
3036
3036
|
* script, like {@link hideHostedSiteHeader}. No-op on web (cross-origin iframe).
|
|
3037
3037
|
*/
|
|
3038
3038
|
hideHostedSiteFooter?: boolean;
|
|
3039
|
+
/**
|
|
3040
|
+
* RFC 0062 §5.8 — sign the page in natively. Runs only when {@link hostedSiteAdapter} names an
|
|
3041
|
+
* adapter AND the app declares that adapter's capability; the host seeds the adapter's session
|
|
3042
|
+
* into the page's own storage at document start, on the exact {@link allowedOrigins} only.
|
|
3043
|
+
*/
|
|
3044
|
+
sessionBridge?: boolean;
|
|
3045
|
+
/** RFC 0062 §5.8 — which site adapter the host runs: `""` (none) | `"wix"` | `"base44"`. */
|
|
3046
|
+
hostedSiteAdapter?: "" | "wix" | "base44";
|
|
3039
3047
|
}
|
|
3040
3048
|
/**
|
|
3041
3049
|
* Embeddable WebView component (web-in-SDUI). WebViews have no intrinsic height,
|
package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts
CHANGED
|
@@ -1051,6 +1051,13 @@ export declare const screenDescriptorSchema: {
|
|
|
1051
1051
|
readonly hideHostedSiteFooter: {
|
|
1052
1052
|
readonly type: "boolean";
|
|
1053
1053
|
};
|
|
1054
|
+
readonly sessionBridge: {
|
|
1055
|
+
readonly type: "boolean";
|
|
1056
|
+
};
|
|
1057
|
+
readonly hostedSiteAdapter: {
|
|
1058
|
+
readonly type: "string";
|
|
1059
|
+
readonly enum: readonly ["", "wix", "base44"];
|
|
1060
|
+
};
|
|
1054
1061
|
};
|
|
1055
1062
|
};
|
|
1056
1063
|
};
|
|
@@ -2012,6 +2019,13 @@ export declare const widgetSnapshotSchema: {
|
|
|
2012
2019
|
readonly hideHostedSiteFooter: {
|
|
2013
2020
|
readonly type: "boolean";
|
|
2014
2021
|
};
|
|
2022
|
+
readonly sessionBridge: {
|
|
2023
|
+
readonly type: "boolean";
|
|
2024
|
+
};
|
|
2025
|
+
readonly hostedSiteAdapter: {
|
|
2026
|
+
readonly type: "string";
|
|
2027
|
+
readonly enum: readonly ["", "wix", "base44"];
|
|
2028
|
+
};
|
|
2015
2029
|
};
|
|
2016
2030
|
};
|
|
2017
2031
|
};
|
|
@@ -8634,7 +8634,10 @@ var screenDescriptorSchema = {
|
|
|
8634
8634
|
coverBandColor: { type: "string" },
|
|
8635
8635
|
// RFC 0062 — binary-shipped chrome hiding for a hosted site (no page script over the air).
|
|
8636
8636
|
hideWixAds: { type: "boolean" },
|
|
8637
|
-
hideHostedSiteFooter: { type: "boolean" }
|
|
8637
|
+
hideHostedSiteFooter: { type: "boolean" },
|
|
8638
|
+
// RFC 0062 §5.8 — the native session bridge (fields 47/48).
|
|
8639
|
+
sessionBridge: { type: "boolean" },
|
|
8640
|
+
hostedSiteAdapter: { type: "string", enum: ["", "wix", "base44"] }
|
|
8638
8641
|
}
|
|
8639
8642
|
}
|
|
8640
8643
|
}
|
|
@@ -13169,6 +13172,10 @@ function siteWebViewPreset(site) {
|
|
|
13169
13172
|
hideHostedSiteFooter: chrome.hideSiteFooter,
|
|
13170
13173
|
// Wix ads only exist on Wix free sites; a Base44 site never gets the Wix selectors.
|
|
13171
13174
|
hideWixAds: site.kind === "wix" && chrome.hideWixAds,
|
|
13175
|
+
// RFC 0062 §5.8 — a Base44 app is signed in natively and its session carried into the page.
|
|
13176
|
+
// The host still refuses unless the app declares the `base44` capability. Wix keeps its
|
|
13177
|
+
// item-2 bridge (not built yet), so a Wix site carries neither field.
|
|
13178
|
+
...site.kind === "base44" ? { hostedSiteAdapter: "base44", sessionBridge: true } : {},
|
|
13172
13179
|
pullToRefresh: true,
|
|
13173
13180
|
showProgressBar: true,
|
|
13174
13181
|
syncStatusBarAppearance: true,
|
|
@@ -7587,7 +7587,10 @@ var screenDescriptorSchema = {
|
|
|
7587
7587
|
coverBandColor: { type: "string" },
|
|
7588
7588
|
// RFC 0062 — binary-shipped chrome hiding for a hosted site (no page script over the air).
|
|
7589
7589
|
hideWixAds: { type: "boolean" },
|
|
7590
|
-
hideHostedSiteFooter: { type: "boolean" }
|
|
7590
|
+
hideHostedSiteFooter: { type: "boolean" },
|
|
7591
|
+
// RFC 0062 §5.8 — the native session bridge (fields 47/48).
|
|
7592
|
+
sessionBridge: { type: "boolean" },
|
|
7593
|
+
hostedSiteAdapter: { type: "string", enum: ["", "wix", "base44"] }
|
|
7591
7594
|
}
|
|
7592
7595
|
}
|
|
7593
7596
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -6783,7 +6783,6 @@ function walk(node, registry, path2, out2) {
|
|
|
6783
6783
|
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS;
|
|
6784
6784
|
var init_tokens = __esm({
|
|
6785
6785
|
"../../core/ts/src/tokens.ts"() {
|
|
6786
|
-
"use strict";
|
|
6787
6786
|
SYSTEM_FONT_FAMILY = "$system";
|
|
6788
6787
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
6789
6788
|
COLOR_TOKEN_PROPS = {
|
|
@@ -7672,7 +7671,10 @@ var init_validator = __esm({
|
|
|
7672
7671
|
coverBandColor: { type: "string" },
|
|
7673
7672
|
// RFC 0062 — binary-shipped chrome hiding for a hosted site (no page script over the air).
|
|
7674
7673
|
hideWixAds: { type: "boolean" },
|
|
7675
|
-
hideHostedSiteFooter: { type: "boolean" }
|
|
7674
|
+
hideHostedSiteFooter: { type: "boolean" },
|
|
7675
|
+
// RFC 0062 §5.8 — the native session bridge (fields 47/48).
|
|
7676
|
+
sessionBridge: { type: "boolean" },
|
|
7677
|
+
hostedSiteAdapter: { type: "string", enum: ["", "wix", "base44"] }
|
|
7676
7678
|
}
|
|
7677
7679
|
}
|
|
7678
7680
|
}
|
|
@@ -73422,6 +73424,7 @@ function pageId(c, used) {
|
|
|
73422
73424
|
}
|
|
73423
73425
|
function deriveSiteShell(input) {
|
|
73424
73426
|
const origin = normalizeSiteOrigin(input.siteUrl);
|
|
73427
|
+
const kind = input.kind ?? siteKindForOrigin(origin);
|
|
73425
73428
|
const notes = [];
|
|
73426
73429
|
const published = input.look.sitePages ?? [];
|
|
73427
73430
|
const mainPageId = input.look.mainPageId;
|
|
@@ -73440,7 +73443,14 @@ function deriveSiteShell(input) {
|
|
|
73440
73443
|
};
|
|
73441
73444
|
const navLinks = input.look.navLinks ?? [];
|
|
73442
73445
|
let homeTitle = "Home";
|
|
73443
|
-
|
|
73446
|
+
const routes = (input.routes ?? []).filter((r) => isNavigableRoute(r.path));
|
|
73447
|
+
if (routes.length) {
|
|
73448
|
+
for (const r of routes) {
|
|
73449
|
+
const path2 = r.path.startsWith("/") ? r.path : `/${r.path}`;
|
|
73450
|
+
add(routeTitle(r), path2, `${origin.replace(/\/$/, "")}${path2}`);
|
|
73451
|
+
}
|
|
73452
|
+
notes.push(`site pages: taken from the Base44 app book's ${routes.length} route(s) \u2014 edit \`site.pages\` to rename or reorder them.`);
|
|
73453
|
+
} else if (navLinks.length) {
|
|
73444
73454
|
for (const link of navLinks) {
|
|
73445
73455
|
const path2 = pathOnSite(origin, link.href);
|
|
73446
73456
|
if (path2 === null) continue;
|
|
@@ -73501,22 +73511,39 @@ function deriveSiteShell(input) {
|
|
|
73501
73511
|
...placement === "tab" ? {} : { placement }
|
|
73502
73512
|
}))
|
|
73503
73513
|
];
|
|
73504
|
-
if (!published.length && !navLinks.length) {
|
|
73514
|
+
if (!published.length && !navLinks.length && !routes.length) {
|
|
73505
73515
|
notes.push("site pages: the analysis read no page list, so the map has only Home \u2014 add the site's pages to `site.pages` before --apply.");
|
|
73506
73516
|
}
|
|
73507
73517
|
const site = {
|
|
73508
73518
|
origin,
|
|
73509
|
-
kind
|
|
73519
|
+
kind,
|
|
73510
73520
|
pages,
|
|
73511
73521
|
// Hidden by default — the product decision for the site shell (RFC 0062 §6); the owner can
|
|
73512
|
-
// turn any of them back on here, and the flags ride the OTA descriptor.
|
|
73513
|
-
|
|
73522
|
+
// turn any of them back on here, and the flags ride the OTA descriptor. A Base44 app has no
|
|
73523
|
+
// Wix ads to hide, so it never carries the flag (RFC 0062 §5.8).
|
|
73524
|
+
chrome: kind === "wix" ? { hideSiteHeader: true, hideSiteFooter: true, hideWixAds: true } : { hideSiteHeader: true, hideSiteFooter: true }
|
|
73514
73525
|
};
|
|
73515
73526
|
assertSiteShellConfig(site);
|
|
73516
73527
|
const tabTitles = pages.filter((p) => (p.placement ?? "tab") === "tab").map((p) => p.title);
|
|
73517
73528
|
notes.unshift(`site pages: ${pages.length} derived \u2014 tabs ${tabTitles.join(", ")}; edit \`site.pages\` in provisioning.overlay.json to change them.`);
|
|
73518
73529
|
return { site, notes };
|
|
73519
73530
|
}
|
|
73531
|
+
function siteKindForOrigin(origin) {
|
|
73532
|
+
const host = new URL(origin).hostname.toLowerCase();
|
|
73533
|
+
const isBase44 = ["base44.app", "base44.com"].some((d) => host === d || host.endsWith(`.${d}`));
|
|
73534
|
+
return isBase44 ? "base44" : "wix";
|
|
73535
|
+
}
|
|
73536
|
+
function isNavigableRoute(path2) {
|
|
73537
|
+
const p = path2.trim();
|
|
73538
|
+
if (!p || p === "/" || p.includes(":") || p.includes("*")) return false;
|
|
73539
|
+
return !/^\/?(login|signin|sign-in|register|signup|logout)(\/|$)/i.test(p);
|
|
73540
|
+
}
|
|
73541
|
+
function routeTitle(r) {
|
|
73542
|
+
const fromComponent = r.component?.replace(/(Page|Screen|View)$/, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
73543
|
+
if (fromComponent) return fromComponent;
|
|
73544
|
+
const seg = r.path.split("/").filter(Boolean).pop() ?? r.path;
|
|
73545
|
+
return seg.replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
73546
|
+
}
|
|
73520
73547
|
var DERIVED_SITE_MAX_PAGES, SITE_PAGE_TITLE_MAX, ROLE_ICON, TAB_ROLES, SYSTEM_SEGMENT, SYSTEM_TITLE, HOME_WORD, oneLine2;
|
|
73521
73548
|
var init_site_shell_derive = __esm({
|
|
73522
73549
|
"src/site-analyze/site-shell-derive.ts"() {
|
|
@@ -74174,12 +74201,13 @@ __export(cli_exports2, {
|
|
|
74174
74201
|
SITE_FUNCTION_USAGE: () => SITE_FUNCTION_USAGE,
|
|
74175
74202
|
applyNeedsClient: () => applyNeedsClient,
|
|
74176
74203
|
assetFetchFor: () => assetFetchFor,
|
|
74204
|
+
base44BookRoutes: () => base44BookRoutes,
|
|
74177
74205
|
noteWithWarnings: () => noteWithWarnings,
|
|
74178
74206
|
ownerSiteFor: () => ownerSiteFor,
|
|
74179
74207
|
runSiteAnalyze: () => runSiteAnalyze,
|
|
74180
74208
|
runSiteFunctionCli: () => runSiteFunctionCli
|
|
74181
74209
|
});
|
|
74182
|
-
import { readFileSync as readFileSync88 } from "node:fs";
|
|
74210
|
+
import { existsSync as existsSync71, readFileSync as readFileSync88 } from "node:fs";
|
|
74183
74211
|
import { resolve as resolve55 } from "node:path";
|
|
74184
74212
|
function applyNeedsClient(shell) {
|
|
74185
74213
|
if (shell === void 0 || !SHELL_NAMES2.includes(shell)) return true;
|
|
@@ -74230,7 +74258,11 @@ async function runSiteAnalyze(opts) {
|
|
|
74230
74258
|
);
|
|
74231
74259
|
if (opts.shell !== void 0 && isSiteShell(opts.shell)) {
|
|
74232
74260
|
try {
|
|
74233
|
-
const
|
|
74261
|
+
const kind = siteKindForOrigin(result.book.input.siteUrl);
|
|
74262
|
+
const book = kind === "base44" ? base44BookRoutes(resolve55(cwd, ".himi/base44-book/book.json"), result.book.input.siteUrl) : void 0;
|
|
74263
|
+
const routes = book?.routes;
|
|
74264
|
+
if (book?.skipped) result.warnings = [...result.warnings ?? [], book.skipped];
|
|
74265
|
+
const derived = deriveSiteShell({ siteUrl: result.book.input.siteUrl, look: result.book.look, kind, routes });
|
|
74234
74266
|
result.provisioningOverlay.site = derived.site;
|
|
74235
74267
|
const warnings2 = (result.warnings ?? []).map(
|
|
74236
74268
|
(w) => !opts.clientId?.trim() && w.startsWith("no --client-id:") ? `no --client-id: fine for --shell ${opts.shell} \u2014 a site shell binds no client, so --apply works without one. Only the vertical probes were skipped, so the catalog has no counts.` : w
|
|
@@ -74325,6 +74357,30 @@ async function runSiteFunctionCli(opts) {
|
|
|
74325
74357
|
fetchImpl: opts.fetchImpl
|
|
74326
74358
|
});
|
|
74327
74359
|
}
|
|
74360
|
+
function base44BookRoutes(bookPath, siteUrl) {
|
|
74361
|
+
if (!existsSync71(bookPath)) return void 0;
|
|
74362
|
+
try {
|
|
74363
|
+
const book = JSON.parse(readFileSync88(bookPath, "utf8"));
|
|
74364
|
+
if (book.kind !== "base44-app-book" || !Array.isArray(book.routes)) return void 0;
|
|
74365
|
+
const host = (u) => {
|
|
74366
|
+
try {
|
|
74367
|
+
return typeof u === "string" ? new URL(u).host.toLowerCase() : "";
|
|
74368
|
+
} catch {
|
|
74369
|
+
return "";
|
|
74370
|
+
}
|
|
74371
|
+
};
|
|
74372
|
+
const want = host(siteUrl);
|
|
74373
|
+
const have = [host(book.input?.url), host(book.identity?.publishedUrl)].filter(Boolean);
|
|
74374
|
+
if (!have.includes(want)) {
|
|
74375
|
+
return { skipped: `site pages: ignored .himi/base44-book \u2014 it was read from ${have[0] || "an unknown app"}, not ${want}; re-run \`himi base44 analyze --url ${siteUrl}\` for this site.` };
|
|
74376
|
+
}
|
|
74377
|
+
return {
|
|
74378
|
+
routes: book.routes.filter((r) => !!r && typeof r.path === "string").map((r) => ({ path: r.path, ...typeof r.component === "string" ? { component: r.component } : {} }))
|
|
74379
|
+
};
|
|
74380
|
+
} catch {
|
|
74381
|
+
return void 0;
|
|
74382
|
+
}
|
|
74383
|
+
}
|
|
74328
74384
|
var APPLY_NEEDS_CLIENT, FUNCTION_OPS;
|
|
74329
74385
|
var init_cli2 = __esm({
|
|
74330
74386
|
"src/site-analyze/cli.ts"() {
|
|
@@ -74559,7 +74615,7 @@ __export(site_create_exports, {
|
|
|
74559
74615
|
runSiteList: () => runSiteList,
|
|
74560
74616
|
writeProvisioningBinding: () => writeProvisioningBinding
|
|
74561
74617
|
});
|
|
74562
|
-
import { existsSync as
|
|
74618
|
+
import { existsSync as existsSync72, readFileSync as readFileSync89, writeFileSync as writeFileSync34 } from "node:fs";
|
|
74563
74619
|
import { resolve as resolvePath2 } from "node:path";
|
|
74564
74620
|
function oauthClientName(projectName) {
|
|
74565
74621
|
return `${projectName} client`;
|
|
@@ -74708,7 +74764,7 @@ async function runSiteCreate(opts) {
|
|
|
74708
74764
|
if (!wantOauthApp) return { ...base, nextSteps: nextSteps(metaSiteId) };
|
|
74709
74765
|
return { ...base, clientId, redirectUri, nextSteps: nextSteps(metaSiteId, clientId) };
|
|
74710
74766
|
}
|
|
74711
|
-
function writeProvisioningBinding(target, binding2, fs = { existsSync:
|
|
74767
|
+
function writeProvisioningBinding(target, binding2, fs = { existsSync: existsSync72, readFileSync: readFileSync89, writeFileSync: writeFileSync34 }) {
|
|
74712
74768
|
const msid = binding2.siteId;
|
|
74713
74769
|
const path2 = resolvePath2(target);
|
|
74714
74770
|
const committed = committedShellProvisioning(path2);
|
|
@@ -75381,7 +75437,7 @@ var init_context = __esm({
|
|
|
75381
75437
|
});
|
|
75382
75438
|
|
|
75383
75439
|
// src/cli.ts
|
|
75384
|
-
import { mkdtempSync as mkdtempSync5, readFileSync as readFileSync90, mkdirSync as mkdirSync39, writeFileSync as writeFileSync35, existsSync as
|
|
75440
|
+
import { mkdtempSync as mkdtempSync5, readFileSync as readFileSync90, mkdirSync as mkdirSync39, writeFileSync as writeFileSync35, existsSync as existsSync73, rmSync as rmSync20, readdirSync as readdirSync32, statSync as statSync20, lstatSync as lstatSync17, accessSync, constants as constants3, renameSync as renameSync9, cpSync as cpSync3 } from "node:fs";
|
|
75385
75441
|
import { execFile as execFile2, execFileSync as execFileSync7, spawnSync as spawnSync5, spawn as spawn7 } from "node:child_process";
|
|
75386
75442
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
75387
75443
|
import { createHash as createHash36, randomUUID as randomUUID8 } from "node:crypto";
|
|
@@ -78609,7 +78665,7 @@ function createUpdateRunner(spawn8 = spawnSync5) {
|
|
|
78609
78665
|
reexec: (argv) => {
|
|
78610
78666
|
const root = globalNodeModulesRoot();
|
|
78611
78667
|
const entry = root ? join74(root, "@wix", "himalaya-cli", "dist", "cli.mjs") : void 0;
|
|
78612
|
-
if (!entry || !
|
|
78668
|
+
if (!entry || !existsSync73(entry)) return void 0;
|
|
78613
78669
|
const result = spawnSync5(process.execPath, [entry, ...argv], {
|
|
78614
78670
|
// inherit keeps PIPED STDIN working — commands that read stdin must survive a re-exec.
|
|
78615
78671
|
stdio: "inherit",
|
|
@@ -79380,7 +79436,7 @@ async function nativeConfigAdvisories(app, configSource) {
|
|
|
79380
79436
|
const { iosProjectYml: iosProjectYml2 } = await Promise.resolve().then(() => (init_paths2(), paths_exports));
|
|
79381
79437
|
const { androidOptedIn: androidOptedIn3, LABEL_IOS_SPLASH: LABEL_IOS_SPLASH2 } = await Promise.resolve().then(() => (init_splash(), splash_exports));
|
|
79382
79438
|
const iosYmlPath = iosProjectYml2(app);
|
|
79383
|
-
const iosYml =
|
|
79439
|
+
const iosYml = existsSync73(iosYmlPath) ? readFileSync90(iosYmlPath, "utf8") : "";
|
|
79384
79440
|
let optedIn = iosYml.includes(LABEL_IOS_SPLASH2);
|
|
79385
79441
|
if (!optedIn) {
|
|
79386
79442
|
const { androidManifestPath: androidManifestPath3 } = await Promise.resolve().then(() => (init_gen_native_config(), gen_native_config_exports));
|
|
@@ -79446,7 +79502,7 @@ function keptPlan(kept) {
|
|
|
79446
79502
|
}
|
|
79447
79503
|
async function initFromRemoteTemplate(name, parentDir, template, c) {
|
|
79448
79504
|
const dir = resolve56(parentDir, name);
|
|
79449
|
-
if (
|
|
79505
|
+
if (existsSync73(join74(dir, "himalaya.content.json"))) {
|
|
79450
79506
|
throw new Error(`content package already exists at ${dir}`);
|
|
79451
79507
|
}
|
|
79452
79508
|
const r = await c.fetchTemplateSource(TEMPLATE_APP_PREFIX + template);
|
|
@@ -79489,7 +79545,7 @@ function symlinkDestinationIssue(dest) {
|
|
|
79489
79545
|
function restoreDestinationIssue(dest, force) {
|
|
79490
79546
|
const link = symlinkDestinationIssue(dest);
|
|
79491
79547
|
if (link) return link;
|
|
79492
|
-
if (!
|
|
79548
|
+
if (!existsSync73(dest)) return null;
|
|
79493
79549
|
if (!statSync20(dest).isDirectory()) {
|
|
79494
79550
|
return { error: `${dest} exists and is not a directory`, hint: "pass --out/--name to land somewhere else, or remove the file" };
|
|
79495
79551
|
}
|
|
@@ -79504,7 +79560,7 @@ function restoreDestinationIssue(dest, force) {
|
|
|
79504
79560
|
function isHimalayaMonorepoCheckout(start) {
|
|
79505
79561
|
let dir = resolve56(start);
|
|
79506
79562
|
for (; ; ) {
|
|
79507
|
-
if (
|
|
79563
|
+
if (existsSync73(join74(dir, "tools", "himi-cli", "src", "cli.ts")) && existsSync73(join74(dir, "core", "serve", "src", "server.ts"))) return true;
|
|
79508
79564
|
const parent = dirname40(dir);
|
|
79509
79565
|
if (parent === dir) return false;
|
|
79510
79566
|
dir = parent;
|
|
@@ -79832,7 +79888,7 @@ Seed your coding agent with \`himi agent-init\`. Guides: ${idx.portalUrl}`);
|
|
|
79832
79888
|
...res.removed.length ? { removed: res.removed, note: "older copies at the app root, moved to .himi/legacy-agent-files/ (a backup, in case one became app code) \u2014 the current ones live in .agents/skills/himalaya/" } : {},
|
|
79833
79889
|
// In a git repo the refresh moves the diff identity an earlier `himi test` attested (that
|
|
79834
79890
|
// hash is shared with the repo gates and deliberately exempts nothing but its own metadata).
|
|
79835
|
-
...
|
|
79891
|
+
...existsSync73(join74(dir, ".himi", "attestations", "latest.json")) ? { next: "if `himi push` then refuses the attestation as stale, re-run `himi test` \u2014 in a git checkout this refresh changed the tree it covered" } : {},
|
|
79836
79892
|
...res.skipped.length ? { skipped: res.skipped } : {},
|
|
79837
79893
|
portalUrl: idx.portalUrl
|
|
79838
79894
|
});
|
|
@@ -80065,7 +80121,7 @@ async function producedWidgetFamilies(dir) {
|
|
|
80065
80121
|
}
|
|
80066
80122
|
return { families, source: "dist/bundles" };
|
|
80067
80123
|
}
|
|
80068
|
-
var boardOpen = (dir) =>
|
|
80124
|
+
var boardOpen = (dir) => existsSync73(join74(dir, ".himi", "studio", "index.html"));
|
|
80069
80125
|
var BOARD_REFRESHERS = /* @__PURE__ */ new Set(["render", "test", "validate", "build", "push", "icon", "site", "ux", "progress"]);
|
|
80070
80126
|
async function leaveForBoard(dir, record2, value) {
|
|
80071
80127
|
if (!boardOpen(dir)) return;
|
|
@@ -80381,7 +80437,7 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
80381
80437
|
const owed = openApprovals2(readApprovals2(dir).events).length;
|
|
80382
80438
|
next.push(`carried the planning journal into the app (${carried.join(", ")}${owed ? `; ${owed} approval${owed === 1 ? "" : "s"} still owed` : ""}) \u2014 \`himi progress --brief\` there shows it`);
|
|
80383
80439
|
}
|
|
80384
|
-
const planInParent = ["SPEC.md", "MOBILE-UX.md"].filter((f) =>
|
|
80440
|
+
const planInParent = ["SPEC.md", "MOBILE-UX.md"].filter((f) => existsSync73(join74(parentDir, f)));
|
|
80385
80441
|
if (planInParent.length) {
|
|
80386
80442
|
next.push(`${planInParent.join(" and ")} in ${parentDir} ${planInParent.length > 1 ? "are" : "is"} not the app's \u2014 if that is the approved plan, move it over the template's boilerplate in ${dir}`);
|
|
80387
80443
|
}
|
|
@@ -80661,7 +80717,7 @@ ${doNow.map((l) => ` ${l}`).join("\n")}`);
|
|
|
80661
80717
|
const result = { ...outcome.result, ...fromSpec };
|
|
80662
80718
|
const adoptDir = contentDir(flags);
|
|
80663
80719
|
const kept = flags["dry-run"] !== true && (outcome.code === 0 || outcome.result.forcedKeep === true);
|
|
80664
|
-
if (kept &&
|
|
80720
|
+
if (kept && existsSync73(join74(adoptDir, adoptBits.ADOPT_FILE))) {
|
|
80665
80721
|
try {
|
|
80666
80722
|
const inv = adoptBits.inspectApp(adoptDir);
|
|
80667
80723
|
adoptBits.writeInventory(adoptDir, inv, { companions: "if-missing" });
|
|
@@ -81225,7 +81281,7 @@ ${doNow.map((l) => ` ${l}`).join("\n")}`);
|
|
|
81225
81281
|
case "studio": {
|
|
81226
81282
|
const { openStudio: openStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
|
|
81227
81283
|
const dir = contentDir(flags);
|
|
81228
|
-
if (!
|
|
81284
|
+
if (!existsSync73(join74(dir, "himalaya.content.json"))) {
|
|
81229
81285
|
io.error(JSON.stringify({ ok: false, error: "not_a_content_package", dir, hint: "run from the app directory (or pass --content <dir>) \u2014 the board reads that package's .himi/" }));
|
|
81230
81286
|
return 2;
|
|
81231
81287
|
}
|
|
@@ -81303,7 +81359,7 @@ ${handover.hint[0].toUpperCase()}${handover.hint.slice(1)}.`);
|
|
|
81303
81359
|
} = await Promise.resolve().then(() => (init_progress(), progress_exports));
|
|
81304
81360
|
const dir = contentDir(flags);
|
|
81305
81361
|
const journal2 = journalPath2(dir);
|
|
81306
|
-
const isContentPackage =
|
|
81362
|
+
const isContentPackage = existsSync73(join74(dir, "himalaya.content.json"));
|
|
81307
81363
|
const hint = isContentPackage ? {} : { hint: "no himalaya.content.json here \u2014 run from the app directory (or pass --content <dir>) so the build board finds this journal" };
|
|
81308
81364
|
const message = pos.slice(1).join(" ").trim();
|
|
81309
81365
|
const approvalFlags = ["approve", "done", "drop"].filter((f) => flags[f] !== void 0);
|
|
@@ -81455,7 +81511,7 @@ ${handover.hint[0].toUpperCase()}${handover.hint.slice(1)}.`);
|
|
|
81455
81511
|
case "test": {
|
|
81456
81512
|
const dir = contentDir(flags);
|
|
81457
81513
|
const structuredOutput = flags.json === true || io.isTTY !== true;
|
|
81458
|
-
if (
|
|
81514
|
+
if (existsSync73(join74(dir, "functions"))) {
|
|
81459
81515
|
const { invokeLocalFunction: invokeLocalFunction2, loadFunctionsApp: loadFunctionsApp2 } = await Promise.resolve().then(() => (init_functions(), functions_exports));
|
|
81460
81516
|
const loaded = await loadFunctionsApp2(dir);
|
|
81461
81517
|
const results = [];
|
|
@@ -82386,7 +82442,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
82386
82442
|
io.error(JSON.stringify(linked));
|
|
82387
82443
|
return 1;
|
|
82388
82444
|
}
|
|
82389
|
-
if (
|
|
82445
|
+
if (existsSync73(dest)) {
|
|
82390
82446
|
if (!statSync20(dest).isDirectory()) {
|
|
82391
82447
|
io.error(JSON.stringify({
|
|
82392
82448
|
error: `${dest} exists and is not a directory`,
|
|
@@ -82399,7 +82455,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
82399
82455
|
io.error(JSON.stringify({ error: `${dest} already exists and is not empty`, hint: "pass --force to write into it anyway (merging, and naming what it keeps), --replace to restore exactly what was archived, or --out/--name to land somewhere else" }));
|
|
82400
82456
|
return 1;
|
|
82401
82457
|
}
|
|
82402
|
-
if (replace && occupied && !
|
|
82458
|
+
if (replace && occupied && !existsSync73(join74(dest, "himalaya.content.json"))) {
|
|
82403
82459
|
io.error(JSON.stringify({
|
|
82404
82460
|
error: `${dest} is not a content package \u2014 refusing to --replace it`,
|
|
82405
82461
|
hint: "--replace only clears a directory that holds himalaya.content.json. Check --out/--name, or pass --force to merge into it instead."
|
|
@@ -84162,7 +84218,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
84162
84218
|
io.error(JSON.stringify({ error: `patch ${kind} needs --file`, usage: PATCH_USAGE }));
|
|
84163
84219
|
return 2;
|
|
84164
84220
|
}
|
|
84165
|
-
if (!
|
|
84221
|
+
if (!existsSync73(file)) {
|
|
84166
84222
|
io.error(JSON.stringify({ error: `no such file: ${file}` }));
|
|
84167
84223
|
return 2;
|
|
84168
84224
|
}
|
|
@@ -84885,7 +84941,7 @@ ${label2}`);
|
|
|
84885
84941
|
const platform = str9(flags.platform)?.split(",").map((p) => p.trim()).filter(Boolean);
|
|
84886
84942
|
{
|
|
84887
84943
|
const distDir = contentDir(flags);
|
|
84888
|
-
if (
|
|
84944
|
+
if (existsSync73(join74(distDir, "himalaya.content.json"))) {
|
|
84889
84945
|
const issues = await iconIssues(distDir, flags.strict === true, { requireDeclared: true, requireVerified: true });
|
|
84890
84946
|
const errors = issues.filter((i) => i.severity === "error");
|
|
84891
84947
|
for (const i of issues.filter((i2) => i2.severity === "warning")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1157.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": [
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"artifactId": "himalaya-cli"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"falconPackageHash": "
|
|
70
|
+
"falconPackageHash": "3855653c89440e946466c0cb88bbc773e9933df0411400c4fbd70c04"
|
|
71
71
|
}
|