@slonik/types 40.2.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 +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +88 -0
- package/src/index.ts +15 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export type PrimitiveValueExpression = Buffer | bigint | boolean | number | string | readonly PrimitiveValueExpression[] | null;
|
|
3
|
+
export type Query = {
|
|
4
|
+
readonly sql: string;
|
|
5
|
+
readonly values: readonly PrimitiveValueExpression[];
|
|
6
|
+
};
|
|
7
|
+
export type QueryResultRow = Record<string, PrimitiveValueExpression>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,wBAAwB,EAAE,GACnC,IAAI,CAAC;AAET,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"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"access": "public",
|
|
3
|
+
"author": {
|
|
4
|
+
"email": "gajus@gajus.com",
|
|
5
|
+
"name": "Gajus Kuizinas",
|
|
6
|
+
"url": "http://gajus.com"
|
|
7
|
+
},
|
|
8
|
+
"ava": {
|
|
9
|
+
"extensions": [
|
|
10
|
+
"ts"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
"src/**/*.test.ts"
|
|
14
|
+
],
|
|
15
|
+
"require": [
|
|
16
|
+
"ts-node/register/transpile-only"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"roarr": "^7.21.1",
|
|
21
|
+
"safe-stable-stringify": "^2.4.3",
|
|
22
|
+
"serialize-error": "^8.0.0"
|
|
23
|
+
},
|
|
24
|
+
"description": "A Node.js PostgreSQL client with strict types, detailed logging and assertions.",
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "^18.15.3",
|
|
27
|
+
"ava": "^5.3.1",
|
|
28
|
+
"cspell": "^8.6.0",
|
|
29
|
+
"eslint": "^8.57.0",
|
|
30
|
+
"eslint-config-canonical": "^42.8.1",
|
|
31
|
+
"nyc": "^15.1.0",
|
|
32
|
+
"ts-node": "^10.9.1",
|
|
33
|
+
"typescript": "^5.4.3",
|
|
34
|
+
"zod": "^3.22.4"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"./src",
|
|
41
|
+
"./dist"
|
|
42
|
+
],
|
|
43
|
+
"keywords": [
|
|
44
|
+
"postgresql",
|
|
45
|
+
"promise",
|
|
46
|
+
"types"
|
|
47
|
+
],
|
|
48
|
+
"license": "BSD-3-Clause",
|
|
49
|
+
"main": "./dist/index.js",
|
|
50
|
+
"name": "@slonik/types",
|
|
51
|
+
"nyc": {
|
|
52
|
+
"all": true,
|
|
53
|
+
"exclude": [
|
|
54
|
+
"src/bin",
|
|
55
|
+
"src/queries/*.ts",
|
|
56
|
+
"**/*.d.ts"
|
|
57
|
+
],
|
|
58
|
+
"include": [
|
|
59
|
+
"src/**/*.ts"
|
|
60
|
+
],
|
|
61
|
+
"reporter": [
|
|
62
|
+
"html",
|
|
63
|
+
"text-summary"
|
|
64
|
+
],
|
|
65
|
+
"require": [
|
|
66
|
+
"ts-node/register/transpile-only"
|
|
67
|
+
],
|
|
68
|
+
"silent": true,
|
|
69
|
+
"sourceMap": false
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"zod": "^3"
|
|
73
|
+
},
|
|
74
|
+
"repository": {
|
|
75
|
+
"type": "git",
|
|
76
|
+
"url": "https://github.com/gajus/slonik"
|
|
77
|
+
},
|
|
78
|
+
"scripts": {
|
|
79
|
+
"build": "rm -fr ./dist && tsc --project ./tsconfig.json",
|
|
80
|
+
"lint": "npm run lint:cspell && npm run lint:eslint && npm run lint:tsc",
|
|
81
|
+
"lint:cspell": "cspell . --no-progress --gitignore",
|
|
82
|
+
"lint:eslint": "eslint --cache ./src",
|
|
83
|
+
"lint:tsc": "tsc --noEmit",
|
|
84
|
+
"test": "nyc ava --verbose --serial"
|
|
85
|
+
},
|
|
86
|
+
"types": "./dist/index.d.ts",
|
|
87
|
+
"version": "40.2.2"
|
|
88
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PrimitiveValueExpression =
|
|
2
|
+
| Buffer
|
|
3
|
+
| bigint
|
|
4
|
+
| boolean
|
|
5
|
+
| number
|
|
6
|
+
| string
|
|
7
|
+
| readonly PrimitiveValueExpression[]
|
|
8
|
+
| null;
|
|
9
|
+
|
|
10
|
+
export type Query = {
|
|
11
|
+
readonly sql: string;
|
|
12
|
+
readonly values: readonly PrimitiveValueExpression[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type QueryResultRow = Record<string, PrimitiveValueExpression>;
|