@nestjs-kitchen/connextion-postgres 1.0.1 → 1.0.3
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.js +1 -0
- package/dist/polyfill.d.ts +2 -0
- package/dist/polyfill.js +2 -0
- package/dist/utils.d.ts +6 -1
- package/dist/utils.js +17 -2
- package/package.json +3 -5
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __export(src_exports, {
|
|
|
21
21
|
definePostgres: () => import_define_postgres.definePostgres
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(src_exports);
|
|
24
|
+
var import_polyfill = require("./polyfill");
|
|
24
25
|
var import_define_postgres = require("./define-postgres");
|
|
25
26
|
var import_errors = require("./errors");
|
|
26
27
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/polyfill.js
ADDED
package/dist/utils.d.ts
CHANGED
|
@@ -22,5 +22,10 @@ declare const debugFactroy: (name: string, queryId: string, logger: (data: Recor
|
|
|
22
22
|
declare const copyMethodMetadata: (from: any, to: any) => void;
|
|
23
23
|
declare const getTransactionMetdata: (target: any) => any;
|
|
24
24
|
declare const setTransactionMetdata: (target: any) => void;
|
|
25
|
+
declare const withResolvers: <T>() => {
|
|
26
|
+
promise: Promise<T>;
|
|
27
|
+
resolve: (value: T | PromiseLike<T>) => void;
|
|
28
|
+
reject: (reason?: any) => void;
|
|
29
|
+
};
|
|
25
30
|
|
|
26
|
-
export { copyMethodMetadata, createDebugLogger, debugFactroy, extraceQueryTextAndValues, formatArray, getCurrentDateStr, getTransactionMetdata, isObject, isSubmittable, normalizeStrings, plainPromise, printTable, setTransactionMetdata, truncateString };
|
|
31
|
+
export { copyMethodMetadata, createDebugLogger, debugFactroy, extraceQueryTextAndValues, formatArray, getCurrentDateStr, getTransactionMetdata, isObject, isSubmittable, normalizeStrings, plainPromise, printTable, setTransactionMetdata, truncateString, withResolvers };
|
package/dist/utils.js
CHANGED
|
@@ -41,7 +41,8 @@ __export(utils_exports, {
|
|
|
41
41
|
plainPromise: () => plainPromise,
|
|
42
42
|
printTable: () => printTable,
|
|
43
43
|
setTransactionMetdata: () => setTransactionMetdata,
|
|
44
|
-
truncateString: () => truncateString
|
|
44
|
+
truncateString: () => truncateString,
|
|
45
|
+
withResolvers: () => withResolvers
|
|
45
46
|
});
|
|
46
47
|
module.exports = __toCommonJS(utils_exports);
|
|
47
48
|
var import_dayjs = __toESM(require("dayjs"));
|
|
@@ -244,6 +245,19 @@ const getTransactionMetdata = /* @__PURE__ */ __name((target) => {
|
|
|
244
245
|
const setTransactionMetdata = /* @__PURE__ */ __name((target) => {
|
|
245
246
|
return Reflect.defineMetadata(import_constants.TRANSACTION_META, true, target);
|
|
246
247
|
}, "setTransactionMetdata");
|
|
248
|
+
const withResolvers = /* @__PURE__ */ __name(() => {
|
|
249
|
+
let resolve;
|
|
250
|
+
let reject;
|
|
251
|
+
const promise = new Promise((res, rej) => {
|
|
252
|
+
resolve = res;
|
|
253
|
+
reject = rej;
|
|
254
|
+
});
|
|
255
|
+
return {
|
|
256
|
+
promise,
|
|
257
|
+
resolve,
|
|
258
|
+
reject
|
|
259
|
+
};
|
|
260
|
+
}, "withResolvers");
|
|
247
261
|
// Annotate the CommonJS export names for ESM import in node:
|
|
248
262
|
0 && (module.exports = {
|
|
249
263
|
copyMethodMetadata,
|
|
@@ -259,5 +273,6 @@ const setTransactionMetdata = /* @__PURE__ */ __name((target) => {
|
|
|
259
273
|
plainPromise,
|
|
260
274
|
printTable,
|
|
261
275
|
setTransactionMetdata,
|
|
262
|
-
truncateString
|
|
276
|
+
truncateString,
|
|
277
|
+
withResolvers
|
|
263
278
|
});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@nestjs-kitchen/connextion-postgres",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "A flexible module to provide node-postgres interface in NextJS.",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.3",
|
|
6
6
|
"homepage": "https://github.com/yikenman/nestjs-kitchen",
|
|
7
7
|
"repository": "https://github.com/yikenman/nestjs-kitchen",
|
|
8
8
|
"author": "yikenman",
|
|
@@ -25,15 +25,13 @@
|
|
|
25
25
|
"@nestjs/testing": "^10.4.15",
|
|
26
26
|
"@types/jest": "^29.5.14",
|
|
27
27
|
"@types/node": "^22.10.5",
|
|
28
|
-
"@types/supertest": "^6.0.2",
|
|
29
28
|
"jest": "^29.7.0",
|
|
30
|
-
"supertest": "^7.0.0",
|
|
31
29
|
"ts-jest": "^29.1.2",
|
|
32
30
|
"ts-node": "^10.9.2",
|
|
33
31
|
"tsconfig-paths": "^4.2.0",
|
|
34
32
|
"tsup": "^8.3.5",
|
|
35
33
|
"typescript": "^5.7.2",
|
|
36
|
-
"@nestjs-kitchen/connextion": "1.0.
|
|
34
|
+
"@nestjs-kitchen/connextion": "1.0.2"
|
|
37
35
|
},
|
|
38
36
|
"engines": {
|
|
39
37
|
"node": ">=20.13.0"
|
|
@@ -53,7 +51,7 @@
|
|
|
53
51
|
"@types/pg": "^8.11.10",
|
|
54
52
|
"pg": "^8.13.1",
|
|
55
53
|
"reflect-metadata": "^0.2.1",
|
|
56
|
-
"@nestjs-kitchen/connextion": "1.0.
|
|
54
|
+
"@nestjs-kitchen/connextion": "1.0.2"
|
|
57
55
|
},
|
|
58
56
|
"scripts": {
|
|
59
57
|
"build": "tsup",
|