@zoahhq/cli 0.1.5 → 0.1.6

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="https://zoah.com/assets/images/opacity-mark.svg" alt="Zoah" width="84" />
2
+ <img src="https://zoah.com/assets/images/z-logo.svg" alt="Zoah" width="84" />
3
3
  </p>
4
4
 
5
5
  # @zoahhq/cli
package/dist/cli.mjs CHANGED
@@ -338,13 +338,21 @@ var init_colors = __esm({
338
338
  var client_exports = {};
339
339
  __export(client_exports, {
340
340
  ApiClient: () => ApiClient,
341
- ApiError: () => ApiError
341
+ ApiError: () => ApiError,
342
+ ImportFailedError: () => ImportFailedError
342
343
  });
343
344
  import { request as request2 } from "undici";
344
- var ApiError, ApiClient;
345
+ var ImportFailedError, ApiError, ApiClient;
345
346
  var init_client = __esm({
346
347
  "src/api/client.ts"() {
347
348
  "use strict";
349
+ ImportFailedError = class extends Error {
350
+ constructor(reason) {
351
+ super(reason);
352
+ this.reason = reason;
353
+ this.name = "ImportFailedError";
354
+ }
355
+ };
348
356
  ApiError = class extends Error {
349
357
  status;
350
358
  body;
@@ -441,11 +449,7 @@ var init_client = __esm({
441
449
  return status.result;
442
450
  }
443
451
  if (status.status === "failed") {
444
- throw new ApiError(
445
- 500,
446
- status.error ?? "",
447
- `Import failed: ${status.error ?? "unknown error"}`
448
- );
452
+ throw new ImportFailedError(status.error ?? "unknown error");
449
453
  }
450
454
  }
451
455
  }
@@ -40865,6 +40869,7 @@ function flushActionPack() {
40865
40869
  label: pack.label
40866
40870
  });
40867
40871
  pack.label = void 0;
40872
+ pack.shipped.push({ actionId, eventCount: events.length });
40868
40873
  }
40869
40874
  function joinActionPackStandalone(events, client2) {
40870
40875
  const pack = currentPack;
@@ -53250,9 +53255,11 @@ var init_client2 = __esm({
53250
53255
  ]
53251
53256
  });
53252
53257
  traceMark("client.action.refused_oversized", { actionId: action.id, byteLength, events: action.events.length }, action.meta?.requestId);
53258
+ const refusal = overByteCap ? `This change is too large to sync (${byteLength} bytes, limit ${MAX_OUTBOUND_MESSAGE_BYTES}) and was reverted.` : `This change is too large to sync (${action.events.length} events, limit ${MAX_INBOUND_ACTION_EVENTS}) and was reverted.`;
53259
+ this.rejectActionAck(action.id, new Error(refusal));
53253
53260
  emitRejection(this.eventHandlers, {
53254
53261
  code: "MESSAGE_TOO_LARGE",
53255
- message: overByteCap ? `This change is too large to sync (${byteLength} bytes, limit ${MAX_OUTBOUND_MESSAGE_BYTES}) and was reverted.` : `This change is too large to sync (${action.events.length} events, limit ${MAX_INBOUND_ACTION_EVENTS}) and was reverted.`,
53262
+ message: refusal,
53256
53263
  actionId: action.id
53257
53264
  });
53258
53265
  return;
@@ -55386,6 +55393,8 @@ var init_client3 = __esm({
55386
55393
  init_optext();
55387
55394
  init_storage();
55388
55395
  init_org_membership();
55396
+ init_compactAction();
55397
+ init_messaging();
55389
55398
  }
55390
55399
  });
55391
55400
 
@@ -89715,7 +89724,7 @@ var CLI_VERSION;
89715
89724
  var init_version = __esm({
89716
89725
  "src/config/version.ts"() {
89717
89726
  "use strict";
89718
- CLI_VERSION = true ? "0.1.5" : "0.0.0-dev";
89727
+ CLI_VERSION = true ? "0.1.6" : "0.0.0-dev";
89719
89728
  }
89720
89729
  });
89721
89730
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoahhq/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Zoah CLI: import React components, publish via Zoah, swap local imports",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zoah Inc.",