@effect/sql-pg 4.0.0-rc.112 → 4.0.0-rc.113
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 +24 -9
- package/CLAUDE.md +24 -9
- package/ai-docs/package.json +2 -2
- package/ai-docs/src/01_effect/01_basics/02_effect-fn.ts +18 -5
- package/ai-docs/src/01_effect/01_basics/index.md +5 -3
- package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +1 -1
- package/ai-docs/src/01_effect/03_services/20_layer-unwrap.ts +2 -2
- package/ai-docs/src/01_effect/05_resources/10_acquire-release.ts +2 -2
- package/ai-docs/src/03_stream/30_encoding.ts +5 -7
- package/ai-docs/src/08_observability/10_logging.ts +1 -1
- package/ai-docs/src/70_cli/10_basics.ts +7 -7
- package/ai-docs/src/71_ai/10_language-model.ts +2 -2
- package/ai-docs/src/71_ai/20_tools.ts +1 -1
- package/ai-docs/src/71_ai/30_chat.ts +1 -1
- package/dist/PgAuth.d.ts +24 -0
- package/dist/PgAuth.d.ts.map +1 -1
- package/dist/PgAuth.js +29 -2
- package/dist/PgAuth.js.map +1 -1
- package/dist/PgClient.d.ts +49 -82
- package/dist/PgClient.d.ts.map +1 -1
- package/dist/PgClient.js +58 -510
- package/dist/PgClient.js.map +1 -1
- package/dist/PgConnection.d.ts +177 -0
- package/dist/PgConnection.d.ts.map +1 -0
- package/dist/PgConnection.js +1786 -0
- package/dist/PgConnection.js.map +1 -0
- package/dist/PgPool.d.ts +107 -0
- package/dist/PgPool.d.ts.map +1 -0
- package/dist/PgPool.js +124 -0
- package/dist/PgPool.js.map +1 -0
- package/dist/PgProtocol.d.ts +63 -30
- package/dist/PgProtocol.d.ts.map +1 -1
- package/dist/PgProtocol.js +64 -22
- package/dist/PgProtocol.js.map +1 -1
- package/dist/PgTypes.d.ts +85 -17
- package/dist/PgTypes.d.ts.map +1 -1
- package/dist/PgTypes.js +166 -169
- package/dist/PgTypes.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/connection.d.ts +2 -0
- package/dist/internal/connection.d.ts.map +1 -0
- package/dist/internal/connection.js +5 -0
- package/dist/internal/connection.js.map +1 -0
- package/dist/internal/sqlError.d.ts +10 -0
- package/dist/internal/sqlError.d.ts.map +1 -0
- package/dist/internal/sqlError.js +57 -0
- package/dist/internal/sqlError.js.map +1 -0
- package/package.json +6 -14
- package/src/PgAuth.ts +33 -2
- package/src/PgClient.ts +138 -681
- package/src/PgConnection.ts +2294 -0
- package/src/PgPool.ts +231 -0
- package/src/PgProtocol.ts +93 -50
- package/src/PgTypes.ts +254 -186
- package/src/index.ts +10 -0
- package/src/internal/connection.ts +26 -0
- package/src/internal/sqlError.ts +75 -0
package/AGENTS.md
CHANGED
|
@@ -11,9 +11,11 @@ purposes. In practice, you would not include these comments in your code.
|
|
|
11
11
|
|
|
12
12
|
## Writing `Effect` code
|
|
13
13
|
|
|
14
|
-
Prefer
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Prefer `Effect.gen` for inline Effect code. For reusable functions, prefer
|
|
15
|
+
`Effect.fn("name")` when tracing is useful and `Effect.fnUntraced` when it is not,
|
|
16
|
+
particularly in library implementations and hot paths. Avoid functions that only
|
|
17
|
+
wrap and return `Effect.gen`. Attach additional behaviour with combinators; this
|
|
18
|
+
style is more readable and easier to maintain than using combinators alone.
|
|
17
19
|
|
|
18
20
|
### Using Effect.gen
|
|
19
21
|
|
|
@@ -46,13 +48,16 @@ export class FileProcessingError extends Schema.TaggedError<FileProcessingError>
|
|
|
46
48
|
}) {}
|
|
47
49
|
```
|
|
48
50
|
|
|
49
|
-
### Using Effect.fn
|
|
51
|
+
### Using Effect.fn and Effect.fnUntraced
|
|
50
52
|
|
|
51
|
-
When writing functions that return an Effect, use `Effect.fn`
|
|
52
|
-
generator syntax.
|
|
53
|
+
When writing reusable functions that return an Effect, use `Effect.fn` or
|
|
54
|
+
`Effect.fnUntraced` to use the generator syntax.
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
Use `Effect.fn("name")` when the function should create a tracing span. Prefer
|
|
57
|
+
`Effect.fnUntraced` when tracing is not needed, particularly for library
|
|
58
|
+
implementations and hot paths.
|
|
59
|
+
|
|
60
|
+
**Avoid creating functions that only wrap and return an `Effect.gen`**.
|
|
56
61
|
|
|
57
62
|
```ts
|
|
58
63
|
import { Effect, Schema } from "effect"
|
|
@@ -80,6 +85,16 @@ export const effectFunction = Effect.fn("effectFunction")(
|
|
|
80
85
|
})
|
|
81
86
|
)
|
|
82
87
|
|
|
88
|
+
// Effect.fnUntraced avoids tracing and stack-frame capture while still reusing
|
|
89
|
+
// the generator body. This is preferred for library functions that do not
|
|
90
|
+
// represent a useful tracing boundary.
|
|
91
|
+
export const validateBatchSize = Effect.fnUntraced(function*(size: number): Effect.fn.Return<number, SomeError> {
|
|
92
|
+
if (!Number.isInteger(size) || size <= 0) {
|
|
93
|
+
return yield* new SomeError({ message: "Batch size must be a positive integer" })
|
|
94
|
+
}
|
|
95
|
+
return size
|
|
96
|
+
})
|
|
97
|
+
|
|
83
98
|
// Use Schema.TaggedError to define a custom error
|
|
84
99
|
export class SomeError extends Schema.TaggedError<SomeError>()("SomeError", {
|
|
85
100
|
message: Schema.String
|
|
@@ -247,7 +262,7 @@ They let you model finite or infinite data sources.
|
|
|
247
262
|
- `NodeStream.fromReadable` for Node.js readable streams
|
|
248
263
|
- **[Consuming and transforming streams](./ai-docs/src/03_stream/20_consuming-streams.ts)**: How to transform and consume streams using operators like `map`, `flatMap`, `filter`, `mapEffect`, and various `run*` methods.
|
|
249
264
|
- **[Decoding and encoding streams](./ai-docs/src/03_stream/30_encoding.ts)**:
|
|
250
|
-
Use `Stream.pipeThroughChannel` with the `Ndjson`
|
|
265
|
+
Use `Stream.pipeThroughChannel` with the `Ndjson` and `SchemaBinary` modules to
|
|
251
266
|
decode and encode streams of structured data.
|
|
252
267
|
|
|
253
268
|
## Integrating Effect into existing applications
|
package/CLAUDE.md
CHANGED
|
@@ -11,9 +11,11 @@ purposes. In practice, you would not include these comments in your code.
|
|
|
11
11
|
|
|
12
12
|
## Writing `Effect` code
|
|
13
13
|
|
|
14
|
-
Prefer
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Prefer `Effect.gen` for inline Effect code. For reusable functions, prefer
|
|
15
|
+
`Effect.fn("name")` when tracing is useful and `Effect.fnUntraced` when it is not,
|
|
16
|
+
particularly in library implementations and hot paths. Avoid functions that only
|
|
17
|
+
wrap and return `Effect.gen`. Attach additional behaviour with combinators; this
|
|
18
|
+
style is more readable and easier to maintain than using combinators alone.
|
|
17
19
|
|
|
18
20
|
### Using Effect.gen
|
|
19
21
|
|
|
@@ -46,13 +48,16 @@ export class FileProcessingError extends Schema.TaggedError<FileProcessingError>
|
|
|
46
48
|
}) {}
|
|
47
49
|
```
|
|
48
50
|
|
|
49
|
-
### Using Effect.fn
|
|
51
|
+
### Using Effect.fn and Effect.fnUntraced
|
|
50
52
|
|
|
51
|
-
When writing functions that return an Effect, use `Effect.fn`
|
|
52
|
-
generator syntax.
|
|
53
|
+
When writing reusable functions that return an Effect, use `Effect.fn` or
|
|
54
|
+
`Effect.fnUntraced` to use the generator syntax.
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
Use `Effect.fn("name")` when the function should create a tracing span. Prefer
|
|
57
|
+
`Effect.fnUntraced` when tracing is not needed, particularly for library
|
|
58
|
+
implementations and hot paths.
|
|
59
|
+
|
|
60
|
+
**Avoid creating functions that only wrap and return an `Effect.gen`**.
|
|
56
61
|
|
|
57
62
|
```ts
|
|
58
63
|
import { Effect, Schema } from "effect"
|
|
@@ -80,6 +85,16 @@ export const effectFunction = Effect.fn("effectFunction")(
|
|
|
80
85
|
})
|
|
81
86
|
)
|
|
82
87
|
|
|
88
|
+
// Effect.fnUntraced avoids tracing and stack-frame capture while still reusing
|
|
89
|
+
// the generator body. This is preferred for library functions that do not
|
|
90
|
+
// represent a useful tracing boundary.
|
|
91
|
+
export const validateBatchSize = Effect.fnUntraced(function*(size: number): Effect.fn.Return<number, SomeError> {
|
|
92
|
+
if (!Number.isInteger(size) || size <= 0) {
|
|
93
|
+
return yield* new SomeError({ message: "Batch size must be a positive integer" })
|
|
94
|
+
}
|
|
95
|
+
return size
|
|
96
|
+
})
|
|
97
|
+
|
|
83
98
|
// Use Schema.TaggedError to define a custom error
|
|
84
99
|
export class SomeError extends Schema.TaggedError<SomeError>()("SomeError", {
|
|
85
100
|
message: Schema.String
|
|
@@ -247,7 +262,7 @@ They let you model finite or infinite data sources.
|
|
|
247
262
|
- `NodeStream.fromReadable` for Node.js readable streams
|
|
248
263
|
- **[Consuming and transforming streams](./ai-docs/src/03_stream/20_consuming-streams.ts)**: How to transform and consume streams using operators like `map`, `flatMap`, `filter`, `mapEffect`, and various `run*` methods.
|
|
249
264
|
- **[Decoding and encoding streams](./ai-docs/src/03_stream/30_encoding.ts)**:
|
|
250
|
-
Use `Stream.pipeThroughChannel` with the `Ndjson`
|
|
265
|
+
Use `Stream.pipeThroughChannel` with the `Ndjson` and `SchemaBinary` modules to
|
|
251
266
|
decode and encode streams of structured data.
|
|
252
267
|
|
|
253
268
|
## Integrating Effect into existing applications
|
package/ai-docs/package.json
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@effect/sql-sqlite-wasm": "workspace:*",
|
|
28
28
|
"@effect/vitest": "workspace:*",
|
|
29
29
|
"effect": "workspace:*",
|
|
30
|
-
"hono": "^4.13.
|
|
31
|
-
"nodemailer": "^
|
|
30
|
+
"hono": "^4.13.7",
|
|
31
|
+
"nodemailer": "^10.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/nodemailer": "^8.0.1"
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @title Using Effect.fn
|
|
2
|
+
* @title Using Effect.fn and Effect.fnUntraced
|
|
3
3
|
*
|
|
4
|
-
* When writing functions that return an Effect, use `Effect.fn`
|
|
5
|
-
* generator syntax.
|
|
4
|
+
* When writing reusable functions that return an Effect, use `Effect.fn` or
|
|
5
|
+
* `Effect.fnUntraced` to use the generator syntax.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Use `Effect.fn("name")` when the function should create a tracing span. Prefer
|
|
8
|
+
* `Effect.fnUntraced` when tracing is not needed, particularly for library
|
|
9
|
+
* implementations and hot paths.
|
|
10
|
+
*
|
|
11
|
+
* **Avoid creating functions that only wrap and return an `Effect.gen`**.
|
|
9
12
|
*/
|
|
10
13
|
|
|
11
14
|
import { Effect, Schema } from "effect"
|
|
@@ -33,6 +36,16 @@ export const effectFunction = Effect.fn("effectFunction")(
|
|
|
33
36
|
})
|
|
34
37
|
)
|
|
35
38
|
|
|
39
|
+
// Effect.fnUntraced avoids tracing and stack-frame capture while still reusing
|
|
40
|
+
// the generator body. This is preferred for library functions that do not
|
|
41
|
+
// represent a useful tracing boundary.
|
|
42
|
+
export const validateBatchSize = Effect.fnUntraced(function*(size: number): Effect.fn.Return<number, SomeError> {
|
|
43
|
+
if (!Number.isInteger(size) || size <= 0) {
|
|
44
|
+
return yield* new SomeError({ message: "Batch size must be a positive integer" })
|
|
45
|
+
}
|
|
46
|
+
return size
|
|
47
|
+
})
|
|
48
|
+
|
|
36
49
|
// Use Schema.TaggedError to define a custom error
|
|
37
50
|
export class SomeError extends Schema.TaggedError<SomeError>()("SomeError", {
|
|
38
51
|
message: Schema.String
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
## Writing `Effect` code
|
|
2
2
|
|
|
3
|
-
Prefer
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Prefer `Effect.gen` for inline Effect code. For reusable functions, prefer
|
|
4
|
+
`Effect.fn("name")` when tracing is useful and `Effect.fnUntraced` when it is not,
|
|
5
|
+
particularly in library implementations and hot paths. Avoid functions that only
|
|
6
|
+
wrap and return `Effect.gen`. Attach additional behaviour with combinators; this
|
|
7
|
+
style is more readable and easier to maintain than using combinators alone.
|
|
@@ -14,7 +14,7 @@ export const SqlClientLayer: Layer.Layer<
|
|
|
14
14
|
PgClient.PgClient | SqlClient.SqlClient,
|
|
15
15
|
Config.ConfigError | SqlError.SqlError
|
|
16
16
|
> = PgClient.layerConfig({
|
|
17
|
-
url: Config.
|
|
17
|
+
url: Config.Redacted("DATABASE_URL")
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
export class UserRespositoryError extends Schema.TaggedError<UserRespositoryError>()("UserRespositoryError", {
|
|
@@ -51,7 +51,7 @@ export class MessageStore extends Context.Service<MessageStore, {
|
|
|
51
51
|
static readonly layer = Layer.unwrap(
|
|
52
52
|
Effect.gen(function*() {
|
|
53
53
|
// Read config inside an Effect, then choose which concrete layer to use.
|
|
54
|
-
const useInMemory = yield* Config.
|
|
54
|
+
const useInMemory = yield* Config.Boolean("MESSAGE_STORE_IN_MEMORY").pipe(
|
|
55
55
|
Config.withDefault(false)
|
|
56
56
|
)
|
|
57
57
|
|
|
@@ -59,7 +59,7 @@ export class MessageStore extends Context.Service<MessageStore, {
|
|
|
59
59
|
return MessageStore.layerInMemory
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const remoteUrl = yield* Config.
|
|
62
|
+
const remoteUrl = yield* Config.URL("MESSAGE_STORE_URL")
|
|
63
63
|
return MessageStore.layerRemote(remoteUrl)
|
|
64
64
|
})
|
|
65
65
|
)
|
|
@@ -22,8 +22,8 @@ export class Smtp extends Context.Service<Smtp, {
|
|
|
22
22
|
static readonly layer = Layer.effect(
|
|
23
23
|
Smtp,
|
|
24
24
|
Effect.gen(function*() {
|
|
25
|
-
const user = yield* Config.
|
|
26
|
-
const pass = yield* Config.
|
|
25
|
+
const user = yield* Config.String("SMTP_USER")
|
|
26
|
+
const pass = yield* Config.Redacted("SMTP_PASS")
|
|
27
27
|
|
|
28
28
|
// Use `Effect.acquireRelease` to manage the lifecycle of the SMTP
|
|
29
29
|
// transporter.
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @title Decoding and encoding streams
|
|
3
3
|
*
|
|
4
|
-
* Use `Stream.pipeThroughChannel` with the `Ndjson`
|
|
4
|
+
* Use `Stream.pipeThroughChannel` with the `Ndjson` and `SchemaBinary` modules to
|
|
5
5
|
* decode and encode streams of structured data.
|
|
6
6
|
*/
|
|
7
7
|
import { DateTime, Schema, Stream } from "effect"
|
|
8
|
-
import {
|
|
8
|
+
import { Ndjson, SchemaBinary } from "effect/unstable/encoding"
|
|
9
9
|
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
// `Msgpack.encode()`, etc.).
|
|
13
|
-
export const msgpackDecoder = Msgpack.decodeSchema(Schema.Struct({
|
|
10
|
+
// SchemaBinary derives a framed binary decoder directly from a schema.
|
|
11
|
+
export const schemaBinaryDecoder = SchemaBinary.decode(Schema.Struct({
|
|
14
12
|
id: Schema.Int,
|
|
15
13
|
name: Schema.String
|
|
16
|
-
}))
|
|
14
|
+
}))()
|
|
17
15
|
|
|
18
16
|
// ---------------------------------------------------------------------------
|
|
19
17
|
// Domain
|
|
@@ -41,7 +41,7 @@ export const AppLoggerLayer = Logger.layer([appLogger]).pipe(
|
|
|
41
41
|
// Create a logger layer that uses the default logger for development, and the
|
|
42
42
|
// custom logger for production
|
|
43
43
|
export const LoggerLayer = Layer.unwrap(Effect.gen(function*() {
|
|
44
|
-
const env = yield* Config.
|
|
44
|
+
const env = yield* Config.String("NODE_ENV").pipe(Config.withDefault("development"))
|
|
45
45
|
if (env === "production") {
|
|
46
46
|
return AppLoggerLayer
|
|
47
47
|
}
|
|
@@ -10,7 +10,7 @@ import { Argument, Command, Flag } from "effect/unstable/cli"
|
|
|
10
10
|
|
|
11
11
|
// You can define flags outside of commands and reuse them across multiple
|
|
12
12
|
// commands.
|
|
13
|
-
const workspace = Flag.
|
|
13
|
+
const workspace = Flag.String("workspace").pipe(
|
|
14
14
|
Flag.withAlias("w"),
|
|
15
15
|
Flag.withDescription("Workspace to operate on"),
|
|
16
16
|
Flag.withDefault("personal")
|
|
@@ -21,7 +21,7 @@ const workspace = Flag.string("workspace").pipe(
|
|
|
21
21
|
const tasks = Command.make("tasks").pipe(
|
|
22
22
|
Command.withSharedFlags({
|
|
23
23
|
workspace,
|
|
24
|
-
verbose: Flag.
|
|
24
|
+
verbose: Flag.Boolean("verbose").pipe(
|
|
25
25
|
Flag.withAlias("v"),
|
|
26
26
|
Flag.withDescription("Print diagnostic output"),
|
|
27
27
|
Flag.withDefault(false)
|
|
@@ -41,17 +41,17 @@ const Email = Schema.String.pipe(
|
|
|
41
41
|
const create = Command.make(
|
|
42
42
|
"create",
|
|
43
43
|
{
|
|
44
|
-
title: Argument.
|
|
44
|
+
title: Argument.String("title").pipe(
|
|
45
45
|
Argument.withDescription("Task title"),
|
|
46
46
|
// Reject empty titles at parse time, so the handler only ever sees
|
|
47
47
|
// valid input
|
|
48
48
|
Argument.withSchema(Schema.NonEmptyString)
|
|
49
49
|
),
|
|
50
|
-
priority: Flag.
|
|
50
|
+
priority: Flag.Literals("priority", ["low", "normal", "high"]).pipe(
|
|
51
51
|
Flag.withDescription("Priority for the new task"),
|
|
52
52
|
Flag.withDefault("normal")
|
|
53
53
|
),
|
|
54
|
-
assignee: Flag.
|
|
54
|
+
assignee: Flag.String("assignee").pipe(
|
|
55
55
|
Flag.withDescription("Email address of the person to assign"),
|
|
56
56
|
Flag.withSchema(Email),
|
|
57
57
|
Flag.optional
|
|
@@ -88,11 +88,11 @@ const create = Command.make(
|
|
|
88
88
|
const list = Command.make(
|
|
89
89
|
"list",
|
|
90
90
|
{
|
|
91
|
-
status: Flag.
|
|
91
|
+
status: Flag.Literals("status", ["open", "done", "all"]).pipe(
|
|
92
92
|
Flag.withDescription("Filter tasks by status"),
|
|
93
93
|
Flag.withDefault("open")
|
|
94
94
|
),
|
|
95
|
-
json: Flag.
|
|
95
|
+
json: Flag.Boolean("json").pipe(
|
|
96
96
|
Flag.withDescription("Print machine-readable output"),
|
|
97
97
|
Flag.withDefault(false)
|
|
98
98
|
)
|
|
@@ -13,7 +13,7 @@ import { LaunchPlan } from "./fixtures/domain/LaunchPlan.ts"
|
|
|
13
13
|
|
|
14
14
|
// You can use Config to create ai clients
|
|
15
15
|
const AnthropicClientLayer = AnthropicClient.layerConfig({
|
|
16
|
-
apiKey: Config.
|
|
16
|
+
apiKey: Config.Redacted("ANTHROPIC_API_KEY")
|
|
17
17
|
}).pipe(
|
|
18
18
|
// Providers typically require an HttpClient, but you can choose which one to
|
|
19
19
|
// use.
|
|
@@ -21,7 +21,7 @@ const AnthropicClientLayer = AnthropicClient.layerConfig({
|
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
const OpenAiClientLayer = OpenAiClient.layerConfig({
|
|
24
|
-
apiKey: Config.
|
|
24
|
+
apiKey: Config.Redacted("OPENAI_API_KEY")
|
|
25
25
|
}).pipe(
|
|
26
26
|
Layer.provide(FetchHttpClient.layer)
|
|
27
27
|
)
|
|
@@ -101,7 +101,7 @@ const ProductToolkitLayer = ProductToolkit.toLayer(Effect.gen(function*() {
|
|
|
101
101
|
|
|
102
102
|
// Provider setup (same pattern as the language-model example).
|
|
103
103
|
const OpenAiClientLayer = OpenAiClient.layerConfig({
|
|
104
|
-
apiKey: Config.
|
|
104
|
+
apiKey: Config.Redacted("OPENAI_API_KEY")
|
|
105
105
|
}).pipe(Layer.provide(FetchHttpClient.layer))
|
|
106
106
|
|
|
107
107
|
export class ProductAssistantError extends Schema.TaggedError<ProductAssistantError>()(
|
|
@@ -14,7 +14,7 @@ import { FetchHttpClient } from "effect/unstable/http"
|
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
|
|
16
16
|
const OpenAiClientLayer = OpenAiClient.layerConfig({
|
|
17
|
-
apiKey: Config.
|
|
17
|
+
apiKey: Config.Redacted("OPENAI_API_KEY")
|
|
18
18
|
}).pipe(Layer.provide(FetchHttpClient.layer))
|
|
19
19
|
|
|
20
20
|
// ---------------------------------------------------------------------------
|
package/dist/PgAuth.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ export declare class AuthError extends AuthError_base<{
|
|
|
12
12
|
readonly message: string;
|
|
13
13
|
}> {
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Computes the legacy PostgreSQL MD5 password response.
|
|
17
|
+
*
|
|
18
|
+
* @category authentication
|
|
19
|
+
* @since 4.0.0
|
|
20
|
+
*/
|
|
15
21
|
export declare const md5Password: (options: {
|
|
16
22
|
readonly user: string;
|
|
17
23
|
readonly password: string;
|
|
@@ -53,6 +59,12 @@ export interface ScramFinal {
|
|
|
53
59
|
* @since 4.0.0
|
|
54
60
|
*/
|
|
55
61
|
export type ScramState = ScramFirst | ScramFinal;
|
|
62
|
+
/**
|
|
63
|
+
* Creates the first SCRAM-SHA-256 client message.
|
|
64
|
+
*
|
|
65
|
+
* @category SCRAM
|
|
66
|
+
* @since 4.0.0
|
|
67
|
+
*/
|
|
56
68
|
export declare const scramInit: (options: {
|
|
57
69
|
readonly password: string;
|
|
58
70
|
readonly nonce: string;
|
|
@@ -60,10 +72,22 @@ export declare const scramInit: (options: {
|
|
|
60
72
|
readonly state: ScramFirst;
|
|
61
73
|
readonly response: Uint8Array;
|
|
62
74
|
}, AuthError>;
|
|
75
|
+
/**
|
|
76
|
+
* Processes the server's SCRAM challenge and creates the client proof.
|
|
77
|
+
*
|
|
78
|
+
* @category SCRAM
|
|
79
|
+
* @since 4.0.0
|
|
80
|
+
*/
|
|
63
81
|
export declare const scramContinue: (state: ScramFirst, challenge: Uint8Array) => Result.Result<{
|
|
64
82
|
readonly state: ScramFinal;
|
|
65
83
|
readonly response: Uint8Array;
|
|
66
84
|
}, AuthError>;
|
|
85
|
+
/**
|
|
86
|
+
* Verifies the server's final SCRAM message.
|
|
87
|
+
*
|
|
88
|
+
* @category SCRAM
|
|
89
|
+
* @since 4.0.0
|
|
90
|
+
*/
|
|
67
91
|
export declare const scramFinish: (state: ScramFinal, challenge: Uint8Array) => Result.Result<void, AuthError>;
|
|
68
92
|
export {};
|
|
69
93
|
//# sourceMappingURL=PgAuth.d.ts.map
|
package/dist/PgAuth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgAuth.d.ts","sourceRoot":"","sources":["../src/PgAuth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PgAuth.d.ts","sourceRoot":"","sources":["../src/PgAuth.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;;;;AAGvC;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,eAAgC;IAC7D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,CAAC;CAAG;AA0EL;;;;;GAKG;AACH,eAAO,MAAM,WAAW,YAAa;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAC1B,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAA6C,CAAA;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,kBAAkB,CAAA;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAA;CACxC;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAA;CACrC;AAED;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;AAuDhD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,YAAa;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,KAAG,MAAM,CAAC,MAAM,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAA;CAAE,EAAE,SAAS,CAClD,CAAA;AAyDxC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,UACjB,UAAU,aACN,UAAU,KACpB,MAAM,CAAC,MAAM,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAA;CAAE,EAAE,SAAS,CACpC,CAAA;AAsBrD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,UACf,UAAU,aACN,UAAU,KACpB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAsD,CAAA"}
|
package/dist/PgAuth.js
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* `SCRAM-SHA-256-PLUS` is not implemented: channel binding needs the TLS
|
|
11
11
|
* socket, which this codec does not own. Passwords are used as UTF-8 without
|
|
12
12
|
* SASLprep normalisation, so non-ASCII passwords that require normalisation
|
|
13
|
-
* are not supported.
|
|
13
|
+
* are not supported. Server iteration counts above 1,000,000 are rejected
|
|
14
|
+
* before password derivation.
|
|
14
15
|
*
|
|
15
16
|
* @since 4.0.0
|
|
16
17
|
*/
|
|
@@ -42,6 +43,8 @@ const textEncoder = /*#__PURE__*/new TextEncoder();
|
|
|
42
43
|
const textDecoder = /*#__PURE__*/new TextDecoder("utf-8", {
|
|
43
44
|
fatal: true
|
|
44
45
|
});
|
|
46
|
+
/** Bounds synchronous PBKDF2 work requested by an untrusted server. */
|
|
47
|
+
const maxScramIterations = 1_000_000;
|
|
45
48
|
const bytesOf = value => Uint8Array.from(value);
|
|
46
49
|
const sha256 = data => bytesOf(createHash("sha256").update(data).digest());
|
|
47
50
|
const hmacSha256 = (key, data) => bytesOf(createHmac("sha256", key).update(data).digest());
|
|
@@ -83,6 +86,12 @@ const md5PasswordUnsafe = options => {
|
|
|
83
86
|
const outer = createHash("md5").update(textEncoder.encode(inner)).update(options.salt).digest("hex");
|
|
84
87
|
return `md5${outer}`;
|
|
85
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* Computes the legacy PostgreSQL MD5 password response.
|
|
91
|
+
*
|
|
92
|
+
* @category authentication
|
|
93
|
+
* @since 4.0.0
|
|
94
|
+
*/
|
|
86
95
|
export const md5Password = options => result(() => md5PasswordUnsafe(options));
|
|
87
96
|
/**
|
|
88
97
|
* The only SASL mechanism this module implements.
|
|
@@ -136,6 +145,12 @@ const scramInitUnsafe = options => {
|
|
|
136
145
|
response: textEncoder.encode(GS2_HEADER + clientFirstMessageBare)
|
|
137
146
|
};
|
|
138
147
|
};
|
|
148
|
+
/**
|
|
149
|
+
* Creates the first SCRAM-SHA-256 client message.
|
|
150
|
+
*
|
|
151
|
+
* @category SCRAM
|
|
152
|
+
* @since 4.0.0
|
|
153
|
+
*/
|
|
139
154
|
export const scramInit = options => result(() => scramInitUnsafe(options));
|
|
140
155
|
/**
|
|
141
156
|
* Answers an `AuthenticationSASLContinue` challenge.
|
|
@@ -160,7 +175,7 @@ const scramContinueUnsafe = (state, challenge) => {
|
|
|
160
175
|
const salt = fromBase64(saltText, "s");
|
|
161
176
|
const iterationText = attribute(attributes, "i");
|
|
162
177
|
const iterations = Number(iterationText);
|
|
163
|
-
if (!/^[1-9]\d*$/.test(iterationText) || !Number.isSafeInteger(iterations) || iterations >
|
|
178
|
+
if (!/^[1-9]\d*$/.test(iterationText) || !Number.isSafeInteger(iterations) || iterations > maxScramIterations) {
|
|
164
179
|
return fail(`Invalid SCRAM iteration count: ${iterationText}`);
|
|
165
180
|
}
|
|
166
181
|
const saltedPassword = bytesOf(pbkdf2Sync(textEncoder.encode(state.password), salt, iterations, 32, "sha256"));
|
|
@@ -178,6 +193,12 @@ const scramContinueUnsafe = (state, challenge) => {
|
|
|
178
193
|
response: textEncoder.encode(`${clientFinalMessageWithoutProof},p=${toBase64(clientProof)}`)
|
|
179
194
|
};
|
|
180
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Processes the server's SCRAM challenge and creates the client proof.
|
|
198
|
+
*
|
|
199
|
+
* @category SCRAM
|
|
200
|
+
* @since 4.0.0
|
|
201
|
+
*/
|
|
181
202
|
export const scramContinue = (state, challenge) => result(() => scramContinueUnsafe(state, challenge));
|
|
182
203
|
/**
|
|
183
204
|
* Verifies the server signature carried by `AuthenticationSASLFinal`. Returns
|
|
@@ -198,5 +219,11 @@ const scramFinishUnsafe = (state, challenge) => {
|
|
|
198
219
|
fail("SCRAM server signature mismatch");
|
|
199
220
|
}
|
|
200
221
|
};
|
|
222
|
+
/**
|
|
223
|
+
* Verifies the server's final SCRAM message.
|
|
224
|
+
*
|
|
225
|
+
* @category SCRAM
|
|
226
|
+
* @since 4.0.0
|
|
227
|
+
*/
|
|
201
228
|
export const scramFinish = (state, challenge) => result(() => scramFinishUnsafe(state, challenge));
|
|
202
229
|
//# sourceMappingURL=PgAuth.js.map
|
package/dist/PgAuth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PgAuth.js","names":[],"sources":["../src/PgAuth.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PgAuth.js","names":[],"sources":["../src/PgAuth.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;AAiBA,OAAO,KAAK,IAAI,MAAM,aAAa;AACnC,OAAO,KAAK,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe;AACvC,SAAS,UAAU,EAAE,UAAU,EAAE,UAAU,QAAQ,aAAa;AAEhE;;;;;;AAMA,OAAM,MAAO,SAAU,sBAAQ,IAAI,CAAC,W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