domainkit 0.4.0 → 0.5.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/index.d.mts +262 -42
- package/dist/index.mjs +56 -26
- package/dist/index.mjs.map +1 -1
- package/dist/promise.d.mts +99 -66
- package/dist/promise.mjs +154 -111
- package/dist/promise.mjs.map +1 -1
- package/dist/{resolver-uqe1h5Vz.d.mts → resolver-BGBLnPjJ.d.mts} +208 -477
- package/dist/{resolver-CvK7JoJM.mjs → resolver-tZU6gEVq.mjs} +122 -12
- package/dist/resolver-tZU6gEVq.mjs.map +1 -0
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +121 -60
- package/dist/testing.mjs.map +1 -1
- package/dist/{verify-CkgVrwyl.d.mts → verify-6xK05pwL.d.mts} +185 -44
- package/dist/{verify-BUB4N5zs.mjs → verify-B2fPyjde.mjs} +555 -394
- package/dist/verify-B2fPyjde.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/resolver-CvK7JoJM.mjs.map +0 -1
- package/dist/verify-BUB4N5zs.mjs.map +0 -1
package/dist/promise.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { $ as Txt, A as decodeReceipt$1, D as Receipt, E as Operation, F as webCryptoLayer, G as Cname, H as A, I as Error$2, J as Observed, K as Mx, L as Service$2, M as encodeReceipt, O as Schema$
|
|
2
|
+
import { B as tokenValidator$1, C as integrationFlow$1, D as tokenConnectionMethod$3, E as restore$3, F as oauthMethod$1, I as restore$2, J as secret_exports, L as subjectResolver$1, N as manifest$2, O as tokenMethod$3, P as oauthFlow$1, Q as decode$3, R as tokenConnectionMethod$2, S as exchangeCode$1, T as manifest$3, U as make$6, W as authorize$2, X as Method$2, Y as provider_context_exports, Z as Schema$1, _ as toAsync$2, a as Result, at as start$1, c as Observation, d as defaultMake$1, et as diagnostic_exports, f as make$8, h as toAsync$4, i as PublicDnsObservation, it as complete$1, j as make$7, l as Policy, n as ProviderObservation, nt as Method$1, o as observe$1, ot as version, q as selection_exports, r as PublicDns$1, rt as StartResult, t as Provider$1, tt as Error, u as Service, w as integrationMethod$1, y as toAsync$3, z as tokenMethod$2 } from "./verify-B2fPyjde.mjs";
|
|
3
|
+
import { $ as Txt, A as decodeReceipt$1, Ct as encode, D as Receipt, E as Operation, Et as Schema$3, F as webCryptoLayer, G as Cname, H as A, I as Error$2, J as Observed, K as Mx, L as Service$2, M as encodeReceipt, O as Schema$4, Q as Srv, S as create$3, St as decode$4, T as Authorization, Tt as validate, U as Aaaa, V as toAsync$5, W as Caa, X as RequirementMetadata, Y as Opaque, Z as Schema$2, _t as ProviderConnection, a as Authorization$1, at as parse, b as apply$3, c as PartialError, ct as make$9, d as apply$2, dt as zones_exports, et as Type, f as authorize$3, ft as Error$1, g as CreateResult, gt as DomainAttachment, ht as ConnectionStatus, it as equals, j as encode$1, jt as invalid_input_exports, k as decode$5, kt as parse$1, l as Plan, mt as AuthorizationError, o as Error$3, ot as Candidate, p as create$2, pt as Service$1, q as Ns, s as Operation$1, st as Service$3, t as Error$4, tt as data, u as Receipt$1, vt as ProviderTarget, w as renderManualInstructions$1, x as authorize$4, xt as authorizationError, y as Target, yt as ProviderTargetEvidence, z as layerFromAsync$1 } from "./resolver-tZU6gEVq.mjs";
|
|
4
4
|
import { Data, Effect, Layer } from "effect";
|
|
5
|
-
//#region src/promise/
|
|
6
|
-
var
|
|
5
|
+
//#region src/promise/managed-dns-connections.ts
|
|
6
|
+
var managed_dns_connections_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
Error: () => Error$1,
|
|
8
8
|
from: () => from,
|
|
9
|
-
|
|
9
|
+
layerFromAsync: () => layerFromAsync,
|
|
10
10
|
toAsync: () => toAsync$1
|
|
11
11
|
});
|
|
12
12
|
const failure = (operation, cause) => cause instanceof Error$1 ? cause : new Error$1({
|
|
@@ -15,98 +15,110 @@ const failure = (operation, cause) => cause instanceof Error$1 ? cause : new Err
|
|
|
15
15
|
operation,
|
|
16
16
|
retry: "safe"
|
|
17
17
|
});
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
try: () => repository.
|
|
21
|
-
catch: (cause) => failure("
|
|
22
|
-
})
|
|
23
|
-
connect:
|
|
24
|
-
try: () => repository.connect(
|
|
25
|
-
catch: (cause) => failure("
|
|
26
|
-
})
|
|
27
|
-
detach: (
|
|
28
|
-
try: () => repository.detach(
|
|
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({
|
|
29
33
|
connectionId,
|
|
30
|
-
|
|
34
|
+
ownerId,
|
|
35
|
+
revoke: (authorization) => Effect.runPromise(revoke(authorization))
|
|
31
36
|
}),
|
|
32
|
-
catch: (cause) => failure("
|
|
37
|
+
catch: (cause) => failure("ManagedDnsConnections.disconnect", cause)
|
|
33
38
|
}),
|
|
34
|
-
|
|
35
|
-
try: () => repository.
|
|
36
|
-
catch: (cause) => failure("
|
|
37
|
-
})
|
|
38
|
-
get:
|
|
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({
|
|
39
44
|
try: () => repository.get(authorizationId),
|
|
40
|
-
catch: (cause) => failure("
|
|
41
|
-
})
|
|
42
|
-
|
|
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({
|
|
43
52
|
try: () => repository.getByConnectionId(connectionId),
|
|
44
|
-
catch: (cause) => failure("
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
try: () => repository.
|
|
48
|
-
catch: (cause) => failure("
|
|
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)
|
|
49
58
|
}),
|
|
50
|
-
promoteEvidence:
|
|
59
|
+
promoteEvidence: (authorizationId, evidence) => Effect.tryPromise({
|
|
51
60
|
try: () => repository.promoteEvidence(authorizationId, evidence),
|
|
52
|
-
catch: (cause) => failure("
|
|
53
|
-
})
|
|
61
|
+
catch: (cause) => failure("ManagedDnsConnections.promoteEvidence", cause)
|
|
62
|
+
}),
|
|
54
63
|
recover: ({ authorizationId, revoke }) => Effect.tryPromise({
|
|
55
64
|
try: () => repository.recover({
|
|
56
65
|
authorizationId,
|
|
57
|
-
revoke: (
|
|
66
|
+
revoke: (authorization) => Effect.runPromise(revoke(authorization))
|
|
58
67
|
}),
|
|
59
|
-
catch: (cause) => failure("
|
|
68
|
+
catch: (cause) => failure("ManagedDnsConnections.recover", cause)
|
|
60
69
|
}),
|
|
61
|
-
rotate:
|
|
70
|
+
rotate: (authorizationId, credential, expiresAt) => Effect.tryPromise({
|
|
62
71
|
try: () => repository.rotate(authorizationId, credential, expiresAt),
|
|
63
|
-
catch: (cause) => failure("
|
|
64
|
-
})
|
|
72
|
+
catch: (cause) => failure("ManagedDnsConnections.rotate", cause)
|
|
73
|
+
})
|
|
65
74
|
});
|
|
66
|
-
const toAsync$1 = (
|
|
67
|
-
|
|
68
|
-
connect: (
|
|
69
|
-
detach: (
|
|
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({
|
|
70
80
|
connectionId,
|
|
71
|
-
|
|
81
|
+
ownerId,
|
|
82
|
+
revoke: (authorization) => Effect.promise(() => revoke(authorization))
|
|
72
83
|
})),
|
|
73
|
-
|
|
74
|
-
get: (authorizationId) => Effect.runPromise(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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({
|
|
79
91
|
authorizationId,
|
|
80
|
-
revoke: (
|
|
92
|
+
revoke: (authorization) => Effect.promise(() => revoke(authorization))
|
|
81
93
|
})),
|
|
82
|
-
rotate: (authorizationId, credential, expiresAt) => Effect.runPromise(
|
|
94
|
+
rotate: (authorizationId, credential, expiresAt) => Effect.runPromise(service.rotate(authorizationId, credential, expiresAt))
|
|
83
95
|
});
|
|
84
96
|
const from = (repository) => repository;
|
|
85
97
|
//#endregion
|
|
86
98
|
//#region src/promise/connection.ts
|
|
87
99
|
var connection_exports = /* @__PURE__ */ __exportAll({
|
|
88
100
|
AuthorizationError: () => AuthorizationError,
|
|
101
|
+
ConnectionStatus: () => ConnectionStatus,
|
|
102
|
+
DomainAttachment: () => DomainAttachment,
|
|
89
103
|
Error: () => Error,
|
|
90
|
-
Grant: () => Grant,
|
|
91
104
|
Method: () => Method,
|
|
92
|
-
|
|
93
|
-
|
|
105
|
+
ProviderConnection: () => ProviderConnection,
|
|
106
|
+
ProviderTarget: () => ProviderTarget,
|
|
107
|
+
ProviderTargetEvidence: () => ProviderTargetEvidence,
|
|
94
108
|
StartResult: () => StartResult,
|
|
95
|
-
|
|
109
|
+
attach: () => attach,
|
|
110
|
+
authorizationError: () => authorizationError,
|
|
96
111
|
complete: () => complete,
|
|
97
|
-
|
|
98
|
-
|
|
112
|
+
decode: () => decode$2,
|
|
113
|
+
detach: () => detach,
|
|
114
|
+
disconnect: () => disconnect,
|
|
99
115
|
encode: () => encode,
|
|
100
|
-
extend: () => extend,
|
|
101
116
|
fromEffectFlow: () => fromEffectFlow,
|
|
102
117
|
fromEffectTokenMethod: () => fromEffectTokenMethod,
|
|
103
|
-
includeDomains: () => includeDomains,
|
|
104
|
-
removeDomain: () => removeDomain,
|
|
105
|
-
removeDomainFromGrant: () => removeDomain$1,
|
|
106
118
|
start: () => start,
|
|
107
|
-
|
|
119
|
+
validate: () => validate
|
|
108
120
|
});
|
|
109
|
-
function decode$
|
|
121
|
+
function decode$2(input) {
|
|
110
122
|
return Effect.runPromise(decode$4(input));
|
|
111
123
|
}
|
|
112
124
|
const Method = Data.taggedEnum();
|
|
@@ -139,10 +151,6 @@ const effectContinuations = (store) => ({
|
|
|
139
151
|
catch: (cause) => connectionFailure("ConnectionContinuations.put", cause)
|
|
140
152
|
})
|
|
141
153
|
});
|
|
142
|
-
const toAsyncContinuations = (store) => ({
|
|
143
|
-
consume: (id, now) => Effect.runPromise(store.consume(id, now)),
|
|
144
|
-
put: (continuation) => Effect.runPromise(store.put(continuation))
|
|
145
|
-
});
|
|
146
154
|
const effectFlow = (flow) => ({
|
|
147
155
|
complete: (payload, callbackUrl) => Effect.tryPromise({
|
|
148
156
|
try: () => flow.complete(payload, callbackUrl),
|
|
@@ -176,10 +184,10 @@ function fromEffectTokenMethod(method) {
|
|
|
176
184
|
async function start(input) {
|
|
177
185
|
return Effect.runPromise(start$1({
|
|
178
186
|
authorizedById: input.authorizedById,
|
|
179
|
-
|
|
187
|
+
...input.authorizationId === void 0 ? {} : { authorizationId: input.authorizationId },
|
|
180
188
|
method: effectMethod(input.method),
|
|
181
189
|
ownerId: input.ownerId
|
|
182
|
-
}).pipe(Effect.provide(Layer.merge(
|
|
190
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.repository), webCryptoLayer))));
|
|
183
191
|
}
|
|
184
192
|
async function complete(input) {
|
|
185
193
|
return Effect.runPromise(complete$1({
|
|
@@ -187,47 +195,46 @@ async function complete(input) {
|
|
|
187
195
|
continuationId: input.continuationId,
|
|
188
196
|
continuations: effectContinuations(input.continuations),
|
|
189
197
|
flow: effectFlow(input.flow)
|
|
190
|
-
}).pipe(Effect.provide(Layer.merge(
|
|
198
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.repository), webCryptoLayer))));
|
|
191
199
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
200
|
+
function attach(input) {
|
|
201
|
+
return input.repository.attach({
|
|
202
|
+
attachment: input.attachment,
|
|
195
203
|
connectionId: input.connectionId,
|
|
196
|
-
grant: input.grant,
|
|
197
204
|
ownerId: input.ownerId
|
|
198
|
-
})
|
|
205
|
+
});
|
|
199
206
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
connectionId: input.connectionId,
|
|
204
|
-
domain: input.domain,
|
|
207
|
+
function detach(input) {
|
|
208
|
+
return input.repository.detach({
|
|
209
|
+
attachmentId: input.attachmentId,
|
|
205
210
|
ownerId: input.ownerId
|
|
206
|
-
})
|
|
211
|
+
});
|
|
207
212
|
}
|
|
213
|
+
function disconnect(input) {
|
|
214
|
+
return input.repository.disconnect({
|
|
215
|
+
connectionId: input.connectionId,
|
|
216
|
+
ownerId: input.ownerId,
|
|
217
|
+
revoke: input.revoke
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/promise/provider-session.ts
|
|
222
|
+
var provider_session_exports = /* @__PURE__ */ __exportAll({ fromEffect: () => fromEffect });
|
|
223
|
+
const fromEffect = (session) => ({
|
|
224
|
+
providerId: session.providerId,
|
|
225
|
+
listTargets: (input) => Effect.runPromise(session.listTargets(input)),
|
|
226
|
+
resolveTarget: (domain) => Effect.runPromise(session.resolveTarget(domain)),
|
|
227
|
+
forTarget: (target) => Effect.runPromise(session.forTarget(target)).then(toAsync$5)
|
|
228
|
+
});
|
|
208
229
|
//#endregion
|
|
209
230
|
//#region src/promise/provider-auth.ts
|
|
210
231
|
var provider_auth_exports = /* @__PURE__ */ __exportAll({
|
|
211
232
|
Method: () => Method$2,
|
|
212
|
-
Schema: () => Schema$
|
|
213
|
-
decode: () => decode$
|
|
214
|
-
});
|
|
215
|
-
function decode$2(input) {
|
|
216
|
-
return Effect.runPromise(decode$5(input));
|
|
217
|
-
}
|
|
218
|
-
//#endregion
|
|
219
|
-
//#region src/promise/provider-authorization.ts
|
|
220
|
-
var provider_authorization_exports = /* @__PURE__ */ __exportAll({
|
|
221
|
-
Capability: () => Capability,
|
|
222
|
-
CapabilityEvidence: () => CapabilityEvidence,
|
|
223
|
-
Evidence: () => Evidence,
|
|
224
|
-
EvidenceSchema: () => EvidenceSchema,
|
|
225
|
-
Schema: () => Schema$3,
|
|
226
|
-
decode: () => decode$1,
|
|
227
|
-
encode: () => encode$1
|
|
233
|
+
Schema: () => Schema$1,
|
|
234
|
+
decode: () => decode$1
|
|
228
235
|
});
|
|
229
236
|
function decode$1(input) {
|
|
230
|
-
return Effect.runPromise(decode$
|
|
237
|
+
return Effect.runPromise(decode$3(input));
|
|
231
238
|
}
|
|
232
239
|
//#endregion
|
|
233
240
|
//#region src/promise/zone-discovery.ts
|
|
@@ -302,7 +309,7 @@ var dns_record_exports = /* @__PURE__ */ __exportAll({
|
|
|
302
309
|
Observed: () => Observed,
|
|
303
310
|
Opaque: () => Opaque,
|
|
304
311
|
RequirementMetadata: () => RequirementMetadata,
|
|
305
|
-
Schema: () => Schema$
|
|
312
|
+
Schema: () => Schema$2,
|
|
306
313
|
Srv: () => Srv,
|
|
307
314
|
Txt: () => Txt,
|
|
308
315
|
Type: () => Type,
|
|
@@ -313,7 +320,7 @@ var dns_record_exports = /* @__PURE__ */ __exportAll({
|
|
|
313
320
|
//#endregion
|
|
314
321
|
//#region src/promise/domain-name.ts
|
|
315
322
|
var domain_name_exports = /* @__PURE__ */ __exportAll({
|
|
316
|
-
Schema: () => Schema$
|
|
323
|
+
Schema: () => Schema$3,
|
|
317
324
|
parse: () => parse$1
|
|
318
325
|
});
|
|
319
326
|
//#endregion
|
|
@@ -322,14 +329,14 @@ var dns_plan_exports = /* @__PURE__ */ __exportAll({
|
|
|
322
329
|
Authorization: () => Authorization,
|
|
323
330
|
Operation: () => Operation,
|
|
324
331
|
Receipt: () => Receipt,
|
|
325
|
-
Schema: () => Schema$
|
|
332
|
+
Schema: () => Schema$4,
|
|
326
333
|
decode: () => decode,
|
|
327
334
|
decodeReceipt: () => decodeReceipt,
|
|
328
|
-
encode: () => encode$
|
|
335
|
+
encode: () => encode$1,
|
|
329
336
|
encodeReceipt: () => encodeReceipt
|
|
330
337
|
});
|
|
331
338
|
function decode(input) {
|
|
332
|
-
return Effect.runPromise(decode$
|
|
339
|
+
return Effect.runPromise(decode$5(input));
|
|
333
340
|
}
|
|
334
341
|
function decodeReceipt(input) {
|
|
335
342
|
return Effect.runPromise(decodeReceipt$1(input));
|
|
@@ -352,7 +359,7 @@ function create$1(input) {
|
|
|
352
359
|
plan: input.plan,
|
|
353
360
|
receipt: input.receipt,
|
|
354
361
|
...input.ttlMs === void 0 ? {} : { ttlMs: input.ttlMs }
|
|
355
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
362
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.provider), webCryptoLayer))));
|
|
356
363
|
}
|
|
357
364
|
function authorize$1(plan, operationIds) {
|
|
358
365
|
return Effect.runPromise(authorize$3(plan, operationIds).pipe(Effect.provide(webCryptoLayer)));
|
|
@@ -362,7 +369,7 @@ function apply$1(input) {
|
|
|
362
369
|
authorization: input.authorization,
|
|
363
370
|
plan: input.plan,
|
|
364
371
|
...input.priorReceipt === void 0 ? {} : { priorReceipt: input.priorReceipt }
|
|
365
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
372
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.provider), webCryptoLayer))));
|
|
366
373
|
}
|
|
367
374
|
//#endregion
|
|
368
375
|
//#region src/promise/cloudflare-auth.ts
|
|
@@ -370,6 +377,7 @@ var cloudflare_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
370
377
|
manifest: () => manifest$1,
|
|
371
378
|
oauthFlow: () => oauthFlow,
|
|
372
379
|
oauthMethod: () => oauthMethod,
|
|
380
|
+
restore: () => restore$1,
|
|
373
381
|
subjectResolver: () => subjectResolver,
|
|
374
382
|
tokenConnectionMethod: () => tokenConnectionMethod$1,
|
|
375
383
|
tokenMethod: () => tokenMethod$1,
|
|
@@ -377,6 +385,9 @@ var cloudflare_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
377
385
|
});
|
|
378
386
|
const manifest$1 = manifest$2;
|
|
379
387
|
const oauthMethod = oauthMethod$1;
|
|
388
|
+
function restore$1(options) {
|
|
389
|
+
return Effect.runPromise(restore$2(options));
|
|
390
|
+
}
|
|
380
391
|
const tokenMethod$1 = tokenMethod$2;
|
|
381
392
|
function subjectResolver(options) {
|
|
382
393
|
const resolve = subjectResolver$1(options);
|
|
@@ -406,12 +417,22 @@ function make$5(options) {
|
|
|
406
417
|
const client = make$6(options);
|
|
407
418
|
return {
|
|
408
419
|
id: client.id,
|
|
420
|
+
providerId: client.providerId,
|
|
409
421
|
createRecord: (zone, record) => Effect.runPromise(client.createRecord(zone, record)),
|
|
410
422
|
deleteRecord: (zone, providerRecordId) => Effect.runPromise(client.deleteRecord(zone, providerRecordId)),
|
|
411
423
|
getRecord: (zone, providerRecordId) => Effect.runPromise(client.getRecord(zone, providerRecordId)),
|
|
412
424
|
listAccounts: () => Effect.runPromise(client.listAccounts()),
|
|
413
425
|
listRecords: (zone) => Effect.runPromise(client.listRecords(zone)),
|
|
414
426
|
listZones: (input) => Effect.runPromise(client.listZones(input)),
|
|
427
|
+
listTargets: (input) => Effect.runPromise(client.listTargets(input)),
|
|
428
|
+
resolveTarget: (domain) => Effect.runPromise(client.resolveTarget(domain)),
|
|
429
|
+
forTarget: (target) => Effect.runPromise(client.forTarget(target)).then((provider) => ({
|
|
430
|
+
id: provider.id,
|
|
431
|
+
createRecord: (zone, record) => Effect.runPromise(provider.createRecord(zone, record)),
|
|
432
|
+
deleteRecord: (zone, providerRecordId) => Effect.runPromise(provider.deleteRecord(zone, providerRecordId)),
|
|
433
|
+
getRecord: (zone, providerRecordId) => Effect.runPromise(provider.getRecord(zone, providerRecordId)),
|
|
434
|
+
listRecords: (zone) => Effect.runPromise(provider.listRecords(zone))
|
|
435
|
+
})),
|
|
415
436
|
validateToken: () => Effect.runPromise(client.validateToken())
|
|
416
437
|
};
|
|
417
438
|
}
|
|
@@ -433,11 +454,15 @@ var vercel_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
433
454
|
integrationFlow: () => integrationFlow,
|
|
434
455
|
integrationMethod: () => integrationMethod,
|
|
435
456
|
manifest: () => manifest,
|
|
457
|
+
restore: () => restore,
|
|
436
458
|
tokenConnectionMethod: () => tokenConnectionMethod,
|
|
437
459
|
tokenMethod: () => tokenMethod
|
|
438
460
|
});
|
|
439
461
|
const integrationMethod = integrationMethod$1;
|
|
440
462
|
const manifest = manifest$3;
|
|
463
|
+
function restore(options) {
|
|
464
|
+
return Effect.runPromise(restore$3(options));
|
|
465
|
+
}
|
|
441
466
|
const tokenMethod = tokenMethod$3;
|
|
442
467
|
function exchangeCode(options) {
|
|
443
468
|
return Effect.runPromise(exchangeCode$1(options));
|
|
@@ -462,12 +487,22 @@ function make$4(options) {
|
|
|
462
487
|
const client = make$7(options);
|
|
463
488
|
return {
|
|
464
489
|
id: client.id,
|
|
490
|
+
providerId: client.providerId,
|
|
465
491
|
createRecord: (zone, record) => Effect.runPromise(client.createRecord(zone, record)),
|
|
466
492
|
deleteRecord: (zone, providerRecordId) => Effect.runPromise(client.deleteRecord(zone, providerRecordId)),
|
|
467
493
|
getRecord: (zone, providerRecordId) => Effect.runPromise(client.getRecord(zone, providerRecordId)),
|
|
468
494
|
listAccounts: () => Effect.runPromise(client.listAccounts()),
|
|
469
495
|
listRecords: (zone) => Effect.runPromise(client.listRecords(zone)),
|
|
470
496
|
listZones: (input) => Effect.runPromise(client.listZones(input)),
|
|
497
|
+
listTargets: (input) => Effect.runPromise(client.listTargets(input)),
|
|
498
|
+
resolveTarget: (domain) => Effect.runPromise(client.resolveTarget(domain)),
|
|
499
|
+
forTarget: (target) => Effect.runPromise(client.forTarget(target)).then((provider) => ({
|
|
500
|
+
id: provider.id,
|
|
501
|
+
createRecord: (zone, record) => Effect.runPromise(provider.createRecord(zone, record)),
|
|
502
|
+
deleteRecord: (zone, providerRecordId) => Effect.runPromise(provider.deleteRecord(zone, providerRecordId)),
|
|
503
|
+
getRecord: (zone, providerRecordId) => Effect.runPromise(provider.getRecord(zone, providerRecordId)),
|
|
504
|
+
listRecords: (zone) => Effect.runPromise(provider.listRecords(zone))
|
|
505
|
+
})),
|
|
471
506
|
validateToken: () => Effect.runPromise(client.validateToken())
|
|
472
507
|
};
|
|
473
508
|
}
|
|
@@ -496,7 +531,7 @@ function create(input) {
|
|
|
496
531
|
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(Layer.succeed(Service$3, make$9(sources.map(toEffectSource))), webCryptoLayer))));
|
|
497
532
|
}
|
|
498
533
|
const { provider, ...programInput } = input;
|
|
499
|
-
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync(provider), webCryptoLayer))));
|
|
534
|
+
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync$1(provider), webCryptoLayer))));
|
|
500
535
|
}
|
|
501
536
|
function authorize(plan, operationIds, options = {}) {
|
|
502
537
|
return Effect.runPromise(authorize$4(plan, operationIds, options).pipe(Effect.provide(webCryptoLayer)));
|
|
@@ -505,10 +540,18 @@ function apply(input) {
|
|
|
505
540
|
return Effect.runPromise(apply$3({
|
|
506
541
|
authorization: input.authorization,
|
|
507
542
|
plan: input.plan
|
|
508
|
-
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
543
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.provider), webCryptoLayer))));
|
|
509
544
|
}
|
|
510
545
|
function authorizeForConnection(input) {
|
|
511
|
-
return Effect.runPromise(authorize$2(
|
|
546
|
+
return Effect.runPromise(authorize$2({
|
|
547
|
+
attachment: input.attachment,
|
|
548
|
+
authorization: input.authorization,
|
|
549
|
+
connection: input.connection,
|
|
550
|
+
domain: input.domain,
|
|
551
|
+
...input.allowPartial === void 0 ? {} : { allowPartial: input.allowPartial },
|
|
552
|
+
...input.operationIds === void 0 ? {} : { operationIds: input.operationIds },
|
|
553
|
+
plan: input.plan
|
|
554
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.repository), webCryptoLayer))));
|
|
512
555
|
}
|
|
513
556
|
const renderManualInstructions = renderManualInstructions$1;
|
|
514
557
|
//#endregion
|
|
@@ -529,7 +572,7 @@ function observe(input) {
|
|
|
529
572
|
record: input.record,
|
|
530
573
|
...input.publicDns === void 0 ? {} : { publicDns: input.publicDns },
|
|
531
574
|
provider: Provider$1.Enabled({ zone: provider.zone })
|
|
532
|
-
}).pipe(Effect.provide(layerFromAsync(provider.provider))) : observe$1({
|
|
575
|
+
}).pipe(Effect.provide(layerFromAsync$1(provider.provider))) : observe$1({
|
|
533
576
|
record: input.record,
|
|
534
577
|
...input.publicDns === void 0 ? {} : { publicDns: input.publicDns },
|
|
535
578
|
provider: Provider$1.Disabled()
|
|
@@ -631,6 +674,6 @@ function asyncResolver(resolver) {
|
|
|
631
674
|
/** The current package version from the package manifest. */
|
|
632
675
|
const VERSION = version;
|
|
633
676
|
//#endregion
|
|
634
|
-
export {
|
|
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 };
|
|
635
678
|
|
|
636
679
|
//# sourceMappingURL=promise.mjs.map
|