@slonik/types 40.2.2 → 40.2.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/index.d.ts +1 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/types.test.d.ts +2 -0
- package/dist/types.test.d.ts.map +1 -0
- package/dist/types.test.js +10 -0
- package/dist/types.test.js.map +1 -0
- package/package.json +2 -11
- package/src/index.ts +1 -15
- package/src/types.test.ts +5 -0
- package/src/types.ts +27 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
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>;
|
|
1
|
+
export * from './types';
|
|
8
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
3
18
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export type SerializableValue = SerializableValue[] | boolean | number | string | readonly SerializableValue[] | {
|
|
9
|
+
[key: string]: SerializableValue;
|
|
10
|
+
} | null | undefined;
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.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;AAEtE,MAAM,MAAM,iBAAiB,GACzB,iBAAiB,EAAE,GACnB,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,iBAAiB,EAAE,GAC5B;IACE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAClC,GACD,IAAI,GACJ,SAAS,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.test.d.ts","sourceRoot":"","sources":["../src/types.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ava_1 = __importDefault(require("ava"));
|
|
7
|
+
(0, ava_1.default)('ok', (t) => {
|
|
8
|
+
t.true(true);
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=types.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.test.js","sourceRoot":"","sources":["../src/types.test.ts"],"names":[],"mappings":";;;;;AAAA,8CAAuB;AAEvB,IAAA,aAAI,EAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE;IACf,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"access": "public",
|
|
3
2
|
"author": {
|
|
4
3
|
"email": "gajus@gajus.com",
|
|
5
4
|
"name": "Gajus Kuizinas",
|
|
@@ -16,11 +15,6 @@
|
|
|
16
15
|
"ts-node/register/transpile-only"
|
|
17
16
|
]
|
|
18
17
|
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"roarr": "^7.21.1",
|
|
21
|
-
"safe-stable-stringify": "^2.4.3",
|
|
22
|
-
"serialize-error": "^8.0.0"
|
|
23
|
-
},
|
|
24
18
|
"description": "A Node.js PostgreSQL client with strict types, detailed logging and assertions.",
|
|
25
19
|
"devDependencies": {
|
|
26
20
|
"@types/node": "^18.15.3",
|
|
@@ -30,8 +24,7 @@
|
|
|
30
24
|
"eslint-config-canonical": "^42.8.1",
|
|
31
25
|
"nyc": "^15.1.0",
|
|
32
26
|
"ts-node": "^10.9.1",
|
|
33
|
-
"typescript": "^5.4.3"
|
|
34
|
-
"zod": "^3.22.4"
|
|
27
|
+
"typescript": "^5.4.3"
|
|
35
28
|
},
|
|
36
29
|
"engines": {
|
|
37
30
|
"node": ">=18"
|
|
@@ -51,8 +44,6 @@
|
|
|
51
44
|
"nyc": {
|
|
52
45
|
"all": true,
|
|
53
46
|
"exclude": [
|
|
54
|
-
"src/bin",
|
|
55
|
-
"src/queries/*.ts",
|
|
56
47
|
"**/*.d.ts"
|
|
57
48
|
],
|
|
58
49
|
"include": [
|
|
@@ -84,5 +75,5 @@
|
|
|
84
75
|
"test": "nyc ava --verbose --serial"
|
|
85
76
|
},
|
|
86
77
|
"types": "./dist/index.d.ts",
|
|
87
|
-
"version": "40.2.
|
|
78
|
+
"version": "40.2.4"
|
|
88
79
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
export
|
|
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>;
|
|
1
|
+
export * from './types';
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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>;
|
|
16
|
+
|
|
17
|
+
export type SerializableValue =
|
|
18
|
+
| SerializableValue[]
|
|
19
|
+
| boolean
|
|
20
|
+
| number
|
|
21
|
+
| string
|
|
22
|
+
| readonly SerializableValue[]
|
|
23
|
+
| {
|
|
24
|
+
[key: string]: SerializableValue;
|
|
25
|
+
}
|
|
26
|
+
| null
|
|
27
|
+
| undefined;
|