@homespunapps/core 1.6.20 → 1.6.22

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
@@ -375,7 +375,13 @@ export declare class HomespunClient {
375
375
  * DELETE /v1/apps/:id/domain - remove the domain binding (Cloudflare
376
376
  * hostname best-effort + record + quota release). Idempotent.
377
377
  */
378
- deleteAppDomain(appId: string): Promise<void>;
378
+ /**
379
+ * Unbind the app's custom domains. With no `domain` every binding goes;
380
+ * with one, only that binding, except that removing the primary takes its
381
+ * aliases with it (an alias pointing at a domain the app no longer holds
382
+ * would redirect visitors into nothing).
383
+ */
384
+ deleteAppDomain(appId: string, domain?: string): Promise<void>;
379
385
  /**
380
386
  * POST /v1/apps/:id/members — add or invite a member by email. If a Human
381
387
  * already exists for the email, the member row is created immediately
package/dist/client.js CHANGED
@@ -703,8 +703,15 @@ export class HomespunClient {
703
703
  * DELETE /v1/apps/:id/domain - remove the domain binding (Cloudflare
704
704
  * hostname best-effort + record + quota release). Idempotent.
705
705
  */
706
- async deleteAppDomain(appId) {
707
- const r = await this.call("DELETE", `/v1/apps/${encodeURIComponent(appId)}/domain`);
706
+ /**
707
+ * Unbind the app's custom domains. With no `domain` every binding goes;
708
+ * with one, only that binding, except that removing the primary takes its
709
+ * aliases with it (an alias pointing at a domain the app no longer holds
710
+ * would redirect visitors into nothing).
711
+ */
712
+ async deleteAppDomain(appId, domain) {
713
+ const query = domain ? `?domain=${encodeURIComponent(domain)}` : "";
714
+ const r = await this.call("DELETE", `/v1/apps/${encodeURIComponent(appId)}/domain${query}`);
708
715
  if (!r.ok)
709
716
  this.fail(r);
710
717
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homespunapps/core",
3
- "version": "1.6.20",
3
+ "version": "1.6.22",
4
4
  "description": "Homespun relay client: typed HTTP + WebSocket operations against a Homespun relay. Framework-free.",
5
5
  "license": "MIT",
6
6
  "type": "module",