domainkit 0.14.0 → 0.15.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/Cloudflare.mjs +16 -7
- package/dist/Cloudflare.mjs.map +1 -1
- package/dist/Connect.mjs +5 -1
- package/dist/Connect.mjs.map +1 -1
- package/dist/Provider.mjs.map +1 -1
- package/dist/Server.mjs +3 -1
- package/dist/Server.mjs.map +1 -1
- package/dist/Storage.mjs +5 -0
- package/dist/Storage.mjs.map +1 -1
- package/dist/Testing.mjs +2 -0
- package/dist/Testing.mjs.map +1 -1
- package/dist/Verify.mjs +4 -1
- package/dist/Verify.mjs.map +1 -1
- package/dist/internal/conformance/provider.mjs +1 -0
- package/dist/internal/conformance/provider.mjs.map +1 -1
- package/dist/internal/conformance/storage.mjs +2 -0
- package/dist/internal/conformance/storage.mjs.map +1 -1
- package/dist/package.mjs +1 -1
- package/dist/types/Connect.d.ts +3 -1
- package/dist/types/Provider.d.ts +6 -0
- package/dist/types/Server.d.ts +4 -0
- package/dist/types/Storage.d.ts +5 -0
- package/dist/types/Testing.d.ts +2 -0
- package/dist/types/Verify.d.ts +15 -8
- package/package.json +2 -2
package/dist/types/Server.d.ts
CHANGED
|
@@ -279,6 +279,8 @@ export declare const Zones: Schema.Struct<{
|
|
|
279
279
|
readonly connections: Schema.$Array<Schema.Struct<{
|
|
280
280
|
readonly connectionId: Schema.String;
|
|
281
281
|
readonly provider: Schema.String;
|
|
282
|
+
/** What the provider called the account at connect time; `null` when it named none. */
|
|
283
|
+
readonly label: Schema.NullOr<Schema.String>;
|
|
282
284
|
readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
|
|
283
285
|
}>>;
|
|
284
286
|
/** Every provider a customer could connect, so a picker offers one without a second call. */
|
|
@@ -7443,6 +7445,8 @@ export declare const group: HttpApiGroup.HttpApiGroup<"domainkit", HttpApiEndpoi
|
|
|
7443
7445
|
readonly connections: Schema.$Array<Schema.Struct<{
|
|
7444
7446
|
readonly connectionId: Schema.String;
|
|
7445
7447
|
readonly provider: Schema.String;
|
|
7448
|
+
/** What the provider called the account at connect time; `null` when it named none. */
|
|
7449
|
+
readonly label: Schema.NullOr<Schema.String>;
|
|
7446
7450
|
readonly status: Schema.Literals<readonly ["disconnected", "connected", "reconnect"]>;
|
|
7447
7451
|
}>>;
|
|
7448
7452
|
/** Every provider a customer could connect, so a picker offers one without a second call. */
|
package/dist/types/Storage.d.ts
CHANGED
|
@@ -38,6 +38,11 @@ declare const Authorization_base: Schema.Class<Authorization, Schema.Struct<{
|
|
|
38
38
|
readonly capabilities: Schema.$Array<Schema.Literals<readonly ["dns:read", "dns:write"]>>;
|
|
39
39
|
/** Provider-specific account context (account id, team id, ...) decoded by the provider's `context` schema. */
|
|
40
40
|
readonly context: Schema.Unknown;
|
|
41
|
+
/**
|
|
42
|
+
* What the provider called the account when the credential was issued, so a UI names the
|
|
43
|
+
* connection without a provider call. `null` when the provider names no single account.
|
|
44
|
+
*/
|
|
45
|
+
readonly label: Schema.NullOr<Schema.String>;
|
|
41
46
|
readonly revocation: Schema.Literals<readonly ["active", "pending", "revoked"]>;
|
|
42
47
|
readonly createdBy: Schema.String;
|
|
43
48
|
readonly createdAt: Schema.DateTimeUtcFromString;
|
package/dist/types/Testing.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export interface FakeProviderOptions {
|
|
|
22
22
|
readonly zones?: ReadonlyArray<string>;
|
|
23
23
|
/** The label each zone carries, keyed by zone. Default: the zone name. */
|
|
24
24
|
readonly labels?: Readonly<Record<string, string>>;
|
|
25
|
+
/** What the fake calls the account it issues credentials for. Default: none, so the label is `null`. */
|
|
26
|
+
readonly accountLabel?: string;
|
|
25
27
|
/** Pre-existing records, to produce `Noop` and `Conflict` operations. */
|
|
26
28
|
readonly records?: ReadonlyArray<{
|
|
27
29
|
readonly zone: string;
|
package/dist/types/Verify.d.ts
CHANGED
|
@@ -98,17 +98,17 @@ export interface Summary {
|
|
|
98
98
|
readonly mismatch: number;
|
|
99
99
|
readonly unknown: number;
|
|
100
100
|
}
|
|
101
|
-
/** The least a value has to carry to be summarised: core `Readiness` and the wire shape both do. */
|
|
102
|
-
export interface Summarisable {
|
|
103
|
-
readonly requirements: ReadonlyArray<{
|
|
104
|
-
readonly status: Storage.RequirementStatus;
|
|
105
|
-
}>;
|
|
106
|
-
}
|
|
107
101
|
/**
|
|
108
102
|
* How a readiness stands, as counts. Pure and total: a host renders "3 of 4 found" from the stored
|
|
109
|
-
* fact without deciding what an absent readiness means, because `observed` says so.
|
|
103
|
+
* fact without deciding what an absent readiness means, because `observed` says so. The parameter
|
|
104
|
+
* is the least a value has to carry to be summarised, so core `Readiness` and the wire shape both
|
|
105
|
+
* pass without naming a type between them.
|
|
110
106
|
*/
|
|
111
|
-
export declare const summary: (readiness:
|
|
107
|
+
export declare const summary: (readiness: {
|
|
108
|
+
readonly requirements: ReadonlyArray<{
|
|
109
|
+
readonly status: Storage.RequirementStatus;
|
|
110
|
+
}>;
|
|
111
|
+
} | null) => Summary;
|
|
112
112
|
export interface PolicyShape {
|
|
113
113
|
/** Delay before the next check, given time since the first pending observation. Default ladder: 15s, 1m, 5m, 30m. */
|
|
114
114
|
readonly backoff: (pendingForMs: number) => number;
|
|
@@ -124,6 +124,8 @@ export declare class Policy extends Policy_base {
|
|
|
124
124
|
/** Why readiness was written: a DNS observation, or host evidence merged into the stored row. */
|
|
125
125
|
export type Cause = "observe" | "evidence";
|
|
126
126
|
export interface ReadinessChanged {
|
|
127
|
+
/** The tenant the row was written under, from the `Principal` the write ran as. */
|
|
128
|
+
readonly ownerId: string;
|
|
127
129
|
readonly domain: string;
|
|
128
130
|
readonly readiness: Readiness;
|
|
129
131
|
readonly cause: Cause;
|
|
@@ -134,6 +136,11 @@ export interface ObserverShape {
|
|
|
134
136
|
* rows, wakes a durable job at `nextCheckAt`, or notifies a customer hangs it here instead of
|
|
135
137
|
* mirroring the fact at every call site.
|
|
136
138
|
*
|
|
139
|
+
* Readiness is stored per owner and domain, and an observer provided over `DomainKit.layer` is
|
|
140
|
+
* scoped to the layer rather than to one request, so a host that serves more than one tenant
|
|
141
|
+
* keys its projection by `ownerId` and `domain`: the same domain name can be attached in two
|
|
142
|
+
* tenants at once.
|
|
143
|
+
*
|
|
137
144
|
* Events for one domain are not ordered against each other: two observations that overlap both
|
|
138
145
|
* store, last write wins in `Storage`, and their callbacks can finish in either order. A
|
|
139
146
|
* projection compares `readiness.checkedAt`, which is the moment the row was written, and keeps
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domainkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Build reviewable DNS plans for custom domains in TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"custom-domains",
|
|
@@ -157,5 +157,5 @@
|
|
|
157
157
|
"engines": {
|
|
158
158
|
"node": ">=24.10.0"
|
|
159
159
|
},
|
|
160
|
-
"packageManager": "bun@1.4.
|
|
160
|
+
"packageManager": "bun@1.4.2"
|
|
161
161
|
}
|