@homespunapps/core 1.6.35 → 1.6.37

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/client.d.ts CHANGED
@@ -289,7 +289,13 @@ export declare class HomespunClient {
289
289
  finalizeBlob(attachmentId: string): Promise<AttachmentRef>;
290
290
  /** POST /v1/apps — create (deploy) a new App + its first AppVersion. */
291
291
  deployApp(req: DeployAppRequest): Promise<DeployAppResponse>;
292
- /** POST /v1/apps/:id/versions — redeploy (compat-gated unless force). */
292
+ /**
293
+ * POST /v1/apps/:id/versions: redeploy (compat-gated unless force).
294
+ *
295
+ * An omitted field keeps what is live (html, manifest and assets alike), so
296
+ * send only what changes. Undefined fields are dropped by the JSON encoder,
297
+ * which is exactly the "omitted" the relay reads.
298
+ */
293
299
  redeployApp(appId: string, req: RedeployAppRequest): Promise<RedeployAppResponse>;
294
300
  /**
295
301
  * Dry-run a deploy: validate the manifest + asset shapes, run the compat gate
@@ -765,15 +771,26 @@ export interface DeployAppResponse {
765
771
  */
766
772
  warnings?: string[];
767
773
  }
768
- /** Request body for `POST /v1/apps/:id/versions` — redeploy (compat-gated). */
774
+ /**
775
+ * Request body for `POST /v1/apps/:id/versions`: redeploy (compat-gated).
776
+ *
777
+ * Every content field is optional, and an OMITTED one keeps what is live: the
778
+ * relay carries the current version's html / manifest / assets forward. Send
779
+ * only what changes. At least one of the three is required; a body that omits
780
+ * all three is refused as `invalid_args` rather than minting a no-op version.
781
+ */
769
782
  export interface RedeployAppRequest {
770
- html: string;
771
- manifest: unknown;
783
+ /** Omit to keep the live document (a manifest-only change needs no HTML). */
784
+ html?: string;
785
+ /** Omit to keep the live manifest (an HTML-only change needs no manifest). */
786
+ manifest?: unknown;
772
787
  /** Bypass the compat gate; a removed collection is detached, not deleted. */
773
788
  force?: boolean;
774
789
  /**
775
- * Optional asset bundle for this version. Replaces the previous version's asset
776
- * set atomically (the new version carries its own map; old assets are detached).
790
+ * Optional asset bundle for this version. Present, it replaces the previous
791
+ * version's asset set atomically (the new version carries its own map; old
792
+ * assets are detached). Omitted, the live asset set is carried forward; `[]`
793
+ * is the explicit "clear the assets".
777
794
  */
778
795
  assets?: AppAsset[];
779
796
  }
@@ -828,8 +845,10 @@ export interface DeployCheckResult {
828
845
  */
829
846
  export interface DeployCheckRequest {
830
847
  app_id?: string;
831
- html: string;
832
- manifest: unknown;
848
+ /** Required to check a create; omit on a redeploy check to inherit the live document. */
849
+ html?: string;
850
+ /** Required to check a create; omit on a redeploy check to inherit the live manifest. */
851
+ manifest?: unknown;
833
852
  force?: boolean;
834
853
  assets?: AppAsset[];
835
854
  }
package/dist/client.js CHANGED
@@ -544,7 +544,13 @@ export class HomespunClient {
544
544
  this.fail(r);
545
545
  return this.asObject(r);
546
546
  }
547
- /** POST /v1/apps/:id/versions — redeploy (compat-gated unless force). */
547
+ /**
548
+ * POST /v1/apps/:id/versions: redeploy (compat-gated unless force).
549
+ *
550
+ * An omitted field keeps what is live (html, manifest and assets alike), so
551
+ * send only what changes. Undefined fields are dropped by the JSON encoder,
552
+ * which is exactly the "omitted" the relay reads.
553
+ */
548
554
  async redeployApp(appId, req) {
549
555
  const r = await this.call("POST", `/v1/apps/${encodeURIComponent(appId)}/versions`, {
550
556
  html: req.html,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homespunapps/core",
3
- "version": "1.6.35",
3
+ "version": "1.6.37",
4
4
  "description": "Homespun relay client: typed HTTP + WebSocket operations against a Homespun relay. Framework-free.",
5
5
  "license": "MIT",
6
6
  "type": "module",