@wix/himalaya-cli 0.825.0 → 0.826.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 +43 -2
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -59810,7 +59810,7 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
59810
59810
  return 1;
59811
59811
  }
59812
59812
  payload.source = { files, meta };
59813
- const { collectAppSource: collectAppSource2, secretFindings: secretFindings2, zipAppSource: zipAppSource2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
59813
+ const { collectAppSource: collectAppSource2, secretFindings: secretFindings2, zipAppSource: zipAppSource2, MAX_APP_SOURCE_BYTES: MAX_APP_SOURCE_BYTES2 } = await Promise.resolve().then(() => (init_app_source(), app_source_exports));
59814
59814
  const templateArchive = collectAppSource2(sourceDir);
59815
59815
  const templateSecrets = secretFindings2(templateArchive.entries);
59816
59816
  if (templateSecrets.length > 0) {
@@ -59821,7 +59821,27 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
59821
59821
  }));
59822
59822
  return 1;
59823
59823
  }
59824
- payload.appSource = zipAppSource2(templateArchive.entries).toString("base64");
59824
+ const templateZip = zipAppSource2(templateArchive.entries);
59825
+ const templateSourceB64 = templateZip.toString("base64");
59826
+ if (templateSourceB64.length > MAX_APP_SOURCE_BYTES2) {
59827
+ io.error(JSON.stringify({
59828
+ ok: false,
59829
+ template: name,
59830
+ app: templateAppId,
59831
+ published: false,
59832
+ error: "app_source_too_large",
59833
+ archivedBytes: templateZip.length,
59834
+ encodedBytes: templateSourceB64.length,
59835
+ limit: MAX_APP_SOURCE_BYTES2,
59836
+ files: templateArchive.entries.length,
59837
+ // No `--no-source` here, deliberately: a template's archive is not optional the way
59838
+ // a push's is. `himi pull` restores templates through it, so a flag that dropped it
59839
+ // would publish a template nobody can restore — the failure #2423 exists to prevent.
59840
+ hint: "trim the template's source tree (build output and dependencies are already excluded) \u2014 a template's archive is not optional, so there is no flag that publishes without it"
59841
+ }));
59842
+ return 1;
59843
+ }
59844
+ payload.appSource = templateSourceB64;
59825
59845
  const tplVis = visibilityFlag(flags, io);
59826
59846
  if (!tplVis) return 2;
59827
59847
  const publishMeta = {
@@ -59829,6 +59849,27 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
59829
59849
  ...str5(flags.notes) ? { notes: str5(flags.notes) } : {},
59830
59850
  ...tplVis.value ? { visibility: tplVis.value } : {}
59831
59851
  };
59852
+ const templateBodyBytes = publishReleaseBodyBytes(payload, publishMeta);
59853
+ if (templateBodyBytes > MAX_PUBLISH_BODY_BYTES) {
59854
+ io.error(JSON.stringify({
59855
+ ok: false,
59856
+ template: name,
59857
+ app: templateAppId,
59858
+ published: false,
59859
+ error: "publish_body_too_large",
59860
+ bodyBytes: templateBodyBytes,
59861
+ limit: MAX_PUBLISH_BODY_BYTES,
59862
+ // Both halves, because "the body is too big" does not say which one to cut, and the
59863
+ // two answer to different edits: `sourceChars` shrinks by removing FILES from the
59864
+ // tree, `appSourceBytes` by removing bytes (an image, a fixture) that may not be
59865
+ // text at all. They overlap by design — the same tree, twice — so they are reported
59866
+ // separately rather than summed into a figure that double-counts it.
59867
+ sourceChars: JSON.stringify(payload.source).length,
59868
+ appSourceBytes: templateSourceB64.length,
59869
+ hint: "trim the template's source tree \u2014 a template carries its tree twice (the public catalog view and the private archive), and neither is optional, so there is no flag that publishes without them"
59870
+ }));
59871
+ return 1;
59872
+ }
59832
59873
  let r;
59833
59874
  try {
59834
59875
  r = await client3().publishRelease(payload, publishMeta);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.825.0",
3
+ "version": "0.826.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": "5e06eccfd54f4a4994881cefcb68da9d51e6dccb06e0b6b2fd095790"
66
+ "falconPackageHash": "b3bc4ec44896b4a76de319d7e7785fdec50e5682c47183f97304d771"
67
67
  }