@distilled.cloud/acme 1.0.0-rc.19 → 1.0.0-rc.20
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/lib/_bundle/sdk.js +1 -1
- package/lib/_chunks/{_distilled-core_errors-CS3jP5s-.js → _distilled-core_errors-Cr8-AbeO.js} +1 -1
- package/lib/errors.d.ts +4 -3
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/protocol.js +1 -1
- package/package.json +2 -2
- package/src/errors.ts +2 -3
package/lib/_bundle/sdk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e}from"../_chunks/_distilled-core_errors-
|
|
1
|
+
import{i as e}from"../_chunks/_distilled-core_errors-Cr8-AbeO.js";import{config$Redacted as t,config$String as n,config$all as r,config$option as i,config$withDefault as a}from"@distilled.cloud/core/_bundle/base";import*as o from"effect/Context";import*as s from"effect/Effect";import*as c from"effect/Layer";import*as l from"effect/Option";import"effect/Redacted";var u=Object.defineProperty;var __exportAll=(e,t)=>{let n={};for(var r in e){u(n,r,{get:e[r],enumerable:true})}if(!t){u(n,Symbol.toStringTag,{value:`Module`})}return n};const d={LetsEncrypt:`https://acme-v02.api.letsencrypt.org/directory`,LetsEncryptStaging:`https://acme-staging-v02.api.letsencrypt.org/directory`,ZeroSSL:`https://acme.zerossl.com/v2/DV90`,GoogleTrustServices:`https://dv.acme-v02.api.pki.goog/directory`,GoogleTrustServicesStaging:`https://dv.acme-v02.test-api.pki.goog/directory`};var Credentials=class extends (/*@__PURE__*/ o.Service()(`AcmeCredentials`)){};const f=/*@__PURE__*/ c.succeed(Credentials,/*@__PURE__*/ r({directoryUrl:/*@__PURE__*/ n(`ACME_DIRECTORY_URL`).pipe(/*@__PURE__*/ a(d.LetsEncrypt)),accountKey:/*@__PURE__*/ t(`ACME_ACCOUNT_KEY`),accountUrl:/*@__PURE__*/ i(/*@__PURE__*/ n(`ACME_ACCOUNT_URL`)),eabKid:/*@__PURE__*/ i(/*@__PURE__*/ n(`ACME_EAB_KID`)),eabHmac:/*@__PURE__*/ i(/*@__PURE__*/ t(`ACME_EAB_HMAC_KEY`))}).pipe(/*@__PURE__*/ s.mapError(()=>new e({message:`ACME_ACCOUNT_KEY (a private JWK) is required; ACME_DIRECTORY_URL, ACME_ACCOUNT_URL, ACME_EAB_KID and ACME_EAB_HMAC_KEY are optional`})),/*@__PURE__*/ s.map(({directoryUrl:e,accountKey:t,accountUrl:n,eabKid:r,eabHmac:i})=>({directoryUrl:e,accountKey:t,accountUrl:l.getOrUndefined(n),externalAccountBinding:l.isSome(r)&&l.isSome(i)?{keyId:r.value,hmacKey:i.value}:void 0}))));const layer=e=>c.succeed(Credentials,s.isEffect(e)?e:s.succeed(e));export{Credentials as credentials$Credentials,f as credentials$CredentialsFromEnv,d as credentials$Directories,layer as credentials$layer,__exportAll as t};
|
|
2
2
|
//# sourceMappingURL=sdk.js.map
|
package/lib/_chunks/{_distilled-core_errors-CS3jP5s-.js → _distilled-core_errors-Cr8-AbeO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{errors$API_ERRORS as e,errors$BadGateway as t,errors$BadRequest as n,errors$ConfigError as r,errors$Conflict as i,errors$DEFAULT_ERRORS as a,errors$Forbidden as o,errors$GatewayTimeout as s,errors$HTTP_STATUS_MAP as c,errors$InternalServerError as l,errors$Locked as u,errors$NotFound as d,errors$ServiceUnavailable as f,errors$TooManyRequests as p,errors$Unauthorized as m,errors$UnprocessableEntity as
|
|
1
|
+
import{errors$API_ERRORS as e,errors$BadGateway as t,errors$BadRequest as n,errors$ConfigError as r,errors$Conflict as i,errors$DEFAULT_ERRORS as a,errors$Forbidden as o,errors$GatewayTimeout as s,errors$HTTP_STATUS_MAP as c,errors$InternalServerError as l,errors$Locked as u,errors$NotFound as d,errors$ServiceUnavailable as f,errors$TooManyRequests as p,errors$Unauthorized as m,errors$UnknownErrorFields as h,errors$UnprocessableEntity as g}from"@distilled.cloud/core/_bundle/rest";export{g as _,i as a,s as c,u as d,d as f,h as g,m as h,r as i,c as l,p as m,t as n,a as o,f as p,n as r,o as s,e as t,l as u};
|
package/lib/errors.d.ts
CHANGED
|
@@ -12,13 +12,14 @@ export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeou
|
|
|
12
12
|
import type { BadRequest as CoreBadRequest, Conflict as CoreConflict, DefaultErrors as CoreDefaultErrors, Forbidden as CoreForbidden, NotFound as CoreNotFound } from "@distilled.cloud/core/errors";
|
|
13
13
|
import * as Schema from "@distilled.cloud/core/schema-lite-typed";
|
|
14
14
|
declare const UnknownAcmeError_base: Schema.TaggedErrorClass<"UnknownAcmeError", {
|
|
15
|
+
readonly status: import("effect/Schema").Number;
|
|
16
|
+
readonly code: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
17
|
+
readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
18
|
+
readonly body: import("effect/Schema").Unknown;
|
|
15
19
|
/** The problem `type` URN, when the body was a problem document. */
|
|
16
20
|
readonly type: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
17
|
-
readonly message: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
18
|
-
readonly status: import("effect/Schema").optional<import("effect/Schema").Number>;
|
|
19
21
|
readonly detail: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
20
22
|
readonly subproblems: import("effect/Schema").optional<Schema.$Array<import("effect/Schema").Unknown>>;
|
|
21
|
-
readonly body: import("effect/Schema").Unknown;
|
|
22
23
|
}>;
|
|
23
24
|
/**
|
|
24
25
|
* Unknown ACME error -- a problem document whose `type` matches no typed
|
package/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,UAAU,IAAI,cAAc,EAC5B,QAAQ,IAAI,YAAY,EACxB,aAAa,IAAI,iBAAiB,EAClC,SAAS,IAAI,aAAa,EAC1B,QAAQ,IAAI,YAAY,EACzB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EACV,UAAU,IAAI,cAAc,EAC5B,QAAQ,IAAI,YAAY,EACxB,aAAa,IAAI,iBAAiB,EAClC,SAAS,IAAI,aAAa,EAC1B,QAAQ,IAAI,YAAY,EACzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;;;;;;IAU9D,oEAAoE;;;;;AARxE;;;;GAIG;AACH,qBAAa,gBACX,SAAQ,aAAa,CAAC,qBAMpB;CAAG;;;;;;;;;AAEP,kCAAkC;AAClC,qBAAa,cACX,SAAQ,aAAa,CAAC,mBAGU;CAAG;;;;;;;;;AAErC,yEAAyE;AACzE,qBAAa,SACX,SAAQ,aAAa,CAAC,cAGe;CAAG;;;;;;;;;AAE1C;;;GAGG;AACH,qBAAa,wBACX,SAAQ,aAAa,CAAC,6BAGe;CAAG;AAE1C,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG,SAAS,GAAG,wBAAwB,CAAC;AAEpG;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,YAAY,CAAC"}
|
package/lib/errors.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"./_chunks/_distilled-core_errors-Cr8-AbeO.js";import{category$withBadRequestError as _,category$withParseError as v,category$withRetryableError as y,category$withThrottlingError as b,schema_lite_typed$Array as x,schema_lite_typed$String as S,schema_lite_typed$TaggedError as C,schema_lite_typed$Unknown as w,schema_lite_typed$optional as T}from"@distilled.cloud/core/_bundle/base";var UnknownAcmeError=class extends (/*@__PURE__*/ C()(`UnknownAcmeError`,{...a,type:/*@__PURE__*/ T(S),detail:/*@__PURE__*/ T(S),subproblems:/*@__PURE__*/ T(/*@__PURE__*/ x(w))})){};var AcmeParseError=class extends (/*@__PURE__*/ C()(`AcmeParseError`,{body:w,cause:w}).pipe(v)){};var JoseError=class extends (/*@__PURE__*/ C()(`JoseError`,{message:S,cause:/*@__PURE__*/ T(w)}).pipe(_)){};var DirectoryMissingResource=class extends (/*@__PURE__*/ C()(`DirectoryMissingResource`,{resource:S,directoryUrl:S}).pipe(_)){};export{h as API_ERRORS,AcmeParseError,u as BadGateway,p as BadRequest,s as ConfigError,t as Conflict,d as DEFAULT_ERRORS,DirectoryMissingResource,m as Forbidden,n as GatewayTimeout,c as HTTP_STATUS_MAP,g as InternalServerError,JoseError,r as Locked,i as NotFound,f as ServiceUnavailable,l as TooManyRequests,o as Unauthorized,UnknownAcmeError,e as UnprocessableEntity,b as n,y as t};
|
|
2
2
|
//# sourceMappingURL=errors.js.map
|
package/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","names":["Schema.String","Schema.
|
|
1
|
+
{"version":3,"file":"errors.js","names":["Schema.String","Schema.Unknown","Category.withParseError","Category.withBadRequestError","UnprocessableEntity","Conflict","GatewayTimeout","Locked","NotFound","UnknownErrorFields","Unauthorized","ConfigError","HTTP_STATUS_MAP","TooManyRequests","BadGateway","DEFAULT_ERRORS","ServiceUnavailable","BadRequest","Forbidden","API_ERRORS","InternalServerError","withBadRequestError","withParseError","withRetryableError","withThrottlingError","Array","String","TaggedError","Unknown","optional"],"sources":["../src/errors.ts"],"mappings":"ggBA4CA,IAAa,iBAAb,eACwB,gBAAqC,CAAC,CAAC,mBAAoB,CAC/E,GAAGS,EAEH,KAAoB,gBAAgBT,CAAa,EACjD,OAAsB,gBAAgBA,CAAa,EACnD,YAA2B,gBAA8B,gBAAaC,CAAc,CAAC,CACvF,CAAC,EAAA,AAAE,CAAC,EAGN,IAAa,eAAb,eACwB,gBAAmC,CAAC,CAAC,iBAAkB,CAC3E,KAAMA,EACN,MAAOA,CACT,CAAC,CAAC,CAAC,KAAKC,CAAuB,EAAA,AAAE,CAAC,EAGpC,IAAa,UAAb,eACwB,gBAA8B,CAAC,CAAC,YAAa,CACjE,QAASF,EACT,MAAqB,gBAAgBC,CAAc,CACrD,CAAC,CAAC,CAAC,KAAKE,CAA4B,EAAA,AAAE,CAAC,EAMzC,IAAa,yBAAb,eACwB,gBAA6C,CAAC,CAAC,2BAA4B,CAC/F,SAAUH,EACV,aAAcA,CAChB,CAAC,CAAC,CAAC,KAAKG,CAA4B,EAAA,AAAE,CAAC"}
|
package/lib/protocol.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as e,u as t}from"./_chunks/_distilled-core_errors-
|
|
1
|
+
import{l as e,u as t}from"./_chunks/_distilled-core_errors-Cr8-AbeO.js";import{credentials$Credentials as n}from"./_bundle/sdk.js";import{AcmeParseError as r,DirectoryMissingResource as i,JoseError as a,UnknownAcmeError as o}from"./errors.js";import{parseJwk as s,signExternalAccountBinding as c,signRequest as l}from"./jose.js";import{A as u,b as d,h as f,v as p}from"./_chunks/_distilled-core_trait-BRJKEsOV.js";import{api$Protocol as m,api$make as h,response_validation$failUnlessLenient as g,response_validation$isValidating as _,response_validation$validateResponse as v}from"@distilled.cloud/core/_bundle/base";import{protocol_http$getAnn as y,protocol_http$getProps as b,protocol_http$hasPropAnn as x,protocol_http$mapKeys as S,retry_after$parseRetryAfter as C,retry_after$parseRetryAfterForStatus as w}from"@distilled.cloud/core/_bundle/rest";import*as T from"effect/Effect";import*as E from"effect/Layer";import*as D from"effect/Redacted";import*as O from"effect/http/HttpClient";import*as k from"effect/http/HttpClientRequest";import*as A from"effect/Schema";const j=/*@__PURE__*/ A.Struct({newNonce:A.String,newAccount:A.String,newOrder:A.String,revokeCert:A.String,newAuthz:/*@__PURE__*/ A.optional(A.String),keyChange:/*@__PURE__*/ A.optional(A.String),meta:/*@__PURE__*/ A.optional(/*@__PURE__*/ A.Record(A.String,A.Unknown))});const M=/*@__PURE__*/ new Map;const N=/*@__PURE__*/ new Map;const P=/*@__PURE__*/ new WeakMap;const F=/*@__PURE__*/ T.gen(function*(){return yield*yield*n});const fetchDirectory=e=>T.gen(function*(){const t=M.get(e);if(t)return t;const n=yield*(yield*O.HttpClient).get(e);rememberNonce(e,n);if(n.status>=400){const t=yield*n.text;return yield*fail(new o({message:`GET ${e} answered ${n.status}`,status:n.status,body:D.make(t)}))}const r=yield*n.text;const i=yield*parseJson(r);const a=yield*A.decodeUnknownEffect(j)(i).pipe(T.mapError(()=>parseError(`Invalid ACME directory response`)));M.set(e,a);return a});const rememberNonce=(e,t)=>{const n=t.headers[`replay-nonce`];if(typeof n===`string`&&n.length>0)N.set(e,n)};const takeNonce=(e,t)=>T.gen(function*(){const n=N.get(e);if(n!==void 0){N.delete(e);return n}const r=yield*(yield*O.HttpClient).execute(k.head(t.newNonce));const i=r.headers[`replay-nonce`];if(typeof i!==`string`||i.length===0)return yield*fail(new o({message:`HEAD ${t.newNonce} returned no Replay-Nonce header`,status:r.status,body:void 0}));return i});const I={"/directory":`GetDirectory`,"/newNonce":`NewNonce`,"/newAccount":`NewAccount`,"/account/{url}":`UpdateAccount`,"/newOrder":`NewOrder`,"/order/{url}":`GetOrder`,"/finalize/{url}":`FinalizeOrder`,"/authz/{url}":`GetAuthorization`,"/authz/{url}/deactivate":`DeactivateAuthorization`,"/challenge/{url}":`RespondChallenge`,"/cert/{url}":`DownloadCertificate`,"/revokeCert":`RevokeCertificate`};const operationOf=e=>{const t=y(e,p);return I[t?.uri??``]??``};const L={NewNonce:`newNonce`,NewAccount:`newAccount`,NewOrder:`newOrder`,RevokeCertificate:`revokeCert`};const R=/*@__PURE__*/ new Set([`GetOrder`,`GetAuthorization`,`DownloadCertificate`]);const z=`application/json, application/pem-certificate-chain`;const encode=({input:e,inputAst:t})=>T.gen(function*(){const n=yield*F;const r=operationOf(t);if(r===``)return yield*fail(new a({message:"The operation's input carries no known ACME `T.Http` uri."}));if(r===`GetDirectory`)return k.get(n.directoryUrl).pipe(k.setHeader(`Accept`,`application/json`));const o=yield*fetchDirectory(n.directoryUrl);if(r===`NewNonce`)return k.head(o.newNonce);const l=u(e)??{};const f=L[r];let p;if(f!==void 0){const e=o[f];if(typeof e!==`string`)return yield*fail(new i({resource:f,directoryUrl:n.directoryUrl}));p=e}else{const e=b(t).find(e=>x(e,d));const n=e?l[String(e.name)]:void 0;if(typeof n!==`string`)return yield*fail(new a({message:`${r} needs the resource URL the CA returned (\`url\`).`}));p=n}let m;if(!R.has(r)){const e={};for(const n of b(t)){if(x(n,d))continue;const t=String(n.name);if(l[t]!==void 0)e[t]=l[t]}m=e}const h=yield*s(n.accountKey);const g=r===`NewAccount`||n.accountUrl===void 0;if(r===`NewAccount`&&n.externalAccountBinding!==void 0&&m.externalAccountBinding===void 0)m.externalAccountBinding=yield*c({jwk:h,url:p,keyId:n.externalAccountBinding.keyId,hmacKey:n.externalAccountBinding.hmacKey});const _=yield*takeNonce(n.directoryUrl,o);const v={jwk:h,url:p,kid:g?void 0:n.accountUrl,payload:m,directoryUrl:n.directoryUrl};const y=yield*signedRequest(v,_);P.set(y.body,v);return y});const signedRequest=(e,t)=>T.gen(function*(){const n=yield*l({...e,nonce:t});return k.post(e.url).pipe(k.setHeader(`Accept`,z),k.bodyText(JSON.stringify(n),`application/jose+json`))});const isProblem=e=>isObject(e)&&typeof e.type===`string`;const matchProblem=(e,t,n,r)=>{const i=n.type??``;let a;for(const n of e){const e=f(n);if(!e)continue;for(const r of e){if(r.status!==void 0&&r.status!==t)continue;if(r.code!==void 0&&r.code!==t)continue;const e=r.message;let o=false;if(e===void 0)o=true;else if(typeof e===`string`)o=e===i;else if(e.matches!==void 0)o=new RegExp(e.matches).test(i);else if(e.includes!==void 0)o=i.includes(e.includes);if(!o)continue;const s=(r.status!==void 0?1:0)+(e!==void 0?2:0);if(!a||s>a.specificity)a={cls:n,specificity:s}}}if(!a)return void 0;return new a.cls({code:t,message:n.detail??i,type:i,detail:n.detail,subproblems:n.subproblems,...i===`urn:ietf:params:acme:error:rateLimited`?{retryAfter:C(r)}:{}})};const parseLinkAlternates=e=>{if(!e)return[];const t=[];for(const n of e.split(`,`)){const e=n.match(/<([^>]+)>\s*;\s*rel="?alternate"?/);if(e)t.push(e[1])}return t};const decode=({response:n,outputAst:r,errors:i})=>T.gen(function*(){const a=P.get(n.request.body);P.delete(n.request.body);const s=a?.directoryUrl??(yield*F).directoryUrl;for(let c=0;;c++){const l=n.headers;const u=n.status;const d=n.request.method===`HEAD`;const f=(l[`content-type`]??``).includes(`pem-certificate-chain`);const p=d?``:yield*n.text;const m=d||f&&u<400?void 0:yield*parseJson(p).pipe(T.catchTag(`AcmeParseError`,e=>u>=400?T.succeed(void 0):g(e,p)));const h=u>=400&&isProblem(m)?m:void 0;if(h?.type===`urn:ietf:params:acme:error:badNonce`){const e=l[`replay-nonce`];if(a&&e&&c<2){n=yield*(yield*O.HttpClient).execute(yield*signedRequest(a,e));continue}}else rememberNonce(s,n);if(u>=400){if(h){const e=matchProblem(i,u,h,l);if(e!==void 0)return yield*fail(e);return yield*fail(new o({type:h.type,detail:h.detail,subproblems:h.subproblems,message:h.detail??h.type,status:u,body:D.make(m)}))}const n=`HTTP ${u}`;const r=e[u];if(r)return yield*fail(new r({message:n,retryAfter:w(u,l)}));if(u>=500)return yield*fail(new t({message:n,retryAfter:w(u,l)}));return yield*fail(new o({message:n,status:u,body:D.make(m??p)}))}let y;if(d)y={replayNonce:l[`replay-nonce`]||void 0};else if(f)y={chain:p,alternates:parseLinkAlternates(l[`link`])};else if(isObject(m)){y=m;const e=l[`location`];if(e&&b(r).some(e=>e.name===`location`))y={...y,location:e}}else{if(!(yield*_))return m;return yield*fail(parseError(`Expected a JSON object`))}return yield*v(r,S(r,y,`decode`),()=>parseError(`Response does not match the output schema`))}});const isObject=e=>typeof e===`object`&&e!==null&&!Array.isArray(e);const parseError=e=>new r({body:`[REDACTED]`,cause:e});const parseJson=e=>T.try({try:()=>e.trim().length>0?JSON.parse(e):{},catch:()=>parseError(`Invalid JSON response`)});const fail=e=>T.fail(e);const B=/*@__PURE__*/ E.succeed(m,/*@__PURE__*/ m.of({encode:e=>encode(e),decode:e=>decode(e)}));const resetProtocolCaches=()=>{M.clear();N.clear()};const V={getAnn:y,Redacted:D};export{B as AcmeProtocol,V as _internal,resetProtocolCaches,h as t};
|
|
2
2
|
//# sourceMappingURL=protocol.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/acme",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@distilled.cloud/core": "1.0.0-rc.
|
|
68
|
+
"@distilled.cloud/core": "1.0.0-rc.20"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@distilled.cloud/dev": "0.0.0",
|
package/src/errors.ts
CHANGED
|
@@ -34,6 +34,7 @@ import type {
|
|
|
34
34
|
Forbidden as CoreForbidden,
|
|
35
35
|
NotFound as CoreNotFound,
|
|
36
36
|
} from "@distilled.cloud/core/errors";
|
|
37
|
+
import { UnknownErrorFields } from "@distilled.cloud/core/errors";
|
|
37
38
|
import * as Schema from "@distilled.cloud/core/schema-lite-typed";
|
|
38
39
|
|
|
39
40
|
/**
|
|
@@ -43,13 +44,11 @@ import * as Schema from "@distilled.cloud/core/schema-lite-typed";
|
|
|
43
44
|
*/
|
|
44
45
|
export class UnknownAcmeError
|
|
45
46
|
extends /*@__PURE__*/ Schema.TaggedError<UnknownAcmeError>()("UnknownAcmeError", {
|
|
47
|
+
...UnknownErrorFields,
|
|
46
48
|
/** The problem `type` URN, when the body was a problem document. */
|
|
47
49
|
type: /*@__PURE__*/ Schema.optional(Schema.String),
|
|
48
|
-
message: /*@__PURE__*/ Schema.optional(Schema.String),
|
|
49
|
-
status: /*@__PURE__*/ Schema.optional(Schema.Number),
|
|
50
50
|
detail: /*@__PURE__*/ Schema.optional(Schema.String),
|
|
51
51
|
subproblems: /*@__PURE__*/ Schema.optional(/*@__PURE__*/ Schema.Array(Schema.Unknown)),
|
|
52
|
-
body: Schema.Unknown,
|
|
53
52
|
}) {}
|
|
54
53
|
|
|
55
54
|
/** Schema parse error wrapper. */
|