@slonik/types 46.2.0 → 46.4.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/dist/types.d.ts CHANGED
@@ -1,12 +1,3 @@
1
- export type PrimitiveValueExpression = bigint | boolean | Buffer | null | number | readonly PrimitiveValueExpression[] | string;
2
- export type Query = {
3
- readonly sql: string;
4
- readonly values: readonly PrimitiveValueExpression[];
5
- };
6
- export type QueryResultRow = Record<string, PrimitiveValueExpression>;
7
- export type SerializableValue = {
8
- [key: string]: SerializableValue;
9
- } | boolean | null | number | readonly SerializableValue[] | SerializableValue[] | string | undefined;
10
1
  /**
11
2
  * @see https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
12
3
  */
@@ -17,6 +8,12 @@ export type ConnectionOptions = {
17
8
  options?: string;
18
9
  password?: string;
19
10
  port?: number;
11
+ ssl?: {
12
+ ca?: string;
13
+ cert?: string;
14
+ key?: string;
15
+ rejectUnauthorized: boolean;
16
+ };
20
17
  sslMode?: 'disable' | 'no-verify' | 'require';
21
18
  username?: string;
22
19
  };
@@ -24,4 +21,13 @@ export type Field = {
24
21
  readonly dataTypeId: number;
25
22
  readonly name: string;
26
23
  };
24
+ export type PrimitiveValueExpression = bigint | boolean | Buffer | null | number | readonly PrimitiveValueExpression[] | string;
25
+ export type Query = {
26
+ readonly sql: string;
27
+ readonly values: readonly PrimitiveValueExpression[];
28
+ };
29
+ export type QueryResultRow = Record<string, PrimitiveValueExpression>;
30
+ export type SerializableValue = boolean | null | number | readonly SerializableValue[] | SerializableValue[] | string | undefined | {
31
+ [key: string]: SerializableValue;
32
+ };
27
33
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,OAAO,GACP,MAAM,GACN,IAAI,GACJ,MAAM,GACN,SAAS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,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,kBAAkB,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,OAAO,GACP,MAAM,GACN,IAAI,GACJ,MAAM,GACN,SAAS,wBAAwB,EAAE,GACnC,MAAM,CAAC;AAEX,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,IAAI,GACJ,MAAM,GACN,SAAS,iBAAiB,EAAE,GAC5B,iBAAiB,EAAE,GACnB,MAAM,GACN,SAAS,GACT;IACE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAClC,CAAC"}
package/package.json CHANGED
@@ -20,11 +20,11 @@
20
20
  "@types/node": "^22.9.0",
21
21
  "ava": "^6.1.3",
22
22
  "cspell": "^8.16.0",
23
- "eslint": "^9.14.0",
23
+ "eslint": "^9.16.0",
24
24
  "nyc": "^15.1.0",
25
25
  "ts-node": "^10.9.1",
26
26
  "typescript": "^5.6.3",
27
- "@slonik/eslint-config": "^46.2.0"
27
+ "@slonik/eslint-config": "^46.4.0"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=18"
@@ -67,7 +67,7 @@
67
67
  "url": "https://github.com/gajus/slonik"
68
68
  },
69
69
  "types": "./dist/index.d.ts",
70
- "version": "46.2.0",
70
+ "version": "46.4.0",
71
71
  "scripts": {
72
72
  "build": "rm -fr ./dist && tsc --project ./tsconfig.json",
73
73
  "lint": "npm run lint:cspell && npm run lint:eslint && npm run lint:tsc",
package/src/types.ts CHANGED
@@ -1,3 +1,28 @@
1
+ /**
2
+ * @see https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
3
+ */
4
+ export type ConnectionOptions = {
5
+ applicationName?: string;
6
+ databaseName?: string;
7
+ host?: string;
8
+ options?: string;
9
+ password?: string;
10
+ port?: number;
11
+ ssl?: {
12
+ ca?: string;
13
+ cert?: string;
14
+ key?: string;
15
+ rejectUnauthorized: boolean;
16
+ };
17
+ sslMode?: 'disable' | 'no-verify' | 'require';
18
+ username?: string;
19
+ };
20
+
21
+ export type Field = {
22
+ readonly dataTypeId: number;
23
+ readonly name: string;
24
+ };
25
+
1
26
  export type PrimitiveValueExpression =
2
27
  | bigint
3
28
  | boolean
@@ -15,32 +40,13 @@ export type Query = {
15
40
  export type QueryResultRow = Record<string, PrimitiveValueExpression>;
16
41
 
17
42
  export type SerializableValue =
18
- | {
19
- [key: string]: SerializableValue;
20
- }
21
43
  | boolean
22
44
  | null
23
45
  | number
24
46
  | readonly SerializableValue[]
25
47
  | SerializableValue[]
26
48
  | string
27
- | undefined;
28
-
29
- /**
30
- * @see https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
31
- */
32
- export type ConnectionOptions = {
33
- applicationName?: string;
34
- databaseName?: string;
35
- host?: string;
36
- options?: string;
37
- password?: string;
38
- port?: number;
39
- sslMode?: 'disable' | 'no-verify' | 'require';
40
- username?: string;
41
- };
42
-
43
- export type Field = {
44
- readonly dataTypeId: number;
45
- readonly name: string;
46
- };
49
+ | undefined
50
+ | {
51
+ [key: string]: SerializableValue;
52
+ };