@zvndev/powdb-client 0.3.1 → 0.3.2

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 CHANGED
@@ -304,6 +304,10 @@ The client enforces the same frame limits as the server and throws on violation:
304
304
  - Node.js 18+ (uses `node:net`, `node:tls`)
305
305
  - A running PowDB server (`cargo run --release -p powdb-server`)
306
306
 
307
+ For local development, `npm test` and `npm run test:pool` start a disposable
308
+ PowDB server automatically when `POWDB_PORT` is not set. Set `POWDB_HOST` and
309
+ `POWDB_PORT` to run those tests against an existing server.
310
+
307
311
  ## License
308
312
 
309
313
  MIT
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * protocol.
6
6
  *
7
7
  * const client = await Client.connect({
8
- * host: "213.188.194.202",
8
+ * host: "127.0.0.1",
9
9
  * port: 5433,
10
10
  * dbName: "default",
11
11
  * password: process.env.POWDB_PASSWORD,
@@ -18,7 +18,7 @@ import * as tls from "node:tls";
18
18
  import { EventEmitter } from "node:events";
19
19
  import { type TypedRow, type TypedSchema } from "./typed.js";
20
20
  /** Client library version. Compared to the server's reported version. */
21
- export declare const CLIENT_VERSION = "0.3.1";
21
+ export declare const CLIENT_VERSION = "0.3.2";
22
22
  export type QueryResult = {
23
23
  kind: "rows";
24
24
  columns: string[];
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * protocol.
6
6
  *
7
7
  * const client = await Client.connect({
8
- * host: "213.188.194.202",
8
+ * host: "127.0.0.1",
9
9
  * port: 5433,
10
10
  * dbName: "default",
11
11
  * password: process.env.POWDB_PASSWORD,
@@ -21,7 +21,7 @@ import { encode, tryDecode } from "./protocol.js";
21
21
  import { PowDBError } from "./errors.js";
22
22
  import { coerceRows, } from "./typed.js";
23
23
  /** Client library version. Compared to the server's reported version. */
24
- export const CLIENT_VERSION = "0.3.1";
24
+ export const CLIENT_VERSION = "0.3.2";
25
25
  /** Module-level set of host:port pairs we've already warned about. */
26
26
  const versionWarnings = new Set();
27
27
  /** Extract the major component of a dotted version string, e.g. "0.2.0" → "0". */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zvndev/powdb-client",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript client for PowDB (PowQL wire protocol)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -15,7 +15,7 @@
15
15
  "license": "MIT",
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "https://github.com/zvndev/powdb",
18
+ "url": "git+https://github.com/zvndev/powdb.git",
19
19
  "directory": "clients/ts"
20
20
  },
21
21
  "keywords": ["powdb", "database", "client", "powql"],
@@ -24,10 +24,10 @@
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsc -p tsconfig.json",
27
- "test": "tsx test/client.test.ts",
27
+ "test": "tsx test/run-with-server.ts test/client.test.ts",
28
28
  "test:escape": "tsx test/escape.test.ts",
29
29
  "test:protocol": "tsx test/protocol.test.ts",
30
- "test:pool": "tsx test/pool.test.ts",
30
+ "test:pool": "tsx test/run-with-server.ts test/pool.test.ts",
31
31
  "test:typed": "tsx test/typed.test.ts",
32
32
  "test:errors": "tsx test/errors.test.ts",
33
33
  "demo": "tsx demo/demo.ts",
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * protocol.
6
6
  *
7
7
  * const client = await Client.connect({
8
- * host: "213.188.194.202",
8
+ * host: "127.0.0.1",
9
9
  * port: 5433,
10
10
  * dbName: "default",
11
11
  * password: process.env.POWDB_PASSWORD,
@@ -27,7 +27,7 @@ import {
27
27
  } from "./typed.js";
28
28
 
29
29
  /** Client library version. Compared to the server's reported version. */
30
- export const CLIENT_VERSION = "0.3.1";
30
+ export const CLIENT_VERSION = "0.3.2";
31
31
 
32
32
  export type QueryResult =
33
33
  | { kind: "rows"; columns: string[]; rows: string[][] }