badmfck-api-server 1.1.0 → 1.1.1

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.
@@ -1,5 +1,7 @@
1
1
  import { FieldInfo, MysqlError, Pool, PoolConnection } from "mysql";
2
2
  import { BaseService } from "./BaseService";
3
+ import { Req } from "badmfck-signal";
4
+ export declare const REQ_MYSQL_QUERY: Req<MySqlQuery | MySqlQuery[], MysqlResult[]>;
3
5
  export interface MysqlServiceOptions {
4
6
  connectionLimit: number;
5
7
  host: string;
@@ -3,11 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.MysqlService = void 0;
6
+ exports.MysqlService = exports.REQ_MYSQL_QUERY = void 0;
7
7
  const mysql_1 = __importDefault(require("mysql"));
8
8
  const BaseService_1 = require("./BaseService");
9
9
  const badmfck_signal_1 = require("badmfck-signal");
10
- const REQ_MYSQL_QUERY = new badmfck_signal_1.Req();
10
+ exports.REQ_MYSQL_QUERY = new badmfck_signal_1.Req();
11
11
  class MysqlService extends BaseService_1.BaseService {
12
12
  reconnectionTimeout = 1000 * 3;
13
13
  reconnecting = false;
@@ -25,7 +25,7 @@ class MysqlService extends BaseService_1.BaseService {
25
25
  if (this.options.onLog)
26
26
  this.options.onLog(2, "Mysql server not connected");
27
27
  }
28
- REQ_MYSQL_QUERY.listener = async (data) => {
28
+ exports.REQ_MYSQL_QUERY.listener = async (data) => {
29
29
  if (!Array.isArray(data))
30
30
  data = [data];
31
31
  const promises = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",