@ntalmagor/3drise-common 1.0.8 → 1.0.10
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/build/database.d.ts +2 -2
- package/build/database.js +29 -22
- package/build/index.d.ts +2 -2
- package/build/index.js +9 -3
- package/package.json +5 -2
package/build/database.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Sequelize } from 'sequelize-typescript';
|
|
2
|
-
declare
|
|
3
|
-
export default
|
|
2
|
+
export declare function getSequelize(): Sequelize;
|
|
3
|
+
export default getSequelize;
|
package/build/database.js
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSequelize = getSequelize;
|
|
3
4
|
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
let _sequelize = null;
|
|
6
|
+
function getSequelize() {
|
|
7
|
+
if (!_sequelize) {
|
|
8
|
+
_sequelize = new sequelize_typescript_1.Sequelize({
|
|
9
|
+
database: process.env.RISE_MYSQL_DATABASE,
|
|
10
|
+
dialect: 'mysql',
|
|
11
|
+
host: process.env.MYSQL_HOST,
|
|
12
|
+
username: process.env.RISE_MYSQL_USER,
|
|
13
|
+
password: process.env.RISE_MYSQL_PASSWORD,
|
|
14
|
+
port: parseInt(process.env.MYSQL_PORT || '3306'),
|
|
15
|
+
models: [],
|
|
16
|
+
logging: console.log, // Set to false in production
|
|
17
|
+
pool: {
|
|
18
|
+
max: 10,
|
|
19
|
+
min: 0,
|
|
20
|
+
acquire: 30000,
|
|
21
|
+
idle: 10000,
|
|
22
|
+
},
|
|
23
|
+
dialectOptions: {
|
|
24
|
+
connectTimeout: 60000
|
|
25
|
+
},
|
|
26
|
+
retry: {
|
|
27
|
+
max: 3
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
}
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
return _sequelize;
|
|
32
|
+
}
|
|
33
|
+
exports.default = getSequelize;
|
package/build/index.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export { default as dotenv } from 'dotenv';
|
|
|
15
15
|
export { default as multer } from 'multer';
|
|
16
16
|
export { default as Redis } from 'ioredis';
|
|
17
17
|
export { OAuth2Client } from 'google-auth-library';
|
|
18
|
-
export
|
|
19
|
-
export {
|
|
18
|
+
export { S3Client, ListBucketsCommand, PutObjectCommand, GetObjectCommand, DeleteObjectCommand, ListObjectsV2Command } from '@aws-sdk/client-s3';
|
|
19
|
+
export { getSequelize } from './database';
|
|
20
20
|
export * from './models/index';
|
|
21
21
|
export type { RedisType } from './utils/redisClient';
|
|
22
22
|
export * from './errors/bad-request-error';
|
package/build/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.getSequelize = exports.ListObjectsV2Command = exports.DeleteObjectCommand = exports.GetObjectCommand = exports.PutObjectCommand = exports.ListBucketsCommand = exports.S3Client = exports.OAuth2Client = exports.Redis = exports.multer = exports.dotenv = exports.cors = exports.session = exports.jwt = exports.QueryTypes = exports.Transaction = exports.literal = exports.col = exports.fn = exports.Op = exports.express = void 0;
|
|
21
21
|
// Re-export shared libraries and their types
|
|
22
22
|
require("express-async-errors");
|
|
23
23
|
var express_1 = require("express");
|
|
@@ -48,10 +48,16 @@ var ioredis_1 = require("ioredis");
|
|
|
48
48
|
Object.defineProperty(exports, "Redis", { enumerable: true, get: function () { return __importDefault(ioredis_1).default; } });
|
|
49
49
|
var google_auth_library_1 = require("google-auth-library");
|
|
50
50
|
Object.defineProperty(exports, "OAuth2Client", { enumerable: true, get: function () { return google_auth_library_1.OAuth2Client; } });
|
|
51
|
-
|
|
51
|
+
var client_s3_1 = require("@aws-sdk/client-s3");
|
|
52
|
+
Object.defineProperty(exports, "S3Client", { enumerable: true, get: function () { return client_s3_1.S3Client; } });
|
|
53
|
+
Object.defineProperty(exports, "ListBucketsCommand", { enumerable: true, get: function () { return client_s3_1.ListBucketsCommand; } });
|
|
54
|
+
Object.defineProperty(exports, "PutObjectCommand", { enumerable: true, get: function () { return client_s3_1.PutObjectCommand; } });
|
|
55
|
+
Object.defineProperty(exports, "GetObjectCommand", { enumerable: true, get: function () { return client_s3_1.GetObjectCommand; } });
|
|
56
|
+
Object.defineProperty(exports, "DeleteObjectCommand", { enumerable: true, get: function () { return client_s3_1.DeleteObjectCommand; } });
|
|
57
|
+
Object.defineProperty(exports, "ListObjectsV2Command", { enumerable: true, get: function () { return client_s3_1.ListObjectsV2Command; } });
|
|
52
58
|
// export { default as getRedisClient } from './utils/redisClient';
|
|
53
59
|
var database_1 = require("./database");
|
|
54
|
-
Object.defineProperty(exports, "
|
|
60
|
+
Object.defineProperty(exports, "getSequelize", { enumerable: true, get: function () { return database_1.getSequelize; } });
|
|
55
61
|
__exportStar(require("./models/index"), exports);
|
|
56
62
|
__exportStar(require("./errors/bad-request-error"), exports);
|
|
57
63
|
__exportStar(require("./errors/custom-error"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntalmagor/3drise-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@aws-sdk/client-s3": "^3.975.0",
|
|
26
26
|
"@types/cookie-session": "^2.0.49",
|
|
27
27
|
"@types/cors": "^2.8.17",
|
|
28
|
-
"@types/express": "
|
|
28
|
+
"@types/express": "~4.17.21",
|
|
29
29
|
"@types/jsonwebtoken": "^9.0.8",
|
|
30
30
|
"@types/multer": "^2.0.0",
|
|
31
31
|
"@types/node": "^20.19.17",
|
|
@@ -46,5 +46,8 @@
|
|
|
46
46
|
"sequelize": "^6.37.7",
|
|
47
47
|
"sequelize-typescript": "^2.1.6",
|
|
48
48
|
"uuid": "^13.0.0"
|
|
49
|
+
},
|
|
50
|
+
"overrides": {
|
|
51
|
+
"@types/express": "~4.17.21"
|
|
49
52
|
}
|
|
50
53
|
}
|