streamby-core 0.29.7 → 0.29.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/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "streamby-core",
3
- "version": "0.29.7",
4
- "description": "StreamBy middleware framework for media storage management",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist"
9
- ],
10
- "scripts": {
11
- "build": "tsc",
12
- "test": "vitest",
13
- "dev": "ts-node-dev --respawn --clear dev.ts",
14
- "prepublishOnly": "npm run build"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/GwerhDev/StreamBy-Package.git"
19
- },
20
- "keywords": [
21
- "streamby",
22
- "middleware",
23
- "upload",
24
- "storage",
25
- "s3",
26
- "express",
27
- "typescript"
28
- ],
29
- "author": "TerminalCore Labs",
30
- "license": "MIT",
31
- "dependencies": {
32
- "@aws-sdk/client-s3": "^3.528.0",
33
- "@aws-sdk/s3-request-presigner": "^3.787.0",
34
- "@prisma/client": "^6.12.0",
35
- "bcrypt": "^5.1.1",
36
- "dotenv": "^16.5.0",
37
- "express": "^4.0.0",
38
- "mongodb": "^6.17.0",
39
- "mongoose": "^8.13.2",
40
- "node-fetch": "^3.0.0",
41
- "pg": "^8.16.3",
42
- "prisma": "^6.12.0",
43
- "ws": "^8.20.0"
44
- },
45
- "devDependencies": {
46
- "@types/bcrypt": "^5.0.2",
47
- "@types/cors": "^2.8.18",
48
- "@types/express": "^4.17.17",
49
- "@types/mongodb": "^4.0.7",
50
- "@types/node": "^22.15.21",
51
- "@types/pg": "^8.15.4",
52
- "@types/supertest": "^6.0.3",
53
- "@types/ws": "^8.18.1",
54
- "cors": "^2.8.5",
55
- "supertest": "^7.1.4",
56
- "ts-node-dev": "^2.0.0",
57
- "typescript": "^5.8.3",
58
- "vitest": "^3.1.1"
59
- },
60
- "peerDependencies": {
61
- "express": "^4.0.0"
62
- }
63
- }
1
+ {
2
+ "name": "streamby-core",
3
+ "version": "0.29.9",
4
+ "description": "StreamBy middleware framework for media storage management",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "test": "vitest",
13
+ "dev": "ts-node-dev --respawn --clear dev.ts",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/GwerhDev/StreamBy-Package.git"
19
+ },
20
+ "keywords": [
21
+ "streamby",
22
+ "middleware",
23
+ "upload",
24
+ "storage",
25
+ "s3",
26
+ "express",
27
+ "typescript"
28
+ ],
29
+ "author": "TerminalCore Labs",
30
+ "license": "MIT",
31
+ "dependencies": {
32
+ "@aws-sdk/client-s3": "^3.528.0",
33
+ "@aws-sdk/s3-request-presigner": "^3.787.0",
34
+ "@prisma/client": "^6.12.0",
35
+ "bcrypt": "^5.1.1",
36
+ "dotenv": "^16.5.0",
37
+ "express": "^4.0.0",
38
+ "mongodb": "^6.17.0",
39
+ "mongoose": "^8.13.2",
40
+ "node-fetch": "^3.0.0",
41
+ "pg": "^8.16.3",
42
+ "prisma": "^6.12.0",
43
+ "ws": "^8.20.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/bcrypt": "^5.0.2",
47
+ "@types/cors": "^2.8.18",
48
+ "@types/express": "^4.17.17",
49
+ "@types/mongodb": "^4.0.7",
50
+ "@types/node": "^22.15.21",
51
+ "@types/pg": "^8.15.4",
52
+ "@types/supertest": "^6.0.3",
53
+ "@types/ws": "^8.18.1",
54
+ "cors": "^2.8.5",
55
+ "supertest": "^7.1.4",
56
+ "ts-node-dev": "^2.0.0",
57
+ "typescript": "^5.8.3",
58
+ "vitest": "^3.1.1"
59
+ },
60
+ "peerDependencies": {
61
+ "express": "^4.0.0"
62
+ }
63
+ }
@@ -1,3 +0,0 @@
1
- export declare function encrypt(text: string, secretKey: string): string;
2
- export declare function decrypt(text: string, secretKey: string): string;
3
- export declare function hash(text: string): string;
@@ -1,32 +0,0 @@
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.encrypt = encrypt;
7
- exports.decrypt = decrypt;
8
- exports.hash = hash;
9
- const crypto_1 = __importDefault(require("crypto"));
10
- const ALGORITHM = 'aes-256-cbc';
11
- const IV_LENGTH = 16;
12
- function encrypt(text, secretKey) {
13
- const iv = crypto_1.default.randomBytes(IV_LENGTH);
14
- const key = crypto_1.default.createHash('sha256').update(String(secretKey)).digest('base64').substr(0, 32);
15
- const cipher = crypto_1.default.createCipheriv(ALGORITHM, Buffer.from(key), iv);
16
- let encrypted = cipher.update(text);
17
- encrypted = Buffer.concat([encrypted, cipher.final()]);
18
- return iv.toString('hex') + ':' + encrypted.toString('hex');
19
- }
20
- function decrypt(text, secretKey) {
21
- const textParts = text.split(':');
22
- const iv = Buffer.from(textParts.shift(), 'hex');
23
- const encryptedText = Buffer.from(textParts.join(':'), 'hex');
24
- const key = crypto_1.default.createHash('sha256').update(String(secretKey)).digest('base64').substr(0, 32);
25
- const decipher = crypto_1.default.createDecipheriv(ALGORITHM, Buffer.from(key), iv);
26
- let decrypted = decipher.update(encryptedText);
27
- decrypted = Buffer.concat([decrypted, decipher.final()]);
28
- return decrypted.toString();
29
- }
30
- function hash(text) {
31
- return crypto_1.default.createHash('sha256').update(text).digest('hex');
32
- }