domainkit 0.2.0 → 0.2.2
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 +5 -0
- package/dist/{auth-CZ1pZHMZ.mjs → auth-BR-19zj-.mjs} +2 -2
- package/dist/{auth-CZ1pZHMZ.mjs.map → auth-BR-19zj-.mjs.map} +1 -1
- package/dist/{auth-CzhZ3Cuc.mjs → auth-g-waCHcz.mjs} +2 -2
- package/dist/{auth-CzhZ3Cuc.mjs.map → auth-g-waCHcz.mjs.map} +1 -1
- package/dist/{authorization-DOg2Re1D.mjs → authorization-OeaSR47S.mjs} +40 -3
- package/dist/authorization-OeaSR47S.mjs.map +1 -0
- package/dist/{cloudflare-FDl5q7Dm.d.mts → cloudflare-BrZPU9li.d.mts} +4 -4
- package/dist/{cloudflare-BedFw4cX.mjs → cloudflare-CGmasR8A.mjs} +3 -3
- package/dist/{cloudflare-BedFw4cX.mjs.map → cloudflare-CGmasR8A.mjs.map} +1 -1
- package/dist/cloudflare.d.mts +2 -2
- package/dist/cloudflare.mjs +1 -1
- package/dist/{connection-CEqadXSm.d.mts → connection-BfkloPZy.d.mts} +8 -4
- package/dist/{connection-CcQokgrd.mjs → connection-BwtOwpH6.mjs} +12 -3
- package/dist/connection-BwtOwpH6.mjs.map +1 -0
- package/dist/{connection-BWrBwqjk.mjs → connection-CjNQe_E-.mjs} +2 -2
- package/dist/{connection-BWrBwqjk.mjs.map → connection-CjNQe_E-.mjs.map} +1 -1
- package/dist/connection-api-DNuEZ_jR.d.mts +7 -0
- package/dist/effect-cloudflare.d.mts +1 -1
- package/dist/effect-cloudflare.mjs +1 -1
- package/dist/effect-vercel.d.mts +1 -1
- package/dist/effect-vercel.mjs +1 -1
- package/dist/effect.d.mts +6 -6
- package/dist/effect.mjs +6 -5
- package/dist/effect.mjs.map +1 -1
- package/dist/{index-B1opsgls.d.mts → index-BHWRTThN.d.mts} +2 -2
- package/dist/{index-Ewc__bQu.d.mts → index-D3PVknwE.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +5 -5
- package/dist/{resolver-CJOR9mQ8.d.mts → resolver-Dc0hwV-J.d.mts} +12 -12
- package/dist/testing.d.mts +2 -2
- package/dist/{vercel-DgJaUX9D.d.mts → vercel-BsNDu4Np.d.mts} +4 -4
- package/dist/{vercel-CWZ33NUS.mjs → vercel-CfoJaaCu.mjs} +3 -3
- package/dist/{vercel-CWZ33NUS.mjs.map → vercel-CfoJaaCu.mjs.map} +1 -1
- package/dist/vercel.d.mts +2 -2
- package/dist/vercel.mjs +1 -1
- package/dist/{verify-BzpiA0Es.mjs → verify-BKbvq7IN.mjs} +3 -3
- package/dist/{verify-BzpiA0Es.mjs.map → verify-BKbvq7IN.mjs.map} +1 -1
- package/dist/{verify-DZWLM91T.d.mts → verify-Dls29YC-.d.mts} +3 -3
- package/dist/{zone-discovery-BA5I24vu.d.mts → zone-discovery-BPnH3sLU.d.mts} +9 -2
- package/package.json +1 -1
- package/dist/authorization-DOg2Re1D.mjs.map +0 -1
- package/dist/connection-CcQokgrd.mjs.map +0 -1
- package/dist/connection-api-DftK7eHo.d.mts +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-
|
|
1
|
+
{"version":3,"file":"connection-CjNQe_E-.mjs","names":["S","DomainName.Schema","Schema","InvalidInputError","ProviderAuthorization.evidenceFor","DomainName.parse"],"sources":["../src/auth/connection.ts"],"sourcesContent":["import { Effect, Schema as S } from \"effect\";\n\nimport * as DomainName from \"../domain/domain-name.ts\";\nimport { Error as InvalidInputError } from \"../invalid-input.ts\";\nimport type { Value as Secret } from \"./secret.ts\";\nimport type { OAuthMethod } from \"./manifest.ts\";\nimport * as ProviderAuthorization from \"./authorization.ts\";\n\nexport const Grant = S.TaggedUnion({\n account: {},\n domains: { domains: S.Array(DomainName.Schema) },\n});\nexport type Grant = typeof Grant.Type;\n\n/** An owner-scoped grant bound to one provider authorization. */\nexport const Schema = S.Struct({\n authorizationId: S.String,\n createdAt: S.DateFromString,\n grant: Grant,\n id: S.String,\n ownerId: S.String,\n});\nexport interface Connection extends S.Schema.Type<typeof Schema> {}\n\nexport const decode = Effect.fn(\"Connection.decode\")((input: unknown) =>\n S.decodeUnknownEffect(Schema)(input).pipe(\n Effect.mapError((cause) => new InvalidInputError({ message: cause.message })),\n ),\n);\n\nexport const validate = Effect.fn(\"Connection.validate\")((input: unknown) =>\n S.decodeUnknownEffect(S.toType(Schema))(input).pipe(\n Effect.mapError((cause) => new InvalidInputError({ message: cause.message })),\n ),\n);\n\nexport const encode = S.encodeSync(Schema);\n\nexport interface OAuthContinuation {\n readonly clientId: string;\n readonly codeVerifier: Secret;\n readonly expiresAt: Date;\n readonly grant: Grant;\n readonly method: OAuthMethod;\n readonly ownerId: string;\n readonly redirectUri: string;\n readonly stateHash: string;\n readonly authorizedById: string;\n}\n\nexport interface StoredCredential {\n readonly accessToken: Secret;\n readonly refreshToken: Secret | null;\n readonly tokenType: string;\n}\n\nexport class AuthorizationError extends S.TaggedError<AuthorizationError>()(\"AuthorizationError\", {\n category: S.Literal(\"authorization\"),\n message: S.String,\n operation: S.String,\n retry: S.Literals([\"never\", \"after-user-action\", \"safe\", \"unknown\"]),\n}) {}\n\nexport const authorizationError = (message: string, operation: string): AuthorizationError =>\n new AuthorizationError({\n category: \"authorization\",\n message,\n operation,\n retry: \"after-user-action\",\n });\n\nexport function assertGrant(\n connection: Connection,\n authorization: ProviderAuthorization.ProviderAuthorization,\n request: {\n readonly capability: ProviderAuthorization.Capability;\n readonly domain: string;\n readonly now?: Date;\n readonly providerId: string;\n },\n): DomainName.DomainName {\n if (\n connection.authorizationId !== authorization.id ||\n authorization.providerId !== request.providerId ||\n authorization.revocation._tag !== \"Active\"\n ) {\n throw authorizationError(\n \"Connection does not grant this provider account\",\n \"Connection.assertGrant\",\n );\n }\n if (authorization.expiresAt !== null) {\n if (Number.isNaN(authorization.expiresAt.getTime())) {\n throw authorizationError(\"Connection expiration is invalid\", \"Connection.assertGrant\");\n }\n if (authorization.expiresAt <= (request.now ?? new Date())) {\n throw authorizationError(\"Connection has expired\", \"Connection.assertGrant\");\n }\n }\n if (!authorization.requiredCapabilities.includes(request.capability)) {\n throw authorizationError(\n `Connection lacks the ${request.capability} capability`,\n \"Connection.assertGrant\",\n );\n }\n if (ProviderAuthorization.evidenceFor(authorization, request.capability) === undefined) {\n throw authorizationError(\n `Connection has no evidence for the ${request.capability} capability`,\n \"Connection.assertGrant\",\n );\n }\n let domain: DomainName.DomainName;\n try {\n domain = DomainName.parse(request.domain);\n } catch (cause) {\n if (cause instanceof InvalidInputError) throw cause;\n throw new InvalidInputError({\n message: cause instanceof Error ? cause.message : String(cause),\n });\n }\n if (connection.grant._tag === \"domains\" && !connection.grant.domains.includes(domain)) {\n throw authorizationError(\"Connection does not grant this domain\", \"Connection.assertGrant\");\n }\n return domain;\n}\n"],"mappings":";;;;AAQA,MAAa,QAAQA,OAAE,YAAY;CACjC,SAAS,CAAC;CACV,SAAS,EAAE,SAASA,OAAE,MAAMC,QAAiB,EAAE;AACjD,CAAC;;AAID,MAAaC,WAASF,OAAE,OAAO;CAC7B,iBAAiBA,OAAE;CACnB,WAAWA,OAAE;CACb,OAAO;CACP,IAAIA,OAAE;CACN,SAASA,OAAE;AACb,CAAC;AAGD,MAAa,SAAS,OAAO,GAAG,mBAAmB,CAAC,EAAE,UACpDA,OAAE,oBAAoBE,QAAM,CAAC,CAAC,KAAK,CAAC,CAAC,KACnC,OAAO,UAAU,UAAU,IAAIC,QAAkB,EAAE,SAAS,MAAM,QAAQ,CAAC,CAAC,CAC9E,CACF;AAEA,MAAa,WAAW,OAAO,GAAG,qBAAqB,CAAC,EAAE,UACxDH,OAAE,oBAAoBA,OAAE,OAAOE,QAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAC7C,OAAO,UAAU,UAAU,IAAIC,QAAkB,EAAE,SAAS,MAAM,QAAQ,CAAC,CAAC,CAC9E,CACF;AAEA,MAAa,SAASH,OAAE,WAAWE,QAAM;AAoBzC,IAAa,qBAAb,cAAwCF,OAAE,YAAgC,CAAC,CAAC,sBAAsB;CAChG,UAAUA,OAAE,QAAQ,eAAe;CACnC,SAASA,OAAE;CACX,WAAWA,OAAE;CACb,OAAOA,OAAE,SAAS;EAAC;EAAS;EAAqB;EAAQ;CAAS,CAAC;AACrE,CAAC,CAAC,CAAC,CAAC;AAEJ,MAAa,sBAAsB,SAAiB,cAClD,IAAI,mBAAmB;CACrB,UAAU;CACV;CACA;CACA,OAAO;AACT,CAAC;AAEH,SAAgB,YACd,YACA,eACA,SAMuB;CACvB,IACE,WAAW,oBAAoB,cAAc,MAC7C,cAAc,eAAe,QAAQ,cACrC,cAAc,WAAW,SAAS,UAElC,MAAM,mBACJ,mDACA,wBACF;CAEF,IAAI,cAAc,cAAc,MAAM;EACpC,IAAI,OAAO,MAAM,cAAc,UAAU,QAAQ,CAAC,GAChD,MAAM,mBAAmB,oCAAoC,wBAAwB;EAEvF,IAAI,cAAc,cAAc,QAAQ,uBAAO,IAAI,KAAK,IACtD,MAAM,mBAAmB,0BAA0B,wBAAwB;CAE/E;CACA,IAAI,CAAC,cAAc,qBAAqB,SAAS,QAAQ,UAAU,GACjE,MAAM,mBACJ,wBAAwB,QAAQ,WAAW,cAC3C,wBACF;CAEF,IAAII,YAAkC,eAAe,QAAQ,UAAU,MAAM,KAAA,GAC3E,MAAM,mBACJ,sCAAsC,QAAQ,WAAW,cACzD,wBACF;CAEF,IAAI;CACJ,IAAI;EACF,SAASC,MAAiB,QAAQ,MAAM;CAC1C,SAAS,OAAO;EACd,IAAI,iBAAiBF,SAAmB,MAAM;EAC9C,MAAM,IAAIA,QAAkB,EAC1B,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAChE,CAAC;CACH;CACA,IAAI,WAAW,MAAM,SAAS,aAAa,CAAC,WAAW,MAAM,QAAQ,SAAS,MAAM,GAClF,MAAM,mBAAmB,yCAAyC,wBAAwB;CAE5F,OAAO;AACT"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { B as encode, F as Schema, I as StoredCredential, L as assertGrant, M as Connection, N as Grant, R as authorizationError, V as validate, _ as Requirements, a as Authentication, b as extend, c as CompleteInput, d as Error, f as ExtendInput, g as Method, h as InteractiveStart, j as AuthorizationError, l as Continuation, m as InteractiveFlow, o as AuthenticationFailure, p as Failure, s as BaseInput, u as ContinuationStore, v as StartResult, x as start, y as complete, z as decode } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
|
+
declare namespace connection_api_d_exports {
|
|
3
|
+
export { Authentication, AuthenticationFailure, AuthorizationError, BaseInput, CompleteInput, Connection, Method as ConnectionMethod, StartResult as ConnectionStartResult, Continuation, ContinuationStore, Error, ExtendInput, Failure, Grant, InteractiveFlow, InteractiveStart, Method, Requirements, Schema, StartResult, StoredCredential, assertGrant, authorizationError, complete, decode, encode, extend, start, validate };
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { connection_api_d_exports as t };
|
|
7
|
+
//# sourceMappingURL=connection-api-DNuEZ_jR.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as Zone, b as make, c as auth_d_exports, f as Account, g as Options, h as ListZonesInput, m as Interface, p as Fetch, v as client_d_exports, y as discovery } from "./index-
|
|
1
|
+
import { _ as Zone, b as make, c as auth_d_exports, f as Account, g as Options, h as ListZonesInput, m as Interface, p as Fetch, v as client_d_exports, y as discovery } from "./index-BHWRTThN.mjs";
|
|
2
2
|
export { type Account, auth_d_exports as Auth, client_d_exports as Client, type Fetch, type Interface, type ListZonesInput, type Options, type Zone, discovery, make };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as make, l as client_exports, t as auth_exports, u as discovery } from "./auth-
|
|
1
|
+
import { d as make, l as client_exports, t as auth_exports, u as discovery } from "./auth-BR-19zj-.mjs";
|
|
2
2
|
export { auth_exports as Auth, client_exports as Client, discovery, make };
|
package/dist/effect-vercel.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as Zone, b as make, d as Account, f as AccountContext, g as Options, h as ListZonesInput, m as Interface, p as Fetch, s as auth_d_exports, v as client_d_exports, y as discovery } from "./index-
|
|
1
|
+
import { _ as Zone, b as make, d as Account, f as AccountContext, g as Options, h as ListZonesInput, m as Interface, p as Fetch, s as auth_d_exports, v as client_d_exports, y as discovery } from "./index-D3PVknwE.mjs";
|
|
2
2
|
export { type Account, type AccountContext, auth_d_exports as Auth, client_d_exports as Client, type Fetch, type Interface, type ListZonesInput, type Options, type Zone, discovery, make };
|
package/dist/effect-vercel.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as client_exports, l as discovery, t as auth_exports, u as make } from "./auth-
|
|
1
|
+
import { c as client_exports, l as discovery, t as auth_exports, u as make } from "./auth-g-waCHcz.mjs";
|
|
2
2
|
export { auth_exports as Auth, client_exports as Client, discovery, make };
|
package/dist/effect.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { t as index_d_exports } from "./index-
|
|
3
|
-
import { t as connection_api_d_exports } from "./connection-api-
|
|
4
|
-
import { t as index_d_exports$1 } from "./index-
|
|
5
|
-
import { _ as selection_d_exports, a as verify_d_exports, d as google_doh_d_exports, g as zones_d_exports, h as doh_d_exports, l as resolver_pool_d_exports, p as cloudflare_doh_d_exports, v as diagnostic_d_exports } from "./verify-
|
|
6
|
-
import { B as types_d_exports, N as DnsPlan, b as AuthorizeError, k as plan_d_exports, l as resolver_d_exports, v as deletion_d_exports } from "./resolver-
|
|
1
|
+
import { A as lifecycle_repository_d_exports, At as Type, Bt as invalid_input_d_exports, J as authorization_d_exports, K as ProviderAuthorization, Lt as domain_name_d_exports, M as Connection, Mt as dns_record_d_exports, X as CryptoError, Z as canonical_json_d_exports, ht as provider_d_exports, i as zone_discovery_d_exports, j as AuthorizationError, lt as secret_d_exports, st as manifest_d_exports, w as provider_context_d_exports, zt as Error$1 } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
|
+
import { t as index_d_exports } from "./index-BHWRTThN.mjs";
|
|
3
|
+
import { t as connection_api_d_exports } from "./connection-api-DNuEZ_jR.mjs";
|
|
4
|
+
import { t as index_d_exports$1 } from "./index-D3PVknwE.mjs";
|
|
5
|
+
import { _ as selection_d_exports, a as verify_d_exports, d as google_doh_d_exports, g as zones_d_exports, h as doh_d_exports, l as resolver_pool_d_exports, p as cloudflare_doh_d_exports, v as diagnostic_d_exports } from "./verify-Dls29YC-.mjs";
|
|
6
|
+
import { B as types_d_exports, N as DnsPlan, b as AuthorizeError, k as plan_d_exports, l as resolver_d_exports, v as deletion_d_exports } from "./resolver-Dc0hwV-J.mjs";
|
|
7
7
|
import { Crypto, Effect } from "effect";
|
|
8
8
|
declare namespace connection_authorization_d_exports {
|
|
9
9
|
export { Error, Requirements, authorize };
|
package/dist/effect.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import { A as invalid_input_exports, C as provider_exports, D as domain_name_exports, N as lifecycle_repository_exports, g as dns_record_exports } from "./dns-record-BLeqo56C.mjs";
|
|
3
|
-
import { _ as StartResult, d as provider_context_exports, g as Method, h as Error, m as secret_exports, o as authorization_exports, v as complete, y as
|
|
4
|
-
import { d as make, l as client_exports, t as auth_exports, u as discovery } from "./auth-
|
|
3
|
+
import { _ as StartResult, b as start, d as provider_context_exports, g as Method, h as Error, m as secret_exports, o as authorization_exports, v as complete, y as extend } from "./authorization-OeaSR47S.mjs";
|
|
4
|
+
import { d as make, l as client_exports, t as auth_exports, u as discovery } from "./auth-BR-19zj-.mjs";
|
|
5
5
|
import { n as zones_exports } from "./zones-DKHTpX9C.mjs";
|
|
6
|
-
import { a as authorizationError, c as validate, i as assertGrant, n as Grant, o as decode, r as Schema, s as encode, t as AuthorizationError } from "./connection-
|
|
6
|
+
import { a as authorizationError, c as validate, i as assertGrant, n as Grant, o as decode, r as Schema, s as encode, t as AuthorizationError } from "./connection-CjNQe_E-.mjs";
|
|
7
7
|
import { t as canonical_json_exports } from "./canonical-json-CpvqGMcr.mjs";
|
|
8
|
-
import { C as selection_exports, D as manifest_exports, O as diagnostic_exports, S as connection_authorization_exports, b as dns_data_exports, g as cloudflare_doh_exports, k as version, m as google_doh_exports, p as resolver_pool_exports, s as verify_exports, v as doh_exports } from "./verify-
|
|
8
|
+
import { C as selection_exports, D as manifest_exports, O as diagnostic_exports, S as connection_authorization_exports, b as dns_data_exports, g as cloudflare_doh_exports, k as version, m as google_doh_exports, p as resolver_pool_exports, s as verify_exports, v as doh_exports } from "./verify-BKbvq7IN.mjs";
|
|
9
9
|
import { C as plan_exports, L as zone_discovery_exports, N as types_exports, m as deletion_exports, r as resolver_exports } from "./resolver-CxE-VDw4.mjs";
|
|
10
|
-
import { c as client_exports$1, l as discovery$1, t as auth_exports$1, u as make$1 } from "./auth-
|
|
10
|
+
import { c as client_exports$1, l as discovery$1, t as auth_exports$1, u as make$1 } from "./auth-g-waCHcz.mjs";
|
|
11
11
|
//#region src/providers/cloudflare/index.ts
|
|
12
12
|
var cloudflare_exports = /* @__PURE__ */ __exportAll({
|
|
13
13
|
Auth: () => auth_exports,
|
|
@@ -29,6 +29,7 @@ var connection_api_exports = /* @__PURE__ */ __exportAll({
|
|
|
29
29
|
complete: () => complete,
|
|
30
30
|
decode: () => decode,
|
|
31
31
|
encode: () => encode,
|
|
32
|
+
extend: () => extend,
|
|
32
33
|
start: () => start,
|
|
33
34
|
validate: () => validate
|
|
34
35
|
});
|
package/dist/effect.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect.mjs","names":["packageJson.version"],"sources":["../src/providers/cloudflare/index.ts","../src/auth/connection-api.ts","../src/providers/vercel/index.ts","../src/effect.ts"],"sourcesContent":["export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { discovery, make } from \"./client.ts\";\nexport type { Account, Fetch, Interface, ListZonesInput, Options, Zone } from \"./client.ts\";\n","export {\n assertGrant,\n authorizationError,\n AuthorizationError,\n decode,\n encode,\n Grant,\n Schema,\n validate,\n} from \"./connection.ts\";\nexport type { Connection, StoredCredential } from \"./connection.ts\";\nexport { complete, Error, Method, start, StartResult } from \"./connect.ts\";\nexport type {\n Authentication,\n AuthenticationFailure,\n BaseInput,\n CompleteInput,\n Continuation,\n ContinuationStore,\n Failure,\n InteractiveFlow,\n InteractiveStart,\n Method as ConnectionMethod,\n Requirements,\n StartResult as ConnectionStartResult,\n} from \"./connect.ts\";\n","export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { discovery, make } from \"./client.ts\";\nexport type {\n Account,\n AccountContext,\n Fetch,\n Interface,\n ListZonesInput,\n Options,\n Zone,\n} from \"./client.ts\";\n","import packageJson from \"../package.json\" with { type: \"json\" };\n\n/** The current package version from the package manifest. */\nexport const VERSION = packageJson.version;\n\nexport * as Connection from \"./auth/connection-api.ts\";\nexport * as AuthorizationLifecycle from \"./auth/lifecycle-repository.ts\";\nexport * as Diagnostic from \"./auth/diagnostic.ts\";\nexport * as ProviderAuth from \"./auth/manifest.ts\";\nexport * as ProviderAuthorization from \"./auth/authorization.ts\";\nexport * as ProviderContext from \"./auth/provider-context.ts\";\nexport * as Secret from \"./auth/secret.ts\";\nexport * as ProviderDiscovery from \"./discovery/selection.ts\";\nexport * as ZoneDiscovery from \"./discovery/zone-discovery.ts\";\nexport * as Zones from \"./discovery/zones.ts\";\nexport * as DnsRecord from \"./domain/dns-record.ts\";\nexport * as DomainName from \"./domain/domain-name.ts\";\nexport * as InvalidInput from \"./invalid-input.ts\";\nexport * as DnsProvider from \"./provider/provider.ts\";\nexport * as ConnectionAuthorization from \"./plan/connection-authorization.ts\";\nexport * as Digest from \"./plan/canonical-json.ts\";\nexport * as Deletion from \"./plan/deletion.ts\";\nexport * as Provisioning from \"./plan/plan.ts\";\nexport * as DnsPlan from \"./plan/types.ts\";\nexport * as Cloudflare from \"./providers/cloudflare/index.ts\";\nexport * as Vercel from \"./providers/vercel/index.ts\";\nexport * as CloudflareDnsOverHttps from \"./verification/cloudflare-doh.ts\";\nexport * as DnsData from \"./verification/dns-data.ts\";\nexport * as DnsOverHttps from \"./verification/doh.ts\";\nexport * as GoogleDnsOverHttps from \"./verification/google-doh.ts\";\nexport * as DnsResolverPool from \"./verification/resolver-pool.ts\";\nexport * as DnsResolver from \"./verification/resolver.ts\";\nexport * as Verification from \"./verification/verify.ts\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"effect.mjs","names":["packageJson.version"],"sources":["../src/providers/cloudflare/index.ts","../src/auth/connection-api.ts","../src/providers/vercel/index.ts","../src/effect.ts"],"sourcesContent":["export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { discovery, make } from \"./client.ts\";\nexport type { Account, Fetch, Interface, ListZonesInput, Options, Zone } from \"./client.ts\";\n","export {\n assertGrant,\n authorizationError,\n AuthorizationError,\n decode,\n encode,\n Grant,\n Schema,\n validate,\n} from \"./connection.ts\";\nexport type { Connection, StoredCredential } from \"./connection.ts\";\nexport { complete, Error, extend, Method, start, StartResult } from \"./connect.ts\";\nexport type {\n Authentication,\n AuthenticationFailure,\n BaseInput,\n CompleteInput,\n Continuation,\n ContinuationStore,\n Failure,\n InteractiveFlow,\n InteractiveStart,\n ExtendInput,\n Method as ConnectionMethod,\n Requirements,\n StartResult as ConnectionStartResult,\n} from \"./connect.ts\";\n","export * as Auth from \"./auth.ts\";\nexport * as Client from \"./client.ts\";\n\nexport { discovery, make } from \"./client.ts\";\nexport type {\n Account,\n AccountContext,\n Fetch,\n Interface,\n ListZonesInput,\n Options,\n Zone,\n} from \"./client.ts\";\n","import packageJson from \"../package.json\" with { type: \"json\" };\n\n/** The current package version from the package manifest. */\nexport const VERSION = packageJson.version;\n\nexport * as Connection from \"./auth/connection-api.ts\";\nexport * as AuthorizationLifecycle from \"./auth/lifecycle-repository.ts\";\nexport * as Diagnostic from \"./auth/diagnostic.ts\";\nexport * as ProviderAuth from \"./auth/manifest.ts\";\nexport * as ProviderAuthorization from \"./auth/authorization.ts\";\nexport * as ProviderContext from \"./auth/provider-context.ts\";\nexport * as Secret from \"./auth/secret.ts\";\nexport * as ProviderDiscovery from \"./discovery/selection.ts\";\nexport * as ZoneDiscovery from \"./discovery/zone-discovery.ts\";\nexport * as Zones from \"./discovery/zones.ts\";\nexport * as DnsRecord from \"./domain/dns-record.ts\";\nexport * as DomainName from \"./domain/domain-name.ts\";\nexport * as InvalidInput from \"./invalid-input.ts\";\nexport * as DnsProvider from \"./provider/provider.ts\";\nexport * as ConnectionAuthorization from \"./plan/connection-authorization.ts\";\nexport * as Digest from \"./plan/canonical-json.ts\";\nexport * as Deletion from \"./plan/deletion.ts\";\nexport * as Provisioning from \"./plan/plan.ts\";\nexport * as DnsPlan from \"./plan/types.ts\";\nexport * as Cloudflare from \"./providers/cloudflare/index.ts\";\nexport * as Vercel from \"./providers/vercel/index.ts\";\nexport * as CloudflareDnsOverHttps from \"./verification/cloudflare-doh.ts\";\nexport * as DnsData from \"./verification/dns-data.ts\";\nexport * as DnsOverHttps from \"./verification/doh.ts\";\nexport * as GoogleDnsOverHttps from \"./verification/google-doh.ts\";\nexport * as DnsResolverPool from \"./verification/resolver-pool.ts\";\nexport * as DnsResolver from \"./verification/resolver.ts\";\nexport * as Verification from \"./verification/verify.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGGA,MAAa,UAAUA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as Envelope, Ft as DomainName, S as Codec, ct as Value, et as Manifest, ft as Error, g as Method, it as OAuthSubjectResolver, m as InteractiveFlow, nt as OAuthClientConfiguration, ot as TokenValidation, pt as Interface$1, r as Source, rt as OAuthMethod, zt as Error$1 } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
2
|
import { Effect, Schema } from "effect";
|
|
3
3
|
import * as oauth from "oauth4webapi";
|
|
4
4
|
//#region src/providers/cloudflare/protocol.d.ts
|
|
@@ -156,4 +156,4 @@ declare namespace index_d_exports {
|
|
|
156
156
|
}
|
|
157
157
|
//#endregion
|
|
158
158
|
export { Zone as _, SubjectResolverOptions as a, make as b, auth_d_exports as c, tokenMethod as d, Account as f, Options as g, ListZonesInput as h, OAuthMethodOptions as i, manifest as l, Interface as m, CredentialTarget as n, TokenConnectionOptions as o, Fetch as p, OAuthFlowOptions as r, TokenValidatorOptions as s, index_d_exports as t, oauthMethod as u, client_d_exports as v, discovery as y };
|
|
159
|
-
//# sourceMappingURL=index-
|
|
159
|
+
//# sourceMappingURL=index-BHWRTThN.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as IntegrationMethod, C as Envelope, Ft as DomainName, H as Capability, S as Codec, ct as Value, et as Manifest, ft as Error, g as Method, m as InteractiveFlow, ot as TokenValidation, pt as Interface$1, r as Source, zt as Error$1 } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
2
|
import { Effect, Schema } from "effect";
|
|
3
3
|
declare namespace client_d_exports {
|
|
4
4
|
export { Account, AccountContext, Fetch, Interface, ListZonesInput, Options, Zone, discovery, make };
|
|
@@ -142,4 +142,4 @@ declare namespace index_d_exports {
|
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
export { Zone as _, IntegrationMethodOptions as a, make as b, integrationMethod as c, Account as d, AccountContext as f, Options as g, ListZonesInput as h, IntegrationFlowOptions as i, manifest as l, Interface as m, ExchangeCodeOptions as n, TokenConnectionOptions as o, Fetch as p, IntegrationCredential as r, auth_d_exports as s, index_d_exports as t, tokenMethod as u, client_d_exports as v, discovery as y };
|
|
145
|
-
//# sourceMappingURL=index-
|
|
145
|
+
//# sourceMappingURL=index-D3PVknwE.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as Source, i as authorization_lifecycle_d_exports, o as zone_discovery_d_exports, r as connection_d_exports } from "./connection-
|
|
3
|
-
import { n as cloudflare_d_exports } from "./cloudflare-
|
|
4
|
-
import { _ as selection_d_exports, c as Policy, f as Options$3, g as zones_d_exports, i as Result, m as Options$4, n as PublicDns$1, o as DefaultOptions, r as PublicDnsObservation, s as Observation, t as ProviderObservation, u as Options$5, v as diagnostic_d_exports } from "./verify-
|
|
5
|
-
import { A as renderManualInstructions$1, C as DiscoverCreateInput$1, E as ResolvedCreateResult, F as PlanAuthorization, I as Receipt, L as Schema$5, M as Authorization, N as DnsPlan, O as Target, P as Operation, R as encode$1, S as CreateResult$1, _ as Receipt$1, d as Authorization$1, f as CreateError, g as Plan, h as PartialError, j as ApplyReceipt, m as Operation$1, n as AsyncInterface$1, o as Query, p as Error, r as AsyncResolution, t as Answer, u as ApplyError, w as ExactCreateInput$1, z as encodeReceipt } from "./resolver-
|
|
6
|
-
import { i as vercel_d_exports } from "./vercel-
|
|
1
|
+
import { At as Type, Bt as invalid_input_d_exports, Ct as Ns, Dt as Schema$3, Et as RequirementMetadata, Ft as DomainName, G as EvidenceSchema, H as Capability, It as Schema$4, K as ProviderAuthorization, M as Connection, Nt as equals, Ot as Srv, Pt as parse, Q as AsyncOAuthSubjectResolver, Rt as parse$1, St as Mx, Tt as Opaque, U as CapabilityEvidence, W as Evidence, Y as encode, _t as Aaaa, at as Schema$1, bt as DnsRecord, dt as CreateResult, et as Manifest, gt as A, jt as data, kt as Txt, lt as secret_d_exports, nt as OAuthClientConfiguration, ot as TokenValidation, q as Schema$2, rt as OAuthMethod, tt as Method, ut as AsyncInterface, vt as Caa, w as provider_context_d_exports, wt as Observed, xt as Encoded, yt as Cname } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
|
+
import { a as Source, i as authorization_lifecycle_d_exports, o as zone_discovery_d_exports, r as connection_d_exports } from "./connection-BfkloPZy.mjs";
|
|
3
|
+
import { n as cloudflare_d_exports } from "./cloudflare-BrZPU9li.mjs";
|
|
4
|
+
import { _ as selection_d_exports, c as Policy, f as Options$3, g as zones_d_exports, i as Result, m as Options$4, n as PublicDns$1, o as DefaultOptions, r as PublicDnsObservation, s as Observation, t as ProviderObservation, u as Options$5, v as diagnostic_d_exports } from "./verify-Dls29YC-.mjs";
|
|
5
|
+
import { A as renderManualInstructions$1, C as DiscoverCreateInput$1, E as ResolvedCreateResult, F as PlanAuthorization, I as Receipt, L as Schema$5, M as Authorization, N as DnsPlan, O as Target, P as Operation, R as encode$1, S as CreateResult$1, _ as Receipt$1, d as Authorization$1, f as CreateError, g as Plan, h as PartialError, j as ApplyReceipt, m as Operation$1, n as AsyncInterface$1, o as Query, p as Error, r as AsyncResolution, t as Answer, u as ApplyError, w as ExactCreateInput$1, z as encodeReceipt } from "./resolver-Dc0hwV-J.mjs";
|
|
6
|
+
import { i as vercel_d_exports } from "./vercel-BsNDu4Np.mjs";
|
|
7
7
|
import { Data } from "effect";
|
|
8
8
|
declare namespace dns_provider_d_exports {
|
|
9
9
|
export { CreateResult, AsyncInterface as Interface };
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import { A as invalid_input_exports, O as parse$1, S as layerFromAsync, T as Schema$2, _ as equals, a as Mx, b as Service, c as Opaque, d as Srv, f as Txt, i as Cname, l as RequirementMetadata, m as data, n as Aaaa, o as Ns, p as Type, r as Caa, s as Observed, t as A, u as Schema$1, v as parse, y as Error } from "./dns-record-BLeqo56C.mjs";
|
|
3
|
-
import { a as Schema$3, c as encode, d as provider_context_exports, i as EvidenceSchema, m as secret_exports, n as CapabilityEvidence, r as Evidence, s as decode$3, t as Capability } from "./authorization-
|
|
3
|
+
import { a as Schema$3, c as encode, d as provider_context_exports, i as EvidenceSchema, m as secret_exports, n as CapabilityEvidence, r as Evidence, s as decode$3, t as Capability } from "./authorization-OeaSR47S.mjs";
|
|
4
4
|
import { n as zones_exports } from "./zones-DKHTpX9C.mjs";
|
|
5
5
|
import { i as webCryptoLayer } from "./canonical-json-CpvqGMcr.mjs";
|
|
6
|
-
import { i as authorization_lifecycle_exports, t as connection_exports } from "./connection-
|
|
7
|
-
import { t as cloudflare_exports } from "./cloudflare-
|
|
8
|
-
import { C as selection_exports, E as decode$4, O as diagnostic_exports, T as Schema$4, _ as toAsync$1, a as Result, c as Observation, d as defaultMake$1, f as make$4, h as toAsync$3, i as PublicDnsObservation, k as version, l as Policy, n as ProviderObservation, o as observe$1, r as PublicDns$1, t as Provider$1, u as Service$1, w as Method, x as authorize$2, y as toAsync$2 } from "./verify-
|
|
6
|
+
import { i as authorization_lifecycle_exports, t as connection_exports } from "./connection-BwtOwpH6.mjs";
|
|
7
|
+
import { t as cloudflare_exports } from "./cloudflare-CGmasR8A.mjs";
|
|
8
|
+
import { C as selection_exports, E as decode$4, O as diagnostic_exports, T as Schema$4, _ as toAsync$1, a as Result, c as Observation, d as defaultMake$1, f as make$4, h as toAsync$3, i as PublicDnsObservation, k as version, l as Policy, n as ProviderObservation, o as observe$1, r as PublicDns$1, t as Provider$1, u as Service$1, w as Method, x as authorize$2, y as toAsync$2 } from "./verify-BKbvq7IN.mjs";
|
|
9
9
|
import { A as decodeReceipt$1, D as Receipt, E as Operation, F as Service$2, I as make$5, M as encodeReceipt, O as Schema$5, P as Candidate, S as create$3, T as Authorization, a as Authorization$1, b as apply$3, c as PartialError, d as apply$2, f as authorize$3, g as CreateResult, j as encode$1, k as decode$5, l as Plan, o as Error$1, p as create$2, s as Operation$1, t as Error$2, u as Receipt$1, w as renderManualInstructions$1, x as authorize$4, y as Target } from "./resolver-CxE-VDw4.mjs";
|
|
10
|
-
import { r as vercel_exports } from "./vercel-
|
|
10
|
+
import { r as vercel_exports } from "./vercel-CfoJaaCu.mjs";
|
|
11
11
|
import { Data, Effect, Layer } from "effect";
|
|
12
12
|
//#region src/promise/provider-auth.ts
|
|
13
13
|
var provider_auth_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as Type, Ft as DomainName, X as CryptoError, bt as DnsRecord, ft as Error$3, mt as Service$1, n as Service$2, t as Candidate, xt as Encoded, zt as Error$2 } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
2
|
import { Cause, Context, Crypto, Data, Effect, Layer, Schema } from "effect";
|
|
3
3
|
declare namespace types_d_exports {
|
|
4
4
|
export { ApplyReceipt, Authorization$1 as Authorization, DnsPlan, Operation$1 as Operation, PlanAuthorization, Receipt$1 as Receipt, Schema$1 as Schema, decode, decodeReceipt, encode, encodeReceipt };
|
|
@@ -840,6 +840,11 @@ declare const decode: (input: unknown) => Effect.Effect<{
|
|
|
840
840
|
readonly operations: readonly ({
|
|
841
841
|
readonly _tag: "conflict";
|
|
842
842
|
readonly existing: readonly ({
|
|
843
|
+
readonly _tag: "Opaque";
|
|
844
|
+
readonly name: string;
|
|
845
|
+
readonly providerRecordId: string | null;
|
|
846
|
+
readonly providerType: string;
|
|
847
|
+
} | {
|
|
843
848
|
readonly _tag: "A";
|
|
844
849
|
readonly metadata: {
|
|
845
850
|
readonly ownership: string;
|
|
@@ -933,11 +938,6 @@ declare const decode: (input: unknown) => Effect.Effect<{
|
|
|
933
938
|
readonly policy: "append" | "exclusive";
|
|
934
939
|
readonly ttl: number | null;
|
|
935
940
|
readonly value: string;
|
|
936
|
-
} | {
|
|
937
|
-
readonly _tag: "Opaque";
|
|
938
|
-
readonly name: string;
|
|
939
|
-
readonly providerRecordId: string | null;
|
|
940
|
-
readonly providerType: string;
|
|
941
941
|
})[];
|
|
942
942
|
readonly id: string;
|
|
943
943
|
readonly reason: string;
|
|
@@ -1243,6 +1243,11 @@ declare const encode: (input: {
|
|
|
1243
1243
|
readonly operations: readonly ({
|
|
1244
1244
|
readonly _tag: "conflict";
|
|
1245
1245
|
readonly existing: readonly ({
|
|
1246
|
+
readonly _tag: "Opaque";
|
|
1247
|
+
readonly name: string;
|
|
1248
|
+
readonly providerRecordId: string | null;
|
|
1249
|
+
readonly providerType: string;
|
|
1250
|
+
} | {
|
|
1246
1251
|
readonly _tag: "A";
|
|
1247
1252
|
readonly metadata: {
|
|
1248
1253
|
readonly ownership: string;
|
|
@@ -1336,11 +1341,6 @@ declare const encode: (input: {
|
|
|
1336
1341
|
readonly policy: "append" | "exclusive";
|
|
1337
1342
|
readonly ttl: number | null;
|
|
1338
1343
|
readonly value: string;
|
|
1339
|
-
} | {
|
|
1340
|
-
readonly _tag: "Opaque";
|
|
1341
|
-
readonly name: string;
|
|
1342
|
-
readonly providerRecordId: string | null;
|
|
1343
|
-
readonly providerType: string;
|
|
1344
1344
|
})[];
|
|
1345
1345
|
readonly id: string;
|
|
1346
1346
|
readonly reason: string;
|
|
@@ -2741,4 +2741,4 @@ declare const layerFromAsync: (resolver: AsyncInterface) => Layer.Layer<Service>
|
|
|
2741
2741
|
declare const toAsync: (resolver: Interface) => AsyncInterface;
|
|
2742
2742
|
//#endregion
|
|
2743
2743
|
export { renderManualInstructions as A, types_d_exports as B, DiscoverCreateInput as C, StaleError as D, ResolvedCreateResult as E, PlanAuthorization as F, Receipt$1 as I, Schema$1 as L, Authorization$1 as M, DnsPlan as N, Target as O, Operation$1 as P, encode as R, CreateResult as S, PartialApplyError as T, Receipt as _, Interface as a, AuthorizeError as b, Service as c, Authorization as d, CreateError as f, Plan as g, PartialError as h, Error as i, ApplyReceipt as j, plan_d_exports as k, resolver_d_exports as l, Operation as m, AsyncInterface as n, Query as o, Error$1 as p, AsyncResolution as r, Resolution as s, Answer as t, ApplyError as u, deletion_d_exports as v, ExactCreateInput as w, ConflictError as x, AuthorizationError as y, encodeReceipt as z };
|
|
2744
|
-
//# sourceMappingURL=resolver-
|
|
2744
|
+
//# sourceMappingURL=resolver-Dc0hwV-J.d.mts.map
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as StaleError, T as PartialApplyError, a as Interface$2, c as Service$2, h as PartialError, i as Error$4, j as ApplyReceipt, n as AsyncInterface$1, o as Query, p as Error$5, s as Resolution, x as ConflictError, y as AuthorizationError } from "./resolver-
|
|
1
|
+
import { D as Error$1, Ft as DomainName, O as Interface, T as Aggregate, X as CryptoError, ft as Error$2, k as Service, mt as Service$1, pt as Interface$1, u as ContinuationStore, ut as AsyncInterface, wt as Observed, zt as Error$3 } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
|
+
import { D as StaleError, T as PartialApplyError, a as Interface$2, c as Service$2, h as PartialError, i as Error$4, j as ApplyReceipt, n as AsyncInterface$1, o as Query, p as Error$5, s as Resolution, x as ConflictError, y as AuthorizationError } from "./resolver-Dc0hwV-J.mjs";
|
|
3
3
|
import { Effect, Layer, Schema } from "effect";
|
|
4
4
|
declare namespace in_memory_lifecycle_repository_d_exports {
|
|
5
5
|
export { Options$1 as Options, layer$2 as layer, make$3 as make };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as Source, n as Method, t as InteractiveFlow } from "./connection-
|
|
3
|
-
import { _ as Zone, a as IntegrationMethodOptions, c as integrationMethod$1, d as Account, f as AccountContext, g as Options, h as ListZonesInput, i as IntegrationFlowOptions, l as manifest$1, n as ExchangeCodeOptions, o as TokenConnectionOptions, p as Fetch, r as IntegrationCredential, u as tokenMethod$1 } from "./index-
|
|
1
|
+
import { ot as TokenValidation, ut as AsyncInterface } from "./zone-discovery-BPnH3sLU.mjs";
|
|
2
|
+
import { a as Source, n as Method, t as InteractiveFlow } from "./connection-BfkloPZy.mjs";
|
|
3
|
+
import { _ as Zone, a as IntegrationMethodOptions, c as integrationMethod$1, d as Account, f as AccountContext, g as Options, h as ListZonesInput, i as IntegrationFlowOptions, l as manifest$1, n as ExchangeCodeOptions, o as TokenConnectionOptions, p as Fetch, r as IntegrationCredential, u as tokenMethod$1 } from "./index-D3PVknwE.mjs";
|
|
4
4
|
declare namespace vercel_auth_d_exports {
|
|
5
5
|
export { ExchangeCodeOptions, IntegrationCredential, IntegrationFlowOptions, IntegrationMethodOptions, exchangeCode, integrationFlow, integrationMethod, manifest, tokenConnectionMethod, tokenMethod };
|
|
6
6
|
}
|
|
@@ -28,4 +28,4 @@ declare function make(options: Options): Interface;
|
|
|
28
28
|
declare function discovery(options: Options): Source;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { vercel_auth_d_exports as a, vercel_d_exports as i, discovery as n, make as r, Interface as t };
|
|
31
|
-
//# sourceMappingURL=vercel-
|
|
31
|
+
//# sourceMappingURL=vercel-BsNDu4Np.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { n as fromEffectFlow, r as fromEffectTokenMethod } from "./connection-
|
|
3
|
-
import { a as manifest$1, i as integrationMethod$1, n as exchangeCode$1, o as tokenConnectionMethod$1, r as integrationFlow$1, s as tokenMethod$1, u as make$1 } from "./auth-
|
|
2
|
+
import { n as fromEffectFlow, r as fromEffectTokenMethod } from "./connection-BwtOwpH6.mjs";
|
|
3
|
+
import { a as manifest$1, i as integrationMethod$1, n as exchangeCode$1, o as tokenConnectionMethod$1, r as integrationFlow$1, s as tokenMethod$1, u as make$1 } from "./auth-g-waCHcz.mjs";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
//#region src/promise/vercel-auth.ts
|
|
6
6
|
var vercel_auth_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -57,4 +57,4 @@ function discovery(options) {
|
|
|
57
57
|
//#endregion
|
|
58
58
|
export { vercel_auth_exports as i, make as n, vercel_exports as r, discovery as t };
|
|
59
59
|
|
|
60
|
-
//# sourceMappingURL=vercel-
|
|
60
|
+
//# sourceMappingURL=vercel-CfoJaaCu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel-
|
|
1
|
+
{"version":3,"file":"vercel-CfoJaaCu.mjs","names":["EffectAuth.integrationMethod","EffectAuth.manifest","EffectAuth.tokenMethod","EffectAuth.exchangeCode","Connection.fromEffectFlow","EffectAuth.integrationFlow","Connection.fromEffectTokenMethod","EffectAuth.tokenConnectionMethod","Vercel.make"],"sources":["../src/promise/vercel-auth.ts","../src/promise/vercel.ts"],"sourcesContent":["import { Effect } from \"effect\";\n\nimport * as EffectAuth from \"../providers/vercel/auth.ts\";\nimport * as Connection from \"./connection.ts\";\n\nexport const integrationMethod = EffectAuth.integrationMethod;\nexport const manifest = EffectAuth.manifest;\nexport const tokenMethod = EffectAuth.tokenMethod;\nexport type {\n ExchangeCodeOptions,\n IntegrationCredential,\n IntegrationFlowOptions,\n IntegrationMethodOptions,\n} from \"../providers/vercel/auth.ts\";\n\nexport function exchangeCode(\n options: EffectAuth.ExchangeCodeOptions,\n): Promise<EffectAuth.IntegrationCredential> {\n return Effect.runPromise(EffectAuth.exchangeCode(options));\n}\n\n/** Creates Vercel Integration's implementation for the Promise connection facade. */\nexport function integrationFlow(\n options: EffectAuth.IntegrationFlowOptions,\n): Connection.InteractiveFlow {\n return Connection.fromEffectFlow(EffectAuth.integrationFlow(options));\n}\n\n/** Creates a Vercel token method for the Promise connection facade. */\nexport function tokenConnectionMethod(\n options: EffectAuth.TokenConnectionOptions,\n): Extract<Connection.Method, { readonly _tag: \"Token\" }> {\n return Connection.fromEffectTokenMethod(EffectAuth.tokenConnectionMethod(options));\n}\n","import { Effect } from \"effect\";\n\nimport type * as ProviderAuth from \"../auth/manifest.ts\";\nimport type * as DnsProvider from \"../provider/provider.ts\";\nimport * as Vercel from \"../providers/vercel/index.ts\";\nimport type * as ZoneDiscovery from \"./zone-discovery.ts\";\n\nexport * as Auth from \"./vercel-auth.ts\";\nexport type {\n Account,\n AccountContext,\n Fetch,\n ListZonesInput,\n Options,\n Zone,\n} from \"../providers/vercel/client.ts\";\n\nexport interface Interface extends DnsProvider.AsyncInterface {\n readonly listAccounts: () => Promise<ReadonlyArray<Vercel.Account>>;\n readonly listZones: (input?: Vercel.Client.ListZonesInput) => Promise<ReadonlyArray<Vercel.Zone>>;\n readonly validateToken: () => Promise<ProviderAuth.TokenValidation>;\n}\n\n/** Creates a Promise-compatible facade over the Effect-native Vercel client. */\nexport function make(options: Vercel.Client.Options): Interface {\n const client = Vercel.make(options);\n return {\n id: client.id,\n createRecord: (zone, record) => Effect.runPromise(client.createRecord(zone, record)),\n deleteRecord: (zone, providerRecordId) =>\n Effect.runPromise(client.deleteRecord(zone, providerRecordId)),\n getRecord: (zone, providerRecordId) =>\n Effect.runPromise(client.getRecord(zone, providerRecordId)),\n listAccounts: () => Effect.runPromise(client.listAccounts()),\n listRecords: (zone) => Effect.runPromise(client.listRecords(zone)),\n listZones: (input) => Effect.runPromise(client.listZones(input)),\n validateToken: () => Effect.runPromise(client.validateToken()),\n };\n}\n\n/** Creates the optional Vercel discovery source for Promise consumers. */\nexport function discovery(options: Vercel.Client.Options): ZoneDiscovery.Source {\n const client = make(options);\n return {\n listZones: (name) => client.listZones({ name }),\n provider: client,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAKA,MAAa,oBAAoBA;AACjC,MAAa,WAAWC;AACxB,MAAa,cAAcC;AAQ3B,SAAgB,aACd,SAC2C;CAC3C,OAAO,OAAO,WAAWC,eAAwB,OAAO,CAAC;AAC3D;;AAGA,SAAgB,gBACd,SAC4B;CAC5B,OAAOC,eAA0BC,kBAA2B,OAAO,CAAC;AACtE;;AAGA,SAAgB,sBACd,SACwD;CACxD,OAAOC,sBAAiCC,wBAAiC,OAAO,CAAC;AACnF;;;;;;;;;ACTA,SAAgB,KAAK,SAA2C;CAC9D,MAAM,SAASC,OAAY,OAAO;CAClC,OAAO;EACL,IAAI,OAAO;EACX,eAAe,MAAM,WAAW,OAAO,WAAW,OAAO,aAAa,MAAM,MAAM,CAAC;EACnF,eAAe,MAAM,qBACnB,OAAO,WAAW,OAAO,aAAa,MAAM,gBAAgB,CAAC;EAC/D,YAAY,MAAM,qBAChB,OAAO,WAAW,OAAO,UAAU,MAAM,gBAAgB,CAAC;EAC5D,oBAAoB,OAAO,WAAW,OAAO,aAAa,CAAC;EAC3D,cAAc,SAAS,OAAO,WAAW,OAAO,YAAY,IAAI,CAAC;EACjE,YAAY,UAAU,OAAO,WAAW,OAAO,UAAU,KAAK,CAAC;EAC/D,qBAAqB,OAAO,WAAW,OAAO,cAAc,CAAC;CAC/D;AACF;;AAGA,SAAgB,UAAU,SAAsD;CAC9E,MAAM,SAAS,KAAK,OAAO;CAC3B,OAAO;EACL,YAAY,SAAS,OAAO,UAAU,EAAE,KAAK,CAAC;EAC9C,UAAU;CACZ;AACF"}
|
package/dist/vercel.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as Zone, d as Account, f as AccountContext, g as Options, h as ListZonesInput, p as Fetch } from "./index-
|
|
2
|
-
import { a as vercel_auth_d_exports, n as discovery, r as make, t as Interface } from "./vercel-
|
|
1
|
+
import { _ as Zone, d as Account, f as AccountContext, g as Options, h as ListZonesInput, p as Fetch } from "./index-D3PVknwE.mjs";
|
|
2
|
+
import { a as vercel_auth_d_exports, n as discovery, r as make, t as Interface } from "./vercel-BsNDu4Np.mjs";
|
|
3
3
|
export { type Account, type AccountContext, vercel_auth_d_exports as Auth, type Fetch, Interface, type ListZonesInput, type Options, type Zone, discovery, make };
|
package/dist/vercel.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as vercel_auth_exports, n as make, t as discovery } from "./vercel-
|
|
1
|
+
import { i as vercel_auth_exports, n as make, t as discovery } from "./vercel-CfoJaaCu.mjs";
|
|
2
2
|
export { vercel_auth_exports as Auth, discovery, make };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
2
|
import { E as decode$1, O as parse$1, T as Schema$2, _ as equals, b as Service$1, k as Error$1, m as data } from "./dns-record-BLeqo56C.mjs";
|
|
3
3
|
import { t as candidates } from "./zones-DKHTpX9C.mjs";
|
|
4
|
-
import { a as authorizationError, i as assertGrant, t as AuthorizationError } from "./connection-
|
|
4
|
+
import { a as authorizationError, i as assertGrant, t as AuthorizationError } from "./connection-CjNQe_E-.mjs";
|
|
5
5
|
import { i as toAsync$3, n as Service$2, t as Error$2, x as authorize$1 } from "./resolver-CxE-VDw4.mjs";
|
|
6
6
|
import { Context, Data, Effect, Layer, Option, Schema, SchemaIssue, SchemaTransformation } from "effect";
|
|
7
7
|
import * as DnsPacket from "@leichtgewicht/dns-packet";
|
|
8
8
|
//#region package.json
|
|
9
|
-
var version = "0.2.
|
|
9
|
+
var version = "0.2.2";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/auth/diagnostic.ts
|
|
12
12
|
var diagnostic_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -639,4 +639,4 @@ function recordValue(requirement) {
|
|
|
639
639
|
//#endregion
|
|
640
640
|
export { selection_exports as C, manifest_exports as D, decode as E, diagnostic_exports as O, connection_authorization_exports as S, Schema$1 as T, toAsync$1 as _, Result as a, dns_data_exports as b, Observation as c, defaultMake as d, make as f, cloudflare_doh_exports as g, toAsync as h, PublicDnsObservation as i, version as k, Policy as l, google_doh_exports as m, ProviderObservation as n, observe as o, resolver_pool_exports as p, PublicDns as r, verify_exports as s, Provider as t, Service as u, doh_exports as v, Method as w, authorize as x, toAsync$2 as y };
|
|
641
641
|
|
|
642
|
-
//# sourceMappingURL=verify-
|
|
642
|
+
//# sourceMappingURL=verify-BKbvq7IN.mjs.map
|