@distilled.cloud/tailscale 1.0.0-rc.20 → 1.0.0-rc.22
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 -3
- package/lib/.lazy.json +1 -1
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +17 -8
- package/lib/credentials.d.ts.map +1 -1
- package/lib/errors.d.ts +25 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.lazy.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/protocol.d.ts +15 -8
- package/lib/protocol.d.ts.map +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/tailscale.d.ts +40 -86
- package/lib/services/tailscale.d.ts.map +1 -1
- package/lib/services/tailscale.js +130 -133
- package/lib/services/tailscale.js.map +1 -1
- package/lib/services.lazy/tailscale.js +3 -3
- package/lib/traits.d.ts.map +1 -1
- package/lib/unstable-services/index.d.ts +2 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +1 -0
- package/lib/unstable-services/tailscale.d.ts +129 -0
- package/lib/unstable-services/tailscale.d.ts.map +1 -0
- package/lib/unstable-services/tailscale.js +2 -0
- package/lib/unstable-services/tailscale.js.map +1 -0
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/unstable-services.lazy/tailscale.js +1 -0
- package/package.json +12 -5
- package/src/credentials.ts +78 -98
- package/src/errors.ts +23 -1
- package/src/protocol.ts +41 -44
- package/src/services/tailscale.ts +758 -811
- package/src/unstable-services/index.ts +2 -0
- package/src/unstable-services/tailscale.ts +319 -0
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ program.pipe(Effect.provide(Live), Effect.runPromise);
|
|
|
29
29
|
|
|
30
30
|
## Auth
|
|
31
31
|
|
|
32
|
-
`CredentialsFromEnv` reads these
|
|
32
|
+
`CredentialsFromEnv` reads these once, when the layer is built, through the current `ConfigProvider`:
|
|
33
33
|
|
|
34
34
|
| Variable | Behavior |
|
|
35
35
|
|---|---|
|
|
@@ -37,9 +37,9 @@ program.pipe(Effect.provide(Live), Effect.runPromise);
|
|
|
37
37
|
| `TAILSCALE_OAUTH_CLIENT_ID` and `TAILSCALE_OAUTH_CLIENT_SECRET` | Client-credentials exchange at `{apiBaseUrl}/oauth/token`, cached until `expires_in` minus 60 seconds |
|
|
38
38
|
| `TAILSCALE_BASE_URL` | API origin. Default `https://api.tailscale.com`. The client calls `{origin}/api/v2` unless the value already ends in `/api/v2` |
|
|
39
39
|
|
|
40
|
-
Setting both an API key and an OAuth client, or only half an OAuth pair, fails with `ConfigError`.
|
|
40
|
+
Setting both an API key and an OAuth client, or only half an OAuth pair, fails the layer with `ConfigError`.
|
|
41
41
|
|
|
42
|
-
The explicit layers are `fromApiKey({ apiKey, apiBaseUrl? })` and `fromClientCredentials({ clientId, clientSecret, scope?, apiBaseUrl? })`. Their `apiBaseUrl` is the full API root (default `https://api.tailscale.com/api/v2`), used as given. The OAuth layers need an `HttpClient` for the token exchange and share one exchange across concurrent requests.
|
|
42
|
+
The explicit layers are `fromApiKey({ apiKey, apiBaseUrl? })` and `fromClientCredentials({ clientId, clientSecret, scope?, apiBaseUrl? })`. Their `apiBaseUrl` is the full API root (default `https://api.tailscale.com/api/v2`), used as given. The OAuth layers need an `HttpClient` for the token exchange and share one exchange across concurrent requests. A failed exchange fails the call with `TokenRequestFailed`, which carries the token endpoint's `status`.
|
|
43
43
|
|
|
44
44
|
Pass the tailnet to each operation. `"-"` is the default tailnet of the token in use.
|
|
45
45
|
|
package/lib/.lazy.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"serviceDirs":["services"],"twins":["index.js"]}
|
|
1
|
+
{"serviceDirs":["unstable-services","services"],"twins":["index.js"]}
|
package/lib/_bundle/sdk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{api$D as e,api$
|
|
1
|
+
import{api$D as e,api$call as t,api$error as n,api$named as r,api$newError as i,api$op as ee,api$opPaginated as te,category$withAuthError as a,category$withBadRequestError as ne,category$withConflictError as re,category$withParseError as ie,config$Redacted as o,config$String as s,config$all as ae,config$map as c,config$option as l,pagination$paginateCursor as oe,retry$capped as u,retry$jittered as se,retry$makeDefault as ce,retry$throttlingFactory as d,retry$throttlingOptions as le,retry$transientFactory as f,retry$transientOptions as ue,schema_lite_typed$Number as de,schema_lite_typed$String as fe,schema_lite_typed$TaggedError as p,schema_lite_typed$Unknown as m,schema_lite_typed$optional as pe,trait$Body as me,trait$FormDataFile as he,trait$Header as h,trait$Http as g,trait$HttpBody as _,trait$KeyDictionary as v,trait$Label as y,trait$Query as b,trait$ResponseCode as x,trait$UnionCases as S,trait$applyErrorMatchers as C,trait$bodySymbol as w,trait$errorMatchersSymbol as T,trait$formDataFileSymbol as E,trait$getErrorMatchers as D,trait$headerSymbol as O,trait$httpBodySymbol as k,trait$httpSymbol as A,trait$keyDictionarySymbol as j,trait$labelSymbol as M,trait$querySymbol as N,trait$responseCodeSymbol as P,trait$unionCasesSymbol as F}from"@distilled.cloud/core/_bundle/base";import{errors$API_ERRORS as I,errors$BadGateway as L,errors$BadRequest as R,errors$ConfigError as z,errors$Conflict as ge,errors$DEFAULT_ERRORS as _e,errors$Forbidden as ve,errors$GatewayTimeout as ye,errors$HTTP_STATUS_MAP as be,errors$InternalServerError as xe,errors$Locked as Se,errors$NotFound as Ce,errors$ServiceUnavailable as we,errors$TooManyRequests as Te,errors$Unauthorized as Ee,errors$UnknownErrorFields as De,errors$UnprocessableEntity as Oe,protocol_http$getAnn as ke,protocol_http$getProps as Ae,protocol_http$hasPropAnn as B,protocol_http$resolveNode as V,protocol_http$responseHeaderMembers as je,protocol_http$withResponseHeaders as Me,protocol_rest$BinaryResponse as Ne,protocol_rest$RawResponse as Pe,protocol_rest$RawResponseRoot as Fe,protocol_rest$SensitiveValue as Ie,protocol_rest$rawResponseRootSymbol as H,protocol_rest$rawResponseSymbol as U,protocol_rest$restProtocol as Le,protocol_rest$sensitiveValueSymbol as Re,protocol_rest$unknownErrorProps as ze,protocol_rest$validateSuccess as Be,schema_lite$Array as Ve,schema_lite$Boolean as He,schema_lite$NullOr as Ue,schema_lite$Number as We,schema_lite$Record as Ge,schema_lite$String as Ke,schema_lite$Struct as qe,schema_lite$TaggedError as Je,schema_lite$Union as Ye,schema_lite$Unknown as Xe,schema_lite$at as Ze,schema_lite$optional as Qe,schema_lite$suspend as $e}from"@distilled.cloud/core/_bundle/rest";import{refreshing as et}from"@distilled.cloud/core/token-cache";import*as W from"effect/Context";import*as G from"effect/Effect";import*as tt from"effect/http/HttpClient";import*as K from"effect/http/HttpClientRequest";import*as q from"effect/http/HttpClientResponse";import*as J from"effect/Layer";import*as Y from"effect/Option";import*as X from"effect/Redacted";import*as Z from"effect/Schema";var UnknownTailscaleError=class extends (/*@__PURE__*/ p()(`UnknownTailscaleError`,De)){};var TailscaleParseError=class extends p()(`TailscaleParseError`,{body:m,cause:m}).pipe(ie){};var TokenRequestFailed=class extends (/*@__PURE__*/ p()(`TokenRequestFailed`,{message:fe,status:/*@__PURE__*/ pe(de)}).pipe(a)){};const nt=I;const Q=`https://api.tailscale.com/api/v2`;const rt=6e4;var Credentials=class extends W.Service()(`TailscaleCredentials`){};const fromApiKey=e=>J.succeed(Credentials,G.succeed({token:e.apiKey,apiBaseUrl:e.apiBaseUrl??`https://api.tailscale.com/api/v2`}));const it=Z.Struct({access_token:Z.Redacted(Z.String),expires_in:Z.Number});const exchangeFailed=(e,t)=>new TokenRequestFailed({message:`OAuth token exchange failed: ${e}`,status:t});const makeClientCredentials=e=>G.gen(function*(){const t=yield*tt.HttpClient;const n=e.apiBaseUrl??`https://api.tailscale.com/api/v2`;const r=t.execute(K.post(`${n}/oauth/token`).pipe(K.bodyUrlParams({grant_type:`client_credentials`,client_id:e.clientId,client_secret:X.value(e.clientSecret),...e.scope?{scope:e.scope}:{},...e.tokenTailnet?{tailnet:e.tokenTailnet}:{}}))).pipe(G.flatMap(q.filterStatusOk),G.mapError(e=>exchangeFailed(e.message,e.response?.status)),G.flatMap(e=>q.schemaBodyJson(it)(e).pipe(G.mapError(t=>exchangeFailed(t.message,e.status)))));const i=G.map(r,e=>({config:{token:e.access_token,apiBaseUrl:n},refreshAt:Date.now()+e.expires_in*1e3-rt}));return et(i,e=>e.refreshAt,{onTimeout:e=>new TokenRequestFailed({message:`Tailscale OAuth token exchange timed out after ${e/1e3} s`})}).pipe(G.map(e=>e.config))});const fromClientCredentials=e=>J.effect(Credentials,makeClientCredentials(e));const apiBaseUrlFromOrigin=e=>{const t=e.replace(/\/+$/,``);return t.endsWith(`/api/v2`)?t:`${t}/api/v2`};const at=`TAILSCALE_API_KEY and TAILSCALE_OAUTH_CLIENT_ID/TAILSCALE_OAUTH_CLIENT_SECRET cannot both be set`;const nonEmpty=e=>Y.filter(e,e=>X.value(e).length>0);const ot=/*@__PURE__*/ ae({apiKey:l(o(`TAILSCALE_API_KEY`)).pipe(c(nonEmpty)),clientId:l(s(`TAILSCALE_OAUTH_CLIENT_ID`)),clientSecret:l(o(`TAILSCALE_OAUTH_CLIENT_SECRET`)).pipe(c(nonEmpty)),origin:l(s(`TAILSCALE_BASE_URL`))});const st=/*@__PURE__*/ J.effect(Credentials,G.gen(function*(){const e=yield*ot.pipe(G.mapError(e=>new z({message:`Failed to read Tailscale configuration: ${e.message}`})));const t=Y.getOrUndefined(e.apiKey);const n=Y.getOrUndefined(e.clientId);const r=Y.getOrUndefined(e.clientSecret);const i=Y.match(e.origin,{onNone:()=>Q,onSome:apiBaseUrlFromOrigin});if(t&&(n||r))return yield*new z({message:at});if(t)return G.succeed({token:t,apiBaseUrl:i});if(n&&r)return yield*makeClientCredentials({clientId:n,clientSecret:r,apiBaseUrl:i});if(n||r)return yield*new z({message:`TAILSCALE_OAUTH_CLIENT_ID and TAILSCALE_OAUTH_CLIENT_SECRET are both required`});return yield*new z({message:`TAILSCALE_API_KEY or TAILSCALE_OAUTH_CLIENT_ID and TAILSCALE_OAUTH_CLIENT_SECRET is required`})}));const isStringAst=e=>V(e)._tag===`String`;const isRawRoot=e=>ke(e,H)!==void 0;const rawStringMember=e=>Ae(e).find(e=>B(e,U)&&isStringAst(e.type));const decodeRawString=(e,t,n)=>G.flatMap(e.text,r=>Be(t,{value:n===void 0?r:Me(je(t),{[n.name]:r},e.headers),body:r,nonJson:false},e=>new TailscaleParseError(e)));const $=/*@__PURE__*/ Le({credentials:/*@__PURE__*/ G.flatten(Credentials),baseUrl:e=>e.apiBaseUrl,headers:e=>({Authorization:`Bearer ${X.value(e.token)}`}),unknownError:e=>new UnknownTailscaleError(ze(e)),parseError:({body:e,cause:t})=>new TailscaleParseError({body:e,cause:t})});const ct={encode:$.encode,decode:e=>{if(e.response.status<200||e.response.status>=300)return $.decode(e);const{outputAst:t}=e;if(isRawRoot(t)&&isStringAst(t))return decodeRawString(e.response,t,void 0);const n=rawStringMember(t);if(n!==void 0)return decodeRawString(e.response,t,n);if(isRawRoot(t)&&V(t)._tag===`Arrays`)return G.flatMap(e.response.text,t=>t.trim()===`null`?G.succeed([]):$.decode(e));return $.decode(e)}};const lt=ct;var Retry=class extends W.Service()(`TailscaleRetry`){};const policy=e=>G.provide(J.succeed(Retry,e));const ut=G.provide(J.succeed(Retry,{while:()=>false}));const dt=policy(d);const ft=policy(f);export{re as Ca,Ve as Xc,He as Yc,e as a,t as b,Credentials as credentials$Credentials,st as credentials$CredentialsFromEnv,Q as credentials$DEFAULT_API_BASE_URL,fromApiKey as credentials$fromApiKey,fromClientCredentials as credentials$fromClientCredentials,makeClientCredentials as credentials$makeClientCredentials,I as errors$API_ERRORS,L as errors$BadGateway,R as errors$BadRequest,z as errors$ConfigError,ge as errors$Conflict,_e as errors$DEFAULT_ERRORS,ve as errors$Forbidden,ye as errors$GatewayTimeout,be as errors$HTTP_STATUS_MAP,xe as errors$InternalServerError,Se as errors$Locked,Ce as errors$NotFound,we as errors$ServiceUnavailable,TailscaleParseError as errors$TailscaleParseError,nt as errors$TailscaleServiceErrors,TokenRequestFailed as errors$TokenRequestFailed,Te as errors$TooManyRequests,Ee as errors$Unauthorized,UnknownTailscaleError as errors$UnknownTailscaleError,Oe as errors$UnprocessableEntity,n as f,Ue as fd,We as gd,Ge as hd,Ke as jd,qe as kd,r as l,i as m,Je as md,ee as n,te as o,Ye as od,oe as pagination$paginateCursor,Xe as pd,lt as protocol$TailscaleProtocol,Ze as rd,Retry as retry$Retry,u as retry$capped,se as retry$jittered,ce as retry$makeDefault,ut as retry$none,policy as retry$policy,dt as retry$throttling,d as retry$throttlingFactory,le as retry$throttlingOptions,ft as retry$transient,f as retry$transientFactory,ue as retry$transientOptions,Ne as traits$BinaryResponse,me as traits$Body,he as traits$FormDataFile,h as traits$Header,g as traits$Http,_ as traits$HttpBody,v as traits$KeyDictionary,y as traits$Label,b as traits$Query,Pe as traits$RawResponse,Fe as traits$RawResponseRoot,x as traits$ResponseCode,Ie as traits$SensitiveValue,S as traits$UnionCases,C as traits$applyErrorMatchers,w as traits$bodySymbol,T as traits$errorMatchersSymbol,E as traits$formDataFileSymbol,D as traits$getErrorMatchers,O as traits$headerSymbol,k as traits$httpBodySymbol,A as traits$httpSymbol,j as traits$keyDictionarySymbol,M as traits$labelSymbol,N as traits$querySymbol,H as traits$rawResponseRootSymbol,U as traits$rawResponseSymbol,P as traits$responseCodeSymbol,Re as traits$sensitiveValueSymbol,F as traits$unionCasesSymbol,Qe as wd,$e as xd,a as ya,ne as za};
|
|
2
2
|
//# sourceMappingURL=sdk.js.map
|
package/lib/_bundle/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","names":["
|
|
1
|
+
{"version":3,"file":"sdk.js","names":["Schema.TaggedError","Schema.Unknown","Category.withParseError","Schema.String","Schema.Number","Category.withAuthError","EffectConfig.option","EffectConfig.Redacted","EffectConfig.map","EffectConfig.String","D","call","error","named","newError","op","opPaginated","withAuthError","withBadRequestError","withConflictError","withParseError","Redacted$3","String$2","all$1","map","option","paginateCursor","capped","jittered","makeDefault","throttlingFactory","throttlingOptions","transientFactory","transientOptions","Number$1","String$1","TaggedError$1","Unknown$1","optional$1","Body","FormDataFile","Header","Http","HttpBody","KeyDictionary","Label","Query","ResponseCode","UnionCases","applyErrorMatchers","bodySymbol","errorMatchersSymbol","formDataFileSymbol","getErrorMatchers","headerSymbol","httpBodySymbol","httpSymbol","keyDictionarySymbol","labelSymbol","querySymbol","responseCodeSymbol","unionCasesSymbol","API_ERRORS","BadGateway","BadRequest","ConfigError","Conflict","DEFAULT_ERRORS","Forbidden","GatewayTimeout","HTTP_STATUS_MAP","InternalServerError","Locked","NotFound","ServiceUnavailable","TooManyRequests","Unauthorized","UnknownErrorFields","UnprocessableEntity","getAnn","getProps","hasPropAnn","resolveNode","responseHeaderMembers","withResponseHeaders","BinaryResponse","RawResponse","RawResponseRoot","SensitiveValue","rawResponseRootSymbol","rawResponseSymbol","restProtocol","sensitiveValueSymbol","unknownErrorProps","validateSuccess","Array","Boolean","NullOr","Number","Record","String","Struct","TaggedError","Union","Unknown","at","optional","suspend","Context","Effect","HttpClient","HttpClientRequest","HttpClientResponse","Layer","Option","Redacted","Schema","TailscaleServiceErrors","DEFAULT_API_BASE_URL","TOKEN_REFRESH_WINDOW_MS","config","TokenResponse","reason","client","apiBaseUrl","exchange","cause","response","mint","token","refreshing","cached","timeoutMs","trimmed","origin","BOTH_METHODS","value","v","EnvConfig","CredentialsFromEnv","env","apiKey","clientId","clientSecret","ast","outputAst","prop","member","text","info","TailscaleProtocolRest","creds","tailscaleProtocolMethods","args","TailscaleProtocol","optionsOrFactory","none","throttling","transient"],"sources":["../../src/errors.ts","../../src/credentials.ts","../../src/protocol.ts","../../src/retry.ts"],"mappings":"0gGAwBA,IAAa,sBAAb,eACwB,gBAA0C,CAAC,CAC/D,wBACA6E,EACF,EAAA,AAAE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CAAC,CAAC,EAE/E,MAAa4C,GAAa,OAAO/H,CAAiB,EAElD,MAAagI,GAAY,OAAO9H,CAAgB"}
|
package/lib/credentials.d.ts
CHANGED
|
@@ -4,12 +4,19 @@ import * as Effect from "effect/Effect";
|
|
|
4
4
|
import * as HttpClient from "effect/http/HttpClient";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
6
|
import * as Redacted from "effect/Redacted";
|
|
7
|
+
import { TokenRequestFailed } from "./errors.ts";
|
|
7
8
|
export declare const DEFAULT_API_BASE_URL = "https://api.tailscale.com/api/v2";
|
|
8
9
|
export interface Config {
|
|
9
10
|
readonly token: Redacted.Redacted<string>;
|
|
10
11
|
readonly apiBaseUrl: string;
|
|
11
12
|
}
|
|
12
|
-
declare const Credentials_base: Context.ServiceClass<Credentials, "TailscaleCredentials", Effect.Effect<Config,
|
|
13
|
+
declare const Credentials_base: Context.ServiceClass<Credentials, "TailscaleCredentials", Effect.Effect<Config, TokenRequestFailed, never>>;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the current credentials on every request. `CredentialsFromEnv`
|
|
16
|
+
* reads and checks the environment when it is built, so the effect fails
|
|
17
|
+
* only when the OAuth token exchange it makes at run time fails, with
|
|
18
|
+
* {@link TokenRequestFailed}.
|
|
19
|
+
*/
|
|
13
20
|
export declare class Credentials extends Credentials_base {
|
|
14
21
|
}
|
|
15
22
|
export declare const fromApiKey: (config: {
|
|
@@ -35,18 +42,20 @@ export interface ClientCredentialsConfig {
|
|
|
35
42
|
/**
|
|
36
43
|
* Builds the OAuth client-credentials token cache. The returned effect posts
|
|
37
44
|
* the exchange through the captured `HttpClient`, reuses the token until
|
|
38
|
-
* 60 seconds before `expires_in`, and
|
|
39
|
-
*
|
|
45
|
+
* 60 seconds before `expires_in`, and concurrent resolutions of a cold or
|
|
46
|
+
* stale token share one exchange (core `refreshing`). A failed exchange
|
|
47
|
+
* fails the returned effect with {@link TokenRequestFailed}.
|
|
40
48
|
*/
|
|
41
|
-
export declare const makeClientCredentials: (config: ClientCredentialsConfig) => Effect.Effect<Effect.Effect<Config,
|
|
49
|
+
export declare const makeClientCredentials: (config: ClientCredentialsConfig) => Effect.Effect<Effect.Effect<Config, TokenRequestFailed>, never, HttpClient.HttpClient>;
|
|
42
50
|
export declare const fromClientCredentials: (config: ClientCredentialsConfig) => Layer.Layer<Credentials, never, HttpClient.HttpClient>;
|
|
43
51
|
/**
|
|
44
52
|
* Reads `TAILSCALE_API_KEY`, `TAILSCALE_OAUTH_CLIENT_ID`,
|
|
45
53
|
* `TAILSCALE_OAUTH_CLIENT_SECRET` and `TAILSCALE_BASE_URL`
|
|
46
|
-
* through `@distilled.cloud/core/config
|
|
47
|
-
*
|
|
48
|
-
*
|
|
54
|
+
* through `@distilled.cloud/core/config`, so a provided `ConfigProvider`
|
|
55
|
+
* supplies them. They are read, and checked, once: when the layer is built.
|
|
56
|
+
* Two methods at once, half an OAuth pair or no method fails the layer with
|
|
57
|
+
* `ConfigError`. The OAuth token cache belongs to the layer.
|
|
49
58
|
*/
|
|
50
|
-
export declare const CredentialsFromEnv: Layer.Layer<Credentials,
|
|
59
|
+
export declare const CredentialsFromEnv: Layer.Layer<Credentials, ConfigError, HttpClient.HttpClient>;
|
|
51
60
|
export {};
|
|
52
61
|
//# sourceMappingURL=credentials.d.ts.map
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAGrD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CA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E,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC,UAAU,CA6CzF,CAAC"}
|
package/lib/errors.d.ts
CHANGED
|
@@ -19,4 +19,29 @@ declare const TailscaleParseError_base: Schema.TaggedErrorClass<"TailscaleParseE
|
|
|
19
19
|
});
|
|
20
20
|
export declare class TailscaleParseError extends TailscaleParseError_base {
|
|
21
21
|
}
|
|
22
|
+
declare const TokenRequestFailed_base: Schema.TaggedErrorClass<"TokenRequestFailed", {
|
|
23
|
+
readonly message: import("effect/Schema").String;
|
|
24
|
+
readonly status: import("effect/Schema").optional<import("effect/Schema").Number>;
|
|
25
|
+
}> & (new (...args: any[]) => {
|
|
26
|
+
"@distilled.cloud/error/categories": {
|
|
27
|
+
AuthError: true;
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* The OAuth token exchange the credentials make failed: Tailscale could
|
|
32
|
+
* not be reached, refused the client credentials, answered with something
|
|
33
|
+
* that is not a token, or did not answer in time.
|
|
34
|
+
* `status` is the token endpoint's HTTP status, when it answered. It is a
|
|
35
|
+
* failure of a request at run time, so it is not a `ConfigError`.
|
|
36
|
+
*/
|
|
37
|
+
export declare class TokenRequestFailed extends /*@__PURE__*/ TokenRequestFailed_base {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The errors declared on the Tailscale service: any operation can return
|
|
41
|
+
* them, and every generated operation lists them as its `serviceErrors`.
|
|
42
|
+
* Each of core's status classes: the protocol builds the one for a failed
|
|
43
|
+
* response's status when the operation's own classes do not match.
|
|
44
|
+
*/
|
|
45
|
+
export declare const TailscaleServiceErrors: readonly [typeof import("@distilled.cloud/core/errors").Unauthorized, typeof import("@distilled.cloud/core/errors").Forbidden, typeof import("@distilled.cloud/core/errors").NotFound, typeof import("@distilled.cloud/core/errors").BadRequest, typeof import("@distilled.cloud/core/errors").Conflict, typeof import("@distilled.cloud/core/errors").UnprocessableEntity, typeof import("@distilled.cloud/core/errors").TooManyRequests, typeof import("@distilled.cloud/core/errors").Locked, typeof import("@distilled.cloud/core/errors").InternalServerError, typeof import("@distilled.cloud/core/errors").BadGateway, typeof import("@distilled.cloud/core/errors").ServiceUnavailable, typeof import("@distilled.cloud/core/errors").GatewayTimeout];
|
|
46
|
+
export type TailscaleServiceError = InstanceType<(typeof TailscaleServiceErrors)[number]>;
|
|
22
47
|
//# sourceMappingURL=errors.d.ts.map
|
package/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,cAAc,EACd,SAAS,EACT,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIlE,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;;;;;;;AAElE,qBAAa,qBACX,SAAQ,aAAa,CAAC,0BAGrB;CAAG;;;;;;;;;AAEN,qBAAa,mBAAoB,SAAQ,wBAMV;CAAG;;;;;;;;;AAElC;;;;;;GAMG;AACH,qBAAa,kBACX,SAAQ,aAAa,CAAC,uBAGS;CAAG;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,+tBAAa,CAAC;AACjD,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { errors$API_ERRORS as API_ERRORS, errors$BadGateway as BadGateway, errors$BadRequest as BadRequest, errors$ConfigError as ConfigError, errors$Conflict as Conflict, errors$DEFAULT_ERRORS as DEFAULT_ERRORS, errors$Forbidden as Forbidden, errors$GatewayTimeout as GatewayTimeout, errors$HTTP_STATUS_MAP as HTTP_STATUS_MAP, errors$InternalServerError as InternalServerError, errors$Locked as Locked, errors$NotFound as NotFound, errors$ServiceUnavailable as ServiceUnavailable, errors$TailscaleParseError as TailscaleParseError, errors$TooManyRequests as TooManyRequests, errors$Unauthorized as Unauthorized, errors$UnknownTailscaleError as UnknownTailscaleError, errors$UnprocessableEntity as UnprocessableEntity } from "./_bundle/sdk.js";
|
|
1
|
+
export { errors$API_ERRORS as API_ERRORS, errors$BadGateway as BadGateway, errors$BadRequest as BadRequest, errors$ConfigError as ConfigError, errors$Conflict as Conflict, errors$DEFAULT_ERRORS as DEFAULT_ERRORS, errors$Forbidden as Forbidden, errors$GatewayTimeout as GatewayTimeout, errors$HTTP_STATUS_MAP as HTTP_STATUS_MAP, errors$InternalServerError as InternalServerError, errors$Locked as Locked, errors$NotFound as NotFound, errors$ServiceUnavailable as ServiceUnavailable, errors$TailscaleParseError as TailscaleParseError, errors$TailscaleServiceErrors as TailscaleServiceErrors, errors$TokenRequestFailed as TokenRequestFailed, errors$TooManyRequests as TooManyRequests, errors$Unauthorized as Unauthorized, errors$UnknownTailscaleError as UnknownTailscaleError, errors$UnprocessableEntity as UnprocessableEntity } from "./_bundle/sdk.js";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
package/lib/index.lazy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAkD,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
package/lib/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { DecodeArgs, ErrorOf, ProtocolOf } from "@distilled.cloud/core/protocol";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
3
|
import type * as HttpClient from "effect/http/HttpClient";
|
|
4
|
-
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
5
|
-
import * as Layer from "effect/Layer";
|
|
6
4
|
import { Credentials } from "./credentials.ts";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { TailscaleParseError, UnknownTailscaleError, type TailscaleServiceError } from "./errors.ts";
|
|
6
|
+
/**
|
|
7
|
+
* What every generated Tailscale operation fails with besides its own
|
|
8
|
+
* errors: the service's errors, the protocol's, and what resolving the
|
|
9
|
+
* credentials fails with.
|
|
10
|
+
*/
|
|
11
|
+
export type TailscaleOpError = TailscaleServiceError | ErrorOf<typeof TailscaleProtocol>;
|
|
10
12
|
export type TailscaleOpContext = Credentials | HttpClient.HttpClient;
|
|
13
|
+
declare const tailscaleProtocolMethods: {
|
|
14
|
+
encode: (args: import("@distilled.cloud/core/protocol").EncodeArgs) => Effect.Effect<import("effect/http/HttpClientRequest").HttpClientRequest, TailscaleParseError | import("./errors.ts").TokenRequestFailed | UnknownTailscaleError | import("@distilled.cloud/core/protocol-rest").RestProtocolError, Credentials>;
|
|
15
|
+
decode: (args: DecodeArgs) => Effect.Effect<unknown, import("@distilled.cloud/core/protocol").DeclaredError | TailscaleParseError | import("./errors.ts").TokenRequestFailed | UnknownTailscaleError | import("@distilled.cloud/core/protocol-rest").RestProtocolError, Credentials>;
|
|
16
|
+
};
|
|
11
17
|
/**
|
|
12
18
|
* Core's REST protocol, plus two things the Tailscale API does differently on
|
|
13
19
|
* a 2xx: policy files are HuJSON text, and an empty list can arrive as the
|
|
14
20
|
* JSON `null` (a Go nil slice), which decodes as `[]`.
|
|
15
21
|
*/
|
|
16
|
-
export declare const TailscaleProtocol:
|
|
22
|
+
export declare const TailscaleProtocol: ProtocolOf<typeof tailscaleProtocolMethods>;
|
|
23
|
+
export {};
|
|
17
24
|
//# sourceMappingURL=protocol.d.ts.map
|
package/lib/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAY,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAgBhG,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAK1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,OAAO,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEzF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAiDrE,QAAA,MAAM,wBAAwB;;mBAEb,UAAU;CAiBW,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAChD,CAAC"}
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAuC,MAAM,6BAA6B,CAAC;AAC/F,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,MAAM,EACN,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,qBAAa,KAAM,SAAQ,UAAkD;CAAG;AAEhF,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,eAAO,MAAM,IAAI,mFAA+D,CAAC;AAEjF,eAAO,MAAM,UAAU,mFAA4B,CAAC;AAEpD,eAAO,MAAM,SAAS,mFAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
|