@runnerpro/backend 1.6.8 → 1.6.9
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/lib/cjs/db/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.toPgArray = exports.batchQuery = exports.query = void 0;
|
|
15
|
+
exports.pool = exports.toPgArray = exports.batchQuery = exports.query = void 0;
|
|
16
16
|
const pg_1 = __importDefault(require("pg"));
|
|
17
17
|
const { Pool } = pg_1.default;
|
|
18
18
|
const pool = new Pool({
|
|
@@ -22,6 +22,7 @@ const pool = new Pool({
|
|
|
22
22
|
host: process.env.DB_HOST,
|
|
23
23
|
port: 5432,
|
|
24
24
|
});
|
|
25
|
+
exports.pool = pool;
|
|
25
26
|
const query = (queryText, values = []) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
27
|
const client = yield pool.connect();
|
|
27
28
|
const text = getParseQuery(queryText, values);
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDefaultWorkoutImage = exports.generateShareMap = exports.reduceSizeImage = exports.getLetter = exports.getNumberByLetter = exports.appendSheet = exports.writeSheet = exports.findCellByValue = exports.readSheet = exports.NOTION_DATABASES_ID = exports.notionEditPage = exports.notionAddPage = exports.notionGetDatabase = exports.notionGetUsers = exports.getCountNotificaciones = exports.chatExposed = exports.chatApi = exports.chat = exports.getExerciseTranslatedDescription = exports.useTranslation = exports.LANGUAGES = exports.translate = exports.CHANNEL_SLACK = exports.notifySlack = exports.fetchIA = exports.err = exports.sendMail = exports.toPgArray = exports.batchQuery = exports.query = exports.sleep = exports.sendNotification = void 0;
|
|
3
|
+
exports.getDefaultWorkoutImage = exports.generateShareMap = exports.reduceSizeImage = exports.getLetter = exports.getNumberByLetter = exports.appendSheet = exports.writeSheet = exports.findCellByValue = exports.readSheet = exports.NOTION_DATABASES_ID = exports.notionEditPage = exports.notionAddPage = exports.notionGetDatabase = exports.notionGetUsers = exports.getCountNotificaciones = exports.chatExposed = exports.chatApi = exports.chat = exports.getExerciseTranslatedDescription = exports.useTranslation = exports.LANGUAGES = exports.translate = exports.CHANNEL_SLACK = exports.notifySlack = exports.fetchIA = exports.err = exports.sendMail = exports.pool = exports.toPgArray = exports.batchQuery = exports.query = exports.sleep = exports.sendNotification = void 0;
|
|
4
4
|
const sendNotification_1 = require("./sendNotification");
|
|
5
5
|
Object.defineProperty(exports, "sendNotification", { enumerable: true, get: function () { return sendNotification_1.sendNotification; } });
|
|
6
6
|
const sleep_1 = require("./sleep");
|
|
@@ -9,6 +9,7 @@ const db_1 = require("./db");
|
|
|
9
9
|
Object.defineProperty(exports, "query", { enumerable: true, get: function () { return db_1.query; } });
|
|
10
10
|
Object.defineProperty(exports, "batchQuery", { enumerable: true, get: function () { return db_1.batchQuery; } });
|
|
11
11
|
Object.defineProperty(exports, "toPgArray", { enumerable: true, get: function () { return db_1.toPgArray; } });
|
|
12
|
+
Object.defineProperty(exports, "pool", { enumerable: true, get: function () { return db_1.pool; } });
|
|
12
13
|
const sendMail_1 = require("./sendMail");
|
|
13
14
|
Object.defineProperty(exports, "sendMail", { enumerable: true, get: function () { return sendMail_1.sendMail; } });
|
|
14
15
|
const err_1 = require("./err");
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import postgresql from 'pg';
|
|
2
|
+
declare const pool: postgresql.Pool;
|
|
1
3
|
declare const query: (queryText: string, values?: (string | number | boolean)[]) => Promise<any>;
|
|
2
4
|
declare const toPgArray: (arr: string[]) => string;
|
|
3
5
|
declare const batchQuery: (queries: any, length?: number) => Promise<void>;
|
|
4
|
-
export { query, batchQuery, toPgArray };
|
|
6
|
+
export { query, batchQuery, toPgArray, pool };
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/db/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,IAAI,CAAC;AAI5B,QAAA,MAAM,IAAI,iBAMR,CAAC;AAEH,QAAA,MAAM,KAAK,cAAqB,MAAM,WAAU,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,iBAsB5E,CAAC;AAEF,QAAA,MAAM,SAAS,QAAS,MAAM,EAAE,WAM/B,CAAC;AA+BF,QAAA,MAAM,UAAU,YAAmB,GAAG,mCAUrC,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC"}
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { sendNotification } from './sendNotification';
|
|
2
2
|
import { sleep } from './sleep';
|
|
3
|
-
import { query, batchQuery, toPgArray } from './db';
|
|
3
|
+
import { query, batchQuery, toPgArray, pool } from './db';
|
|
4
4
|
import { sendMail } from './sendMail';
|
|
5
5
|
import { err } from './err';
|
|
6
6
|
import { fetchIA } from './fetch/fetchIA';
|
|
@@ -12,5 +12,5 @@ import { readSheet, findCellByValue, writeSheet, appendSheet, getNumberByLetter,
|
|
|
12
12
|
import { reduceSizeImage } from './image/reduceSizeImage';
|
|
13
13
|
import { generateShareMap } from './image/generateShareMap';
|
|
14
14
|
import { getDefaultWorkoutImage } from './image/getDefaultWorkoutImage';
|
|
15
|
-
export { sendNotification, sleep, query, batchQuery, toPgArray, sendMail, err, fetchIA, notifySlack, CHANNEL_SLACK, translate, LANGUAGES, useTranslation, getExerciseTranslatedDescription, chat, chatApi, chatExposed, getCountNotificaciones, notionGetUsers, notionGetDatabase, notionAddPage, notionEditPage, NOTION_DATABASES_ID, readSheet, findCellByValue, writeSheet, appendSheet, getNumberByLetter, getLetter, reduceSizeImage, generateShareMap, getDefaultWorkoutImage, };
|
|
15
|
+
export { sendNotification, sleep, query, batchQuery, toPgArray, pool, sendMail, err, fetchIA, notifySlack, CHANNEL_SLACK, translate, LANGUAGES, useTranslation, getExerciseTranslatedDescription, chat, chatApi, chatExposed, getCountNotificaciones, notionGetUsers, notionGetDatabase, notionAddPage, notionEditPage, NOTION_DATABASES_ID, readSheet, findCellByValue, writeSheet, appendSheet, getNumberByLetter, getLetter, reduceSizeImage, generateShareMap, getDefaultWorkoutImage, };
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,SA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