@effect/sql-pglite 4.0.0-rc.116 → 4.0.0-rc.118
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/AGENTS.md +4 -4
- package/CLAUDE.md +4 -4
- package/ai-docs/package.json +3 -3
- package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +1 -1
- package/ai-docs/src/01_effect/06_running/20_layer-launch.ts +1 -1
- package/ai-docs/src/03_stream/30_encoding.ts +1 -1
- package/ai-docs/src/08_observability/20_otlp-tracing.ts +2 -2
- package/ai-docs/src/08_observability/index.md +1 -1
- package/ai-docs/src/40_sql/10_basics.ts +2 -2
- package/ai-docs/src/40_sql/index.md +1 -1
- package/ai-docs/src/50_http-client/10_basics.ts +1 -1
- package/ai-docs/src/51_http-server/10_basics.ts +2 -2
- package/ai-docs/src/51_http-server/20_testing.ts +2 -2
- package/ai-docs/src/51_http-server/fixtures/api/Api.ts +1 -1
- package/ai-docs/src/51_http-server/fixtures/api/Authorization.ts +1 -1
- package/ai-docs/src/51_http-server/fixtures/api/System.ts +1 -1
- package/ai-docs/src/51_http-server/fixtures/api/Users.ts +1 -1
- package/ai-docs/src/51_http-server/fixtures/domain/User.ts +1 -1
- package/ai-docs/src/51_http-server/fixtures/server/Users/http.ts +1 -1
- package/ai-docs/src/51_http-server/fixtures/server/Users.ts +1 -1
- package/ai-docs/src/60_child-process/10_working-with-child-processes.ts +1 -1
- package/ai-docs/src/60_child-process/index.md +1 -1
- package/ai-docs/src/70_cli/10_basics.ts +1 -1
- package/ai-docs/src/70_cli/index.md +1 -1
- package/ai-docs/src/71_ai/10_language-model.ts +2 -2
- package/ai-docs/src/71_ai/20_tools.ts +2 -2
- package/ai-docs/src/71_ai/30_chat.ts +2 -2
- package/ai-docs/src/80_cluster/10_entities.ts +3 -3
- package/dist/PgliteClient.d.ts +5 -5
- package/dist/PgliteClient.d.ts.map +1 -1
- package/dist/PgliteClient.js +5 -4
- package/dist/PgliteClient.js.map +1 -1
- package/dist/PgliteMigrator.d.ts +4 -4
- package/dist/PgliteMigrator.d.ts.map +1 -1
- package/dist/PgliteMigrator.js +2 -2
- package/dist/PgliteMigrator.js.map +1 -1
- package/package.json +3 -3
- package/src/PgliteClient.ts +8 -7
- package/src/PgliteMigrator.ts +4 -4
package/AGENTS.md
CHANGED
|
@@ -302,7 +302,7 @@ Use it when your Effect programs need testable current time, safe parsing, stabl
|
|
|
302
302
|
|
|
303
303
|
Effect has built-in support for structured logging, distributed tracing, and
|
|
304
304
|
metrics. For exporting telemetry, use the lightweight Otlp modules from
|
|
305
|
-
`effect/
|
|
305
|
+
`effect/observability` in new projects, or use
|
|
306
306
|
`@effect/opentelemetry` NodeSdk when integrating with an existing OpenTelemetry
|
|
307
307
|
setup.
|
|
308
308
|
|
|
@@ -344,7 +344,7 @@ if (Predicate.isObject(thing)) {
|
|
|
344
344
|
|
|
345
345
|
## Working with SQL databases
|
|
346
346
|
|
|
347
|
-
Use the `effect/
|
|
347
|
+
Use the `effect/sql` modules together with a driver package such as
|
|
348
348
|
`@effect/sql-sqlite-node` to access SQL databases. Define domain models with
|
|
349
349
|
`Model.Class` to derive schemas for the database and JSON boundaries, run
|
|
350
350
|
migrations, and write type-safe queries.
|
|
@@ -372,13 +372,13 @@ Build http clients with the `HttpClient` module.
|
|
|
372
372
|
|
|
373
373
|
## Working with child processes
|
|
374
374
|
|
|
375
|
-
Use the `effect/
|
|
375
|
+
Use the `effect/process` modules to define child processes and run them with `ChildProcessSpawner`.
|
|
376
376
|
|
|
377
377
|
- **[Working with child processes](./ai-docs/src/60_child-process/10_working-with-child-processes.ts)**: This example shows how to collect process output, compose pipelines, and stream long-running command output.
|
|
378
378
|
|
|
379
379
|
## Building CLI applications
|
|
380
380
|
|
|
381
|
-
Use the "effect/
|
|
381
|
+
Use the "effect/cli" modules to build CLI applications. These modules
|
|
382
382
|
provide utilities for parsing command-line arguments, handling user input, and
|
|
383
383
|
managing the flow of a CLI application.
|
|
384
384
|
|
package/CLAUDE.md
CHANGED
|
@@ -302,7 +302,7 @@ Use it when your Effect programs need testable current time, safe parsing, stabl
|
|
|
302
302
|
|
|
303
303
|
Effect has built-in support for structured logging, distributed tracing, and
|
|
304
304
|
metrics. For exporting telemetry, use the lightweight Otlp modules from
|
|
305
|
-
`effect/
|
|
305
|
+
`effect/observability` in new projects, or use
|
|
306
306
|
`@effect/opentelemetry` NodeSdk when integrating with an existing OpenTelemetry
|
|
307
307
|
setup.
|
|
308
308
|
|
|
@@ -344,7 +344,7 @@ if (Predicate.isObject(thing)) {
|
|
|
344
344
|
|
|
345
345
|
## Working with SQL databases
|
|
346
346
|
|
|
347
|
-
Use the `effect/
|
|
347
|
+
Use the `effect/sql` modules together with a driver package such as
|
|
348
348
|
`@effect/sql-sqlite-node` to access SQL databases. Define domain models with
|
|
349
349
|
`Model.Class` to derive schemas for the database and JSON boundaries, run
|
|
350
350
|
migrations, and write type-safe queries.
|
|
@@ -372,13 +372,13 @@ Build http clients with the `HttpClient` module.
|
|
|
372
372
|
|
|
373
373
|
## Working with child processes
|
|
374
374
|
|
|
375
|
-
Use the `effect/
|
|
375
|
+
Use the `effect/process` modules to define child processes and run them with `ChildProcessSpawner`.
|
|
376
376
|
|
|
377
377
|
- **[Working with child processes](./ai-docs/src/60_child-process/10_working-with-child-processes.ts)**: This example shows how to collect process output, compose pipelines, and stream long-running command output.
|
|
378
378
|
|
|
379
379
|
## Building CLI applications
|
|
380
380
|
|
|
381
|
-
Use the "effect/
|
|
381
|
+
Use the "effect/cli" modules to build CLI applications. These modules
|
|
382
382
|
provide utilities for parsing command-line arguments, handling user input, and
|
|
383
383
|
managing the flow of a CLI application.
|
|
384
384
|
|
package/ai-docs/package.json
CHANGED
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"@effect/sql-sqlite-wasm": "workspace:*",
|
|
28
28
|
"@effect/vitest": "workspace:*",
|
|
29
29
|
"effect": "workspace:*",
|
|
30
|
-
"hono": "^4.13.
|
|
31
|
-
"nodemailer": "^10.0.
|
|
30
|
+
"hono": "^4.13.9",
|
|
31
|
+
"nodemailer": "^10.0.10"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/nodemailer": "^8.0.
|
|
34
|
+
"@types/nodemailer": "^8.0.2"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { PgClient } from "@effect/sql-pg"
|
|
9
9
|
import { Array, Config, Context, Effect, Layer, type Option, Schema } from "effect"
|
|
10
|
-
import { SqlClient, SqlError } from "effect/
|
|
10
|
+
import { SqlClient, SqlError } from "effect/sql"
|
|
11
11
|
|
|
12
12
|
// Define a layer for the SqlClient service
|
|
13
13
|
export const SqlClientLayer: Layer.Layer<
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { NodeHttpServer, NodeRuntime } from "@effect/platform-node"
|
|
7
7
|
import { Effect, Layer } from "effect"
|
|
8
|
-
import { HttpRouter, HttpServerResponse } from "effect/
|
|
8
|
+
import { HttpRouter, HttpServerResponse } from "effect/http"
|
|
9
9
|
import { createServer } from "node:http"
|
|
10
10
|
|
|
11
11
|
// Build a tiny HTTP app with a health-check endpoint.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* decode and encode streams of structured data.
|
|
6
6
|
*/
|
|
7
7
|
import { DateTime, Schema, Stream } from "effect"
|
|
8
|
-
import { Ndjson, SchemaBinary } from "effect/
|
|
8
|
+
import { Ndjson, SchemaBinary } from "effect/encoding"
|
|
9
9
|
|
|
10
10
|
// SchemaBinary derives a framed binary decoder directly from a schema.
|
|
11
11
|
export const schemaBinaryDecoder = SchemaBinary.decode(Schema.Struct({
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { NodeRuntime } from "@effect/platform-node"
|
|
7
7
|
import { Context, Effect, Layer } from "effect"
|
|
8
|
-
import { FetchHttpClient } from "effect/
|
|
9
|
-
import { OtlpLogger, OtlpSerialization, OtlpTracer } from "effect/
|
|
8
|
+
import { FetchHttpClient } from "effect/http"
|
|
9
|
+
import { OtlpLogger, OtlpSerialization, OtlpTracer } from "effect/observability"
|
|
10
10
|
|
|
11
11
|
// Configure OTLP span export.
|
|
12
12
|
export const OtlpTracingLayer = OtlpTracer.layer({
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Effect has built-in support for structured logging, distributed tracing, and
|
|
4
4
|
metrics. For exporting telemetry, use the lightweight Otlp modules from
|
|
5
|
-
`effect/
|
|
5
|
+
`effect/observability` in new projects, or use
|
|
6
6
|
`@effect/opentelemetry` NodeSdk when integrating with an existing OpenTelemetry
|
|
7
7
|
setup.
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { NodeRuntime } from "@effect/platform-node"
|
|
8
8
|
import { SqliteClient, SqliteMigrator } from "@effect/sql-sqlite-node"
|
|
9
9
|
import { Context, Effect, Layer, Schema } from "effect"
|
|
10
|
-
import { Model } from "effect/
|
|
11
|
-
import { SqlClient, SqlModel, SqlSchema } from "effect/
|
|
10
|
+
import { Model } from "effect/schema"
|
|
11
|
+
import { SqlClient, SqlModel, SqlSchema } from "effect/sql"
|
|
12
12
|
|
|
13
13
|
// Use a branded string for the group id, so it cannot be mixed up with other
|
|
14
14
|
// string ids in the application.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Working with SQL databases
|
|
2
2
|
|
|
3
|
-
Use the `effect/
|
|
3
|
+
Use the `effect/sql` modules together with a driver package such as
|
|
4
4
|
`@effect/sql-sqlite-node` to access SQL databases. Define domain models with
|
|
5
5
|
`Model.Class` to derive schemas for the database and JSON boundaries, run
|
|
6
6
|
migrations, and write type-safe queries.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Define a service that uses the HttpClient module to fetch data from an external API
|
|
5
5
|
*/
|
|
6
6
|
import { Context, Effect, flow, Layer, Schedule, Schema } from "effect"
|
|
7
|
-
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/
|
|
7
|
+
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpClientResponse } from "effect/http"
|
|
8
8
|
|
|
9
9
|
class Todo extends Schema.Class<Todo>("Todo")({
|
|
10
10
|
userId: Schema.Int,
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { NodeHttpServer, NodeRuntime } from "@effect/platform-node"
|
|
8
8
|
import { Context, Effect, flow, Layer, Schedule } from "effect"
|
|
9
|
-
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpRouter, HttpServer } from "effect/
|
|
10
|
-
import { HttpApiBuilder, HttpApiClient, HttpApiMiddleware, HttpApiScalar } from "effect/
|
|
9
|
+
import { FetchHttpClient, HttpClient, HttpClientRequest, HttpRouter, HttpServer } from "effect/http"
|
|
10
|
+
import { HttpApiBuilder, HttpApiClient, HttpApiMiddleware, HttpApiScalar } from "effect/http-api"
|
|
11
11
|
import { createServer } from "node:http"
|
|
12
12
|
// Api definitions should **always** be seperate from the server implementation,
|
|
13
13
|
// so that they can be shared between the server and client without leaking
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { assert, layer } from "@effect/vitest"
|
|
8
8
|
import { Effect, Layer } from "effect"
|
|
9
|
-
import { HttpClientRequest, HttpServer } from "effect/
|
|
10
|
-
import { HttpApiMiddleware, HttpApiTest } from "effect/
|
|
9
|
+
import { HttpClientRequest, HttpServer } from "effect/http"
|
|
10
|
+
import { HttpApiMiddleware, HttpApiTest } from "effect/http-api"
|
|
11
11
|
import { Api } from "./fixtures/api/Api.ts"
|
|
12
12
|
import { Authorization } from "./fixtures/api/Authorization.ts"
|
|
13
13
|
import { UserId } from "./fixtures/domain/User.ts"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Schema } from "effect"
|
|
2
|
-
import { HttpApiMiddleware, HttpApiSecurity } from "effect/
|
|
2
|
+
import { HttpApiMiddleware, HttpApiSecurity } from "effect/http-api"
|
|
3
3
|
import type { User } from "../domain/User.ts"
|
|
4
4
|
|
|
5
5
|
export class CurrentUser extends Context.Service<CurrentUser, User>()("acme/HttpApi/Authorization/CurrentUser") {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect"
|
|
2
|
-
import { HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api"
|
|
3
3
|
import { User, UserId } from "../domain/User.ts"
|
|
4
4
|
import { SearchQueryTooShort, UserNotFound } from "../domain/UserErrors.ts"
|
|
5
5
|
import { Authorization } from "./Authorization.ts"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Layer } from "effect"
|
|
2
|
-
import { HttpApiBuilder, HttpApiError } from "effect/
|
|
2
|
+
import { HttpApiBuilder, HttpApiError } from "effect/http-api"
|
|
3
3
|
import { Api } from "../../api/Api.ts"
|
|
4
4
|
import { CurrentUser } from "../../api/Authorization.ts"
|
|
5
5
|
import { AuthorizationLayer } from "../Authorization.ts"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SqliteClient, SqliteMigrator } from "@effect/sql-sqlite-node"
|
|
2
2
|
import { Context, Effect, Layer, Schema } from "effect"
|
|
3
|
-
import { SqlClient, SqlModel, SqlSchema } from "effect/
|
|
3
|
+
import { SqlClient, SqlModel, SqlSchema } from "effect/sql"
|
|
4
4
|
import { User } from "../domain/User.ts"
|
|
5
5
|
import type { UserId } from "../domain/User.ts"
|
|
6
6
|
import { SearchQueryTooShort, UserNotFound, UsersError } from "../domain/UserErrors.ts"
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { NodeServices } from "@effect/platform-node"
|
|
7
7
|
import { Console, Context, Effect, Layer, Schema, Stream, String } from "effect"
|
|
8
|
-
import { ChildProcess, ChildProcessSpawner } from "effect/
|
|
8
|
+
import { ChildProcess, ChildProcessSpawner } from "effect/process"
|
|
9
9
|
|
|
10
10
|
export class DevToolsError extends Schema.TaggedError<DevToolsError>()("DevToolsError", {
|
|
11
11
|
cause: Schema.Defect()
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { NodeRuntime, NodeServices } from "@effect/platform-node"
|
|
8
8
|
import { Console, Effect, Option, Schema } from "effect"
|
|
9
|
-
import { Argument, Command, Flag } from "effect/
|
|
9
|
+
import { Argument, Command, Flag } from "effect/cli"
|
|
10
10
|
|
|
11
11
|
// You can define flags outside of commands and reuse them across multiple
|
|
12
12
|
// commands.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
## Building CLI applications
|
|
2
2
|
|
|
3
|
-
Use the "effect/
|
|
3
|
+
Use the "effect/cli" modules to build CLI applications. These modules
|
|
4
4
|
provide utilities for parsing command-line arguments, handling user input, and
|
|
5
5
|
managing the flow of a CLI application.
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { AnthropicClient, AnthropicLanguageModel } from "@effect/ai-anthropic"
|
|
8
8
|
import { OpenAiClient, OpenAiLanguageModel } from "@effect/ai-openai"
|
|
9
9
|
import { Config, Context, Effect, ExecutionPlan, Layer, Schema, Stream } from "effect"
|
|
10
|
-
import { AiError, LanguageModel, Model, type Response } from "effect/
|
|
11
|
-
import { FetchHttpClient } from "effect/
|
|
10
|
+
import { AiError, LanguageModel, Model, type Response } from "effect/ai"
|
|
11
|
+
import { FetchHttpClient } from "effect/http"
|
|
12
12
|
import { LaunchPlan } from "./fixtures/domain/LaunchPlan.ts"
|
|
13
13
|
|
|
14
14
|
// You can use Config to create ai clients
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { OpenAiClient, OpenAiLanguageModel, OpenAiTool } from "@effect/ai-openai"
|
|
8
8
|
import { Config, Context, Effect, Layer, Schema } from "effect"
|
|
9
|
-
import { AiError, LanguageModel, Tool, Toolkit } from "effect/
|
|
10
|
-
import { FetchHttpClient } from "effect/
|
|
9
|
+
import { AiError, LanguageModel, Tool, Toolkit } from "effect/ai"
|
|
10
|
+
import { FetchHttpClient } from "effect/http"
|
|
11
11
|
|
|
12
12
|
// ---------------------------------------------------------------------------
|
|
13
13
|
// 1. Defining tools
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { OpenAiClient, OpenAiLanguageModel } from "@effect/ai-openai"
|
|
8
8
|
import { Config, Context, DateTime, Effect, Layer, Ref, Schema } from "effect"
|
|
9
|
-
import { AiError, Chat, Prompt, Tool, Toolkit } from "effect/
|
|
10
|
-
import { FetchHttpClient } from "effect/
|
|
9
|
+
import { AiError, Chat, Prompt, Tool, Toolkit } from "effect/ai"
|
|
10
|
+
import { FetchHttpClient } from "effect/http"
|
|
11
11
|
|
|
12
12
|
// ---------------------------------------------------------------------------
|
|
13
13
|
// Provider setup
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { NodeClusterSocket, NodeRuntime } from "@effect/platform-node"
|
|
7
7
|
import { Effect, Layer, Ref, Schema } from "effect"
|
|
8
|
-
import { ClusterSchema, Entity, TestRunner } from "effect/
|
|
9
|
-
import { Rpc } from "effect/
|
|
10
|
-
import type { SqlClient } from "effect/
|
|
8
|
+
import { ClusterSchema, Entity, TestRunner } from "effect/cluster"
|
|
9
|
+
import { Rpc } from "effect/rpc"
|
|
10
|
+
import type { SqlClient } from "effect/sql"
|
|
11
11
|
|
|
12
12
|
export const Increment = Rpc.make("Increment", {
|
|
13
13
|
payload: { amount: Schema.Int },
|
package/dist/PgliteClient.d.ts
CHANGED
|
@@ -17,12 +17,12 @@ import * as Context from "effect/Context";
|
|
|
17
17
|
import * as Effect from "effect/Effect";
|
|
18
18
|
import * as Layer from "effect/Layer";
|
|
19
19
|
import * as Queue from "effect/Queue";
|
|
20
|
+
import * as Reactivity from "effect/reactivity/Reactivity";
|
|
20
21
|
import * as Scope from "effect/Scope";
|
|
21
|
-
import * as
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import
|
|
25
|
-
import * as Statement from "effect/unstable/sql/Statement";
|
|
22
|
+
import * as Client from "effect/sql/SqlClient";
|
|
23
|
+
import { SqlError } from "effect/sql/SqlError";
|
|
24
|
+
import type { Custom, Fragment } from "effect/sql/Statement";
|
|
25
|
+
import * as Statement from "effect/sql/Statement";
|
|
26
26
|
/**
|
|
27
27
|
* Runtime type identifier used to mark `PgliteClient` values.
|
|
28
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgliteClient.d.ts","sourceRoot":"","sources":["../src/PgliteClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAU,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"PgliteClient.d.ts","sourceRoot":"","sources":["../src/PgliteClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAU,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAA;AAC1D,O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,yDAAqC,CAAA"}
|
package/dist/PgliteClient.js
CHANGED
|
@@ -18,13 +18,13 @@ import * as Effect from "effect/Effect";
|
|
|
18
18
|
import * as Fiber from "effect/Fiber";
|
|
19
19
|
import * as Layer from "effect/Layer";
|
|
20
20
|
import * as Queue from "effect/Queue";
|
|
21
|
+
import * as Reactivity from "effect/reactivity/Reactivity";
|
|
21
22
|
import * as Scope from "effect/Scope";
|
|
22
23
|
import * as Semaphore from "effect/Semaphore";
|
|
24
|
+
import * as Client from "effect/sql/SqlClient";
|
|
25
|
+
import { AuthenticationError, AuthorizationError, ConnectionError, ConstraintError, DeadlockError, LockTimeoutError, SerializationError, SqlError, SqlSyntaxError, StatementTimeoutError, UniqueViolation, UnknownError } from "effect/sql/SqlError";
|
|
26
|
+
import * as Statement from "effect/sql/Statement";
|
|
23
27
|
import * as Stream from "effect/Stream";
|
|
24
|
-
import * as Reactivity from "effect/unstable/reactivity/Reactivity";
|
|
25
|
-
import * as Client from "effect/unstable/sql/SqlClient";
|
|
26
|
-
import { AuthenticationError, AuthorizationError, ConnectionError, ConstraintError, DeadlockError, LockTimeoutError, SerializationError, SqlError, SqlSyntaxError, StatementTimeoutError, UniqueViolation, UnknownError } from "effect/unstable/sql/SqlError";
|
|
27
|
-
import * as Statement from "effect/unstable/sql/Statement";
|
|
28
28
|
/**
|
|
29
29
|
* Runtime type identifier used to mark `PgliteClient` values.
|
|
30
30
|
*
|
|
@@ -91,6 +91,7 @@ export const fromClient = options => Effect.gen(function* () {
|
|
|
91
91
|
acquirer,
|
|
92
92
|
compiler,
|
|
93
93
|
transactionAcquirer,
|
|
94
|
+
releaseSavepoint: name => `RELEASE SAVEPOINT ${name}`,
|
|
94
95
|
spanAttributes,
|
|
95
96
|
transformRows
|
|
96
97
|
});
|
package/dist/PgliteClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgliteClient.js","names":[],"sources":["../src/PgliteClient.ts"],"sourcesContent":[null],"mappings":"AA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;MACpB,OAAO,IAAI,eAAe,CAAC;QAAE,GAAG,KAAK;QAAE,UAAU,EAAE,qBAAqB,CAAC,KAAK;MAAC,CAAE,CAAC;IACpF;IACA,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;MACzB,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC;IACnC;IACA,IAAI,IAAI,KAAK,OAAO,EAAE;MACpB,OAAO,IAAI,aAAa,CAAC,KAAK,CAAC;IACjC;IACA,IAAI,IAAI,KAAK,OAAO,EAAE;MACpB,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC;IACtC;IACA,IAAI,IAAI,KAAK,OAAO,EAAE;MACpB,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC;IACpC;IACA,IAAI,IAAI,KAAK,OAAO,EAAE;MACpB,OAAO,IAAI,qBAAqB,CAAC,KAAK,CAAC;IACzC;EACF;EACA,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC;AAChC,CAAC","ignoreList":[]}
|
package/dist/PgliteMigrator.d.ts
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type * as Effect from "effect/Effect";
|
|
12
12
|
import * as Layer from "effect/Layer";
|
|
13
|
-
import * as Migrator from "effect/
|
|
14
|
-
import type * as Client from "effect/
|
|
15
|
-
import type { SqlError } from "effect/
|
|
13
|
+
import * as Migrator from "effect/sql/Migrator";
|
|
14
|
+
import type * as Client from "effect/sql/SqlClient";
|
|
15
|
+
import type { SqlError } from "effect/sql/SqlError";
|
|
16
16
|
/**
|
|
17
17
|
* @since 4.0.0
|
|
18
18
|
*/
|
|
19
|
-
export * from "effect/
|
|
19
|
+
export * from "effect/sql/Migrator";
|
|
20
20
|
/**
|
|
21
21
|
* Runs SQL migrations using the configured `SqlClient`, returning the migrations that were applied.
|
|
22
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgliteMigrator.d.ts","sourceRoot":"","sources":["../src/PgliteMigrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"PgliteMigrator.d.ts","sourceRoot":"","sources":["../src/PgliteMigrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;GAEG;AACH,cAAc,qBAAqB,CAAA;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,EAC3B,OAAO,EAAE,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,KAClC,MAAM,CAAC,MAAM,CAChB,aAAa,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAClD,QAAQ,CAAC,cAAc,GAAG,QAAQ,EAClC,MAAM,CAAC,SAAS,GAAG,EAAE,CACF,CAAA;AAErB;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,WACZ,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,KACnC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,cAAc,GAAG,QAAQ,EAAE,MAAM,CAAC,SAAS,GAAG,CAAC,CAAsC,CAAA"}
|
package/dist/PgliteMigrator.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Layer from "effect/Layer";
|
|
2
|
-
import * as Migrator from "effect/
|
|
2
|
+
import * as Migrator from "effect/sql/Migrator";
|
|
3
3
|
/**
|
|
4
4
|
* @since 4.0.0
|
|
5
5
|
*/
|
|
6
|
-
export * from "effect/
|
|
6
|
+
export * from "effect/sql/Migrator";
|
|
7
7
|
/**
|
|
8
8
|
* Runs SQL migrations using the configured `SqlClient`, returning the migrations that were applied.
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgliteMigrator.js","names":[],"sources":["../src/PgliteMigrator.ts"],"sourcesContent":[null],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"PgliteMigrator.js","names":[],"sources":["../src/PgliteMigrator.ts"],"sourcesContent":[null],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,cAAc;AACrC,OAAO,KAAK,QAAQ,MAAM,qBAAqB;AAI/C;;;AAGA,cAAc,qBAAqB;AAEnC;;;;;;AAMA,OAAO,MAAM,GAAG,gBAMZ,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;AAErB;;;;;;AAMA,OAAO,MAAM,KAAK,GAChB,OAAoC,IAC6C,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/sql-pglite",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.118",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A PGlite toolkit for Effect",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"provenance": true
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"effect": "^4.0.0-rc.
|
|
54
|
+
"effect": "^4.0.0-rc.118"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"effect": "^4.0.0-rc.
|
|
57
|
+
"effect": "^4.0.0-rc.118"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@electric-sql/pglite": "^0.5.8"
|
package/src/PgliteClient.ts
CHANGED
|
@@ -18,12 +18,11 @@ import * as Effect from "effect/Effect"
|
|
|
18
18
|
import * as Fiber from "effect/Fiber"
|
|
19
19
|
import * as Layer from "effect/Layer"
|
|
20
20
|
import * as Queue from "effect/Queue"
|
|
21
|
+
import * as Reactivity from "effect/reactivity/Reactivity"
|
|
21
22
|
import * as Scope from "effect/Scope"
|
|
22
23
|
import * as Semaphore from "effect/Semaphore"
|
|
23
|
-
import * as
|
|
24
|
-
import
|
|
25
|
-
import * as Client from "effect/unstable/sql/SqlClient"
|
|
26
|
-
import type { Connection } from "effect/unstable/sql/SqlConnection"
|
|
24
|
+
import * as Client from "effect/sql/SqlClient"
|
|
25
|
+
import type { Connection } from "effect/sql/SqlConnection"
|
|
27
26
|
import {
|
|
28
27
|
AuthenticationError,
|
|
29
28
|
AuthorizationError,
|
|
@@ -37,9 +36,10 @@ import {
|
|
|
37
36
|
StatementTimeoutError,
|
|
38
37
|
UniqueViolation,
|
|
39
38
|
UnknownError
|
|
40
|
-
} from "effect/
|
|
41
|
-
import type { Custom, Fragment } from "effect/
|
|
42
|
-
import * as Statement from "effect/
|
|
39
|
+
} from "effect/sql/SqlError"
|
|
40
|
+
import type { Custom, Fragment } from "effect/sql/Statement"
|
|
41
|
+
import * as Statement from "effect/sql/Statement"
|
|
42
|
+
import * as Stream from "effect/Stream"
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* Runtime type identifier used to mark `PgliteClient` values.
|
|
@@ -229,6 +229,7 @@ export const fromClient = (
|
|
|
229
229
|
acquirer,
|
|
230
230
|
compiler,
|
|
231
231
|
transactionAcquirer,
|
|
232
|
+
releaseSavepoint: (name) => `RELEASE SAVEPOINT ${name}`,
|
|
232
233
|
spanAttributes,
|
|
233
234
|
transformRows
|
|
234
235
|
})
|
package/src/PgliteMigrator.ts
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type * as Effect from "effect/Effect"
|
|
12
12
|
import * as Layer from "effect/Layer"
|
|
13
|
-
import * as Migrator from "effect/
|
|
14
|
-
import type * as Client from "effect/
|
|
15
|
-
import type { SqlError } from "effect/
|
|
13
|
+
import * as Migrator from "effect/sql/Migrator"
|
|
14
|
+
import type * as Client from "effect/sql/SqlClient"
|
|
15
|
+
import type { SqlError } from "effect/sql/SqlError"
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @since 4.0.0
|
|
19
19
|
*/
|
|
20
|
-
export * from "effect/
|
|
20
|
+
export * from "effect/sql/Migrator"
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Runs SQL migrations using the configured `SqlClient`, returning the migrations that were applied.
|