domainkit 0.4.0 → 0.6.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 +3 -1
- package/dist/canonical-json-9x7gHIoS.mjs +304 -0
- package/dist/canonical-json-9x7gHIoS.mjs.map +1 -0
- package/dist/connect-Db830jad.d.mts +1387 -0
- package/dist/connect-ks3cpqBD.mjs +185 -0
- package/dist/connect-ks3cpqBD.mjs.map +1 -0
- package/dist/connection-DuYDgWir.d.mts +186 -0
- package/dist/connection-api-B__0M3PA.d.mts +26 -0
- package/dist/index.d.mts +243 -42
- package/dist/index.mjs +63 -27
- package/dist/index.mjs.map +1 -1
- package/dist/managed-dns-connections-CaXts84E.mjs +99 -0
- package/dist/managed-dns-connections-CaXts84E.mjs.map +1 -0
- package/dist/promise.d.mts +39 -184
- package/dist/promise.mjs +113 -156
- package/dist/promise.mjs.map +1 -1
- package/dist/{resolver-uqe1h5Vz.d.mts → resolver-DUAIlm2I.d.mts} +24 -1396
- package/dist/{resolver-CvK7JoJM.mjs → resolver-DxJPsq6l.mjs} +9 -115
- package/dist/resolver-DxJPsq6l.mjs.map +1 -0
- 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 +6 -5
- package/dist/testing.mjs +122 -64
- package/dist/testing.mjs.map +1 -1
- package/dist/{verify-BUB4N5zs.mjs → verify-DAtUAEeg.mjs} +461 -485
- package/dist/verify-DAtUAEeg.mjs.map +1 -0
- package/dist/{verify-CkgVrwyl.d.mts → verify-yAy-r9no.d.mts} +198 -42
- package/package.json +5 -1
- package/dist/resolver-CvK7JoJM.mjs.map +0 -1
- package/dist/verify-BUB4N5zs.mjs.map +0 -1
package/dist/promise.mjs
CHANGED
|
@@ -1,112 +1,34 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { B as tokenMethod$2, C as integrationFlow$1, D as tokenConnectionMethod$3, E as restore$3, F as oauthMethod$1, G as authorize$2, I as refreshCredential$1, J as selection_exports, L as restore$2, N as manifest$2, O as tokenMethod$3, P as oauthFlow$1, Q as decode$3, R as subjectResolver$1, S as exchangeCode$1, T as manifest$3, V as tokenValidator$1, W as make$6, X as Method$1, Y as secret_exports, Z as Schema$1, _ as toAsync$1, a as Result, c as Observation, d as defaultMake$1, et as diagnostic_exports, f as make$8, h as toAsync$3, i as PublicDnsObservation, j as make$7, l as Policy, n as ProviderObservation, o as observe$1, r as PublicDns$1, t as Provider$1, tt as version, u as Service, w as integrationMethod$1, y as toAsync$2, z as tokenConnectionMethod$2 } from "./verify-DAtUAEeg.mjs";
|
|
3
|
+
import { A as invalid_input_exports, O as parse, S as encode, T as Schema$2, _ as ProviderTargetEvidence, b as authorizationError, d as provider_context_exports, f as AuthorizationError, g as ProviderTarget, h as ProviderConnection, i as webCryptoLayer, m as DomainAttachment, p as ConnectionStatus, w as validate, x as decode$4 } from "./canonical-json-9x7gHIoS.mjs";
|
|
4
|
+
import { a as start$1, i as complete$1, n as Method$2, r as StartResult, t as Error } from "./connect-ks3cpqBD.mjs";
|
|
5
|
+
import { $ as data, A as decodeReceipt$1, B as A, D as Receipt, E as Operation, F as Service$1, G as Ns, H as Caa, J as RequirementMetadata, K as Observed, L as layerFromAsync, M as encodeReceipt, O as Schema$4, P as Error$1, Q as Type, S as create$3, T as Authorization, U as Cname, V as Aaaa, W as Mx, X as Srv, Y as Schema$3, Z as Txt, a as Authorization$1, at as Service$2, b as apply$3, c as PartialError, d as apply$2, f as authorize$3, g as CreateResult, it as Candidate, j as encode$1, k as decode$5, l as Plan, lt as zones_exports, nt as equals, o as Error$2, ot as make$9, p as create$2, q as Opaque, rt as parse$1, s as Operation$1, t as Error$3, u as Receipt$1, w as renderManualInstructions$1, x as authorize$4, y as Target, z as toAsync$4 } from "./resolver-DxJPsq6l.mjs";
|
|
6
|
+
import { n as managed_dns_connections_exports, t as layerFromAsync$1 } from "./managed-dns-connections-CaXts84E.mjs";
|
|
4
7
|
import { Data, Effect, Layer } from "effect";
|
|
5
|
-
//#region src/promise/authorization-lifecycle.ts
|
|
6
|
-
var authorization_lifecycle_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
-
Error: () => Error$1,
|
|
8
|
-
from: () => from,
|
|
9
|
-
layerFrom: () => layerFrom,
|
|
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 layerFrom = (repository) => Layer.succeed(Service$1, {
|
|
19
|
-
bind: Effect.fn("AuthorizationLifecycleRepository.bind")((authorizationId, binding) => Effect.tryPromise({
|
|
20
|
-
try: () => repository.bind(authorizationId, binding),
|
|
21
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.bind", cause)
|
|
22
|
-
})),
|
|
23
|
-
connect: Effect.fn("AuthorizationLifecycleRepository.connect")((aggregate) => Effect.tryPromise({
|
|
24
|
-
try: () => repository.connect(aggregate),
|
|
25
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.connect", cause)
|
|
26
|
-
})),
|
|
27
|
-
detach: ({ connectionId, revoke }) => Effect.tryPromise({
|
|
28
|
-
try: () => repository.detach({
|
|
29
|
-
connectionId,
|
|
30
|
-
revoke: (aggregate) => Effect.runPromise(revoke(aggregate))
|
|
31
|
-
}),
|
|
32
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.detach", cause)
|
|
33
|
-
}),
|
|
34
|
-
findByProviderAccount: Effect.fn("AuthorizationLifecycleRepository.findByProviderAccount")((providerId, providerAccountId) => Effect.tryPromise({
|
|
35
|
-
try: () => repository.findByProviderAccount(providerId, providerAccountId),
|
|
36
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.findByProviderAccount", cause)
|
|
37
|
-
})),
|
|
38
|
-
get: Effect.fn("AuthorizationLifecycleRepository.get")((authorizationId) => Effect.tryPromise({
|
|
39
|
-
try: () => repository.get(authorizationId),
|
|
40
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.get", cause)
|
|
41
|
-
})),
|
|
42
|
-
getByConnectionId: Effect.fn("AuthorizationLifecycleRepository.getByConnectionId")((connectionId) => Effect.tryPromise({
|
|
43
|
-
try: () => repository.getByConnectionId(connectionId),
|
|
44
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.getByConnectionId", cause)
|
|
45
|
-
})),
|
|
46
|
-
modifyBinding: (connectionId, modify) => Effect.tryPromise({
|
|
47
|
-
try: () => repository.modifyBinding(connectionId, modify),
|
|
48
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.modifyBinding", cause)
|
|
49
|
-
}),
|
|
50
|
-
promoteEvidence: Effect.fn("AuthorizationLifecycleRepository.promoteEvidence")((authorizationId, evidence) => Effect.tryPromise({
|
|
51
|
-
try: () => repository.promoteEvidence(authorizationId, evidence),
|
|
52
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.promoteEvidence", cause)
|
|
53
|
-
})),
|
|
54
|
-
recover: ({ authorizationId, revoke }) => Effect.tryPromise({
|
|
55
|
-
try: () => repository.recover({
|
|
56
|
-
authorizationId,
|
|
57
|
-
revoke: (aggregate) => Effect.runPromise(revoke(aggregate))
|
|
58
|
-
}),
|
|
59
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.recover", cause)
|
|
60
|
-
}),
|
|
61
|
-
rotate: Effect.fn("AuthorizationLifecycleRepository.rotate")((authorizationId, credential, expiresAt) => Effect.tryPromise({
|
|
62
|
-
try: () => repository.rotate(authorizationId, credential, expiresAt),
|
|
63
|
-
catch: (cause) => failure("AuthorizationLifecycleRepository.rotate", cause)
|
|
64
|
-
}))
|
|
65
|
-
});
|
|
66
|
-
const toAsync$1 = (repository) => ({
|
|
67
|
-
bind: (authorizationId, binding) => Effect.runPromise(repository.bind(authorizationId, binding)),
|
|
68
|
-
connect: (aggregate) => Effect.runPromise(repository.connect(aggregate)),
|
|
69
|
-
detach: ({ connectionId, revoke }) => Effect.runPromise(repository.detach({
|
|
70
|
-
connectionId,
|
|
71
|
-
revoke: (aggregate) => Effect.tryPromise(() => revoke(aggregate))
|
|
72
|
-
})),
|
|
73
|
-
findByProviderAccount: (providerId, providerAccountId) => Effect.runPromise(repository.findByProviderAccount(providerId, providerAccountId)),
|
|
74
|
-
get: (authorizationId) => Effect.runPromise(repository.get(authorizationId)),
|
|
75
|
-
getByConnectionId: (connectionId) => Effect.runPromise(repository.getByConnectionId(connectionId)),
|
|
76
|
-
modifyBinding: (connectionId, modify) => Effect.runPromise(repository.modifyBinding(connectionId, modify)),
|
|
77
|
-
promoteEvidence: (authorizationId, evidence) => Effect.runPromise(repository.promoteEvidence(authorizationId, evidence)),
|
|
78
|
-
recover: ({ authorizationId, revoke }) => Effect.runPromise(repository.recover({
|
|
79
|
-
authorizationId,
|
|
80
|
-
revoke: (aggregate) => Effect.tryPromise(() => revoke(aggregate))
|
|
81
|
-
})),
|
|
82
|
-
rotate: (authorizationId, credential, expiresAt) => Effect.runPromise(repository.rotate(authorizationId, credential, expiresAt))
|
|
83
|
-
});
|
|
84
|
-
const from = (repository) => repository;
|
|
85
|
-
//#endregion
|
|
86
8
|
//#region src/promise/connection.ts
|
|
87
9
|
var connection_exports = /* @__PURE__ */ __exportAll({
|
|
88
10
|
AuthorizationError: () => AuthorizationError,
|
|
11
|
+
ConnectionStatus: () => ConnectionStatus,
|
|
12
|
+
DomainAttachment: () => DomainAttachment,
|
|
89
13
|
Error: () => Error,
|
|
90
|
-
Grant: () => Grant,
|
|
91
14
|
Method: () => Method,
|
|
92
|
-
|
|
93
|
-
|
|
15
|
+
ProviderConnection: () => ProviderConnection,
|
|
16
|
+
ProviderTarget: () => ProviderTarget,
|
|
17
|
+
ProviderTargetEvidence: () => ProviderTargetEvidence,
|
|
94
18
|
StartResult: () => StartResult,
|
|
95
|
-
|
|
19
|
+
attach: () => attach,
|
|
20
|
+
authorizationError: () => authorizationError,
|
|
96
21
|
complete: () => complete,
|
|
97
|
-
|
|
98
|
-
|
|
22
|
+
decode: () => decode$2,
|
|
23
|
+
detach: () => detach,
|
|
24
|
+
disconnect: () => disconnect,
|
|
99
25
|
encode: () => encode,
|
|
100
|
-
extend: () => extend,
|
|
101
26
|
fromEffectFlow: () => fromEffectFlow,
|
|
102
27
|
fromEffectTokenMethod: () => fromEffectTokenMethod,
|
|
103
|
-
includeDomains: () => includeDomains,
|
|
104
|
-
removeDomain: () => removeDomain,
|
|
105
|
-
removeDomainFromGrant: () => removeDomain$1,
|
|
106
28
|
start: () => start,
|
|
107
|
-
|
|
29
|
+
validate: () => validate
|
|
108
30
|
});
|
|
109
|
-
function decode$
|
|
31
|
+
function decode$2(input) {
|
|
110
32
|
return Effect.runPromise(decode$4(input));
|
|
111
33
|
}
|
|
112
34
|
const Method = Data.taggedEnum();
|
|
@@ -116,11 +38,11 @@ const connectionFailure = (operation, cause) => cause instanceof Error ? cause :
|
|
|
116
38
|
operation,
|
|
117
39
|
retry: "unknown"
|
|
118
40
|
});
|
|
119
|
-
const effectMethod = (method) => method._tag === "Interactive" ? Method$
|
|
41
|
+
const effectMethod = (method) => method._tag === "Interactive" ? Method$2.Interactive({
|
|
120
42
|
continuations: effectContinuations(method.continuations),
|
|
121
43
|
flow: effectFlow(method.flow),
|
|
122
44
|
...method.ttlMs === void 0 ? {} : { ttlMs: method.ttlMs }
|
|
123
|
-
}) : Method$
|
|
45
|
+
}) : Method$2.Token({
|
|
124
46
|
authenticate: (token) => Effect.tryPromise({
|
|
125
47
|
try: () => method.authenticate(token),
|
|
126
48
|
catch: (cause) => connectionFailure("Connection.start", cause)
|
|
@@ -139,10 +61,6 @@ const effectContinuations = (store) => ({
|
|
|
139
61
|
catch: (cause) => connectionFailure("ConnectionContinuations.put", cause)
|
|
140
62
|
})
|
|
141
63
|
});
|
|
142
|
-
const toAsyncContinuations = (store) => ({
|
|
143
|
-
consume: (id, now) => Effect.runPromise(store.consume(id, now)),
|
|
144
|
-
put: (continuation) => Effect.runPromise(store.put(continuation))
|
|
145
|
-
});
|
|
146
64
|
const effectFlow = (flow) => ({
|
|
147
65
|
complete: (payload, callbackUrl) => Effect.tryPromise({
|
|
148
66
|
try: () => flow.complete(payload, callbackUrl),
|
|
@@ -176,10 +94,10 @@ function fromEffectTokenMethod(method) {
|
|
|
176
94
|
async function start(input) {
|
|
177
95
|
return Effect.runPromise(start$1({
|
|
178
96
|
authorizedById: input.authorizedById,
|
|
179
|
-
|
|
97
|
+
...input.authorizationId === void 0 ? {} : { authorizationId: input.authorizationId },
|
|
180
98
|
method: effectMethod(input.method),
|
|
181
99
|
ownerId: input.ownerId
|
|
182
|
-
}).pipe(Effect.provide(Layer.merge(
|
|
100
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.repository), webCryptoLayer))));
|
|
183
101
|
}
|
|
184
102
|
async function complete(input) {
|
|
185
103
|
return Effect.runPromise(complete$1({
|
|
@@ -187,47 +105,46 @@ async function complete(input) {
|
|
|
187
105
|
continuationId: input.continuationId,
|
|
188
106
|
continuations: effectContinuations(input.continuations),
|
|
189
107
|
flow: effectFlow(input.flow)
|
|
190
|
-
}).pipe(Effect.provide(Layer.merge(
|
|
108
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.repository), webCryptoLayer))));
|
|
191
109
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
110
|
+
function attach(input) {
|
|
111
|
+
return input.repository.attach({
|
|
112
|
+
attachment: input.attachment,
|
|
195
113
|
connectionId: input.connectionId,
|
|
196
|
-
grant: input.grant,
|
|
197
114
|
ownerId: input.ownerId
|
|
198
|
-
})
|
|
115
|
+
});
|
|
199
116
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
connectionId: input.connectionId,
|
|
204
|
-
domain: input.domain,
|
|
117
|
+
function detach(input) {
|
|
118
|
+
return input.repository.detach({
|
|
119
|
+
attachmentId: input.attachmentId,
|
|
205
120
|
ownerId: input.ownerId
|
|
206
|
-
})
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function disconnect(input) {
|
|
124
|
+
return input.repository.disconnect({
|
|
125
|
+
connectionId: input.connectionId,
|
|
126
|
+
ownerId: input.ownerId,
|
|
127
|
+
revoke: input.revoke
|
|
128
|
+
});
|
|
207
129
|
}
|
|
208
130
|
//#endregion
|
|
209
|
-
//#region src/promise/provider-
|
|
210
|
-
var
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
131
|
+
//#region src/promise/provider-session.ts
|
|
132
|
+
var provider_session_exports = /* @__PURE__ */ __exportAll({ fromEffect: () => fromEffect });
|
|
133
|
+
const fromEffect = (session) => ({
|
|
134
|
+
providerId: session.providerId,
|
|
135
|
+
listTargets: (input) => Effect.runPromise(session.listTargets(input)),
|
|
136
|
+
resolveTarget: (domain) => Effect.runPromise(session.resolveTarget(domain)),
|
|
137
|
+
forTarget: (target) => Effect.runPromise(session.forTarget(target)).then(toAsync$4)
|
|
214
138
|
});
|
|
215
|
-
function decode$2(input) {
|
|
216
|
-
return Effect.runPromise(decode$5(input));
|
|
217
|
-
}
|
|
218
139
|
//#endregion
|
|
219
|
-
//#region src/promise/provider-
|
|
220
|
-
var
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
EvidenceSchema: () => EvidenceSchema,
|
|
225
|
-
Schema: () => Schema$3,
|
|
226
|
-
decode: () => decode$1,
|
|
227
|
-
encode: () => encode$1
|
|
140
|
+
//#region src/promise/provider-auth.ts
|
|
141
|
+
var provider_auth_exports = /* @__PURE__ */ __exportAll({
|
|
142
|
+
Method: () => Method$1,
|
|
143
|
+
Schema: () => Schema$1,
|
|
144
|
+
decode: () => decode$1
|
|
228
145
|
});
|
|
229
146
|
function decode$1(input) {
|
|
230
|
-
return Effect.runPromise(decode$
|
|
147
|
+
return Effect.runPromise(decode$3(input));
|
|
231
148
|
}
|
|
232
149
|
//#endregion
|
|
233
150
|
//#region src/promise/zone-discovery.ts
|
|
@@ -243,7 +160,7 @@ function toEffectSource(source) {
|
|
|
243
160
|
return {
|
|
244
161
|
listZones: (name) => Effect.tryPromise({
|
|
245
162
|
try: () => source.listZones(name),
|
|
246
|
-
catch: (cause) => new Error$
|
|
163
|
+
catch: (cause) => new Error$1({
|
|
247
164
|
cause,
|
|
248
165
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
249
166
|
operation: "ZoneDiscovery.listZones",
|
|
@@ -251,7 +168,7 @@ function toEffectSource(source) {
|
|
|
251
168
|
reason: "transport"
|
|
252
169
|
})
|
|
253
170
|
}),
|
|
254
|
-
provider: Service$
|
|
171
|
+
provider: Service$1.of({
|
|
255
172
|
id: source.provider.id,
|
|
256
173
|
createRecord: (zone, record) => Effect.tryPromise({
|
|
257
174
|
try: () => source.provider.createRecord(zone, record),
|
|
@@ -283,7 +200,7 @@ function projectOutcome(outcome) {
|
|
|
283
200
|
}
|
|
284
201
|
}
|
|
285
202
|
function providerFailure(providerId, operation, cause) {
|
|
286
|
-
return cause instanceof Error$
|
|
203
|
+
return cause instanceof Error$1 ? cause : new Error$1({
|
|
287
204
|
cause,
|
|
288
205
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
289
206
|
operation,
|
|
@@ -302,19 +219,19 @@ var dns_record_exports = /* @__PURE__ */ __exportAll({
|
|
|
302
219
|
Observed: () => Observed,
|
|
303
220
|
Opaque: () => Opaque,
|
|
304
221
|
RequirementMetadata: () => RequirementMetadata,
|
|
305
|
-
Schema: () => Schema$
|
|
222
|
+
Schema: () => Schema$3,
|
|
306
223
|
Srv: () => Srv,
|
|
307
224
|
Txt: () => Txt,
|
|
308
225
|
Type: () => Type,
|
|
309
226
|
data: () => data,
|
|
310
227
|
equals: () => equals,
|
|
311
|
-
parse: () => parse
|
|
228
|
+
parse: () => parse$1
|
|
312
229
|
});
|
|
313
230
|
//#endregion
|
|
314
231
|
//#region src/promise/domain-name.ts
|
|
315
232
|
var domain_name_exports = /* @__PURE__ */ __exportAll({
|
|
316
|
-
Schema: () => Schema$
|
|
317
|
-
parse: () => parse
|
|
233
|
+
Schema: () => Schema$2,
|
|
234
|
+
parse: () => parse
|
|
318
235
|
});
|
|
319
236
|
//#endregion
|
|
320
237
|
//#region src/promise/dns-plan.ts
|
|
@@ -322,14 +239,14 @@ var dns_plan_exports = /* @__PURE__ */ __exportAll({
|
|
|
322
239
|
Authorization: () => Authorization,
|
|
323
240
|
Operation: () => Operation,
|
|
324
241
|
Receipt: () => Receipt,
|
|
325
|
-
Schema: () => Schema$
|
|
242
|
+
Schema: () => Schema$4,
|
|
326
243
|
decode: () => decode,
|
|
327
244
|
decodeReceipt: () => decodeReceipt,
|
|
328
|
-
encode: () => encode$
|
|
245
|
+
encode: () => encode$1,
|
|
329
246
|
encodeReceipt: () => encodeReceipt
|
|
330
247
|
});
|
|
331
248
|
function decode(input) {
|
|
332
|
-
return Effect.runPromise(decode$
|
|
249
|
+
return Effect.runPromise(decode$5(input));
|
|
333
250
|
}
|
|
334
251
|
function decodeReceipt(input) {
|
|
335
252
|
return Effect.runPromise(decodeReceipt$1(input));
|
|
@@ -338,7 +255,7 @@ function decodeReceipt(input) {
|
|
|
338
255
|
//#region src/promise/deletion.ts
|
|
339
256
|
var deletion_exports = /* @__PURE__ */ __exportAll({
|
|
340
257
|
Authorization: () => Authorization$1,
|
|
341
|
-
Error: () => Error$
|
|
258
|
+
Error: () => Error$2,
|
|
342
259
|
Operation: () => Operation$1,
|
|
343
260
|
PartialError: () => PartialError,
|
|
344
261
|
Plan: () => Plan,
|
|
@@ -370,6 +287,8 @@ var cloudflare_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
370
287
|
manifest: () => manifest$1,
|
|
371
288
|
oauthFlow: () => oauthFlow,
|
|
372
289
|
oauthMethod: () => oauthMethod,
|
|
290
|
+
refreshCredential: () => refreshCredential,
|
|
291
|
+
restore: () => restore$1,
|
|
373
292
|
subjectResolver: () => subjectResolver,
|
|
374
293
|
tokenConnectionMethod: () => tokenConnectionMethod$1,
|
|
375
294
|
tokenMethod: () => tokenMethod$1,
|
|
@@ -377,6 +296,12 @@ var cloudflare_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
377
296
|
});
|
|
378
297
|
const manifest$1 = manifest$2;
|
|
379
298
|
const oauthMethod = oauthMethod$1;
|
|
299
|
+
function refreshCredential(options) {
|
|
300
|
+
return Effect.runPromise(refreshCredential$1(options));
|
|
301
|
+
}
|
|
302
|
+
function restore$1(options) {
|
|
303
|
+
return Effect.runPromise(restore$2(options));
|
|
304
|
+
}
|
|
380
305
|
const tokenMethod$1 = tokenMethod$2;
|
|
381
306
|
function subjectResolver(options) {
|
|
382
307
|
const resolve = subjectResolver$1(options);
|
|
@@ -406,12 +331,22 @@ function make$5(options) {
|
|
|
406
331
|
const client = make$6(options);
|
|
407
332
|
return {
|
|
408
333
|
id: client.id,
|
|
334
|
+
providerId: client.providerId,
|
|
409
335
|
createRecord: (zone, record) => Effect.runPromise(client.createRecord(zone, record)),
|
|
410
336
|
deleteRecord: (zone, providerRecordId) => Effect.runPromise(client.deleteRecord(zone, providerRecordId)),
|
|
411
337
|
getRecord: (zone, providerRecordId) => Effect.runPromise(client.getRecord(zone, providerRecordId)),
|
|
412
338
|
listAccounts: () => Effect.runPromise(client.listAccounts()),
|
|
413
339
|
listRecords: (zone) => Effect.runPromise(client.listRecords(zone)),
|
|
414
340
|
listZones: (input) => Effect.runPromise(client.listZones(input)),
|
|
341
|
+
listTargets: (input) => Effect.runPromise(client.listTargets(input)),
|
|
342
|
+
resolveTarget: (domain) => Effect.runPromise(client.resolveTarget(domain)),
|
|
343
|
+
forTarget: (target) => Effect.runPromise(client.forTarget(target)).then((provider) => ({
|
|
344
|
+
id: provider.id,
|
|
345
|
+
createRecord: (zone, record) => Effect.runPromise(provider.createRecord(zone, record)),
|
|
346
|
+
deleteRecord: (zone, providerRecordId) => Effect.runPromise(provider.deleteRecord(zone, providerRecordId)),
|
|
347
|
+
getRecord: (zone, providerRecordId) => Effect.runPromise(provider.getRecord(zone, providerRecordId)),
|
|
348
|
+
listRecords: (zone) => Effect.runPromise(provider.listRecords(zone))
|
|
349
|
+
})),
|
|
415
350
|
validateToken: () => Effect.runPromise(client.validateToken())
|
|
416
351
|
};
|
|
417
352
|
}
|
|
@@ -433,11 +368,15 @@ var vercel_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
433
368
|
integrationFlow: () => integrationFlow,
|
|
434
369
|
integrationMethod: () => integrationMethod,
|
|
435
370
|
manifest: () => manifest,
|
|
371
|
+
restore: () => restore,
|
|
436
372
|
tokenConnectionMethod: () => tokenConnectionMethod,
|
|
437
373
|
tokenMethod: () => tokenMethod
|
|
438
374
|
});
|
|
439
375
|
const integrationMethod = integrationMethod$1;
|
|
440
376
|
const manifest = manifest$3;
|
|
377
|
+
function restore(options) {
|
|
378
|
+
return Effect.runPromise(restore$3(options));
|
|
379
|
+
}
|
|
441
380
|
const tokenMethod = tokenMethod$3;
|
|
442
381
|
function exchangeCode(options) {
|
|
443
382
|
return Effect.runPromise(exchangeCode$1(options));
|
|
@@ -462,12 +401,22 @@ function make$4(options) {
|
|
|
462
401
|
const client = make$7(options);
|
|
463
402
|
return {
|
|
464
403
|
id: client.id,
|
|
404
|
+
providerId: client.providerId,
|
|
465
405
|
createRecord: (zone, record) => Effect.runPromise(client.createRecord(zone, record)),
|
|
466
406
|
deleteRecord: (zone, providerRecordId) => Effect.runPromise(client.deleteRecord(zone, providerRecordId)),
|
|
467
407
|
getRecord: (zone, providerRecordId) => Effect.runPromise(client.getRecord(zone, providerRecordId)),
|
|
468
408
|
listAccounts: () => Effect.runPromise(client.listAccounts()),
|
|
469
409
|
listRecords: (zone) => Effect.runPromise(client.listRecords(zone)),
|
|
470
410
|
listZones: (input) => Effect.runPromise(client.listZones(input)),
|
|
411
|
+
listTargets: (input) => Effect.runPromise(client.listTargets(input)),
|
|
412
|
+
resolveTarget: (domain) => Effect.runPromise(client.resolveTarget(domain)),
|
|
413
|
+
forTarget: (target) => Effect.runPromise(client.forTarget(target)).then((provider) => ({
|
|
414
|
+
id: provider.id,
|
|
415
|
+
createRecord: (zone, record) => Effect.runPromise(provider.createRecord(zone, record)),
|
|
416
|
+
deleteRecord: (zone, providerRecordId) => Effect.runPromise(provider.deleteRecord(zone, providerRecordId)),
|
|
417
|
+
getRecord: (zone, providerRecordId) => Effect.runPromise(provider.getRecord(zone, providerRecordId)),
|
|
418
|
+
listRecords: (zone) => Effect.runPromise(provider.listRecords(zone))
|
|
419
|
+
})),
|
|
471
420
|
validateToken: () => Effect.runPromise(client.validateToken())
|
|
472
421
|
};
|
|
473
422
|
}
|
|
@@ -493,7 +442,7 @@ var provisioning_exports = /* @__PURE__ */ __exportAll({
|
|
|
493
442
|
function create(input) {
|
|
494
443
|
if ("sources" in input) {
|
|
495
444
|
const { sources, ...programInput } = input;
|
|
496
|
-
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(Layer.succeed(Service$
|
|
445
|
+
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(Layer.succeed(Service$2, make$9(sources.map(toEffectSource))), webCryptoLayer))));
|
|
497
446
|
}
|
|
498
447
|
const { provider, ...programInput } = input;
|
|
499
448
|
return Effect.runPromise(create$3(programInput).pipe(Effect.provide(Layer.merge(layerFromAsync(provider), webCryptoLayer))));
|
|
@@ -508,7 +457,15 @@ function apply(input) {
|
|
|
508
457
|
}).pipe(Effect.provide(Layer.merge(layerFromAsync(input.provider), webCryptoLayer))));
|
|
509
458
|
}
|
|
510
459
|
function authorizeForConnection(input) {
|
|
511
|
-
return Effect.runPromise(authorize$2(
|
|
460
|
+
return Effect.runPromise(authorize$2({
|
|
461
|
+
attachment: input.attachment,
|
|
462
|
+
authorization: input.authorization,
|
|
463
|
+
connection: input.connection,
|
|
464
|
+
domain: input.domain,
|
|
465
|
+
...input.allowPartial === void 0 ? {} : { allowPartial: input.allowPartial },
|
|
466
|
+
...input.operationIds === void 0 ? {} : { operationIds: input.operationIds },
|
|
467
|
+
plan: input.plan
|
|
468
|
+
}).pipe(Effect.provide(Layer.merge(layerFromAsync$1(input.repository), webCryptoLayer))));
|
|
512
469
|
}
|
|
513
470
|
const renderManualInstructions = renderManualInstructions$1;
|
|
514
471
|
//#endregion
|
|
@@ -544,7 +501,7 @@ function observe(input) {
|
|
|
544
501
|
function fromAsyncResolver(resolver) {
|
|
545
502
|
return { resolve: (query) => Effect.tryPromise({
|
|
546
503
|
try: () => resolver.resolve(query),
|
|
547
|
-
catch: (cause) => new Error$
|
|
504
|
+
catch: (cause) => new Error$3({
|
|
548
505
|
cause,
|
|
549
506
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
550
507
|
reason: "transport"
|
|
@@ -553,11 +510,11 @@ function fromAsyncResolver(resolver) {
|
|
|
553
510
|
switch (resolution._tag) {
|
|
554
511
|
case "answer":
|
|
555
512
|
case "nodata": return Effect.succeed(resolution);
|
|
556
|
-
case "timeout": return Effect.fail(new Error$
|
|
513
|
+
case "timeout": return Effect.fail(new Error$3({
|
|
557
514
|
message: "DNS query timed out",
|
|
558
515
|
reason: "timeout"
|
|
559
516
|
}));
|
|
560
|
-
case "failure": return Effect.fail(new Error$
|
|
517
|
+
case "failure": return Effect.fail(new Error$3({
|
|
561
518
|
message: resolution.message,
|
|
562
519
|
reason: "transport"
|
|
563
520
|
}));
|
|
@@ -568,19 +525,19 @@ function fromAsyncResolver(resolver) {
|
|
|
568
525
|
//#region src/promise/cloudflare-doh.ts
|
|
569
526
|
var cloudflare_doh_exports = /* @__PURE__ */ __exportAll({ make: () => make$3 });
|
|
570
527
|
function make$3(options = {}) {
|
|
571
|
-
return toAsync$
|
|
528
|
+
return toAsync$1(options);
|
|
572
529
|
}
|
|
573
530
|
//#endregion
|
|
574
531
|
//#region src/promise/doh.ts
|
|
575
532
|
var doh_exports = /* @__PURE__ */ __exportAll({ make: () => make$2 });
|
|
576
533
|
function make$2(options) {
|
|
577
|
-
return toAsync$
|
|
534
|
+
return toAsync$2(options);
|
|
578
535
|
}
|
|
579
536
|
//#endregion
|
|
580
537
|
//#region src/promise/google-doh.ts
|
|
581
538
|
var google_doh_exports = /* @__PURE__ */ __exportAll({ make: () => make$1 });
|
|
582
539
|
function make$1(options = {}) {
|
|
583
|
-
return toAsync$
|
|
540
|
+
return toAsync$3(options);
|
|
584
541
|
}
|
|
585
542
|
//#endregion
|
|
586
543
|
//#region src/promise/resolver-pool.ts
|
|
@@ -606,7 +563,7 @@ function toAsync(pool) {
|
|
|
606
563
|
function asyncResolver(resolver) {
|
|
607
564
|
return { resolve: (query) => Effect.tryPromise({
|
|
608
565
|
try: () => resolver.resolve(query),
|
|
609
|
-
catch: (cause) => new Error$
|
|
566
|
+
catch: (cause) => new Error$3({
|
|
610
567
|
cause,
|
|
611
568
|
message: cause instanceof globalThis.Error ? cause.message : String(cause),
|
|
612
569
|
reason: "transport"
|
|
@@ -615,11 +572,11 @@ function asyncResolver(resolver) {
|
|
|
615
572
|
switch (resolution._tag) {
|
|
616
573
|
case "answer":
|
|
617
574
|
case "nodata": return Effect.succeed(resolution);
|
|
618
|
-
case "timeout": return Effect.fail(new Error$
|
|
575
|
+
case "timeout": return Effect.fail(new Error$3({
|
|
619
576
|
message: "DNS query timed out",
|
|
620
577
|
reason: "timeout"
|
|
621
578
|
}));
|
|
622
|
-
case "failure": return Effect.fail(new Error$
|
|
579
|
+
case "failure": return Effect.fail(new Error$3({
|
|
623
580
|
message: resolution.message,
|
|
624
581
|
reason: "transport"
|
|
625
582
|
}));
|
|
@@ -631,6 +588,6 @@ function asyncResolver(resolver) {
|
|
|
631
588
|
/** The current package version from the package manifest. */
|
|
632
589
|
const VERSION = version;
|
|
633
590
|
//#endregion
|
|
634
|
-
export {
|
|
591
|
+
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
592
|
|
|
636
593
|
//# sourceMappingURL=promise.mjs.map
|