@wix/himalaya-cli 0.1016.0 → 0.1017.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 +82 -48
- package/dist/preview-assets.generated.bin +0 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -38769,7 +38769,12 @@ function liveRun(dir) {
|
|
|
38769
38769
|
const build2 = obj(rec?.build);
|
|
38770
38770
|
try {
|
|
38771
38771
|
process.kill(pid, 0);
|
|
38772
|
-
return {
|
|
38772
|
+
return {
|
|
38773
|
+
url,
|
|
38774
|
+
buildError: build2?.ok === false ? text(build2.error) ?? "the last rebuild failed" : null,
|
|
38775
|
+
// Only `--watch` wrote this record before plain runs did, so a record without the key is one.
|
|
38776
|
+
watching: rec?.watching !== false
|
|
38777
|
+
};
|
|
38773
38778
|
} catch {
|
|
38774
38779
|
return null;
|
|
38775
38780
|
}
|
|
@@ -38957,7 +38962,7 @@ function render(s){
|
|
|
38957
38962
|
$("nowmsg").textContent=last?last.message:"Waiting for the first postcard.";
|
|
38958
38963
|
$("nowmeta").textContent=last?("Now \xB7 "+(last.step?("step "+last.stepNumber+" of 8, "+last.step+" \xB7 "):"")+ago(last.ts)):"Now";
|
|
38959
38964
|
var focus=$("focus");clear(focus);var film=$("film");clear(film);
|
|
38960
|
-
if(s.live){$("focuslbl").textContent="Live preview";var f=el("div","phone");var fr=document.createElement("iframe");fr.src=s.live.url;fr.title="Live preview";f.appendChild(fr);focus.appendChild(f);if(s.live.buildError){var be=el("div","chip bad",null);be.style.display="block";be.style.marginTop="8px";be.textContent="Last edit did not build, still showing the last good version: "+s.live.buildError;focus.appendChild(be)}focus.appendChild(el("div","cap","Repaints as the app is edited \xB7 "+s.live.url))}
|
|
38965
|
+
if(s.live){$("focuslbl").textContent="Live preview";var f=el("div","phone");var fr=document.createElement("iframe");fr.src=s.live.url;fr.title="Live preview";f.appendChild(fr);focus.appendChild(f);if(s.live.buildError){var be=el("div","chip bad",null);be.style.display="block";be.style.marginTop="8px";be.textContent="Last edit did not build, still showing the last good version: "+s.live.buildError;focus.appendChild(be)}focus.appendChild(el("div","cap",(s.live.watching?"Repaints as the app is edited \xB7 ":"The build this run started with; himi run --watch repaints on every edit \xB7 ")+s.live.url))}
|
|
38961
38966
|
else if(s.focus&&s.focus.frames.length){var fl=s.focus.frames;$("focuslbl").textContent="Latest \xB7 "+s.focus.id;var p=el("div","phone");p.appendChild(img(fl[fl.length-1].img));focus.appendChild(p);focus.appendChild(el("div","cap",fl.length+(fl.length===1?" version":" versions")+" so far"))}
|
|
38962
38967
|
else{$("focuslbl").textContent="Latest";focus.appendChild(el("div","empty","The first render appears here."))}
|
|
38963
38968
|
if(s.focus&&s.focus.frames.length>1)s.focus.frames.forEach(function(fm){film.appendChild(img(fm.img))});
|
|
@@ -47994,19 +47999,19 @@ var init_preview_assets_generated = __esm({
|
|
|
47994
47999
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
47995
48000
|
init_preview_assets_format();
|
|
47996
48001
|
PREVIEW_ASSET_MANIFEST = [
|
|
47997
|
-
{ key: "assets/index-
|
|
47998
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
47999
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
48000
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
48001
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
48002
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
48003
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
48004
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
48005
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
48006
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
48007
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
48008
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
48009
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
48002
|
+
{ key: "assets/index-DRerTUYc.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1016478, sha256: "42a5b901a0a58a495e5261f68782d28d12aa95cf64df33d9d8d14236e8ea6ead" },
|
|
48003
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1016486, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
48004
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1107410, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
48005
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1198394, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
48006
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1289374, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
48007
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1380246, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
48008
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1471226, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
48009
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1579862, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
48010
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1688946, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
48011
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1797994, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
48012
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1905694, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
48013
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 1993802, length: 4448, sha256: "98239860f1289aebffdb28d2b9f5ce15fbb95a657bb63d262c650ca21513dde3" },
|
|
48014
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1998250, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
|
|
48010
48015
|
];
|
|
48011
48016
|
}
|
|
48012
48017
|
});
|
|
@@ -48342,13 +48347,22 @@ function writeRunRecord(dir, record2) {
|
|
|
48342
48347
|
}
|
|
48343
48348
|
return true;
|
|
48344
48349
|
}
|
|
48345
|
-
function removeRunRecord(dir) {
|
|
48350
|
+
function removeRunRecord(dir, owner) {
|
|
48346
48351
|
const root = join51(dir, ".himi");
|
|
48347
48352
|
try {
|
|
48348
48353
|
if (!lstatSync8(root).isDirectory()) return;
|
|
48349
48354
|
} catch {
|
|
48350
48355
|
return;
|
|
48351
48356
|
}
|
|
48357
|
+
if (owner !== void 0) {
|
|
48358
|
+
const bytes2 = readConfined(root, "run.json");
|
|
48359
|
+
let pid;
|
|
48360
|
+
try {
|
|
48361
|
+
pid = bytes2 ? JSON.parse(bytes2.toString("utf8")).pid : void 0;
|
|
48362
|
+
} catch {
|
|
48363
|
+
}
|
|
48364
|
+
if (typeof pid === "number" && pid !== owner) return;
|
|
48365
|
+
}
|
|
48352
48366
|
rmSync12(join51(root, "run.json"), { force: true });
|
|
48353
48367
|
}
|
|
48354
48368
|
function boardFile(dir, pathname) {
|
|
@@ -48475,7 +48489,7 @@ async function releasePayloadFromDir(root, app, header) {
|
|
|
48475
48489
|
await addDoc(meta.descriptorHash);
|
|
48476
48490
|
}
|
|
48477
48491
|
for (const hash of Object.values(manifest.catalogs ?? {})) await addDoc(hash);
|
|
48478
|
-
for (const d of manifest.authoringDocs ??
|
|
48492
|
+
for (const d of Object.values(manifest.authoringDocs ?? {})) await addDoc(d?.sha256);
|
|
48479
48493
|
await addDoc(manifest.tokensHash);
|
|
48480
48494
|
await addDoc(manifest.appConfigHash);
|
|
48481
48495
|
await addDoc(manifest.sourceHash);
|
|
@@ -63332,7 +63346,7 @@ var COMMANDS = [
|
|
|
63332
63346
|
{ name: "import", summary: "turn a `himi pack --dev` package back into an EDITABLE content package \u2014 the file counterpart of `himi pull`, needing no serve plane, no account and no network. Refuses an invalid package before trusting its source (the content hash is recomputed over every entry on open, so the archive is provably the one that was packed), and refuses a RELEASE package by naming the absence \u2014 it carries built output and no source \u2014 rather than reporting a missing file. `--name` re-substitutes the app identity through the same machinery `himi init --template` and `himi pull --name` use, so the restored tree is a NEW app rather than a second copy of the same one, and a name that also appears inside a screen id (`feed` in `feed_home`) is left alone. A non-empty destination needs `--force` and a merge NAMES what it kept (`left: [...]`), the same contract `himi pull --force` has; a shape clash is refused whole before anything is written. There is no `--replace`: a file you were handed is not the plane's per-release archive.", required: "<package.himi> [--out <dir>] [--name <new>] [--force]" },
|
|
63333
63347
|
{ name: "pull", summary: "restore an app's SOURCE from the serve plane into an editable content package \u2014 the other half of `himi push`, which archives the content package on every publish. Owner or editor only: a viewer may download the RUNNING app (`/v1/owner/package`), not the codebase it was built from. A PAST release is restorable, not only the live one \u2014 the archive is content-addressed per release, so it has none of the live-single-slot problem that makes `himi pack` current-release-only. Two limits: pruning keeps the current release plus the newest ~20 ledger entries, and a release id identifies OTA content rather than source, so a source-only change republishes under the same id and replaces that id's archive. A release published before source archiving shipped, or pushed with `--no-source`, answers `app_source_not_found` and says to push again. `--name` re-substitutes the app identity through the same machinery `himi init --template` uses, so the restored tree is a NEW app rather than a second copy of the same one, and a name that also appears inside a screen id (`feed` in `feed_home`) is left alone. A NON-EMPTY destination is refused unless you say which you mean: `--force` merges and reports \u2014 it writes the archive over what is there, keeps files the release does not carry, and NAMES every one of them as `left: [...]` so a tree that matches no release is never silent (#2437); `--replace` restores exactly what was archived, removing those files first (`removed: [...]`) and implying `--force`. `--replace` refuses a directory holding no `himalaya.content.json`, so a mistyped `--out` cannot clear an unrelated tree, and the only paths it can remove are the ones a push would have archived \u2014 `.git/`, `node_modules/`, `dist/`, `.env*` and key material are out of its reach by construction.", required: "<app> [--release <id>] [--out <dir>] [--name <new>] [--force|--replace] [--target <t>]" },
|
|
63334
63348
|
{ name: "share", summary: "publish or revoke a content-addressed `.himi` share link. The package must be a validated archive for an already-published release; the resulting https URL is safe to QR, copy, or open in Himi Player.", required: "--file <package.himi> [--expires-at <ISO>] | revoke --app <app> <shareId>" },
|
|
63335
|
-
{ name: "run", summary: "serve a .himi package on localhost and open it in a browser \u2014 no serve plane, no dev-server, no setup. Given no argument it builds the current content package first, so `himi run` is the inner loop: edit, run, look at it. The SPA and /v1 are served from ONE origin because Tier-5 bundle fetches on web are same-origin-only. --chrome preview frames the app in a device chassis; --chrome app serves it as a plain web app. Blocks until Ctrl-C, like any dev server. --browser runs the whole plane INSIDE the tab (service worker + in-memory store) so no app code executes in this process or on any pod. --watch keeps the preview LIVE: every save in the content package rebuilds it and repaints the open tab with only what changed (the dev-server's hot-reload events); a build that fails keeps the last good preview on screen and says why.
|
|
63349
|
+
{ name: "run", summary: "serve a .himi package on localhost and open it in a browser \u2014 no serve plane, no dev-server, no setup. Given no argument it builds the current content package first, so `himi run` is the inner loop: edit, run, look at it. The SPA and /v1 are served from ONE origin because Tier-5 bundle fetches on web are same-origin-only. --chrome preview frames the app in a device chassis; --chrome app serves it as a plain web app. Blocks until Ctrl-C, like any dev server. --browser runs the whole plane INSIDE the tab (service worker + in-memory store) so no app code executes in this process or on any pod. --watch keeps the preview LIVE: every save in the content package rebuilds it and repaints the open tab with only what changed (the dev-server's hot-reload events); a build that fails keeps the last good preview on screen and says why. Any `himi run` of a content package (plain, --watch or --browser) frames its preview on the build board (`himi studio`) while it serves, and all but --browser also serve that board at /__himi/studio/ on the preview's own origin.", required: "[<package.himi|dir|url>] [--browser] [--watch] [--content <dir>] [--port <n>] [--chrome preview|app] [--screen <id>] [--surface <id>] [--no-open] [--spa <url>]" },
|
|
63336
63350
|
{ name: "preview", summary: "print the shareable web URL + himi:// deep link + agent /v1/preview JSON URLs for an app+release; --surface frames the web preview as any catalog surface (?surface=)", required: "--app --release [--screen] [--surface]" },
|
|
63337
63351
|
{ name: "surfaces", summary: "the surface catalog vs this app's envelope (platforms.json): targeted surfaces, the opt-in key for the rest, per-surface preview links with --app --release, and which widget families the package produces with --measure-widgets (which runs its built bundles)", required: "[--content <dir>] [--app --release] [--measure-widgets]" },
|
|
63338
63352
|
{ name: "context", summary: "fetch the agent preview envelope (GET /v1/preview/a/<app>) \u2014 ok/issues/screens/links; exit 1 if ok:false", required: "--app --release [--screen] [--include telemetry]" },
|
|
@@ -67704,6 +67718,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67704
67718
|
}
|
|
67705
67719
|
let served = null;
|
|
67706
67720
|
let servedMissing = [];
|
|
67721
|
+
const fromContent = !source;
|
|
67707
67722
|
try {
|
|
67708
67723
|
if (!source) {
|
|
67709
67724
|
const dir2 = contentDir(flags);
|
|
@@ -67729,6 +67744,36 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67729
67744
|
return 2;
|
|
67730
67745
|
}
|
|
67731
67746
|
}
|
|
67747
|
+
const dir = contentDir(flags);
|
|
67748
|
+
const refreshBoard = async () => {
|
|
67749
|
+
if (!boardOpen(dir)) return;
|
|
67750
|
+
const { refreshStudio: refreshStudio2 } = await Promise.resolve().then(() => (init_studio(), studio_exports));
|
|
67751
|
+
refreshStudio2(dir);
|
|
67752
|
+
};
|
|
67753
|
+
const recordKit = fromContent ? await Promise.resolve().then(() => (init_run_watch(), run_watch_exports)) : null;
|
|
67754
|
+
let recorded = false;
|
|
67755
|
+
let startedAt = "";
|
|
67756
|
+
const record2 = (served2, build2) => {
|
|
67757
|
+
try {
|
|
67758
|
+
if (recordKit?.writeRunRecord(dir, { url: served2.url, port: served2.port, pid: process.pid, startedAt, watching: watch2, build: build2 })) recorded = true;
|
|
67759
|
+
return null;
|
|
67760
|
+
} catch (e) {
|
|
67761
|
+
return e.message;
|
|
67762
|
+
}
|
|
67763
|
+
};
|
|
67764
|
+
const announce = async (served2) => {
|
|
67765
|
+
if (!recordKit) return;
|
|
67766
|
+
startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
67767
|
+
const failure = record2(served2, { ok: true, at: startedAt });
|
|
67768
|
+
if (!recorded) io.error(JSON.stringify({ run: "run_record_skipped", message: `${failure ?? `${join57(dir, ".himi")} is not a real directory`}, so the build board will not frame this preview.` }));
|
|
67769
|
+
await refreshBoard();
|
|
67770
|
+
};
|
|
67771
|
+
const retract = async () => {
|
|
67772
|
+
if (!recorded) return;
|
|
67773
|
+
recorded = false;
|
|
67774
|
+
recordKit?.removeRunRecord(dir, process.pid);
|
|
67775
|
+
await refreshBoard();
|
|
67776
|
+
};
|
|
67732
67777
|
if (flags.browser === true) {
|
|
67733
67778
|
const { runInBrowser: runInBrowser2 } = await Promise.resolve().then(() => (init_run_browser(), run_browser_exports));
|
|
67734
67779
|
const { resolvePackage: resolvePackage2 } = await Promise.resolve().then(() => (init_run(), run_exports));
|
|
@@ -67738,17 +67783,17 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67738
67783
|
chrome: chromeArg,
|
|
67739
67784
|
open: flags["no-open"] !== true
|
|
67740
67785
|
});
|
|
67786
|
+
await announce(run2);
|
|
67741
67787
|
print({ ok: true, app: run2.app, url: run2.url, port: run2.port, plane: "browser" });
|
|
67742
67788
|
await new Promise((resolve48) => {
|
|
67743
67789
|
const stop = () => {
|
|
67744
|
-
void run2.close().finally(() => resolve48());
|
|
67790
|
+
void retract().catch((e) => io.error(JSON.stringify({ run: "stop_cleanup_failed", message: e.message }))).finally(() => run2.close().finally(() => resolve48()));
|
|
67745
67791
|
};
|
|
67746
67792
|
process.once("SIGINT", stop);
|
|
67747
67793
|
process.once("SIGTERM", stop);
|
|
67748
67794
|
});
|
|
67749
67795
|
return 0;
|
|
67750
67796
|
}
|
|
67751
|
-
const dir = contentDir(flags);
|
|
67752
67797
|
const watchKit = watch2 ? await Promise.resolve().then(() => (init_run_watch(), run_watch_exports)) : null;
|
|
67753
67798
|
const bus = watchKit ? new watchKit.ReloadBus() : void 0;
|
|
67754
67799
|
if (watch2) served = mkdtempSync4(join57(tmpdir5(), "himi-run-served-"));
|
|
@@ -67759,26 +67804,16 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67759
67804
|
surface: str6(flags.surface),
|
|
67760
67805
|
spa: str6(flags.spa),
|
|
67761
67806
|
open: flags["no-open"] !== true,
|
|
67762
|
-
|
|
67807
|
+
// The build board on the preview's own origin, for any run of this content package.
|
|
67808
|
+
...recordKit ? { extraRoutes: (request) => recordKit.boardFile(dir, new URL(request.url).pathname) } : {},
|
|
67809
|
+
...watchKit && served && bus ? { workDir: served, screenEvents: bus } : {}
|
|
67763
67810
|
});
|
|
67764
67811
|
let watcher;
|
|
67765
67812
|
let rebuild;
|
|
67766
|
-
let recorded = false;
|
|
67767
67813
|
let stopping = false;
|
|
67768
|
-
|
|
67769
|
-
|
|
67770
|
-
|
|
67771
|
-
refreshStudio2(dir);
|
|
67772
|
-
};
|
|
67773
|
-
if (watchKit && bus) {
|
|
67774
|
-
try {
|
|
67775
|
-
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
67776
|
-
const record2 = (build2) => {
|
|
67777
|
-
if (watchKit.writeRunRecord(dir, { url: running.url, port: running.port, pid: process.pid, startedAt, build: build2 })) recorded = true;
|
|
67778
|
-
};
|
|
67779
|
-
record2({ ok: true, at: startedAt });
|
|
67780
|
-
if (!recorded) io.error(JSON.stringify({ watch: "run_record_skipped", message: `${join57(dir, ".himi")} is not a real directory, so the build board will not frame this preview.` }));
|
|
67781
|
-
await refreshBoard();
|
|
67814
|
+
try {
|
|
67815
|
+
await announce(running);
|
|
67816
|
+
if (watchKit && bus) {
|
|
67782
67817
|
const { buildContentBundles: buildContentBundles2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
|
|
67783
67818
|
const live2 = join57(running.releaseRoot, running.app);
|
|
67784
67819
|
const manifestOf = (tree) => JSON.parse(readFileSync72(join57(tree, "release-manifest.json"), "utf8"));
|
|
@@ -67786,7 +67821,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67786
67821
|
const failed2 = async (message) => {
|
|
67787
67822
|
if (stopping) return;
|
|
67788
67823
|
bus.publish("build.failed", { message });
|
|
67789
|
-
record2({ ok: false, at: (/* @__PURE__ */ new Date()).toISOString(), error: message });
|
|
67824
|
+
record2(running, { ok: false, at: (/* @__PURE__ */ new Date()).toISOString(), error: message });
|
|
67790
67825
|
await refreshBoard();
|
|
67791
67826
|
io.error(JSON.stringify({ watch: "build_failed", keptLastGood: true, message }));
|
|
67792
67827
|
};
|
|
@@ -67822,7 +67857,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67822
67857
|
current = fresh;
|
|
67823
67858
|
servedMissing = outcome.missingBundles;
|
|
67824
67859
|
for (const [event, data] of watchKit.reloadEvents(diff)) bus.publish(event, data);
|
|
67825
|
-
record2({ ok: true, at: (/* @__PURE__ */ new Date()).toISOString() });
|
|
67860
|
+
record2(running, { ok: true, at: (/* @__PURE__ */ new Date()).toISOString() });
|
|
67826
67861
|
await refreshBoard();
|
|
67827
67862
|
io.error(JSON.stringify({ watch: "rebuilt", ms: Date.now() - t0, screens: diff.screens, tokens: diff.tokens, config: diff.config, tabs: bus.listeners }));
|
|
67828
67863
|
} catch (e) {
|
|
@@ -67832,11 +67867,12 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67832
67867
|
}
|
|
67833
67868
|
});
|
|
67834
67869
|
watcher = watchKit.watchContent(dir, () => rebuild?.());
|
|
67835
|
-
} catch (e) {
|
|
67836
|
-
if (recorded) watchKit.removeRunRecord(dir);
|
|
67837
|
-
await running.close();
|
|
67838
|
-
throw e;
|
|
67839
67870
|
}
|
|
67871
|
+
} catch (e) {
|
|
67872
|
+
await retract().catch(() => {
|
|
67873
|
+
});
|
|
67874
|
+
await running.close();
|
|
67875
|
+
throw e;
|
|
67840
67876
|
}
|
|
67841
67877
|
print({
|
|
67842
67878
|
ok: true,
|
|
@@ -67844,7 +67880,8 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67844
67880
|
releaseId: running.releaseId,
|
|
67845
67881
|
url: running.url,
|
|
67846
67882
|
port: running.port,
|
|
67847
|
-
...watch2 ? { watching: dir
|
|
67883
|
+
...watch2 ? { watching: dir } : {},
|
|
67884
|
+
...recordKit && boardOpen(dir) ? { board: `${running.origin}/__himi/studio/` } : {},
|
|
67848
67885
|
...running.warnings.length ? { warnings: running.warnings } : {},
|
|
67849
67886
|
stop: "Ctrl-C"
|
|
67850
67887
|
});
|
|
@@ -67854,12 +67891,9 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
67854
67891
|
watcher?.close();
|
|
67855
67892
|
try {
|
|
67856
67893
|
await rebuild?.stop();
|
|
67857
|
-
|
|
67858
|
-
watchKit?.removeRunRecord(dir);
|
|
67859
|
-
await refreshBoard();
|
|
67860
|
-
}
|
|
67894
|
+
await retract();
|
|
67861
67895
|
} catch (e) {
|
|
67862
|
-
io.error(JSON.stringify({
|
|
67896
|
+
io.error(JSON.stringify({ run: "stop_cleanup_failed", message: e.message }));
|
|
67863
67897
|
} finally {
|
|
67864
67898
|
await running.close();
|
|
67865
67899
|
done();
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1017.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": [
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"artifactId": "himalaya-cli"
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
"falconPackageHash": "
|
|
68
|
+
"falconPackageHash": "7241867426a013199afa47aedd31061192ba4c6d3bbc927e00e89b52"
|
|
69
69
|
}
|