@wix/himalaya-cli 0.863.0 → 0.865.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.
@@ -5,7 +5,7 @@ function wixCall(method, path, body, headers) {
5
5
  }
6
6
  return globalThis.himalaya.wixApi.call(method, path, body, headers);
7
7
  }
8
- var BASE = "https://www.wixapis.com/members-feed-viewer/v1";
8
+ var BASE = "/members-feed-viewer/v1";
9
9
  async function queryNotifications(limit = 25) {
10
10
  const res = await wixCall(
11
11
  "POST",
package/dist/cli.mjs CHANGED
@@ -5241,6 +5241,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
5241
5241
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
5242
5242
  var init_bindings = __esm({
5243
5243
  "../../core/ts/src/bindings.ts"() {
5244
+ "use strict";
5244
5245
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5245
5246
  BINDING_SIGIL_RE = new RegExp(
5246
5247
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -27347,6 +27348,7 @@ function shouldRevealError(args) {
27347
27348
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
27348
27349
  var init_validation = __esm({
27349
27350
  "../../core/ts/src/validation.ts"() {
27351
+ "use strict";
27350
27352
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
27351
27353
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
27352
27354
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -30770,6 +30772,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
30770
30772
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
30771
30773
  var init_worker_subtree = __esm({
30772
30774
  "../../core/ts/src/worker-subtree.ts"() {
30775
+ "use strict";
30773
30776
  init_worker_subtree_safe_types_generated();
30774
30777
  WORKER_SUBTREE_CEILINGS = Object.freeze({
30775
30778
  maxEncodedBytes: 65536,
@@ -62248,8 +62251,97 @@ function writeAgentContext(targetDir) {
62248
62251
  // src/cli.ts
62249
62252
  init_wix_placeholders();
62250
62253
  var defaultIO = { log: (l) => console.log(l), error: (l) => console.error(l), isTTY: process.stdout.isTTY === true };
62251
- var BOOLEAN_FLAGS = /* @__PURE__ */ new Set(["browser", "no-open", "yes", "json", "deep", "quiet", "force", "replace", "watch", "no-claim", "new", "dev", "draft", "live", "accept-regressions", "accept-partial", "no-rebind"]);
62254
+ var BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
62255
+ "browser",
62256
+ "no-open",
62257
+ "yes",
62258
+ "json",
62259
+ "deep",
62260
+ "quiet",
62261
+ "force",
62262
+ "replace",
62263
+ "watch",
62264
+ "no-claim",
62265
+ "new",
62266
+ "dev",
62267
+ "draft",
62268
+ "live",
62269
+ "accept-regressions",
62270
+ "accept-partial",
62271
+ "no-rebind",
62272
+ "help",
62273
+ "static",
62274
+ "strict",
62275
+ "apply",
62276
+ "apply-permissions",
62277
+ "allow-destructive",
62278
+ "allow-draft",
62279
+ "all",
62280
+ "all-screens",
62281
+ "ai",
62282
+ "binary",
62283
+ "crashes",
62284
+ "crashes-only",
62285
+ "crashesOnly",
62286
+ "dpx",
62287
+ "dry-run",
62288
+ "dump-state",
62289
+ "follow",
62290
+ "invoke",
62291
+ "licenses",
62292
+ "measure-widgets",
62293
+ "no-events",
62294
+ "no-hostile",
62295
+ "no-logs",
62296
+ "no-oauth-app",
62297
+ "no-shots",
62298
+ "no-source",
62299
+ "no-wait",
62300
+ "offline",
62301
+ "publish",
62302
+ "record",
62303
+ "remote",
62304
+ "rtl",
62305
+ "skip-version-check",
62306
+ "snapshot",
62307
+ "summary",
62308
+ "templates",
62309
+ "tree",
62310
+ "visitor",
62311
+ "wait",
62312
+ "wix",
62313
+ "silent",
62314
+ "include-disabled",
62315
+ "skip-build"
62316
+ ]);
62252
62317
  var SHELL_ENUM = SHELL_NAMES2.join("|");
62318
+ var SWITCH_FLAGS = new Set([...BOOLEAN_FLAGS].filter((name) => name !== "deep"));
62319
+ var SWITCH_CONSEQUENCE = {
62320
+ yes: "silently ignored, it would turn a real mutation into a dry run",
62321
+ new: "silently ignored, it would reuse a client instead of minting a new one",
62322
+ force: "silently ignored, it would stop at the first refusal it was meant to override",
62323
+ record: "silently ignored, it would leave you believing the fixture was refreshed",
62324
+ "no-oauth-app": "silently ignored, it would mint an OAuth client you asked to skip",
62325
+ "dry-run": "silently ignored, it would perform the real writes you asked to rehearse",
62326
+ "allow-destructive": "silently ignored, it would refuse the destructive step you opted into",
62327
+ static: "silently ignored, it would render HYDRATED when you asked for static",
62328
+ // `--wait=false` is the one spelling where "pass it bare" is the WRONG advice: bare `--wait`
62329
+ // means wait. The flag that turns waiting off is a different one, so name it.
62330
+ wait: "if you meant to stop waiting, that is `--no-wait` \u2014 a bare `--wait` means the opposite"
62331
+ };
62332
+ function switchFlagErrors(argv) {
62333
+ const out = [];
62334
+ for (const a of argv) {
62335
+ if (!a.startsWith("--")) continue;
62336
+ const eq = a.indexOf("=");
62337
+ if (eq < 0) continue;
62338
+ const name = a.slice(2, eq);
62339
+ if (!SWITCH_FLAGS.has(name)) continue;
62340
+ const because = SWITCH_CONSEQUENCE[name];
62341
+ out.push(`--${name} takes no value (got "${a}") \u2014 pass it bare${because ? `; ${because}` : ", it is an on/off flag"}`);
62342
+ }
62343
+ return out;
62344
+ }
62253
62345
  function parseFlags(argv) {
62254
62346
  const _ = [];
62255
62347
  const flags = {};
@@ -63789,9 +63881,9 @@ async function producedWidgetFamilies(dir) {
63789
63881
  }
63790
63882
  async function run(argv, io = defaultIO) {
63791
63883
  const { _: pos, flags } = parseFlags(argv);
63884
+ const flagErrors = switchFlagErrors(argv);
63792
63885
  const command = pos[0];
63793
63886
  const print = (o) => io.log(JSON.stringify(o, null, 2));
63794
- const flagInArgv = (name) => argv.some((a) => a === `--${name}` || a.startsWith(`--${name}=`));
63795
63887
  if (flags.version === true || command === "version" || pos.includes("-v")) {
63796
63888
  const v = cliVersion();
63797
63889
  io.log(flags.json ? JSON.stringify({ himi: v }, null, 2) : `himi v${v}`);
@@ -63805,6 +63897,10 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
63805
63897
  io.log(flags.json ? JSON.stringify(helpJson(), null, 2) : USAGE + footer);
63806
63898
  return command === "help" || flags.help ? 0 : 2;
63807
63899
  }
63900
+ if (flagErrors.length > 0 && flags.help !== true) {
63901
+ io.error(JSON.stringify({ ok: false, error: "invalid_flag_value", problems: flagErrors, hint: "run `himi help` for the flag grammar." }));
63902
+ return 2;
63903
+ }
63808
63904
  const contextualDefaultTarget = defaultTargetForCommand(command, contentDir(flags));
63809
63905
  const targetName = () => resolveTargetName({ target: str5(flags.target), defaultTarget: contextualDefaultTarget });
63810
63906
  const client2 = () => new ServeCliClient(
@@ -65520,7 +65616,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
65520
65616
  return 2;
65521
65617
  }
65522
65618
  }
65523
- if (flagInArgv("from-release") && !str5(flags["from-release"])) {
65619
+ if (flags["from-release"] !== void 0 && !str5(flags["from-release"])) {
65524
65620
  io.error(JSON.stringify({ ok: false, error: "from_release_needs_a_value", message: "--from-release takes a release id to branch from. Omit the flag entirely to patch the live release.", usage: ONLY_USAGE }));
65525
65621
  return 2;
65526
65622
  }
@@ -66767,7 +66863,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
66767
66863
  }));
66768
66864
  return 2;
66769
66865
  }
66770
- if (flagInArgv("from-release") && !str5(flags["from-release"])) {
66866
+ if (flags["from-release"] !== void 0 && !str5(flags["from-release"])) {
66771
66867
  io.error(JSON.stringify({ ok: false, error: "from_release_needs_a_value", message: "--from-release takes a release id to branch from. Omit the flag entirely to patch the live release.", usage: PATCH_USAGE }));
66772
66868
  return 2;
66773
66869
  }
@@ -66864,15 +66960,15 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
66864
66960
  const bytes2 = readFileSync64(file);
66865
66961
  const sha = createHash24("sha256").update(bytes2).digest("hex");
66866
66962
  const forScreens = (str5(flags["for-screen"]) ?? "").split(",").map((s) => s.trim()).filter(Boolean);
66867
- if (flagInArgv("no-rebind") && flags["no-rebind"] !== true) {
66963
+ if (flags["no-rebind"] !== void 0 && flags["no-rebind"] !== true) {
66868
66964
  io.error(JSON.stringify({ ok: false, error: "no_rebind_takes_no_value", message: "--no-rebind is a switch and takes no value; pass it bare.", usage: PATCH_USAGE }));
66869
66965
  return 2;
66870
66966
  }
66871
- if (flagInArgv("for-screen") && forScreens.length === 0) {
66967
+ if (flags["for-screen"] !== void 0 && forScreens.length === 0) {
66872
66968
  io.error(JSON.stringify({ ok: false, error: "for_screen_needs_a_value", message: "--for-screen takes one or more screen ids to repoint at the new bytes, comma-separated.", usage: PATCH_USAGE }));
66873
66969
  return 2;
66874
66970
  }
66875
- if (flagInArgv("for-screen") && flagInArgv("no-rebind")) {
66971
+ if (flags["for-screen"] !== void 0 && flags["no-rebind"] !== void 0) {
66876
66972
  io.error(JSON.stringify({
66877
66973
  ok: false,
66878
66974
  error: "conflicting_rebind",
@@ -68042,14 +68138,6 @@ ${report.ok ? "OK \u2014 data + serve plane reachable." : typeof report.hint ===
68042
68138
  if (sub === "client") {
68043
68139
  const { runSiteClientEnsure: runSiteClientEnsure2, runSiteClientList: runSiteClientList2, SITE_CLIENT_USAGE: SITE_CLIENT_USAGE2 } = await Promise.resolve().then(() => (init_site_oauth_client(), site_oauth_client_exports));
68044
68140
  const op = pos[2];
68045
- for (const bare of ["yes", "new"]) {
68046
- if (flags[bare] !== void 0 && flags[bare] !== true) {
68047
- io.error(JSON.stringify({
68048
- error: `--${bare} takes no value (got "${String(flags[bare])}") \u2014 pass it bare; ` + (bare === "yes" ? "silently ignored, it would turn a real create into a dry run" : "silently ignored, it would reuse a client instead of minting a new one")
68049
- }));
68050
- return 2;
68051
- }
68052
- }
68053
68141
  if (op !== "ensure" && op !== "list") {
68054
68142
  io.error(JSON.stringify({
68055
68143
  error: op ? `unknown site client op "${op}" \u2014 did you mean \`ensure\`? (there is no bare \`create\`: the command reconciles an existing client rather than minting a second one every run \u2014 pass --new to force a fresh client)` : "site client needs an op: ensure | list",
@@ -68234,6 +68322,7 @@ export {
68234
68322
  servePlaneAnswers,
68235
68323
  serveUnreachableError,
68236
68324
  serveUnreachableHint,
68325
+ switchFlagErrors,
68237
68326
  templatePreviewAuthError,
68238
68327
  tokenCoversApp,
68239
68328
  wixPlayerTestflightTarget,
@@ -1242,7 +1242,7 @@
1242
1242
  ]
1243
1243
  }
1244
1244
  },
1245
- "POST https://www.wixapis.com/members-feed-viewer/v1/members-viewer-feed-notifications/query": {
1245
+ "POST /members-feed-viewer/v1/members-viewer-feed-notifications/query": {
1246
1246
  "viewerFeedNotifications": [
1247
1247
  {
1248
1248
  "id": "ntf-0001",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.863.0",
3
+ "version": "0.865.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": [
@@ -63,5 +63,5 @@
63
63
  "artifactId": "himalaya-cli"
64
64
  }
65
65
  },
66
- "falconPackageHash": "c5d242935309a310e8916c1fc607f5bfc7aebc217e81fa9fbaa08ca7"
66
+ "falconPackageHash": "c731a83c32276fe2639747f8ae41c16bd1216d848567dfe8f4c28a15"
67
67
  }