@onurege3467/zerohelper 10.2.5 → 10.2.6

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.
Files changed (36) hide show
  1. package/README.md +432 -54
  2. package/dist/bin/commands/cache.d.ts +2 -0
  3. package/dist/bin/commands/cache.js +92 -0
  4. package/dist/bin/commands/db-backup.d.ts +3 -0
  5. package/dist/bin/commands/db-backup.js +118 -0
  6. package/dist/bin/commands/db.d.ts +2 -0
  7. package/dist/bin/commands/db.js +334 -0
  8. package/dist/bin/commands/import-export.d.ts +3 -0
  9. package/dist/bin/commands/import-export.js +123 -0
  10. package/dist/bin/commands/init.d.ts +2 -0
  11. package/dist/bin/commands/init.js +85 -0
  12. package/dist/bin/commands/migrate.d.ts +3 -0
  13. package/dist/bin/commands/migrate.js +167 -0
  14. package/dist/bin/commands/repl.d.ts +2 -0
  15. package/dist/bin/commands/repl.js +96 -0
  16. package/dist/bin/commands/seed.d.ts +2 -0
  17. package/dist/bin/commands/seed.js +76 -0
  18. package/dist/bin/commands/zpack.d.ts +2 -0
  19. package/dist/bin/commands/zpack.js +36 -0
  20. package/dist/bin/index.d.ts +2 -0
  21. package/dist/bin/index.js +28 -0
  22. package/dist/bin/types.d.ts +22 -0
  23. package/dist/bin/types.js +2 -0
  24. package/dist/bin/utils/config.d.ts +3 -0
  25. package/dist/bin/utils/config.js +78 -0
  26. package/dist/bin/utils/prompts.d.ts +3 -0
  27. package/dist/bin/utils/prompts.js +115 -0
  28. package/dist/bin/zero.js +789 -81
  29. package/dist/migrations/1767521950635_test_migration.d.ts +3 -0
  30. package/dist/migrations/1767521950635_test_migration.js +11 -0
  31. package/dist/migrations/1767522158826_create_users_table.d.ts +2 -0
  32. package/dist/migrations/1767522158826_create_users_table.js +11 -0
  33. package/dist/package.json +79 -0
  34. package/dist/zero.config.d.ts +10 -0
  35. package/dist/zero.config.js +13 -0
  36. package/package.json +2 -2
@@ -0,0 +1,3 @@
1
+ import { IDatabase } from "@onurege3467/zerohelper";
2
+ export declare const up: (db: IDatabase) => Promise<void>;
3
+ export declare const down: (db: IDatabase) => Promise<void>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.down = exports.up = void 0;
4
+ const up = async (db) => {
5
+ // Write your migration logic here
6
+ };
7
+ exports.up = up;
8
+ const down = async (db) => {
9
+ // Write your rollback logic here
10
+ };
11
+ exports.down = down;
@@ -0,0 +1,2 @@
1
+ export declare const up: (db: any) => Promise<void>;
2
+ export declare const down: (db: any) => Promise<void>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.down = exports.up = void 0;
4
+ const up = async (db) => {
5
+ await db.insert('migration_test', { name: 'test', created_at: new Date() });
6
+ };
7
+ exports.up = up;
8
+ const down = async (db) => {
9
+ await db.delete('migration_test', { name: 'test' });
10
+ };
11
+ exports.down = down;
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@onurege3467/zerohelper",
3
+ "version": "10.2.6",
4
+ "description": "ZeroHelper is a versatile high-performance utility library and database framework for Node.js, fully written in TypeScript.",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "zero": "./dist/bin/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "prepublishOnly": "npm run build",
13
+ "test": "jest"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "keywords": [
19
+ "helper",
20
+ "zerohelper",
21
+ "database",
22
+ "uuid",
23
+ "mongodb",
24
+ "mysql",
25
+ "jsondatabase",
26
+ "sqlite3",
27
+ "quick.db",
28
+ "postgresql",
29
+ "utility",
30
+ "functions",
31
+ "nodejs",
32
+ "validation",
33
+ "logger",
34
+ "migration",
35
+ "increment",
36
+ "decrement",
37
+ "zpack",
38
+ "typescript",
39
+ "cli",
40
+ "worker"
41
+ ],
42
+ "author": "Onure9e",
43
+ "license": "ISC",
44
+ "dependencies": {
45
+ "bcrypt": "^5.1.1",
46
+ "chalk": "^4.1.2",
47
+ "commander": "^11.1.0",
48
+ "crypto": "^1.0.1",
49
+ "csv": "^6.3.11",
50
+ "dotenv": "^16.4.7",
51
+ "fs": "^0.0.1-security",
52
+ "inquirer": "^8.2.5",
53
+ "js-yaml": "^4.1.0",
54
+ "jsonwebtoken": "^9.0.2",
55
+ "lodash": "^4.17.21",
56
+ "lru-cache": "^10.0.0",
57
+ "mongodb": "^6.12.0",
58
+ "mysql2": "^3.14.1",
59
+ "ora": "^5.4.1",
60
+ "path": "^0.12.7",
61
+ "pg": "^8.14.1",
62
+ "promise-mysql": "^5.2.0",
63
+ "redis": "^4.7.0",
64
+ "sqlite3": "^5.1.7"
65
+ },
66
+ "devDependencies": {
67
+ "@types/bcrypt": "^5.0.2",
68
+ "@types/inquirer": "^8.2.5",
69
+ "@types/jest": "^29.5.14",
70
+ "@types/js-yaml": "^4.0.9",
71
+ "@types/jsonwebtoken": "^9.0.7",
72
+ "@types/lodash": "^4.17.13",
73
+ "@types/node": "^22.10.2",
74
+ "@types/pg": "^8.11.10",
75
+ "jest": "^29.7.0",
76
+ "ts-jest": "^29.2.5",
77
+ "typescript": "^5.7.2"
78
+ }
79
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * ZeroHelper Configuration
3
+ * Generated on 1/4/2026
4
+ */
5
+ export declare const zeroConfig: {
6
+ adapter: string;
7
+ config: {
8
+ path: string;
9
+ };
10
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zeroConfig = void 0;
4
+ /**
5
+ * ZeroHelper Configuration
6
+ * Generated on 1/4/2026
7
+ */
8
+ exports.zeroConfig = {
9
+ "adapter": "json",
10
+ "config": {
11
+ "path": "./test_data.json"
12
+ }
13
+ };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@onurege3467/zerohelper",
3
- "version": "10.2.5",
3
+ "version": "10.2.6",
4
4
  "description": "ZeroHelper is a versatile high-performance utility library and database framework for Node.js, fully written in TypeScript.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
8
- "zero": "./dist/bin/zero.js"
8
+ "zero": "./dist/bin/index.js"
9
9
  },
10
10
  "scripts": {
11
11
  "build": "tsc",