@pgxsinkit/pgwasm 0.6.2 → 0.6.4
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/dist/chunk-82r7js5b.js.map +2 -2
- package/dist/chunk-rqykg4gj.js.map +1 -1
- package/dist/chunk-rsenqaz0.js.map +1 -1
- package/dist/core/parse.d.ts.map +1 -1
- package/dist/drizzle/codecs.d.ts.map +1 -1
- package/dist/drizzle/driver.d.ts.map +1 -1
- package/dist/drizzle/index.js.map +3 -3
- package/dist/drizzle/session.d.ts.map +1 -1
- package/dist/opfs/core/mounted-vfs.d.ts +1 -1
- package/dist/opfs/core/mounted-vfs.d.ts.map +1 -1
- package/dist/opfs/index.js.map +8 -8
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/protocol/index.js.map +1 -1
- package/dist/protocol/wire/parser.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/opfs/SKILL.md +1 -1
- package/src/core/data-dir-archive.ts +1 -1
- package/src/core/parse.ts +2 -2
- package/src/core/pgwasm.ts +4 -4
- package/src/drizzle/codecs.ts +2 -2
- package/src/drizzle/driver.ts +1 -1
- package/src/drizzle/session.ts +2 -2
- package/src/opfs/broker/client.ts +4 -4
- package/src/opfs/broker/server.ts +3 -3
- package/src/opfs/core/codec.ts +2 -2
- package/src/opfs/core/metadata-store.ts +6 -6
- package/src/opfs/core/mounted-vfs.ts +1 -1
- package/src/opfs/core/port.ts +1 -1
- package/src/opfs/core/repacked-vfs.ts +6 -6
- package/src/opfs/core/state-machine.ts +3 -3
- package/src/protocol/index.ts +1 -1
- package/src/protocol/wire/parser.ts +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../../src/protocol/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../src/protocol/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC5D,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC3G,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,sEAAsE;AACtE,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,CAEnD"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/protocol/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * Wire-level access to a pgwasm instance, for tools that speak the Postgres protocol themselves\n * (pg_dump, a REPL, a benchmark). Everyday code uses `query`, `exec` and `transaction` instead: the\n * `execProtocol*` calls bypass pgwasm's query locks. A tool whose exchanges must not interleave with\n * anything else runs them inside `runExclusiveSession`, which holds those locks.\n */\n\nimport {
|
|
5
|
+
"/**\n * Wire-level access to a pgwasm instance, for tools that speak the Postgres protocol themselves\n * (pg_dump, a REPL, a benchmark). Everyday code uses `query`, `exec` and `transaction` instead: the\n * `execProtocol*` calls bypass pgwasm's query locks. A tool whose exchanges must not interleave with\n * anything else runs them inside `runExclusiveSession`, which holds those locks.\n */\n\nimport { type PgwasmProtocol, protocolAccessOf } from \"../core/internals\";\nimport type { Pgwasm } from \"../interface\";\n\nexport type {\n ExecProtocolOptions,\n ExecProtocolResult,\n ExecProtocolStreamOptions,\n PgwasmProtocol,\n} from \"../core/internals\";\nexport { Parser, serialize, messages, Modes } from \"./wire\";\nexport type { BindOpts, ExecOpts, LegalValue, MessageCallback, Mode, ParseOpts, PortalOpts } from \"./wire\";\nexport type { BackendMessage } from \"./wire/messages\";\n\n/** The wire-level methods of a database created by `createPgwasm`. */\nexport function protocol(pg: Pgwasm): PgwasmProtocol {\n return protocolAccessOf(pg);\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";;;;;;;;;;;;;AAqBO,SAAS,QAAQ,CAAC,IAA4B;AAAA,EACnD,OAAO,iBAAiB,EAAE;AAAA;",
|
|
8
8
|
"debugId": "D26D28AA4E01519D64756E2164756E21",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sources":["../../../src/protocol/wire/parser.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sources":["../../../src/protocol/wire/parser.ts"],"names":[],"mappings":"AAKA,OAAO,EASL,KAAK,cAAc,EAsBpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,eAAe,EAAS,MAAM,SAAS,CAAC;AAkCtD,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,CAAC;AAE5D;;;GAGG;AACH,qBAAa,MAAM;;IAMjB,KAAK,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAgC9D;CAiQF"}
|
package/package.json
CHANGED
package/skills/opfs/SKILL.md
CHANGED
|
@@ -11,7 +11,7 @@ import type { DataDirEntry } from "../build/seam";
|
|
|
11
11
|
import { BackupFormatError } from "../errors";
|
|
12
12
|
import type { DumpCompression } from "../interface";
|
|
13
13
|
import { gunzipIfCompressed, gzip } from "../tar/gzip";
|
|
14
|
-
import { readTar, TarFormatError, writeTar
|
|
14
|
+
import { readTar, type TarEntry, TarFormatError, writeTar } from "../tar/tar";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Normalize a backup member's name to a data-directory path: a leading `/`, no trailing `/`, no empty,
|
package/src/core/parse.ts
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
import type { QueryOptions, Results, Row } from "../interface";
|
|
5
5
|
import {
|
|
6
|
+
type BackendMessage,
|
|
6
7
|
CommandCompleteMessage,
|
|
7
8
|
DataRowMessage,
|
|
8
9
|
ParameterDescriptionMessage,
|
|
9
10
|
RowDescriptionMessage,
|
|
10
|
-
type BackendMessage,
|
|
11
11
|
} from "../protocol/wire/messages";
|
|
12
|
-
import {
|
|
12
|
+
import { type Parser, parseType } from "../types";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Turn the backend messages of a simple or extended query into result sets, one per statement
|
package/src/core/pgwasm.ts
CHANGED
|
@@ -33,11 +33,11 @@ import type {
|
|
|
33
33
|
Transaction,
|
|
34
34
|
} from "../interface";
|
|
35
35
|
import {
|
|
36
|
-
|
|
36
|
+
type BackendMessage,
|
|
37
37
|
DatabaseError,
|
|
38
|
+
DataRowMessage,
|
|
38
39
|
NoticeMessage,
|
|
39
40
|
NotificationResponseMessage,
|
|
40
|
-
type BackendMessage,
|
|
41
41
|
} from "../protocol/wire/messages";
|
|
42
42
|
import { Parser as WireParser } from "../protocol/wire/parser";
|
|
43
43
|
import { serialize } from "../protocol/wire/serializer";
|
|
@@ -45,11 +45,11 @@ import { query as queryTemplate } from "../templating";
|
|
|
45
45
|
import {
|
|
46
46
|
arrayParser,
|
|
47
47
|
arraySerializer,
|
|
48
|
+
type Parser,
|
|
48
49
|
parsers as defaultParsers,
|
|
50
|
+
type Serializer,
|
|
49
51
|
serializers as defaultSerializers,
|
|
50
52
|
toText,
|
|
51
|
-
type Parser,
|
|
52
|
-
type Serializer,
|
|
53
53
|
} from "../types";
|
|
54
54
|
import { writeDataDirArchive } from "./data-dir-archive";
|
|
55
55
|
import {
|
package/src/drizzle/codecs.ts
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
parseGeometryArrayAndNormalize,
|
|
12
12
|
parseGeometryTuple,
|
|
13
13
|
parseGeometryXY,
|
|
14
|
+
type PgCodecs,
|
|
14
15
|
refineGenericPgCodecs,
|
|
15
16
|
textToDate,
|
|
16
17
|
textToDateWithTz,
|
|
17
|
-
type PgCodecs,
|
|
18
18
|
} from "drizzle-orm/pg-core/codecs";
|
|
19
19
|
import { pgHexToUint8Array } from "drizzle-orm/utils";
|
|
20
20
|
|
|
21
|
-
import { arrayParser, DATE, INTERVAL, TIMESTAMP, TIMESTAMPTZ
|
|
21
|
+
import { arrayParser, DATE, INTERVAL, type Parser, TIMESTAMP, TIMESTAMPTZ } from "../types";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* The identity parsers the driver passes with every query: these types reach drizzle as Postgres'
|
package/src/drizzle/driver.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { AnyRelations, EmptyRelations } from "drizzle-orm/relations";
|
|
|
12
12
|
import { PgwasmError } from "../errors";
|
|
13
13
|
import type { Pgwasm } from "../interface";
|
|
14
14
|
import { pgwasmCodecs } from "./codecs";
|
|
15
|
-
import {
|
|
15
|
+
import { type PgwasmQueryResultHKT, PgwasmSession, type PgwasmSessionClient } from "./session";
|
|
16
16
|
|
|
17
17
|
export class PgwasmDatabase<TRelations extends AnyRelations = EmptyRelations> extends PgAsyncDatabase<
|
|
18
18
|
PgwasmQueryResultHKT,
|
package/src/drizzle/session.ts
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// own database. Owned outright (ADR-0062).
|
|
4
4
|
|
|
5
5
|
import { entityKind } from "drizzle-orm/entity";
|
|
6
|
-
import {
|
|
6
|
+
import { type Logger, NoopLogger } from "drizzle-orm/logger";
|
|
7
7
|
import { PgAsyncPreparedQuery, PgAsyncSession, PgAsyncTransaction } from "drizzle-orm/pg-core/async/session";
|
|
8
8
|
import type { PgDialect } from "drizzle-orm/pg-core/dialect";
|
|
9
9
|
import type { PgQueryResultHKT, PgTransactionConfig, PreparedQueryConfig } from "drizzle-orm/pg-core/session";
|
|
10
10
|
import type { AnyRelations } from "drizzle-orm/relations";
|
|
11
|
-
import {
|
|
11
|
+
import { type Query, sql } from "drizzle-orm/sql/sql";
|
|
12
12
|
import type { Assume } from "drizzle-orm/utils";
|
|
13
13
|
|
|
14
14
|
import type { Pgwasm, Results, Row, Transaction } from "../interface";
|
|
@@ -46,9 +46,11 @@
|
|
|
46
46
|
|
|
47
47
|
import { FsError } from "../core/errors";
|
|
48
48
|
import {
|
|
49
|
+
errnoName,
|
|
49
50
|
FAULT_NONE,
|
|
50
51
|
FAULT_PROTOCOL,
|
|
51
52
|
FAULT_STORE,
|
|
53
|
+
fsErrorNameOf,
|
|
52
54
|
HEADER_ERRNO,
|
|
53
55
|
HEADER_FAULT,
|
|
54
56
|
HEADER_OPCODE,
|
|
@@ -58,6 +60,7 @@ import {
|
|
|
58
60
|
HEADER_RESULT_LO,
|
|
59
61
|
HEADER_SEQUENCE,
|
|
60
62
|
HEADER_STATE,
|
|
63
|
+
joinResult,
|
|
61
64
|
OPCODE_CLOSE,
|
|
62
65
|
OPCODE_FSTAT,
|
|
63
66
|
OPCODE_FSYNC,
|
|
@@ -78,14 +81,11 @@ import {
|
|
|
78
81
|
PayloadReader,
|
|
79
82
|
PayloadWriter,
|
|
80
83
|
READDIR_DONE,
|
|
84
|
+
readStat,
|
|
81
85
|
STATE_DETACHED,
|
|
82
86
|
STATE_IDLE,
|
|
83
87
|
STATE_REQUEST,
|
|
84
88
|
STATE_RESPONSE,
|
|
85
|
-
errnoName,
|
|
86
|
-
fsErrorNameOf,
|
|
87
|
-
joinResult,
|
|
88
|
-
readStat,
|
|
89
89
|
} from "./protocol";
|
|
90
90
|
import type { BrokerStat, RepackedChannel } from "./protocol";
|
|
91
91
|
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
HEADER_RESULT_HI,
|
|
40
40
|
HEADER_RESULT_LO,
|
|
41
41
|
HEADER_STATE,
|
|
42
|
+
isKnownOpcode,
|
|
42
43
|
OPCODE_CLOSE,
|
|
43
44
|
OPCODE_FSTAT,
|
|
44
45
|
OPCODE_FSYNC,
|
|
@@ -60,13 +61,12 @@ import {
|
|
|
60
61
|
PayloadOverflowError,
|
|
61
62
|
PayloadReader,
|
|
62
63
|
PayloadWriter,
|
|
64
|
+
planOpen,
|
|
63
65
|
READDIR_DONE,
|
|
66
|
+
splitResult,
|
|
64
67
|
STATE_DETACHED,
|
|
65
68
|
STATE_REQUEST,
|
|
66
69
|
STATE_RESPONSE,
|
|
67
|
-
isKnownOpcode,
|
|
68
|
-
planOpen,
|
|
69
|
-
splitResult,
|
|
70
70
|
writeStat,
|
|
71
71
|
} from "./protocol";
|
|
72
72
|
import type { RepackedChannel, RepackedDoorbell } from "./protocol";
|
package/src/opfs/core/codec.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { crc32, crc32WithZeroedRange } from "./checksum";
|
|
|
2
2
|
import { CorruptStoreError, ExtentSizeMismatchError, StoreLimitError, StoreRecreationRequiredError } from "./errors";
|
|
3
3
|
import {
|
|
4
4
|
ARENA_HEADER_BYTES,
|
|
5
|
+
checkedU64,
|
|
5
6
|
FORMAT_VERSION,
|
|
6
7
|
LIMITS_PROFILE_VERSION,
|
|
7
8
|
MAX_COMPONENT_BYTES,
|
|
@@ -12,11 +13,10 @@ import {
|
|
|
12
13
|
MAX_METADATA_BASE_WRITER_BYTES,
|
|
13
14
|
MAX_PATH_BYTES,
|
|
14
15
|
MAX_TOTAL_EXTENTS,
|
|
15
|
-
checkedU64,
|
|
16
16
|
validateExtentSize,
|
|
17
17
|
} from "./limits";
|
|
18
18
|
import { validatePathComponent, validateSymlinkTarget } from "./path";
|
|
19
|
-
import {
|
|
19
|
+
import { estimateTxnPayloadBytes, IndexedExtentSet, validateState } from "./state-machine";
|
|
20
20
|
import type {
|
|
21
21
|
DirectoryInode,
|
|
22
22
|
ExtentRun,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ACTIVATION_SLOT_BYTES,
|
|
3
|
-
METADATA_HEADER_BYTES,
|
|
4
|
-
TXN_FRAME_HEADER_BYTES,
|
|
5
3
|
decodeArenaHeader,
|
|
6
4
|
decodeMetadataBase,
|
|
7
5
|
decodeTxnFrame,
|
|
@@ -10,9 +8,11 @@ import {
|
|
|
10
8
|
encodeMetadataBase,
|
|
11
9
|
inspectMetadataBaseHeader,
|
|
12
10
|
inspectTxnFrameHeader,
|
|
11
|
+
METADATA_HEADER_BYTES,
|
|
13
12
|
metadataBaseDigest,
|
|
14
13
|
selectActivationPair,
|
|
15
14
|
tryDecodeActivationSlot,
|
|
15
|
+
TXN_FRAME_HEADER_BYTES,
|
|
16
16
|
} from "./codec";
|
|
17
17
|
import type { ActivationRecord } from "./codec";
|
|
18
18
|
import {
|
|
@@ -25,18 +25,18 @@ import {
|
|
|
25
25
|
} from "./errors";
|
|
26
26
|
import {
|
|
27
27
|
ARENA_HEADER_BYTES,
|
|
28
|
+
checkedAdd,
|
|
29
|
+
checkedMultiply,
|
|
30
|
+
checkedSafeNumber,
|
|
28
31
|
DEFAULT_EXTENT_BYTES,
|
|
29
32
|
MAX_ACTIVE_LOG_BYTES,
|
|
30
33
|
MAX_ACTIVE_LOG_FRAMES,
|
|
31
34
|
MAX_EXTENT_BYTES,
|
|
32
35
|
MAX_METADATA_BASE_READER_BYTES,
|
|
33
36
|
MIN_EXTENT_BYTES,
|
|
34
|
-
checkedAdd,
|
|
35
|
-
checkedMultiply,
|
|
36
|
-
checkedSafeNumber,
|
|
37
37
|
validateExtentSize,
|
|
38
38
|
} from "./limits";
|
|
39
|
-
import {
|
|
39
|
+
import { metadataFileName, OWNED_FILE_NAMES, readExact, truncateChecked, writeExact } from "./port";
|
|
40
40
|
import type { OwnedFileName, RepackedFileHandle, RepackedPort, RepackedPortEntry } from "./port";
|
|
41
41
|
import { applyTxn, createInitialState, otherMetadataFile, validateState } from "./state-machine";
|
|
42
42
|
import type { MetadataFile, VfsState } from "./state-machine";
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
import { FS_ERRNO, FsError } from "./errors";
|
|
46
46
|
import { MAX_SYMLINK_HOPS } from "./limits";
|
|
47
47
|
import { parsePath } from "./path";
|
|
48
|
-
import type {
|
|
48
|
+
import type { RepackedFileSystem, RepackedStat, RepackedVfsMetrics, RepackReason } from "./repacked-vfs";
|
|
49
49
|
|
|
50
50
|
/** One store served at one path prefix. */
|
|
51
51
|
export interface RepackedMount {
|
package/src/opfs/core/port.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CorruptStoreError, StoreLimitError } from "./errors";
|
|
2
2
|
import {
|
|
3
3
|
ARENA_HEADER_BYTES,
|
|
4
|
-
MAX_TOTAL_EXTENTS,
|
|
5
4
|
checkedAdd,
|
|
6
5
|
checkedMultiply,
|
|
7
6
|
checkedSafeNumber,
|
|
8
7
|
checkedU64,
|
|
8
|
+
MAX_TOTAL_EXTENTS,
|
|
9
9
|
validateExtentSize,
|
|
10
10
|
} from "./limits";
|
|
11
11
|
import type { MetadataFile } from "./state-machine";
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ACTIVATION_SLOT_BYTES,
|
|
3
3
|
encodeActivationSlot,
|
|
4
|
-
encodeValidatedMetadataBase,
|
|
5
4
|
encodeTxnFrame,
|
|
5
|
+
encodeValidatedMetadataBase,
|
|
6
6
|
metadataBaseDigest,
|
|
7
7
|
txnFrameBytes,
|
|
8
8
|
} from "./codec";
|
|
9
9
|
import { CorruptStoreError, FS_ERRNO, FsError, StoreClosedError, StoreFailedError, StoreLimitError } from "./errors";
|
|
10
10
|
import {
|
|
11
11
|
ARENA_HEADER_BYTES,
|
|
12
|
+
checkedAdd,
|
|
13
|
+
checkedMultiply,
|
|
14
|
+
checkedSafeNumber,
|
|
15
|
+
checkedU64,
|
|
12
16
|
MAX_ACTIVE_LOG_BYTES,
|
|
13
17
|
MAX_ACTIVE_LOG_FRAMES,
|
|
14
18
|
MAX_EXTENTS_PER_INODE,
|
|
15
19
|
MAX_METADATA_BASE_WRITER_BYTES,
|
|
16
20
|
SOFT_ACTIVE_LOG_BYTES,
|
|
17
21
|
SOFT_ACTIVE_LOG_FRAMES,
|
|
18
|
-
checkedAdd,
|
|
19
|
-
checkedMultiply,
|
|
20
|
-
checkedSafeNumber,
|
|
21
|
-
checkedU64,
|
|
22
22
|
} from "./limits";
|
|
23
23
|
import { openMetadataStore } from "./metadata-store";
|
|
24
24
|
import type { OpenedMetadataStore } from "./metadata-store";
|
|
25
25
|
import { encodedUtf8Length } from "./path";
|
|
26
|
-
import {
|
|
26
|
+
import { arenaByteOffset, metadataFileName, PortWriteError, truncateChecked, writeExact } from "./port";
|
|
27
27
|
import type { RepackedFileHandle, RepackedPort } from "./port";
|
|
28
28
|
import {
|
|
29
29
|
applyTxn,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { FsError, StoreLimitError } from "./errors";
|
|
2
2
|
import {
|
|
3
|
+
checkedAdd,
|
|
4
|
+
checkedU64,
|
|
3
5
|
MAX_EXTENTS_PER_INODE,
|
|
4
|
-
MAX_INODES,
|
|
5
6
|
MAX_FRAME_PAYLOAD_BYTES,
|
|
7
|
+
MAX_INODES,
|
|
6
8
|
MAX_METADATA_BASE_WRITER_BYTES,
|
|
7
9
|
MAX_PATH_BYTES,
|
|
8
10
|
MAX_PATH_DEPTH,
|
|
9
11
|
MAX_SYMLINK_HOPS,
|
|
10
12
|
MAX_TOTAL_EXTENTS,
|
|
11
13
|
MAX_U64,
|
|
12
|
-
checkedAdd,
|
|
13
|
-
checkedU64,
|
|
14
14
|
validateExtentSize,
|
|
15
15
|
} from "./limits";
|
|
16
16
|
import { encodedUtf8Length, parsePath, validatePathComponent, validateSymlinkTarget } from "./path";
|
package/src/protocol/index.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* anything else runs them inside `runExclusiveSession`, which holds those locks.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { type PgwasmProtocol, protocolAccessOf } from "../core/internals";
|
|
9
9
|
import type { Pgwasm } from "../interface";
|
|
10
10
|
|
|
11
11
|
export type {
|
|
@@ -6,11 +6,13 @@ import { BufferReader } from "./buffer-reader";
|
|
|
6
6
|
import {
|
|
7
7
|
AuthenticationCleartextPassword,
|
|
8
8
|
AuthenticationMD5Password,
|
|
9
|
+
type AuthenticationMessage,
|
|
9
10
|
AuthenticationOk,
|
|
10
11
|
AuthenticationSASL,
|
|
11
12
|
AuthenticationSASLContinue,
|
|
12
13
|
AuthenticationSASLFinal,
|
|
13
14
|
BackendKeyDataMessage,
|
|
15
|
+
type BackendMessage,
|
|
14
16
|
bindComplete,
|
|
15
17
|
closeComplete,
|
|
16
18
|
CommandCompleteMessage,
|
|
@@ -21,6 +23,7 @@ import {
|
|
|
21
23
|
DataRowMessage,
|
|
22
24
|
emptyQuery,
|
|
23
25
|
Field,
|
|
26
|
+
type MessageName,
|
|
24
27
|
noData,
|
|
25
28
|
NoticeMessage,
|
|
26
29
|
NotificationResponseMessage,
|
|
@@ -31,11 +34,8 @@ import {
|
|
|
31
34
|
ReadyForQueryMessage,
|
|
32
35
|
replicationStart,
|
|
33
36
|
RowDescriptionMessage,
|
|
34
|
-
type AuthenticationMessage,
|
|
35
|
-
type BackendMessage,
|
|
36
|
-
type MessageName,
|
|
37
37
|
} from "./messages";
|
|
38
|
-
import {
|
|
38
|
+
import { type BufferParameter, Modes } from "./types";
|
|
39
39
|
|
|
40
40
|
// Every message starts with one type byte and an int32 length that counts itself but not the type.
|
|
41
41
|
const CODE_LENGTH = 1;
|