@wix/himalaya-cli 0.1120.0 → 0.1122.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +32 -26
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -6762,6 +6762,7 @@ function walk(node, registry, path2, out2) {
6762
6762
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA;
6763
6763
  var init_tokens = __esm({
6764
6764
  "../../core/ts/src/tokens.ts"() {
6765
+ "use strict";
6765
6766
  SYSTEM_FONT_FAMILY = "$system";
6766
6767
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
6767
6768
  }
@@ -24718,7 +24719,6 @@ function shouldRevealError(args) {
24718
24719
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
24719
24720
  var init_validation = __esm({
24720
24721
  "../../core/ts/src/validation.ts"() {
24721
- "use strict";
24722
24722
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
24723
24723
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
24724
24724
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -29119,7 +29119,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
29119
29119
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
29120
29120
  var init_worker_subtree = __esm({
29121
29121
  "../../core/ts/src/worker-subtree.ts"() {
29122
- "use strict";
29123
29122
  init_worker_subtree_safe_types_generated();
29124
29123
  WORKER_SUBTREE_CEILINGS = Object.freeze({
29125
29124
  maxEncodedBytes: 65536,
@@ -54681,7 +54680,7 @@ __export(server_exports, {
54681
54680
  protectStdout: () => protectStdout,
54682
54681
  startMcpServer: () => startMcpServer
54683
54682
  });
54684
- import { readFileSync as readFileSync60 } from "node:fs";
54683
+ import { mkdirSync as mkdirSync27, readFileSync as readFileSync60 } from "node:fs";
54685
54684
  import { fileURLToPath as fileURLToPath21 } from "node:url";
54686
54685
  import { McpServer } from "@modelcontextprotocol/server";
54687
54686
  import { serveStdio, StdioServerTransport } from "@modelcontextprotocol/server/stdio";
@@ -54718,6 +54717,13 @@ async function startMcpServer(opts) {
54718
54717
  const stdin = opts.stdin ?? process.stdin;
54719
54718
  const stdout = opts.stdout ?? process.stdout;
54720
54719
  const runCli = createCliBridge(opts.run);
54720
+ if (opts.workspace) {
54721
+ try {
54722
+ mkdirSync27(opts.workspace, { recursive: true });
54723
+ } catch (e) {
54724
+ console.error(`[himi mcp] could not create the workspace folder ${opts.workspace}: ${e.message}`);
54725
+ }
54726
+ }
54721
54727
  const previewDeps = { ...defaultPreviewDeps, ...opts.preview };
54722
54728
  let pinned;
54723
54729
  let rootDir;
@@ -55295,7 +55301,7 @@ __export(coverage_exports, {
55295
55301
  suppressedNativeKeys: () => suppressedNativeKeys,
55296
55302
  trendAndStore: () => trendAndStore
55297
55303
  });
55298
- import { existsSync as existsSync57, mkdirSync as mkdirSync27, readFileSync as readFileSync63, writeFileSync as writeFileSync22 } from "node:fs";
55304
+ import { existsSync as existsSync57, mkdirSync as mkdirSync28, readFileSync as readFileSync63, writeFileSync as writeFileSync22 } from "node:fs";
55299
55305
  import { dirname as dirname31, join as join56 } from "node:path";
55300
55306
  function suppressedNativeKeys(oracle) {
55301
55307
  return [...oracle.ios ? [] : ["native-decode|ios"], ...oracle.android ? [] : ["native-decode|android"]];
@@ -55488,7 +55494,7 @@ function trendAndStore(dir, entries, suppressed) {
55488
55494
  const current = entries.map((e) => e.key);
55489
55495
  const stored = [.../* @__PURE__ */ new Set([...current, ...(previous ?? []).filter((key2) => (suppressed ?? []).includes(key2))])];
55490
55496
  try {
55491
- mkdirSync27(dirname31(p), { recursive: true });
55497
+ mkdirSync28(dirname31(p), { recursive: true });
55492
55498
  writeFileSync22(p, JSON.stringify({ keys: stored, ts: (/* @__PURE__ */ new Date()).toISOString() }, null, 2));
55493
55499
  } catch {
55494
55500
  return null;
@@ -55533,7 +55539,7 @@ function diffAndStoreObservations(dir, current) {
55533
55539
  } catch {
55534
55540
  }
55535
55541
  try {
55536
- mkdirSync27(dirname31(p), { recursive: true });
55542
+ mkdirSync28(dirname31(p), { recursive: true });
55537
55543
  writeFileSync22(p, JSON.stringify({ screens: current, ts: (/* @__PURE__ */ new Date()).toISOString() }, null, 2));
55538
55544
  } catch {
55539
55545
  return null;
@@ -57457,7 +57463,7 @@ __export(run_exports, {
57457
57463
  runPackage: () => runPackage,
57458
57464
  withoutProdServe: () => withoutProdServe
57459
57465
  });
57460
- import { cpSync as cpSync2, existsSync as existsSync59, mkdirSync as mkdirSync28, mkdtempSync as mkdtempSync3, readFileSync as readFileSync66, rmSync as rmSync14, statSync as statSync15 } from "node:fs";
57466
+ import { cpSync as cpSync2, existsSync as existsSync59, mkdirSync as mkdirSync29, mkdtempSync as mkdtempSync3, readFileSync as readFileSync66, rmSync as rmSync14, statSync as statSync15 } from "node:fs";
57461
57467
  import { networkInterfaces as osNetworkInterfaces, tmpdir as tmpdir4 } from "node:os";
57462
57468
  import { dirname as dirname32, join as join58 } from "node:path";
57463
57469
  import { fileURLToPath as fileURLToPath24 } from "node:url";
@@ -57501,7 +57507,7 @@ async function resolvePackage(source, workDir) {
57501
57507
  const root2 = workDir ?? mkdtempSync3(join58(tmpdir4(), "himi-run-"));
57502
57508
  const target = join58(root2, app2);
57503
57509
  if (join58(source) !== target) {
57504
- mkdirSync28(root2, { recursive: true });
57510
+ mkdirSync29(root2, { recursive: true });
57505
57511
  rmSync14(target, { recursive: true, force: true });
57506
57512
  cpSync2(source, target, { recursive: true });
57507
57513
  }
@@ -57696,7 +57702,7 @@ __export(run_watch_exports, {
57696
57702
  watchedContentDir: () => watchedContentDir,
57697
57703
  writeRunRecord: () => writeRunRecord
57698
57704
  });
57699
- import { closeSync as closeSync5, constants as constants2, existsSync as existsSync60, fstatSync, lstatSync as lstatSync13, statSync as statSync16, mkdirSync as mkdirSync29, openSync as openSync4, readFileSync as readFileSync67, realpathSync as realpathSync9, renameSync as renameSync7, rmSync as rmSync15, writeFileSync as writeFileSync23, watch as fsWatch } from "node:fs";
57705
+ import { closeSync as closeSync5, constants as constants2, existsSync as existsSync60, fstatSync, lstatSync as lstatSync13, statSync as statSync16, mkdirSync as mkdirSync30, openSync as openSync4, readFileSync as readFileSync67, realpathSync as realpathSync9, renameSync as renameSync7, rmSync as rmSync15, writeFileSync as writeFileSync23, watch as fsWatch } from "node:fs";
57700
57706
  import { randomUUID as randomUUID4 } from "node:crypto";
57701
57707
  import { extname as extname4, join as join59, resolve as resolve47, sep as sep16 } from "node:path";
57702
57708
  function diffReleases(prev, next) {
@@ -57822,7 +57828,7 @@ function himiDir(dir) {
57822
57828
  return lstatSync13(root).isDirectory() ? root : null;
57823
57829
  } catch (e) {
57824
57830
  if (e.code !== "ENOENT") return null;
57825
- mkdirSync29(root, { recursive: true });
57831
+ mkdirSync30(root, { recursive: true });
57826
57832
  return lstatSync13(root).isDirectory() ? root : null;
57827
57833
  }
57828
57834
  }
@@ -60008,7 +60014,7 @@ __export(notify_exports, {
60008
60014
  runNotify: () => runNotify,
60009
60015
  saveAdminSession: () => saveAdminSession
60010
60016
  });
60011
- import { chmodSync as chmodSync3, mkdirSync as mkdirSync30, readFileSync as readFileSync76, writeFileSync as writeFileSync25 } from "node:fs";
60017
+ import { chmodSync as chmodSync3, mkdirSync as mkdirSync31, readFileSync as readFileSync76, writeFileSync as writeFileSync25 } from "node:fs";
60012
60018
  import { homedir as homedir6 } from "node:os";
60013
60019
  import { dirname as dirname35, join as join62 } from "node:path";
60014
60020
  function defaultSessionsPath() {
@@ -60024,7 +60030,7 @@ function loadSessionsFile(path2 = defaultSessionsPath()) {
60024
60030
  function saveAdminSession(adminUrl, session, path2 = defaultSessionsPath()) {
60025
60031
  const file = loadSessionsFile(path2);
60026
60032
  file.sessions = { ...file.sessions, [adminUrl]: session };
60027
- mkdirSync30(dirname35(path2), { recursive: true, mode: 448 });
60033
+ mkdirSync31(dirname35(path2), { recursive: true, mode: 448 });
60028
60034
  writeFileSync25(path2, JSON.stringify(file, null, 2) + "\n", { mode: 384 });
60029
60035
  try {
60030
60036
  chmodSync3(dirname35(path2), 448);
@@ -63784,7 +63790,7 @@ var init_brand_font = __esm({
63784
63790
  });
63785
63791
 
63786
63792
  // src/site-analyze/write-artifacts.ts
63787
- import { mkdirSync as mkdirSync31, writeFileSync as writeFileSync26 } from "node:fs";
63793
+ import { mkdirSync as mkdirSync32, writeFileSync as writeFileSync26 } from "node:fs";
63788
63794
  import { join as join63 } from "node:path";
63789
63795
  function attachVeloSources(book, sources, put) {
63790
63796
  const byPath = new Map((sources ?? []).map((s) => [s.path, s.text]));
@@ -63940,12 +63946,12 @@ async function downloadMedia(book, fetchImpl, put) {
63940
63946
  }
63941
63947
  async function writeBusinessBook(result, opts) {
63942
63948
  const out2 = opts.outDir;
63943
- mkdirSync31(join63(out2, "evidence/pages"), { recursive: true });
63944
- mkdirSync31(join63(out2, "media/catalog"), { recursive: true });
63949
+ mkdirSync32(join63(out2, "evidence/pages"), { recursive: true });
63950
+ mkdirSync32(join63(out2, "media/catalog"), { recursive: true });
63945
63951
  const files = [];
63946
63952
  const put = (rel, body) => {
63947
63953
  const p = join63(out2, rel);
63948
- mkdirSync31(join63(p, ".."), { recursive: true });
63954
+ mkdirSync32(join63(p, ".."), { recursive: true });
63949
63955
  writeFileSync26(p, body);
63950
63956
  files.push(rel);
63951
63957
  };
@@ -64039,7 +64045,7 @@ var init_customer_build = __esm({
64039
64045
  });
64040
64046
 
64041
64047
  // src/site-analyze/apply.ts
64042
- import { existsSync as existsSync65, readFileSync as readFileSync77, writeFileSync as writeFileSync27, copyFileSync as copyFileSync3, mkdirSync as mkdirSync32, realpathSync as realpathSync10, statSync as statSync18 } from "node:fs";
64048
+ import { existsSync as existsSync65, readFileSync as readFileSync77, writeFileSync as writeFileSync27, copyFileSync as copyFileSync3, mkdirSync as mkdirSync33, realpathSync as realpathSync10, statSync as statSync18 } from "node:fs";
64043
64049
  import { dirname as dirname36, isAbsolute as isAbsolute7, join as join64, resolve as resolve51, sep as sep17 } from "node:path";
64044
64050
  import { spawnSync as spawnSync4 } from "node:child_process";
64045
64051
  function unpairedRedirectNote(overlay) {
@@ -64155,7 +64161,7 @@ function buildMergedContract(options) {
64155
64161
  if (!real.startsWith(realRoot + sep17)) return void 0;
64156
64162
  try {
64157
64163
  if (!statSync18(real).isFile()) return void 0;
64158
- mkdirSync32(dirname36(to), { recursive: true });
64164
+ mkdirSync33(dirname36(to), { recursive: true });
64159
64165
  copyFileSync3(real, to);
64160
64166
  } catch {
64161
64167
  return void 0;
@@ -64193,7 +64199,7 @@ function buildMergedContract(options) {
64193
64199
  const path2 = join64(packageDir, "provisioning.contract.json");
64194
64200
  writeFileSync27(path2, body);
64195
64201
  const localPath = join64(appDir3, LOCAL_CONTRACT_REL);
64196
- mkdirSync32(dirname36(localPath), { recursive: true });
64202
+ mkdirSync33(dirname36(localPath), { recursive: true });
64197
64203
  writeFileSync27(localPath, body);
64198
64204
  staged.push(localPath);
64199
64205
  return { path: path2, staged };
@@ -69930,7 +69936,7 @@ var init_context = __esm({
69930
69936
  });
69931
69937
 
69932
69938
  // src/cli.ts
69933
- import { mkdtempSync as mkdtempSync4, readFileSync as readFileSync80, mkdirSync as mkdirSync33, writeFileSync as writeFileSync29, existsSync as existsSync67, rmSync as rmSync16, readdirSync as readdirSync31, statSync as statSync19, lstatSync as lstatSync14, accessSync, constants as constants3, renameSync as renameSync8, cpSync as cpSync3 } from "node:fs";
69939
+ import { mkdtempSync as mkdtempSync4, readFileSync as readFileSync80, mkdirSync as mkdirSync34, writeFileSync as writeFileSync29, existsSync as existsSync67, rmSync as rmSync16, readdirSync as readdirSync31, statSync as statSync19, lstatSync as lstatSync14, accessSync, constants as constants3, renameSync as renameSync8, cpSync as cpSync3 } from "node:fs";
69934
69940
  import { execFile, execFileSync as execFileSync7, spawnSync as spawnSync5, spawn as spawn7 } from "node:child_process";
69935
69941
  import { AsyncLocalStorage } from "node:async_hooks";
69936
69942
  import { createHash as createHash32, randomUUID as randomUUID7 } from "node:crypto";
@@ -72993,7 +72999,7 @@ function readUpdateCache(path2) {
72993
72999
  }
72994
73000
  function writeUpdateCache(path2, cache) {
72995
73001
  try {
72996
- mkdirSync33(dirname37(path2), { recursive: true, mode: 448 });
73002
+ mkdirSync34(dirname37(path2), { recursive: true, mode: 448 });
72997
73003
  writeFileSync29(path2, JSON.stringify(cache, null, 2) + "\n", { mode: 384 });
72998
73004
  } catch {
72999
73005
  }
@@ -73150,7 +73156,7 @@ function acquireUpdateLock(cachePath, now, hooks = {}) {
73150
73156
  };
73151
73157
  const release = () => removeIfMine(lockPath);
73152
73158
  try {
73153
- mkdirSync33(dirname37(lockPath), { recursive: true, mode: 448 });
73159
+ mkdirSync34(dirname37(lockPath), { recursive: true, mode: 448 });
73154
73160
  } catch {
73155
73161
  return () => {
73156
73162
  };
@@ -73850,7 +73856,7 @@ function readConfigSource(dir) {
73850
73856
  }
73851
73857
  }
73852
73858
  function writePngFile(path2, base64) {
73853
- mkdirSync33(dirname37(path2), { recursive: true });
73859
+ mkdirSync34(dirname37(path2), { recursive: true });
73854
73860
  writeFileSync29(path2, Buffer.from(base64, "base64"));
73855
73861
  return path2;
73856
73862
  }
@@ -74020,7 +74026,7 @@ function materializeForPreview(appDir3, slug, displayName) {
74020
74026
  }
74021
74027
  const dest = join65(root, `${slug}-${process.pid}`);
74022
74028
  rmSync16(dest, { recursive: true, force: true });
74023
- mkdirSync33(dest, { recursive: true });
74029
+ mkdirSync34(dest, { recursive: true });
74024
74030
  try {
74025
74031
  materializeSource(forBuild, displayName, dest, slug);
74026
74032
  } catch (e) {
@@ -75473,7 +75479,7 @@ ${doNow.map((l) => ` ${l}`).join("\n")}`);
75473
75479
  const dir = resolve53(out2);
75474
75480
  const files = himiPluginFiles2(skills.skillMd);
75475
75481
  for (const f of files) {
75476
- mkdirSync33(dirname37(join65(dir, f.path)), { recursive: true });
75482
+ mkdirSync34(dirname37(join65(dir, f.path)), { recursive: true });
75477
75483
  writeFileSync29(join65(dir, f.path), f.text);
75478
75484
  }
75479
75485
  print({ ok: true, dir, files: files.map((f) => f.path), next: [`claude plugin validate ${dir}`, `claude --plugin-dir ${dir}`] });
@@ -75499,7 +75505,7 @@ ${doNow.map((l) => ` ${l}`).join("\n")}`);
75499
75505
  const { buildReel: buildReel2 } = await Promise.resolve().then(() => (init_studio_reel(), studio_reel_exports));
75500
75506
  const out2 = resolve53(str8(flags.out) ?? join65(dir, ".himi", "making-of.html"));
75501
75507
  const { html, plan } = buildReel2(dir);
75502
- mkdirSync33(dirname37(out2), { recursive: true });
75508
+ mkdirSync34(dirname37(out2), { recursive: true });
75503
75509
  writeFileSync29(out2, html);
75504
75510
  const { pathToFileURL: pathToFileURL9 } = await import("node:url");
75505
75511
  const url2 = pathToFileURL9(out2).href;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1120.0",
3
+ "version": "0.1122.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": "98cf64fc20ceea962129bd83a948d2491f2a9672af068c757d9ca1d3"
70
+ "falconPackageHash": "2373a9ad5a2e49d640d2916874394d6c5b2ba0e45bb6382a551aef76"
71
71
  }