@distilled.cloud/turso 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +2 -2
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +2 -2
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +2 -2
- package/lib/retry.js.map +1 -1
- package/package.json +4 -4
- package/src/credentials.ts +2 -2
- package/src/retry.ts +2 -2
package/lib/credentials.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as Layer from "effect/Layer";
|
|
2
2
|
import * as Redacted from "effect/Redacted";
|
|
3
|
-
import * as
|
|
3
|
+
import * as Context from "effect/Context";
|
|
4
4
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
5
5
|
export declare const DEFAULT_API_BASE_URL = "https://api.turso.com";
|
|
6
6
|
export interface Config {
|
|
7
7
|
readonly apiKey: Redacted.Redacted<string>;
|
|
8
8
|
readonly apiBaseUrl: string;
|
|
9
9
|
}
|
|
10
|
-
declare const Credentials_base:
|
|
10
|
+
declare const Credentials_base: Context.ServiceClass<Credentials, "TursoCredentials", Config>;
|
|
11
11
|
export declare class Credentials extends Credentials_base {
|
|
12
12
|
}
|
|
13
13
|
export declare const CredentialsFromEnv: Layer.Layer<Credentials, ConfigError, never>;
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAEJ,eAAO,MAAM,kBAAkB,8CAa9B,CAAC"}
|
package/lib/credentials.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
5
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
6
6
|
export const DEFAULT_API_BASE_URL = "https://api.turso.com";
|
|
7
|
-
export class Credentials extends
|
|
7
|
+
export class Credentials extends Context.Service()("TursoCredentials") {
|
|
8
8
|
}
|
|
9
9
|
export const CredentialsFromEnv = Layer.effect(Credentials, Effect.gen(function* () {
|
|
10
10
|
const apiKey = process.env.TURSO_API_KEY;
|
package/lib/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAO5D,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAAuB,CACrE,kBAAkB,CACnB;CAAG;AAEJ,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAC5C,WAAW,EACX,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAEzC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC,CAAC,IAAI,WAAW,CAAC;YAC5B,OAAO,EAAE,gDAAgD;SAC1D,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;AAC7E,CAAC,CAAC,CACH,CAAC"}
|
package/lib/errors.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
|
|
8
8
|
export type { DefaultErrors } from "@distilled.cloud/core/errors";
|
|
9
9
|
import * as Schema from "effect/Schema";
|
|
10
|
-
declare const UnknownTursoError_base: Schema.
|
|
10
|
+
declare const UnknownTursoError_base: Schema.Class<UnknownTursoError, Schema.TaggedStruct<"UnknownTursoError", {
|
|
11
11
|
readonly code: Schema.optional<Schema.String>;
|
|
12
12
|
readonly message: Schema.optional<Schema.String>;
|
|
13
13
|
readonly body: Schema.Unknown;
|
|
@@ -18,7 +18,7 @@ declare const UnknownTursoError_base: Schema.ErrorClass<UnknownTursoError, Schem
|
|
|
18
18
|
});
|
|
19
19
|
export declare class UnknownTursoError extends UnknownTursoError_base {
|
|
20
20
|
}
|
|
21
|
-
declare const TursoParseError_base: Schema.
|
|
21
|
+
declare const TursoParseError_base: Schema.Class<TursoParseError, Schema.TaggedStruct<"TursoParseError", {
|
|
22
22
|
readonly body: Schema.Unknown;
|
|
23
23
|
readonly cause: Schema.Unknown;
|
|
24
24
|
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
|
package/lib/retry.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Turso retry configuration.
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
|
-
import * as
|
|
5
|
+
import * as Context from "effect/Context";
|
|
6
6
|
export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
|
|
7
7
|
import type { Policy } from "@distilled.cloud/core/retry";
|
|
8
|
-
declare const Retry_base:
|
|
8
|
+
declare const Retry_base: Context.ServiceClass<Retry, "TursoRetry", Policy>;
|
|
9
9
|
/**
|
|
10
10
|
* Context tag for configuring retry behavior of Turso API calls.
|
|
11
11
|
*/
|
package/lib/retry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;;AAE1D;;GAEG;AACH,qBAAa,KAAM,SAAQ,UAA8C;CAAG;AAE5E;;GAEG;AACH,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,IAAI,mFAEhB,CAAC"}
|
package/lib/retry.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
7
|
export { makeDefault, jittered, capped, throttlingOptions, transientOptions, } from "@distilled.cloud/core/retry";
|
|
8
8
|
/**
|
|
9
9
|
* Context tag for configuring retry behavior of Turso API calls.
|
|
10
10
|
*/
|
|
11
|
-
export class Retry extends
|
|
11
|
+
export class Retry extends Context.Service()("TursoRetry") {
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Provides a custom retry policy to all Turso API calls.
|
package/lib/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAGrC;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,OAAO,CAAC,OAAO,EAAiB,CAAC,YAAY,CAAC;CAAG;AAE5E;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,gBAAwB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAChC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAC7C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/turso",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"specs:update": "git -C specs/turso-docs fetch && git -C specs/turso-docs checkout main && git -C specs/turso-docs pull"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@distilled.cloud/core": "0.
|
|
77
|
-
"effect": "4.0.0-beta.
|
|
76
|
+
"@distilled.cloud/core": "0.9.0",
|
|
77
|
+
"effect": "4.0.0-beta.46"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/bun": "^1.3.0",
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
"vitest": "^3.2.3"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"effect": "4.0.0-beta.
|
|
86
|
+
"effect": "4.0.0-beta.46"
|
|
87
87
|
}
|
|
88
88
|
}
|
package/src/credentials.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Layer from "effect/Layer";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
|
-
import * as
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
5
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_API_BASE_URL = "https://api.turso.com";
|
|
@@ -11,7 +11,7 @@ export interface Config {
|
|
|
11
11
|
readonly apiBaseUrl: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export class Credentials extends
|
|
14
|
+
export class Credentials extends Context.Service<Credentials, Config>()(
|
|
15
15
|
"TursoCredentials",
|
|
16
16
|
) {}
|
|
17
17
|
|
package/src/retry.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Effect from "effect/Effect";
|
|
5
5
|
import * as Layer from "effect/Layer";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Context from "effect/Context";
|
|
7
7
|
export {
|
|
8
8
|
type Options,
|
|
9
9
|
type Factory,
|
|
@@ -19,7 +19,7 @@ import type { Policy } from "@distilled.cloud/core/retry";
|
|
|
19
19
|
/**
|
|
20
20
|
* Context tag for configuring retry behavior of Turso API calls.
|
|
21
21
|
*/
|
|
22
|
-
export class Retry extends
|
|
22
|
+
export class Retry extends Context.Service<Retry, Policy>()("TursoRetry") {}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Provides a custom retry policy to all Turso API calls.
|