domainkit 0.5.0 → 0.7.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/README.md +13 -12
- package/dist/canonical-json-CQYKsZw7.mjs +310 -0
- package/dist/canonical-json-CQYKsZw7.mjs.map +1 -0
- package/dist/connect-10vHuShV.d.mts +1401 -0
- package/dist/connect-oI8hcMxc.mjs +185 -0
- package/dist/connect-oI8hcMxc.mjs.map +1 -0
- package/dist/connection-C0xsU41C.d.mts +186 -0
- package/dist/connection-api-DW7xUJdj.d.mts +26 -0
- package/dist/index.d.mts +7 -26
- package/dist/index.mjs +12 -5
- package/dist/index.mjs.map +1 -1
- package/dist/managed-dns-connections-C3A_GBaz.mjs +99 -0
- package/dist/managed-dns-connections-C3A_GBaz.mjs.map +1 -0
- package/dist/promise.d.mts +104 -223
- package/dist/promise.mjs +45 -126
- package/dist/promise.mjs.map +1 -1
- package/dist/{resolver-tZU6gEVq.mjs → resolver-DPJs8h0a.mjs} +54 -250
- package/dist/resolver-DPJs8h0a.mjs.map +1 -0
- package/dist/{resolver-BGBLnPjJ.d.mts → resolver-DRrLm_hB.d.mts} +911 -1140
- package/dist/server.d.mts +128 -0
- package/dist/server.mjs +319 -0
- package/dist/server.mjs.map +1 -0
- package/dist/testing.d.mts +5 -4
- package/dist/testing.mjs +13 -18
- package/dist/testing.mjs.map +1 -1
- package/dist/{verify-6xK05pwL.d.mts → verify-C3V_GtzL.d.mts} +45 -20
- package/dist/{verify-B2fPyjde.mjs → verify-DDnK8U7C.mjs} +138 -323
- package/dist/verify-DDnK8U7C.mjs.map +1 -0
- package/package.json +8 -2
- package/dist/resolver-tZU6gEVq.mjs.map +0 -1
- package/dist/verify-B2fPyjde.mjs.map +0 -1
package/dist/promise.mjs
CHANGED
|
@@ -1,100 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { B as
|
|
3
|
-
import {
|
|
2
|
+
import { $ as decode$3, B as tokenConnectionMethod$2, C as integrationFlow$1, D as tokenConnectionMethod$3, E as restore$3, F as oauthFlow$1, G as make$6, H as tokenValidator$1, I as oauthMethod$1, K as authorize$2, L as refreshCredential$1, M as make$7, O as tokenMethod$3, P as manifest$2, Q as Schema$1, R as restore$2, S as exchangeCode$1, T as manifest$3, V as tokenMethod$2, X as secret_exports, Y as selection_exports, Z as Method$1, _ as toAsync$1, a as Result, c as Observation, d as defaultMake$1, f as make$8, h as toAsync$3, i as PublicDnsObservation, k as AccountContext, l as Policy, n as ProviderObservation, nt as version, o as observe$1, r as PublicDns$1, t as Provider$1, tt as diagnostic_exports, u as Service, w as integrationMethod$1, y as toAsync$2, z as subjectResolver$1 } from "./verify-DDnK8U7C.mjs";
|
|
3
|
+
import { C as encode, E as Schema$2, S as decode$4, T as validate, _ as ProviderTarget, f as provider_context_exports, g as ProviderConnection, h as DomainAttachment, i as webCryptoLayer, j as invalid_input_exports, k as parse, m as ConnectionStatus, p as AuthorizationError, v as ProviderTargetEvidence, x as authorizationError } from "./canonical-json-CQYKsZw7.mjs";
|
|
4
|
+
import { a as start$1, i as complete$1, n as Method$2, r as StartResult, t as Error } from "./connect-oI8hcMxc.mjs";
|
|
5
|
+
import { $ as Txt, A as Schema$4, C as authorize$4, D as Authorization, E as renderManualInstructions$1, G as Cname, H as A, I as Error$1, J as Observed, K as Mx, L as Service$1, M as decodeReceipt$1, N as encode$1, O as Operation, P as encodeReceipt, Q as Srv, S as apply$3, U as Aaaa, V as toAsync$4, W as Caa, X as RequirementMetadata, Y as Opaque, Z as Schema$3, at as parse$1, c as Error$2, ct as make$9, d as Plan, dt as zones_exports, et as Type, f as Receipt$1, h as create$2, it as equals, j as decode$5, k as Receipt, l as Operation$1, m as authorize$3, n as Error$3, ot as Candidate, p as apply$2, q as Ns, s as Authorization$1, st as Service$2, t as AsyncResolution, tt as data, u as PartialError, v as CreateResult, w as create$3, x as Target, z as layerFromAsync } from "./resolver-DPJs8h0a.mjs";
|
|
6
|
+
import { n as managed_dns_connections_exports, t as layerFromAsync$1 } from "./managed-dns-connections-C3A_GBaz.mjs";
|
|
4
7
|
import { Data, Effect, Layer } from "effect";
|
|
5
|
-
//#region src/promise/managed-dns-connections.ts
|
|
6
|
-
var managed_dns_connections_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
-
Error: () => Error$1,
|
|
8
|
-
from: () => from,
|
|
9
|
-
layerFromAsync: () => layerFromAsync,
|
|
10
|
-
toAsync: () => toAsync$1
|
|
11
|
-
});
|
|
12
|
-
const failure = (operation, cause) => cause instanceof Error$1 ? cause : new Error$1({
|
|
13
|
-
category: "storage",
|
|
14
|
-
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
15
|
-
operation,
|
|
16
|
-
retry: "safe"
|
|
17
|
-
});
|
|
18
|
-
const layerFromAsync = (repository) => Layer.succeed(Service$1, {
|
|
19
|
-
attach: (input) => Effect.tryPromise({
|
|
20
|
-
try: () => repository.attach(input),
|
|
21
|
-
catch: (cause) => failure("ManagedDnsConnections.attach", cause)
|
|
22
|
-
}),
|
|
23
|
-
connect: (input) => Effect.tryPromise({
|
|
24
|
-
try: () => repository.connect(input),
|
|
25
|
-
catch: (cause) => failure("ManagedDnsConnections.connect", cause)
|
|
26
|
-
}),
|
|
27
|
-
detach: (input) => Effect.tryPromise({
|
|
28
|
-
try: () => repository.detach(input),
|
|
29
|
-
catch: (cause) => failure("ManagedDnsConnections.detach", cause)
|
|
30
|
-
}),
|
|
31
|
-
disconnect: ({ connectionId, ownerId, revoke }) => Effect.tryPromise({
|
|
32
|
-
try: () => repository.disconnect({
|
|
33
|
-
connectionId,
|
|
34
|
-
ownerId,
|
|
35
|
-
revoke: (authorization) => Effect.runPromise(revoke(authorization))
|
|
36
|
-
}),
|
|
37
|
-
catch: (cause) => failure("ManagedDnsConnections.disconnect", cause)
|
|
38
|
-
}),
|
|
39
|
-
findConnection: (ownerId, authorizationId) => Effect.tryPromise({
|
|
40
|
-
try: () => repository.findConnection(ownerId, authorizationId),
|
|
41
|
-
catch: (cause) => failure("ManagedDnsConnections.findConnection", cause)
|
|
42
|
-
}),
|
|
43
|
-
get: (authorizationId) => Effect.tryPromise({
|
|
44
|
-
try: () => repository.get(authorizationId),
|
|
45
|
-
catch: (cause) => failure("ManagedDnsConnections.get", cause)
|
|
46
|
-
}),
|
|
47
|
-
getAttachment: (attachmentId) => Effect.tryPromise({
|
|
48
|
-
try: () => repository.getAttachment(attachmentId),
|
|
49
|
-
catch: (cause) => failure("ManagedDnsConnections.getAttachment", cause)
|
|
50
|
-
}),
|
|
51
|
-
getByConnectionId: (connectionId) => Effect.tryPromise({
|
|
52
|
-
try: () => repository.getByConnectionId(connectionId),
|
|
53
|
-
catch: (cause) => failure("ManagedDnsConnections.getByConnectionId", cause)
|
|
54
|
-
}),
|
|
55
|
-
listAttachments: (connectionId, ownerId) => Effect.tryPromise({
|
|
56
|
-
try: () => repository.listAttachments(connectionId, ownerId),
|
|
57
|
-
catch: (cause) => failure("ManagedDnsConnections.listAttachments", cause)
|
|
58
|
-
}),
|
|
59
|
-
promoteEvidence: (authorizationId, evidence) => Effect.tryPromise({
|
|
60
|
-
try: () => repository.promoteEvidence(authorizationId, evidence),
|
|
61
|
-
catch: (cause) => failure("ManagedDnsConnections.promoteEvidence", cause)
|
|
62
|
-
}),
|
|
63
|
-
recover: ({ authorizationId, revoke }) => Effect.tryPromise({
|
|
64
|
-
try: () => repository.recover({
|
|
65
|
-
authorizationId,
|
|
66
|
-
revoke: (authorization) => Effect.runPromise(revoke(authorization))
|
|
67
|
-
}),
|
|
68
|
-
catch: (cause) => failure("ManagedDnsConnections.recover", cause)
|
|
69
|
-
}),
|
|
70
|
-
rotate: (authorizationId, credential, expiresAt) => Effect.tryPromise({
|
|
71
|
-
try: () => repository.rotate(authorizationId, credential, expiresAt),
|
|
72
|
-
catch: (cause) => failure("ManagedDnsConnections.rotate", cause)
|
|
73
|
-
})
|
|
74
|
-
});
|
|
75
|
-
const toAsync$1 = (service) => ({
|
|
76
|
-
attach: (input) => Effect.runPromise(service.attach(input)),
|
|
77
|
-
connect: (input) => Effect.runPromise(service.connect(input)),
|
|
78
|
-
detach: (input) => Effect.runPromise(service.detach(input)),
|
|
79
|
-
disconnect: ({ connectionId, ownerId, revoke }) => Effect.runPromise(service.disconnect({
|
|
80
|
-
connectionId,
|
|
81
|
-
ownerId,
|
|
82
|
-
revoke: (authorization) => Effect.promise(() => revoke(authorization))
|
|
83
|
-
})),
|
|
84
|
-
findConnection: (ownerId, authorizationId) => Effect.runPromise(service.findConnection(ownerId, authorizationId)),
|
|
85
|
-
get: (authorizationId) => Effect.runPromise(service.get(authorizationId)),
|
|
86
|
-
getAttachment: (attachmentId) => Effect.runPromise(service.getAttachment(attachmentId)),
|
|
87
|
-
getByConnectionId: (connectionId) => Effect.runPromise(service.getByConnectionId(connectionId)),
|
|
88
|
-
listAttachments: (connectionId, ownerId) => Effect.runPromise(service.listAttachments(connectionId, ownerId)),
|
|
89
|
-
promoteEvidence: (authorizationId, evidence) => Effect.runPromise(service.promoteEvidence(authorizationId, evidence)),
|
|
90
|
-
recover: ({ authorizationId, revoke }) => Effect.runPromise(service.recover({
|
|
91
|
-
authorizationId,
|
|
92
|
-
revoke: (authorization) => Effect.promise(() => revoke(authorization))
|
|
93
|
-
})),
|
|
94
|
-
rotate: (authorizationId, credential, expiresAt) => Effect.runPromise(service.rotate(authorizationId, credential, expiresAt))
|
|
95
|
-
});
|
|
96
|
-
const from = (repository) => repository;
|
|
97
|
-
//#endregion
|
|
98
8
|
//#region src/promise/connection.ts
|
|
99
9
|
var connection_exports = /* @__PURE__ */ __exportAll({
|
|
100
10
|
AuthorizationError: () => AuthorizationError,
|
|
@@ -128,11 +38,11 @@ const connectionFailure = (operation, cause) => cause instanceof Error ? cause :
|
|
|
128
38
|
operation,
|
|
129
39
|
retry: "unknown"
|
|
130
40
|
});
|
|
131
|
-
const effectMethod = (method) => method._tag === "Interactive" ? Method$
|
|
41
|
+
const effectMethod = (method) => method._tag === "Interactive" ? Method$2.Interactive({
|
|
132
42
|
continuations: effectContinuations(method.continuations),
|
|
133
43
|
flow: effectFlow(method.flow),
|
|
134
44
|
...method.ttlMs === void 0 ? {} : { ttlMs: method.ttlMs }
|
|
135
|
-
}) : Method$
|
|
45
|
+
}) : Method$2.Token({
|
|
136
46
|
authenticate: (token) => Effect.tryPromise({
|
|
137
47
|
try: () => method.authenticate(token),
|
|
138
48
|
catch: (cause) => connectionFailure("Connection.start", cause)
|
|
@@ -187,7 +97,7 @@ async function start(input) {
|
|
|
187
97
|
...input.authorizationId === void 0 ? {} : { authorizationId: input.authorizationId },
|
|
188
98
|
method: effectMethod(input.method),
|
|
189
99
|
ownerId: input.ownerId
|
|
190
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.repository), webCryptoLayer))));
|
|
100
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.repository), webCryptoLayer))));
|
|
191
101
|
}
|
|
192
102
|
async function complete(input) {
|
|
193
103
|
return Effect.runPromise(complete$1({
|
|
@@ -195,7 +105,7 @@ async function complete(input) {
|
|
|
195
105
|
continuationId: input.continuationId,
|
|
196
106
|
continuations: effectContinuations(input.continuations),
|
|
197
107
|
flow: effectFlow(input.flow)
|
|
198
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.repository), webCryptoLayer))));
|
|
108
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.repository), webCryptoLayer))));
|
|
199
109
|
}
|
|
200
110
|
function attach(input) {
|
|
201
111
|
return input.repository.attach({
|
|
@@ -224,12 +134,16 @@ const fromEffect = (session) => ({
|
|
|
224
134
|
providerId: session.providerId,
|
|
225
135
|
listTargets: (input) => Effect.runPromise(session.listTargets(input)),
|
|
226
136
|
resolveTarget: (domain) => Effect.runPromise(session.resolveTarget(domain)),
|
|
227
|
-
forTarget: (target) => Effect.runPromise(session.forTarget(target)).then(toAsync$
|
|
137
|
+
forTarget: (target) => Effect.runPromise(session.forTarget(target)).then(toAsync$4)
|
|
228
138
|
});
|
|
229
139
|
//#endregion
|
|
140
|
+
//#region src/promise/dns-resolver.ts
|
|
141
|
+
var dns_resolver_exports = /* @__PURE__ */ __exportAll({ Resolution: () => Resolution });
|
|
142
|
+
const Resolution = AsyncResolution;
|
|
143
|
+
//#endregion
|
|
230
144
|
//#region src/promise/provider-auth.ts
|
|
231
145
|
var provider_auth_exports = /* @__PURE__ */ __exportAll({
|
|
232
|
-
Method: () => Method$
|
|
146
|
+
Method: () => Method$1,
|
|
233
147
|
Schema: () => Schema$1,
|
|
234
148
|
decode: () => decode$1
|
|
235
149
|
});
|
|
@@ -250,7 +164,7 @@ function toEffectSource(source) {
|
|
|
250
164
|
return {
|
|
251
165
|
listZones: (name) => Effect.tryPromise({
|
|
252
166
|
try: () => source.listZones(name),
|
|
253
|
-
catch: (cause) => new Error$
|
|
167
|
+
catch: (cause) => new Error$1({
|
|
254
168
|
cause,
|
|
255
169
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
256
170
|
operation: "ZoneDiscovery.listZones",
|
|
@@ -258,7 +172,7 @@ function toEffectSource(source) {
|
|
|
258
172
|
reason: "transport"
|
|
259
173
|
})
|
|
260
174
|
}),
|
|
261
|
-
provider: Service$
|
|
175
|
+
provider: Service$1.of({
|
|
262
176
|
id: source.provider.id,
|
|
263
177
|
createRecord: (zone, record) => Effect.tryPromise({
|
|
264
178
|
try: () => source.provider.createRecord(zone, record),
|
|
@@ -290,7 +204,7 @@ function projectOutcome(outcome) {
|
|
|
290
204
|
}
|
|
291
205
|
}
|
|
292
206
|
function providerFailure(providerId, operation, cause) {
|
|
293
|
-
return cause instanceof Error$
|
|
207
|
+
return cause instanceof Error$1 ? cause : new Error$1({
|
|
294
208
|
cause,
|
|
295
209
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
296
210
|
operation,
|
|
@@ -309,19 +223,19 @@ var dns_record_exports = /* @__PURE__ */ __exportAll({
|
|
|
309
223
|
Observed: () => Observed,
|
|
310
224
|
Opaque: () => Opaque,
|
|
311
225
|
RequirementMetadata: () => RequirementMetadata,
|
|
312
|
-
Schema: () => Schema$
|
|
226
|
+
Schema: () => Schema$3,
|
|
313
227
|
Srv: () => Srv,
|
|
314
228
|
Txt: () => Txt,
|
|
315
229
|
Type: () => Type,
|
|
316
230
|
data: () => data,
|
|
317
231
|
equals: () => equals,
|
|
318
|
-
parse: () => parse
|
|
232
|
+
parse: () => parse$1
|
|
319
233
|
});
|
|
320
234
|
//#endregion
|
|
321
235
|
//#region src/promise/domain-name.ts
|
|
322
236
|
var domain_name_exports = /* @__PURE__ */ __exportAll({
|
|
323
|
-
Schema: () => Schema$
|
|
324
|
-
parse: () => parse
|
|
237
|
+
Schema: () => Schema$2,
|
|
238
|
+
parse: () => parse
|
|
325
239
|
});
|
|
326
240
|
//#endregion
|
|
327
241
|
//#region src/promise/dns-plan.ts
|
|
@@ -345,7 +259,7 @@ function decodeReceipt(input) {
|
|
|
345
259
|
//#region src/promise/deletion.ts
|
|
346
260
|
var deletion_exports = /* @__PURE__ */ __exportAll({
|
|
347
261
|
Authorization: () => Authorization$1,
|
|
348
|
-
Error: () => Error$
|
|
262
|
+
Error: () => Error$2,
|
|
349
263
|
Operation: () => Operation$1,
|
|
350
264
|
PartialError: () => PartialError,
|
|
351
265
|
Plan: () => Plan,
|
|
@@ -359,7 +273,7 @@ function create$1(input) {
|
|
|
359
273
|
plan: input.plan,
|
|
360
274
|
receipt: input.receipt,
|
|
361
275
|
...input.ttlMs === void 0 ? {} : { ttlMs: input.ttlMs }
|
|
362
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync
|
|
276
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
363
277
|
}
|
|
364
278
|
function authorize$1(plan, operationIds) {
|
|
365
279
|
return Effect.runPromise(authorize$3(plan, operationIds).pipe(Effect.provide(webCryptoLayer)));
|
|
@@ -369,7 +283,7 @@ function apply$1(input) {
|
|
|
369
283
|
authorization: input.authorization,
|
|
370
284
|
plan: input.plan,
|
|
371
285
|
...input.priorReceipt === void 0 ? {} : { priorReceipt: input.priorReceipt }
|
|
372
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync
|
|
286
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
373
287
|
}
|
|
374
288
|
//#endregion
|
|
375
289
|
//#region src/promise/cloudflare-auth.ts
|
|
@@ -377,6 +291,7 @@ var cloudflare_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
377
291
|
manifest: () => manifest$1,
|
|
378
292
|
oauthFlow: () => oauthFlow,
|
|
379
293
|
oauthMethod: () => oauthMethod,
|
|
294
|
+
refreshCredential: () => refreshCredential,
|
|
380
295
|
restore: () => restore$1,
|
|
381
296
|
subjectResolver: () => subjectResolver,
|
|
382
297
|
tokenConnectionMethod: () => tokenConnectionMethod$1,
|
|
@@ -385,6 +300,9 @@ var cloudflare_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
385
300
|
});
|
|
386
301
|
const manifest$1 = manifest$2;
|
|
387
302
|
const oauthMethod = oauthMethod$1;
|
|
303
|
+
function refreshCredential(options) {
|
|
304
|
+
return Effect.runPromise(refreshCredential$1(options));
|
|
305
|
+
}
|
|
388
306
|
function restore$1(options) {
|
|
389
307
|
return Effect.runPromise(restore$2(options));
|
|
390
308
|
}
|
|
@@ -478,6 +396,7 @@ function tokenConnectionMethod(options) {
|
|
|
478
396
|
//#endregion
|
|
479
397
|
//#region src/promise/vercel.ts
|
|
480
398
|
var vercel_exports = /* @__PURE__ */ __exportAll({
|
|
399
|
+
AccountContext: () => AccountContext,
|
|
481
400
|
Auth: () => vercel_auth_exports,
|
|
482
401
|
discovery: () => discovery,
|
|
483
402
|
make: () => make$4
|
|
@@ -528,10 +447,10 @@ var provisioning_exports = /* @__PURE__ */ __exportAll({
|
|
|
528
447
|
function create(input) {
|
|
529
448
|
if ("sources" in input) {
|
|
530
449
|
const { sources, ...programInput } = input;
|
|
531
|
-
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(Layer.succeed(Service$
|
|
450
|
+
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(Layer.succeed(Service$2, make$9(sources.map(toEffectSource))), webCryptoLayer))));
|
|
532
451
|
}
|
|
533
452
|
const { provider, ...programInput } = input;
|
|
534
|
-
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync
|
|
453
|
+
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync(provider), webCryptoLayer))));
|
|
535
454
|
}
|
|
536
455
|
function authorize(plan, operationIds, options = {}) {
|
|
537
456
|
return Effect.runPromise(authorize$4(plan, operationIds, options).pipe(Effect.provide(webCryptoLayer)));
|
|
@@ -540,7 +459,7 @@ function apply(input) {
|
|
|
540
459
|
return Effect.runPromise(apply$3({
|
|
541
460
|
authorization: input.authorization,
|
|
542
461
|
plan: input.plan
|
|
543
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync
|
|
462
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
544
463
|
}
|
|
545
464
|
function authorizeForConnection(input) {
|
|
546
465
|
return Effect.runPromise(authorize$2({
|
|
@@ -551,7 +470,7 @@ function authorizeForConnection(input) {
|
|
|
551
470
|
...input.allowPartial === void 0 ? {} : { allowPartial: input.allowPartial },
|
|
552
471
|
...input.operationIds === void 0 ? {} : { operationIds: input.operationIds },
|
|
553
472
|
plan: input.plan
|
|
554
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.repository), webCryptoLayer))));
|
|
473
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.repository), webCryptoLayer))));
|
|
555
474
|
}
|
|
556
475
|
const renderManualInstructions = renderManualInstructions$1;
|
|
557
476
|
//#endregion
|
|
@@ -572,7 +491,7 @@ function observe(input) {
|
|
|
572
491
|
record: input.record,
|
|
573
492
|
...input.publicDns === void 0 ? {} : { publicDns: input.publicDns },
|
|
574
493
|
provider: Provider$1.Enabled({ zone: provider.zone })
|
|
575
|
-
}).pipe(Effect.provide(layerFromAsync
|
|
494
|
+
}).pipe(Effect.provide(layerFromAsync(provider.provider))) : observe$1({
|
|
576
495
|
record: input.record,
|
|
577
496
|
...input.publicDns === void 0 ? {} : { publicDns: input.publicDns },
|
|
578
497
|
provider: Provider$1.Disabled()
|
|
@@ -587,7 +506,7 @@ function observe(input) {
|
|
|
587
506
|
function fromAsyncResolver(resolver) {
|
|
588
507
|
return { resolve: (query) => Effect.tryPromise({
|
|
589
508
|
try: () => resolver.resolve(query),
|
|
590
|
-
catch: (cause) => new Error$
|
|
509
|
+
catch: (cause) => new Error$3({
|
|
591
510
|
cause,
|
|
592
511
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
593
512
|
reason: "transport"
|
|
@@ -596,11 +515,11 @@ function fromAsyncResolver(resolver) {
|
|
|
596
515
|
switch (resolution._tag) {
|
|
597
516
|
case "answer":
|
|
598
517
|
case "nodata": return Effect.succeed(resolution);
|
|
599
|
-
case "timeout": return Effect.fail(new Error$
|
|
518
|
+
case "timeout": return Effect.fail(new Error$3({
|
|
600
519
|
message: "DNS query timed out",
|
|
601
520
|
reason: "timeout"
|
|
602
521
|
}));
|
|
603
|
-
case "failure": return Effect.fail(new Error$
|
|
522
|
+
case "failure": return Effect.fail(new Error$3({
|
|
604
523
|
message: resolution.message,
|
|
605
524
|
reason: "transport"
|
|
606
525
|
}));
|
|
@@ -611,19 +530,19 @@ function fromAsyncResolver(resolver) {
|
|
|
611
530
|
//#region src/promise/cloudflare-doh.ts
|
|
612
531
|
var cloudflare_doh_exports = /* @__PURE__ */ __exportAll({ make: () => make$3 });
|
|
613
532
|
function make$3(options = {}) {
|
|
614
|
-
return toAsync$
|
|
533
|
+
return toAsync$1(options);
|
|
615
534
|
}
|
|
616
535
|
//#endregion
|
|
617
536
|
//#region src/promise/doh.ts
|
|
618
537
|
var doh_exports = /* @__PURE__ */ __exportAll({ make: () => make$2 });
|
|
619
538
|
function make$2(options) {
|
|
620
|
-
return toAsync$
|
|
539
|
+
return toAsync$2(options);
|
|
621
540
|
}
|
|
622
541
|
//#endregion
|
|
623
542
|
//#region src/promise/google-doh.ts
|
|
624
543
|
var google_doh_exports = /* @__PURE__ */ __exportAll({ make: () => make$1 });
|
|
625
544
|
function make$1(options = {}) {
|
|
626
|
-
return toAsync$
|
|
545
|
+
return toAsync$3(options);
|
|
627
546
|
}
|
|
628
547
|
//#endregion
|
|
629
548
|
//#region src/promise/resolver-pool.ts
|
|
@@ -649,7 +568,7 @@ function toAsync(pool) {
|
|
|
649
568
|
function asyncResolver(resolver) {
|
|
650
569
|
return { resolve: (query) => Effect.tryPromise({
|
|
651
570
|
try: () => resolver.resolve(query),
|
|
652
|
-
catch: (cause) => new Error$
|
|
571
|
+
catch: (cause) => new Error$3({
|
|
653
572
|
cause,
|
|
654
573
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
655
574
|
reason: "transport"
|
|
@@ -658,11 +577,11 @@ function asyncResolver(resolver) {
|
|
|
658
577
|
switch (resolution._tag) {
|
|
659
578
|
case "answer":
|
|
660
579
|
case "nodata": return Effect.succeed(resolution);
|
|
661
|
-
case "timeout": return Effect.fail(new Error$
|
|
580
|
+
case "timeout": return Effect.fail(new Error$3({
|
|
662
581
|
message: "DNS query timed out",
|
|
663
582
|
reason: "timeout"
|
|
664
583
|
}));
|
|
665
|
-
case "failure": return Effect.fail(new Error$
|
|
584
|
+
case "failure": return Effect.fail(new Error$3({
|
|
666
585
|
message: resolution.message,
|
|
667
586
|
reason: "transport"
|
|
668
587
|
}));
|
|
@@ -674,6 +593,6 @@ function asyncResolver(resolver) {
|
|
|
674
593
|
/** The current package version from the package manifest. */
|
|
675
594
|
const VERSION = version;
|
|
676
595
|
//#endregion
|
|
677
|
-
export { cloudflare_exports as Cloudflare, cloudflare_doh_exports as CloudflareDnsOverHttps, connection_exports as Connection, deletion_exports as Deletion, diagnostic_exports as Diagnostic, doh_exports as DnsOverHttps, dns_plan_exports as DnsPlan, dns_record_exports as DnsRecord, resolver_pool_exports as DnsResolverPool, domain_name_exports as DomainName, google_doh_exports as GoogleDnsOverHttps, invalid_input_exports as InvalidInput, managed_dns_connections_exports as ManagedDnsConnections, provider_auth_exports as ProviderAuth, provider_context_exports as ProviderContext, selection_exports as ProviderDiscovery, provider_session_exports as ProviderSession, provisioning_exports as Provisioning, secret_exports as Secret, VERSION, vercel_exports as Vercel, verification_exports as Verification, zone_discovery_exports as ZoneDiscovery, zones_exports as Zones };
|
|
596
|
+
export { cloudflare_exports as Cloudflare, cloudflare_doh_exports as CloudflareDnsOverHttps, connection_exports as Connection, deletion_exports as Deletion, diagnostic_exports as Diagnostic, doh_exports as DnsOverHttps, dns_plan_exports as DnsPlan, dns_record_exports as DnsRecord, dns_resolver_exports as DnsResolver, resolver_pool_exports as DnsResolverPool, domain_name_exports as DomainName, google_doh_exports as GoogleDnsOverHttps, invalid_input_exports as InvalidInput, managed_dns_connections_exports as ManagedDnsConnections, provider_auth_exports as ProviderAuth, provider_context_exports as ProviderContext, selection_exports as ProviderDiscovery, provider_session_exports as ProviderSession, provisioning_exports as Provisioning, secret_exports as Secret, VERSION, vercel_exports as Vercel, verification_exports as Verification, zone_discovery_exports as ZoneDiscovery, zones_exports as Zones };
|
|
678
597
|
|
|
679
598
|
//# sourceMappingURL=promise.mjs.map
|