@trafficgroup/knex-rel 0.0.1 → 0.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/KnexConnection.d.ts +17 -0
- package/dist/KnexConnection.js +99 -0
- package/dist/KnexConnection.js.map +1 -0
- package/dist/d.types.d.ts +17 -0
- package/dist/d.types.js +3 -0
- package/dist/d.types.js.map +1 -0
- package/dist/dao/user/user.dao.d.ts +11 -0
- package/dist/dao/user/user.dao.js +72 -0
- package/dist/dao/user/user.dao.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/folder/folder.interfaces.d.ts +10 -0
- package/dist/interfaces/folder/folder.interfaces.js +3 -0
- package/dist/interfaces/folder/folder.interfaces.js.map +1 -0
- package/dist/interfaces/study/study.interfaces.d.ts +9 -0
- package/dist/interfaces/study/study.interfaces.js +3 -0
- package/dist/interfaces/study/study.interfaces.js.map +1 -0
- package/dist/interfaces/user/user.interfaces.d.ts +9 -0
- package/dist/interfaces/user/user.interfaces.js +3 -0
- package/dist/interfaces/user/user.interfaces.js.map +1 -0
- package/dist/interfaces/video/video.interfaces.d.ts +13 -0
- package/dist/interfaces/video/video.interfaces.js +3 -0
- package/dist/interfaces/video/video.interfaces.js.map +1 -0
- package/package.json +4 -4
- package/.env +0 -5
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Knex } from "knex";
|
|
2
|
+
declare class KnexManager {
|
|
3
|
+
private static knexInstance;
|
|
4
|
+
/**
|
|
5
|
+
* Open a new connection. Reuse the already existing one if there's any.
|
|
6
|
+
*/
|
|
7
|
+
static connect(config?: Knex.Config, connections?: number): Promise<Knex<any, unknown[]>>;
|
|
8
|
+
/**
|
|
9
|
+
* Devuelve la conexión activa.
|
|
10
|
+
*/
|
|
11
|
+
static getConnection(): Knex<any, unknown[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Cierra la conexión y destruye la instancia.
|
|
14
|
+
*/
|
|
15
|
+
static disconnect(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export default KnexManager;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const knex_1 = require("knex");
|
|
13
|
+
class KnexManager {
|
|
14
|
+
/**
|
|
15
|
+
* Open a new connection. Reuse the already existing one if there's any.
|
|
16
|
+
*/
|
|
17
|
+
static connect(config, connections) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
if (!KnexManager.knexInstance) {
|
|
20
|
+
const testConfig = {
|
|
21
|
+
client: "pg",
|
|
22
|
+
connection: {
|
|
23
|
+
host: process.env.SQL_HOST,
|
|
24
|
+
user: process.env.SQL_USER,
|
|
25
|
+
password: process.env.SQL_PASSWORD,
|
|
26
|
+
database: process.env.SQL_DB_NAME,
|
|
27
|
+
charset: "utf8mb4",
|
|
28
|
+
port: Number(process.env.SQL_PORT) || 5432,
|
|
29
|
+
ssl: { rejectUnauthorized: false },
|
|
30
|
+
},
|
|
31
|
+
pool: {
|
|
32
|
+
min: 1,
|
|
33
|
+
max: connections || 15,
|
|
34
|
+
idleTimeoutMillis: 20000,
|
|
35
|
+
acquireTimeoutMillis: 30000,
|
|
36
|
+
},
|
|
37
|
+
migrations: {
|
|
38
|
+
tableName: "knex_migrations",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
KnexManager.knexInstance = (0, knex_1.knex)(config || {
|
|
42
|
+
client: "pg",
|
|
43
|
+
connection: {
|
|
44
|
+
host: process.env.SQL_HOST,
|
|
45
|
+
user: process.env.SQL_USER,
|
|
46
|
+
password: process.env.SQL_PASSWORD,
|
|
47
|
+
database: process.env.SQL_DB_NAME,
|
|
48
|
+
charset: "utf8mb4",
|
|
49
|
+
port: Number(process.env.SQL_PORT) || 5432,
|
|
50
|
+
ssl: { rejectUnauthorized: false },
|
|
51
|
+
},
|
|
52
|
+
pool: {
|
|
53
|
+
min: 1,
|
|
54
|
+
max: connections || 15,
|
|
55
|
+
idleTimeoutMillis: 20000,
|
|
56
|
+
acquireTimeoutMillis: 30000,
|
|
57
|
+
},
|
|
58
|
+
migrations: {
|
|
59
|
+
tableName: "knex_migrations",
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
try {
|
|
63
|
+
yield KnexManager.knexInstance.raw("SELECT 1");
|
|
64
|
+
console.info(`Knex connection established`);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
console.error(`Failed to establish Knex connection:`, error);
|
|
68
|
+
KnexManager.knexInstance = null;
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return KnexManager.knexInstance;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Devuelve la conexión activa.
|
|
77
|
+
*/
|
|
78
|
+
static getConnection() {
|
|
79
|
+
if (!KnexManager.knexInstance) {
|
|
80
|
+
throw new Error("Knex connection has not been established. Call connect() first.");
|
|
81
|
+
}
|
|
82
|
+
return KnexManager.knexInstance;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Cierra la conexión y destruye la instancia.
|
|
86
|
+
*/
|
|
87
|
+
static disconnect() {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
if (KnexManager.knexInstance) {
|
|
90
|
+
yield KnexManager.knexInstance.destroy();
|
|
91
|
+
KnexManager.knexInstance = null;
|
|
92
|
+
console.info(`Knex connection closed`);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
KnexManager.knexInstance = null;
|
|
98
|
+
exports.default = KnexManager;
|
|
99
|
+
//# sourceMappingURL=KnexConnection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KnexConnection.js","sourceRoot":"","sources":["../src/KnexConnection.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+BAAkC;AAElC,MAAM,WAAW;IAGf;;OAEG;IACH,MAAM,CAAO,OAAO,CAClB,MAAoB,EACpB,WAAoB;;YAEpB,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;gBAC9B,MAAM,UAAU,GAAG;oBACjB,MAAM,EAAE,IAAI;oBACZ,UAAU,EAAE;wBACV,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;wBAC1B,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;wBAC1B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;wBAClC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW;wBACjC,OAAO,EAAE,SAAS;wBAClB,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI;wBAC1C,GAAG,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE;qBACnC;oBACD,IAAI,EAAE;wBACJ,GAAG,EAAE,CAAC;wBACN,GAAG,EAAE,WAAW,IAAI,EAAE;wBACtB,iBAAiB,EAAE,KAAK;wBACxB,oBAAoB,EAAE,KAAK;qBAC5B;oBACD,UAAU,EAAE;wBACV,SAAS,EAAE,iBAAiB;qBAC7B;iBACF,CAAC;gBACF,WAAW,CAAC,YA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CAAC;IAClC,CAAC;IAED;;OAEG;IACH,MAAM,CAAO,UAAU;;YACrB,IAAI,WAAW,CAAC,YAAY,EAAE,CAAC;gBAC7B,MAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;gBACzC,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YACzC,CAAC;QACH,CAAC;KAAA;;AAxFc,wBAAY,GAAgC,IAAI,CAAC;AA2FlE,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IDataPaginator<T> {
|
|
2
|
+
success: boolean;
|
|
3
|
+
data: T[];
|
|
4
|
+
page: number;
|
|
5
|
+
limit: number;
|
|
6
|
+
count: number;
|
|
7
|
+
totalCount: number;
|
|
8
|
+
totalPages: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IBaseDAO<T> {
|
|
11
|
+
create(item: T): Promise<T>;
|
|
12
|
+
getById(id: number): Promise<T | null>;
|
|
13
|
+
getByUuid(uuid: string): Promise<T | null>;
|
|
14
|
+
getAll(): Promise<IDataPaginator<T>>;
|
|
15
|
+
update(id: number, item: T): Promise<T | null>;
|
|
16
|
+
delete(id: number): Promise<boolean>;
|
|
17
|
+
}
|
package/dist/d.types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d.types.js","sourceRoot":"","sources":["../src/d.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IBaseDAO, IDataPaginator } from "../../d.types";
|
|
2
|
+
import { IUser } from "../../interfaces/user/user.interfaces";
|
|
3
|
+
export declare class UserDAO implements IBaseDAO<IUser> {
|
|
4
|
+
private _knex;
|
|
5
|
+
create(item: IUser): Promise<IUser>;
|
|
6
|
+
getById(id: number): Promise<IUser | null>;
|
|
7
|
+
getByUuid(uuid: string): Promise<IUser | null>;
|
|
8
|
+
update(id: number, item: Partial<IUser>): Promise<IUser | null>;
|
|
9
|
+
delete(id: number): Promise<boolean>;
|
|
10
|
+
getAll(): Promise<IDataPaginator<IUser>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.UserDAO = void 0;
|
|
16
|
+
const KnexConnection_1 = __importDefault(require("../../KnexConnection"));
|
|
17
|
+
class UserDAO {
|
|
18
|
+
constructor() {
|
|
19
|
+
this._knex = KnexConnection_1.default.getConnection();
|
|
20
|
+
}
|
|
21
|
+
create(item) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const [createdUser] = yield this._knex("user").insert(item).returning("*");
|
|
24
|
+
return createdUser;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
getById(id) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const user = yield this._knex("user").where({ id }).first();
|
|
30
|
+
return user || null;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
getByUuid(uuid) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const user = yield this._knex("user").where({ uuid }).first();
|
|
36
|
+
return user || null;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
update(id, item) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const [updatedUser] = yield this._knex("user").where({ id }).update(item).returning("*");
|
|
42
|
+
return updatedUser || null;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
delete(id) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const result = yield this._knex("user").where({ id }).del();
|
|
48
|
+
return result > 0;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getAll() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const page = 1; // Default to first page
|
|
54
|
+
const limit = 10; // Default limit
|
|
55
|
+
const offset = (page - 1) * limit;
|
|
56
|
+
const [countResult] = yield this._knex("user").count("* as count");
|
|
57
|
+
const totalCount = +countResult.count;
|
|
58
|
+
const users = yield this._knex("user").limit(limit).offset(offset);
|
|
59
|
+
return {
|
|
60
|
+
success: true,
|
|
61
|
+
data: users,
|
|
62
|
+
page,
|
|
63
|
+
limit,
|
|
64
|
+
count: users.length,
|
|
65
|
+
totalCount,
|
|
66
|
+
totalPages: Math.ceil(totalCount / limit),
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.UserDAO = UserDAO;
|
|
72
|
+
//# sourceMappingURL=user.dao.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.dao.js","sourceRoot":"","sources":["../../../src/dao/user/user.dao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,0EAA+C;AAE/C,MAAa,OAAO;IAApB;QACY,UAAK,GAAyB,wBAAW,CAAC,aAAa,EAAE,CAAC;IA8CtE,CAAC;IA5CS,MAAM,CAAC,IAAW;;YACpB,MAAM,CAAC,WAAW,CAAC,GAA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C,CAAC,GAAG,KAAK,CAAC;YAElC,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YACnE,MAAM,UAAU,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC;YACtC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAEnE,OAAO;gBACH,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,KAAK;gBACX,IAAI;gBACJ,KAAK;gBACL,KAAK,EAAE,KAAK,CAAC,MAAM;gBACnB,UAAU;gBACV,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;aAC5C,CAAC;QACN,CAAC;KAAA;CACJ;AA/CD,0BA+CC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
exports.KnexManager = exports.UserDAO = void 0;
|
|
7
|
+
// DAOs
|
|
8
|
+
var user_dao_1 = require("./dao/user/user.dao");
|
|
9
|
+
Object.defineProperty(exports, "UserDAO", { enumerable: true, get: function () { return user_dao_1.UserDAO; } });
|
|
10
|
+
const KnexConnection_1 = __importDefault(require("./KnexConnection"));
|
|
11
|
+
exports.KnexManager = KnexConnection_1.default;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO;AACP,gDAA8C;AAArC,mGAAA,OAAO,OAAA;AAKhB,sEAA2C;AAClC,sBADF,wBAAW,CACE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder.interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/folder/folder.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"study.interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/study/study.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/user/user.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IVideo {
|
|
2
|
+
id: number;
|
|
3
|
+
uuid: string;
|
|
4
|
+
folderId: number;
|
|
5
|
+
videoLocation: string;
|
|
6
|
+
videoRate: number;
|
|
7
|
+
videoType: 'TMC' | 'ATR' | 'JUNCTION' | 'ROUNDABOUT' | 'PATHWAY';
|
|
8
|
+
metadata: Record<string, any>;
|
|
9
|
+
status: 'QUEUE' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
|
|
10
|
+
results: Record<string, any>;
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video.interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/video/video.interfaces.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trafficgroup/knex-rel",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Knex Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/
|
|
19
|
+
"url": "git+https://github.com/thetrafficgroup/knex-rel.git"
|
|
20
20
|
},
|
|
21
21
|
"author": "Genium, Inc",
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"bugs": {
|
|
24
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/thetrafficgroup/knex-rel/issues"
|
|
25
25
|
},
|
|
26
|
-
"homepage": "https://github.com/
|
|
26
|
+
"homepage": "https://github.com/thetrafficgroup/knex-rel#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@eslint/js": "^9.23.0",
|
|
29
29
|
"@types/dotenv": "^6.1.1",
|