@wix/himalaya-cli 0.1677.0 → 0.1678.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 CHANGED
@@ -360,16 +360,19 @@ var init_client = __esm({
360
360
  /** Publish a built release into the store (POST /v1/admin/release), with optional label/notes/gitSha.
361
361
  * `draft: true` stores it fully servable (pinned reads) WITHOUT moving the live release. */
362
362
  async publishRelease(payload, meta, draft = false) {
363
- const { bytes: bytes2, gzip } = encodePublishBody(publishReleaseBody(payload, meta, draft));
363
+ const body = publishReleaseBody(payload, meta, draft);
364
+ const { bytes: bytes2, gzip } = encodePublishBody(body);
364
365
  const headers2 = { ...this.ctrlHeaders(), ...gzip ? { "content-encoding": "gzip" } : {} };
365
- const res = await this.request("control", "POST", "/v1/admin/release", { rawBody: bytes2, headers: headers2 });
366
+ const app2 = body.app;
367
+ const path2 = typeof app2 === "string" && app2 ? `/v1/admin/release?app=${encodeURIComponent(app2)}` : "/v1/admin/release";
368
+ const res = await this.request("control", "POST", path2, { rawBody: bytes2, headers: headers2 });
366
369
  const refusal2 = res.json;
367
370
  const decodedOverPlainCap = res.status === 413 && refusal2?.error === "payload_too_large" && refusal2.limit === MAX_PUBLISH_BODY_BYTES && bytes2.byteLength <= MAX_PUBLISH_BODY_BYTES;
368
371
  if (gzip && (res.status === 400 && refusal2?.error === "bad_json" || decodedOverPlainCap)) {
369
372
  const json9 = {
370
373
  code: "compressed_publish_unsupported",
371
374
  error: "compressed_publish_unsupported",
372
- hint: "this body is over the plain publish cap, and the plane did not accept it compressed: either the plane predates compressed publish bodies (it needs a serve deploy), or this is a self-serve credential, which keeps the plain 8 MB cap",
375
+ hint: "this body is over the plain publish cap, and the plane did not accept it compressed: the plane predates compressed publish bodies, or (for a self-serve credential) predates checking the app before the body \u2014 either way it needs a serve deploy",
373
376
  sentBytes: bytes2.byteLength,
374
377
  ...typeof refusal2?.bytes === "number" ? { planeCountedBytes: refusal2.bytes } : {}
375
378
  };
@@ -15997,7 +16000,6 @@ function webViewOriginAllowed(url, origins) {
15997
16000
  }
15998
16001
  var init_webview_origin = __esm({
15999
16002
  "../../core/ts/src/webview-origin.ts"() {
16000
- "use strict";
16001
16003
  init_define_HHP_CATALOG();
16002
16004
  }
16003
16005
  });
@@ -31448,6 +31450,7 @@ function resolveIdiom(tokens2, ctx = {}) {
31448
31450
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
31449
31451
  var init_idiom = __esm({
31450
31452
  "../../core/ts/src/idiom.ts"() {
31453
+ "use strict";
31451
31454
  init_define_HHP_CATALOG();
31452
31455
  IDIOM_CONTEXTS = {
31453
31456
  ios: { native: ["ios"] },
@@ -431,7 +431,7 @@ whole body gzip-encoded because it is over the plain 8 MB cap:
431
431
 
432
432
  | Code | Meaning |
433
433
  |---|---|
434
- | `compressed_publish_unsupported` | The publish body went out gzipped and the publishing service did not accept it compressed. It either read the bytes as malformed JSON, or measured the decompressed body against the 8 MB uncompressed limit (HTTP 413). Either the service does not accept compressed bodies yet, or the credential is a self-serve one, which keeps the 8 MB uncompressed limit. Nothing was written. |
434
+ | `compressed_publish_unsupported` | The publish body went out gzipped and the publishing service did not accept it compressed. It either read the bytes as malformed JSON, or measured the decompressed body against the 8 MB uncompressed limit (HTTP 413). Either the service does not accept compressed bodies yet, or the credential is a self-serve one and the service predates checking the app before reading the body (until then, self-serve keeps the 8 MB uncompressed limit). Nothing was written. |
435
435
 
436
436
  ## `himi template screens --upsert | --add | --write` codes
437
437
 
@@ -261,8 +261,19 @@ nothing reads them.
261
261
  Caps are enforced at the door (413 `item_too_large`): a screen descriptor 256 KiB, a bundle, an
262
262
  asset or the icon 4 MiB, tokens and app-config 64 KiB each, and the manifest 256 KiB as stored
263
263
  (label 1 KiB, notes 16 KiB). The whole body is capped at 8 MiB (413 `payload_too_large`), except a
264
- whole-release publish from an operator credential, which may be up to 32 MiB: `himi-serve` sends a
265
- body over 8 MiB gzipped. A self-serve credential keeps the 8 MiB limit. A template's catalog view
264
+ whole-release publish, which may be up to 32 MiB: `himi-serve` sends a body over 8 MiB gzipped.
265
+ Any credential gets the 32 MiB cap when the publish names its app on the query
266
+ (`POST /v1/admin/release?app=<app>`), which `himi-serve` does: the plane checks the credential's
267
+ scope for that app before it reads the body, then requires the body's `app` to match
268
+ (400 `release_app_mismatch`). An operator credential gets it without the query too. A self-serve
269
+ publish that does not name its app keeps the 8 MiB limit, because its body would be parsed before
270
+ the plane knew whose app it was. Self-serve publishes are also bounded per account, before the body
271
+ is read: 30 per 10 minutes (429 `release_rate_limited`), one at a time (429 `release_in_flight`),
272
+ and at most two self-serve publishes in flight per serve pod (503 `release_capacity`). Each carries
273
+ `retry-after`; wait and push again. A self-serve body must finish arriving within two minutes
274
+ (408 `body_read_timeout`). `himi push` itself still refuses a self-serve body over
275
+ 8 MiB before sending it (`publish_body_too_large`, `compressedUpload` naming the self-serve
276
+ credential); `himi-serve release push` does not. A template's catalog view
266
277
  (`source`, or `sourceGz` once inflated) may be up to 32 MiB only when an operator credential
267
278
  publishes a reserved `himi-template-*` app; any other release that carries a catalog view keeps
268
279
  8 MiB (413 `item_too_large` for a plain view over it, `source_gz_inflated_too_large` for a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1677.0",
3
+ "version": "0.1678.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": [
@@ -79,5 +79,5 @@
79
79
  "artifactId": "himalaya-cli"
80
80
  }
81
81
  },
82
- "falconPackageHash": "5af8d031bf76ca24718c1afe3462141522b0c184b86daaf154b6c7be"
82
+ "falconPackageHash": "4781d0053d5a20c44fee0d5f3020f89c81e1eca920833e728e969e9e"
83
83
  }