@homespunapps/core 1.6.22 → 1.6.23
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 +17 -6
- package/dist/client.js +14 -9
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -360,15 +360,18 @@ export declare class HomespunClient {
|
|
|
360
360
|
status: string;
|
|
361
361
|
}>;
|
|
362
362
|
/**
|
|
363
|
-
* POST /v1/apps/:id/domain - bind a custom domain to the app.
|
|
364
|
-
*
|
|
365
|
-
*
|
|
363
|
+
* POST /v1/apps/:id/domain - bind a custom domain to the app. The FIRST
|
|
364
|
+
* domain bound serves the app; every one after it becomes an alias that
|
|
365
|
+
* redirects there (`redirect_to`). Returns the record including
|
|
366
|
+
* `dns_records`: the DNS entries the domain owner must publish (the routing
|
|
367
|
+
* CNAME plus any Cloudflare validation records).
|
|
366
368
|
*/
|
|
367
369
|
setAppDomain(appId: string, domain: string): Promise<AppDomain>;
|
|
368
370
|
/**
|
|
369
|
-
* GET /v1/apps/:id/domain - the app's domain
|
|
370
|
-
*
|
|
371
|
-
* update as a side
|
|
371
|
+
* GET /v1/apps/:id/domain - the app's SERVING domain at the top level with
|
|
372
|
+
* its `aliases` beside it, live-refreshed against Cloudflare when the
|
|
373
|
+
* feature is enabled (status/last_error/last_checked_at update as a side
|
|
374
|
+
* effect).
|
|
372
375
|
*/
|
|
373
376
|
getAppDomain(appId: string): Promise<AppDomain>;
|
|
374
377
|
/**
|
|
@@ -896,10 +899,18 @@ export interface AppDomain {
|
|
|
896
899
|
status: "pending" | "active" | "error" | "removed";
|
|
897
900
|
dns_records: AppDomainDnsRecord[];
|
|
898
901
|
cf_hostname_id: string | null;
|
|
902
|
+
cf_worker_route_id?: string | null;
|
|
903
|
+
/** Null on the serving domain; on an alias, the domain it redirects to. */
|
|
904
|
+
redirect_to?: string | null;
|
|
899
905
|
last_error: string | null;
|
|
900
906
|
last_checked_at: string | null;
|
|
901
907
|
created_at: string;
|
|
902
908
|
updated_at: string;
|
|
909
|
+
/**
|
|
910
|
+
* Present on the GET response only: the app's other domains, each of which
|
|
911
|
+
* redirects to the one carried at the top level.
|
|
912
|
+
*/
|
|
913
|
+
aliases?: AppDomain[];
|
|
903
914
|
}
|
|
904
915
|
/**
|
|
905
916
|
* One member row — the shape `listAppMembers` returns and the `member` half
|
package/dist/client.js
CHANGED
|
@@ -673,14 +673,18 @@ export class HomespunClient {
|
|
|
673
673
|
return this.asObject(r);
|
|
674
674
|
}
|
|
675
675
|
// -------------------------------------------------------------------------
|
|
676
|
-
// Custom domains (Cloudflare for SaaS).
|
|
677
|
-
//
|
|
678
|
-
// the
|
|
676
|
+
// Custom domains (Cloudflare for SaaS). An app holds one domain that SERVES
|
|
677
|
+
// plus any number of aliases that redirect to it; the first domain bound
|
|
678
|
+
// becomes the serving one. The relay rejects setAppDomain with
|
|
679
|
+
// `custom_domains_not_enabled` (501) when the deployment has no Cloudflare
|
|
680
|
+
// configuration.
|
|
679
681
|
// -------------------------------------------------------------------------
|
|
680
682
|
/**
|
|
681
|
-
* POST /v1/apps/:id/domain - bind a custom domain to the app.
|
|
682
|
-
*
|
|
683
|
-
*
|
|
683
|
+
* POST /v1/apps/:id/domain - bind a custom domain to the app. The FIRST
|
|
684
|
+
* domain bound serves the app; every one after it becomes an alias that
|
|
685
|
+
* redirects there (`redirect_to`). Returns the record including
|
|
686
|
+
* `dns_records`: the DNS entries the domain owner must publish (the routing
|
|
687
|
+
* CNAME plus any Cloudflare validation records).
|
|
684
688
|
*/
|
|
685
689
|
async setAppDomain(appId, domain) {
|
|
686
690
|
const r = await this.call("POST", `/v1/apps/${encodeURIComponent(appId)}/domain`, { domain });
|
|
@@ -689,9 +693,10 @@ export class HomespunClient {
|
|
|
689
693
|
return this.asObject(r);
|
|
690
694
|
}
|
|
691
695
|
/**
|
|
692
|
-
* GET /v1/apps/:id/domain - the app's domain
|
|
693
|
-
*
|
|
694
|
-
* update as a side
|
|
696
|
+
* GET /v1/apps/:id/domain - the app's SERVING domain at the top level with
|
|
697
|
+
* its `aliases` beside it, live-refreshed against Cloudflare when the
|
|
698
|
+
* feature is enabled (status/last_error/last_checked_at update as a side
|
|
699
|
+
* effect).
|
|
695
700
|
*/
|
|
696
701
|
async getAppDomain(appId) {
|
|
697
702
|
const r = await this.call("GET", `/v1/apps/${encodeURIComponent(appId)}/domain`);
|