dbcube 1.0.1 → 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.
- package/.npmignore +51 -0
- package/CONTRIBUTING.md +9 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/dist/index.cjs +153 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -16
- package/tsup.config.ts +14 -0
- package/.lh/.lhignore +0 -6
- package/.lh/package.json.json +0 -22
- package/src/commands/run/database/create/addDatabaseConfig.js +0 -193
- package/src/commands/run/database/create/createDatabase.js +0 -88
- package/src/commands/run/database/create/index.js +0 -157
- package/src/commands/run/seeder/add.js +0 -76
- package/src/commands/run/table/fresh.js +0 -76
- package/src/commands/run/table/refresh.js +0 -76
- package/src/commands/run/trigger/fresh.js +0 -76
- package/src/index.js +0 -100
- package/src/lib/DBCubeLogger.js +0 -116
- package/src/lib/LoggerConsole.js +0 -262
- package/src/utils/Config.js +0 -49
- package/src/utils/ConfigFileUtils.js +0 -295
- package/src/utils/FileUtils.js +0 -73
package/.npmignore
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Directories
|
|
2
|
+
examples
|
|
3
|
+
|
|
4
|
+
# Ignorar dependencias y configuraciones de desarrollo
|
|
5
|
+
node_modules/
|
|
6
|
+
npm-debug.log*
|
|
7
|
+
yarn-debug.log*
|
|
8
|
+
yarn-error.log*
|
|
9
|
+
|
|
10
|
+
# Ignorar carpetas y archivos irrelevantes
|
|
11
|
+
.vscode/
|
|
12
|
+
.lh
|
|
13
|
+
.idea/
|
|
14
|
+
.DS_Store
|
|
15
|
+
Thumbs.db
|
|
16
|
+
*.log
|
|
17
|
+
|
|
18
|
+
# Ignorar configuraciones del proyecto
|
|
19
|
+
.env
|
|
20
|
+
.env.*.local
|
|
21
|
+
package-lock.json
|
|
22
|
+
|
|
23
|
+
# Ignorar archivos del sistema
|
|
24
|
+
*.swp
|
|
25
|
+
*.swo
|
|
26
|
+
*.tmp
|
|
27
|
+
*.temp
|
|
28
|
+
|
|
29
|
+
# Ignorar carpetas de trabajo
|
|
30
|
+
temp/
|
|
31
|
+
logs/
|
|
32
|
+
debug/
|
|
33
|
+
|
|
34
|
+
# Ignorar archivos de compilación
|
|
35
|
+
src/
|
|
36
|
+
tsconfig.json
|
|
37
|
+
tsconfig.tsbuildinfo
|
|
38
|
+
|
|
39
|
+
# Ignorar pruebas y configuraciones
|
|
40
|
+
tests/
|
|
41
|
+
__tests__/
|
|
42
|
+
__mocks__/
|
|
43
|
+
coverage/
|
|
44
|
+
jest.config.js
|
|
45
|
+
|
|
46
|
+
# Ignorar documentación o ejemplos no necesarios
|
|
47
|
+
docs/
|
|
48
|
+
examples/
|
|
49
|
+
|
|
50
|
+
# Asegurarse de incluir solo lo esencial
|
|
51
|
+
!.npmignore
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Colaboración
|
|
2
|
+
|
|
3
|
+
Si deseas contribuir a este proyecto, sigue estos pasos:
|
|
4
|
+
|
|
5
|
+
1. Haz un fork del repositorio.
|
|
6
|
+
2. Crea una nueva rama (`git checkout -b feature/nueva-caracteristica`).
|
|
7
|
+
3. Realiza tus cambios y haz commit de ellos (`git commit -am 'Añadir nueva característica'`).
|
|
8
|
+
4. Sube tu rama (`git push origin feature/nueva-caracteristica`).
|
|
9
|
+
5. Abre un Pull Request.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Albert Araya - Dbcube
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
File without changes
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
Dbcube: () => Dbcube
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
|
|
37
|
+
// src/lib/Dbcube.ts
|
|
38
|
+
var import_core = require("@dbcube/core");
|
|
39
|
+
var import_query_builder = require("@dbcube/query-builder");
|
|
40
|
+
|
|
41
|
+
// src/lib/FileUtils.ts
|
|
42
|
+
var fs = __toESM(require("fs"));
|
|
43
|
+
var path = __toESM(require("path"));
|
|
44
|
+
var FileUtils = class {
|
|
45
|
+
/**
|
|
46
|
+
* Verifica si un archivo existe (asincrónico).
|
|
47
|
+
* @param filePath - Ruta del archivo.
|
|
48
|
+
* @returns Promise que resuelve true si el archivo existe, false si no.
|
|
49
|
+
*/
|
|
50
|
+
static async fileExists(filePath) {
|
|
51
|
+
return new Promise((resolve2) => {
|
|
52
|
+
fs.access(path.resolve(filePath), fs.constants.F_OK, (err) => {
|
|
53
|
+
resolve2(!err);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Verifica si un archivo existe (sincrónico).
|
|
59
|
+
* @param filePath - Ruta del archivo.
|
|
60
|
+
* @returns True si el archivo existe, false si no.
|
|
61
|
+
*/
|
|
62
|
+
static fileExistsSync(filePath) {
|
|
63
|
+
try {
|
|
64
|
+
fs.accessSync(path.resolve(filePath), fs.constants.F_OK);
|
|
65
|
+
return true;
|
|
66
|
+
} catch {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Extrae el nombre de la base de datos de un string con formato @database().
|
|
72
|
+
* @param input - String de entrada que contiene la referencia a la base de datos.
|
|
73
|
+
* @returns El nombre de la base de datos o null si no se encuentra.
|
|
74
|
+
*/
|
|
75
|
+
static extractDatabaseName(input) {
|
|
76
|
+
const match = input.match(/@database\(["']?([\w-]+)["']?\)/);
|
|
77
|
+
return match ? match[1] : null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Lee recursivamente archivos que terminan en un sufijo dado y los ordena numéricamente.
|
|
81
|
+
* @param dir - Directorio base (relativo o absoluto).
|
|
82
|
+
* @param suffix - Sufijo de archivo (como 'table.cube').
|
|
83
|
+
* @returns Rutas absolutas de los archivos encontrados y ordenados.
|
|
84
|
+
*/
|
|
85
|
+
static getCubeFilesRecursively(dir, suffix) {
|
|
86
|
+
const baseDir = path.resolve(dir);
|
|
87
|
+
const cubeFiles = [];
|
|
88
|
+
function recurse(currentDir) {
|
|
89
|
+
const entries = fs.readdirSync(currentDir, { withFileTypes: true });
|
|
90
|
+
for (const entry of entries) {
|
|
91
|
+
const fullPath = path.join(currentDir, entry.name);
|
|
92
|
+
if (entry.isDirectory()) {
|
|
93
|
+
recurse(fullPath);
|
|
94
|
+
} else if (entry.isFile() && entry.name.endsWith(suffix)) {
|
|
95
|
+
cubeFiles.push(fullPath);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
recurse(baseDir);
|
|
100
|
+
cubeFiles.sort((a, b) => {
|
|
101
|
+
const aNum = parseInt(path.basename(a));
|
|
102
|
+
const bNum = parseInt(path.basename(b));
|
|
103
|
+
return (isNaN(aNum) ? 0 : aNum) - (isNaN(bNum) ? 0 : bNum);
|
|
104
|
+
});
|
|
105
|
+
return cubeFiles;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var FileUtils_default = FileUtils;
|
|
109
|
+
|
|
110
|
+
// src/lib/Dbcube.ts
|
|
111
|
+
var import_path = __toESM(require("path"));
|
|
112
|
+
var Dbcube = class _Dbcube {
|
|
113
|
+
static instance;
|
|
114
|
+
configPath;
|
|
115
|
+
config;
|
|
116
|
+
databases;
|
|
117
|
+
initialized;
|
|
118
|
+
constructor() {
|
|
119
|
+
if (_Dbcube.instance) {
|
|
120
|
+
return _Dbcube.instance;
|
|
121
|
+
}
|
|
122
|
+
this.configPath = import_path.default.join(process.cwd(), "dbcube.config.js");
|
|
123
|
+
this.config = new import_core.Config();
|
|
124
|
+
this.databases = {};
|
|
125
|
+
this.initialized = false;
|
|
126
|
+
_Dbcube.instance = this;
|
|
127
|
+
}
|
|
128
|
+
async loadConfig() {
|
|
129
|
+
const exists = await FileUtils_default.fileExists(this.configPath);
|
|
130
|
+
exists ?? console.log("\u274C Dont exists config file, please create a dbcube.config.js file");
|
|
131
|
+
}
|
|
132
|
+
async init(configCreate = {}) {
|
|
133
|
+
if (this.initialized) return;
|
|
134
|
+
await this.loadConfig();
|
|
135
|
+
const config = require(this.configPath);
|
|
136
|
+
config(this.config);
|
|
137
|
+
const databases = Object.keys(this.config.getAllDatabases());
|
|
138
|
+
for (const database of databases) {
|
|
139
|
+
this.databases[database] = new import_query_builder.Database(database);
|
|
140
|
+
}
|
|
141
|
+
if (configCreate.databaseName) {
|
|
142
|
+
this.databases[configCreate.databaseName] = new import_query_builder.Database(configCreate.databaseName);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
database(databaseName) {
|
|
146
|
+
return this.databases[databaseName];
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
150
|
+
0 && (module.exports = {
|
|
151
|
+
Dbcube
|
|
152
|
+
});
|
|
153
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/lib/Dbcube.ts","../src/lib/FileUtils.ts"],"sourcesContent":["import { Dbcube } from './lib/Dbcube';\r\n\r\n\r\nexport { Dbcube };","import { Config } from '@dbcube/core';\r\nimport { Database } from '@dbcube/query-builder';\r\nimport FileUtils from './FileUtils';\r\nimport path from 'path';\r\n\r\nexport class Dbcube {\r\n private static instance: Dbcube;\r\n private configPath!: string;\r\n private config: any;\r\n private databases!: Record<string, any>;\r\n private initialized!: boolean;\r\n\r\n\r\n constructor() {\r\n if (Dbcube.instance) {\r\n return Dbcube.instance;\r\n }\r\n this.configPath = path.join(process.cwd(), 'dbcube.config.js');\r\n this.config = new Config();\r\n this.databases = {};\r\n this.initialized = false;\r\n\r\n Dbcube.instance = this;\r\n }\r\n\r\n async loadConfig() {\r\n const exists = await FileUtils.fileExists(this.configPath);\r\n exists ?? console.log('❌ Dont exists config file, please create a dbcube.config.js file');\r\n }\r\n\r\n\r\n async init(configCreate: { databaseName?: string; motor?: string; configAnswers?: any } = {}) {\r\n if (this.initialized) return;\r\n await this.loadConfig();\r\n const config = require(this.configPath);\r\n \r\n config(this.config);\r\n const databases = Object.keys(this.config.getAllDatabases());\r\n \r\n for (const database of databases) {\r\n this.databases[database] = new Database(database);\r\n }\r\n if(configCreate.databaseName){\r\n this.databases[configCreate.databaseName] = new Database(configCreate.databaseName);\r\n }\r\n }\r\n\r\n database(databaseName: string){\r\n return this.databases[databaseName];\r\n }\r\n}\r\n\r\nexport default Dbcube;","import * as fs from 'fs';\r\nimport * as path from 'path';\r\n\r\nexport class FileUtils {\r\n /**\r\n * Verifica si un archivo existe (asincrónico).\r\n * @param filePath - Ruta del archivo.\r\n * @returns Promise que resuelve true si el archivo existe, false si no.\r\n */\r\n static async fileExists(filePath: string): Promise<boolean> {\r\n return new Promise<boolean>((resolve) => {\r\n fs.access(path.resolve(filePath), fs.constants.F_OK, (err) => {\r\n resolve(!err);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Verifica si un archivo existe (sincrónico).\r\n * @param filePath - Ruta del archivo.\r\n * @returns True si el archivo existe, false si no.\r\n */\r\n static fileExistsSync(filePath: string): boolean {\r\n try {\r\n fs.accessSync(path.resolve(filePath), fs.constants.F_OK);\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Extrae el nombre de la base de datos de un string con formato @database().\r\n * @param input - String de entrada que contiene la referencia a la base de datos.\r\n * @returns El nombre de la base de datos o null si no se encuentra.\r\n */\r\n static extractDatabaseName(input: string): string | null {\r\n const match = input.match(/@database\\([\"']?([\\w-]+)[\"']?\\)/);\r\n return match ? match[1] : null;\r\n }\r\n\r\n /**\r\n * Lee recursivamente archivos que terminan en un sufijo dado y los ordena numéricamente.\r\n * @param dir - Directorio base (relativo o absoluto).\r\n * @param suffix - Sufijo de archivo (como 'table.cube').\r\n * @returns Rutas absolutas de los archivos encontrados y ordenados.\r\n */\r\n static getCubeFilesRecursively(dir: string, suffix: string): string[] {\r\n const baseDir = path.resolve(dir); // ✅ Asegura que sea absoluto\r\n const cubeFiles: string[] = [];\r\n\r\n function recurse(currentDir: string): void {\r\n const entries = fs.readdirSync(currentDir, { withFileTypes: true });\r\n \r\n for (const entry of entries) {\r\n const fullPath = path.join(currentDir, entry.name);\r\n \r\n if (entry.isDirectory()) {\r\n recurse(fullPath);\r\n } else if (entry.isFile() && entry.name.endsWith(suffix)) {\r\n cubeFiles.push(fullPath); // Ya es absoluta\r\n }\r\n }\r\n }\r\n\r\n recurse(baseDir);\r\n\r\n // Ordenar por número si los archivos comienzan con un número\r\n cubeFiles.sort((a: string, b: string) => {\r\n const aNum = parseInt(path.basename(a));\r\n const bNum = parseInt(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A,IACtF;AAAA,EACJ;AAAA,EAEA,SAAS,cAAqB;AAC1B,WAAO,KAAK,UAAU,YAAY;AAAA,EACtC;AACJ;","names":["resolve","path"]}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare class Dbcube {
|
|
2
|
+
private static instance;
|
|
3
|
+
private configPath;
|
|
4
|
+
private config;
|
|
5
|
+
private databases;
|
|
6
|
+
private initialized;
|
|
7
|
+
constructor();
|
|
8
|
+
loadConfig(): Promise<void>;
|
|
9
|
+
init(configCreate?: {
|
|
10
|
+
databaseName?: string;
|
|
11
|
+
motor?: string;
|
|
12
|
+
configAnswers?: any;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
database(databaseName: string): any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Dbcube };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare class Dbcube {
|
|
2
|
+
private static instance;
|
|
3
|
+
private configPath;
|
|
4
|
+
private config;
|
|
5
|
+
private databases;
|
|
6
|
+
private initialized;
|
|
7
|
+
constructor();
|
|
8
|
+
loadConfig(): Promise<void>;
|
|
9
|
+
init(configCreate?: {
|
|
10
|
+
databaseName?: string;
|
|
11
|
+
motor?: string;
|
|
12
|
+
configAnswers?: any;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
database(databaseName: string): any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Dbcube };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// src/lib/Dbcube.ts
|
|
9
|
+
import { Config } from "@dbcube/core";
|
|
10
|
+
import { Database } from "@dbcube/query-builder";
|
|
11
|
+
|
|
12
|
+
// src/lib/FileUtils.ts
|
|
13
|
+
import * as fs from "fs";
|
|
14
|
+
import * as path from "path";
|
|
15
|
+
var FileUtils = class {
|
|
16
|
+
/**
|
|
17
|
+
* Verifica si un archivo existe (asincrónico).
|
|
18
|
+
* @param filePath - Ruta del archivo.
|
|
19
|
+
* @returns Promise que resuelve true si el archivo existe, false si no.
|
|
20
|
+
*/
|
|
21
|
+
static async fileExists(filePath) {
|
|
22
|
+
return new Promise((resolve2) => {
|
|
23
|
+
fs.access(path.resolve(filePath), fs.constants.F_OK, (err) => {
|
|
24
|
+
resolve2(!err);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Verifica si un archivo existe (sincrónico).
|
|
30
|
+
* @param filePath - Ruta del archivo.
|
|
31
|
+
* @returns True si el archivo existe, false si no.
|
|
32
|
+
*/
|
|
33
|
+
static fileExistsSync(filePath) {
|
|
34
|
+
try {
|
|
35
|
+
fs.accessSync(path.resolve(filePath), fs.constants.F_OK);
|
|
36
|
+
return true;
|
|
37
|
+
} catch {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Extrae el nombre de la base de datos de un string con formato @database().
|
|
43
|
+
* @param input - String de entrada que contiene la referencia a la base de datos.
|
|
44
|
+
* @returns El nombre de la base de datos o null si no se encuentra.
|
|
45
|
+
*/
|
|
46
|
+
static extractDatabaseName(input) {
|
|
47
|
+
const match = input.match(/@database\(["']?([\w-]+)["']?\)/);
|
|
48
|
+
return match ? match[1] : null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Lee recursivamente archivos que terminan en un sufijo dado y los ordena numéricamente.
|
|
52
|
+
* @param dir - Directorio base (relativo o absoluto).
|
|
53
|
+
* @param suffix - Sufijo de archivo (como 'table.cube').
|
|
54
|
+
* @returns Rutas absolutas de los archivos encontrados y ordenados.
|
|
55
|
+
*/
|
|
56
|
+
static getCubeFilesRecursively(dir, suffix) {
|
|
57
|
+
const baseDir = path.resolve(dir);
|
|
58
|
+
const cubeFiles = [];
|
|
59
|
+
function recurse(currentDir) {
|
|
60
|
+
const entries = fs.readdirSync(currentDir, { withFileTypes: true });
|
|
61
|
+
for (const entry of entries) {
|
|
62
|
+
const fullPath = path.join(currentDir, entry.name);
|
|
63
|
+
if (entry.isDirectory()) {
|
|
64
|
+
recurse(fullPath);
|
|
65
|
+
} else if (entry.isFile() && entry.name.endsWith(suffix)) {
|
|
66
|
+
cubeFiles.push(fullPath);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
recurse(baseDir);
|
|
71
|
+
cubeFiles.sort((a, b) => {
|
|
72
|
+
const aNum = parseInt(path.basename(a));
|
|
73
|
+
const bNum = parseInt(path.basename(b));
|
|
74
|
+
return (isNaN(aNum) ? 0 : aNum) - (isNaN(bNum) ? 0 : bNum);
|
|
75
|
+
});
|
|
76
|
+
return cubeFiles;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var FileUtils_default = FileUtils;
|
|
80
|
+
|
|
81
|
+
// src/lib/Dbcube.ts
|
|
82
|
+
import path2 from "path";
|
|
83
|
+
var Dbcube = class _Dbcube {
|
|
84
|
+
static instance;
|
|
85
|
+
configPath;
|
|
86
|
+
config;
|
|
87
|
+
databases;
|
|
88
|
+
initialized;
|
|
89
|
+
constructor() {
|
|
90
|
+
if (_Dbcube.instance) {
|
|
91
|
+
return _Dbcube.instance;
|
|
92
|
+
}
|
|
93
|
+
this.configPath = path2.join(process.cwd(), "dbcube.config.js");
|
|
94
|
+
this.config = new Config();
|
|
95
|
+
this.databases = {};
|
|
96
|
+
this.initialized = false;
|
|
97
|
+
_Dbcube.instance = this;
|
|
98
|
+
}
|
|
99
|
+
async loadConfig() {
|
|
100
|
+
const exists = await FileUtils_default.fileExists(this.configPath);
|
|
101
|
+
exists ?? console.log("\u274C Dont exists config file, please create a dbcube.config.js file");
|
|
102
|
+
}
|
|
103
|
+
async init(configCreate = {}) {
|
|
104
|
+
if (this.initialized) return;
|
|
105
|
+
await this.loadConfig();
|
|
106
|
+
const config = __require(this.configPath);
|
|
107
|
+
config(this.config);
|
|
108
|
+
const databases = Object.keys(this.config.getAllDatabases());
|
|
109
|
+
for (const database of databases) {
|
|
110
|
+
this.databases[database] = new Database(database);
|
|
111
|
+
}
|
|
112
|
+
if (configCreate.databaseName) {
|
|
113
|
+
this.databases[configCreate.databaseName] = new Database(configCreate.databaseName);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
database(databaseName) {
|
|
117
|
+
return this.databases[databaseName];
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
export {
|
|
121
|
+
Dbcube
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/Dbcube.ts","../src/lib/FileUtils.ts"],"sourcesContent":["import { Config } from '@dbcube/core';\r\nimport { Database } from '@dbcube/query-builder';\r\nimport FileUtils from './FileUtils';\r\nimport path from 'path';\r\n\r\nexport class Dbcube {\r\n private static instance: Dbcube;\r\n private configPath!: string;\r\n private config: any;\r\n private databases!: Record<string, any>;\r\n private initialized!: boolean;\r\n\r\n\r\n constructor() {\r\n if (Dbcube.instance) {\r\n return Dbcube.instance;\r\n }\r\n this.configPath = path.join(process.cwd(), 'dbcube.config.js');\r\n this.config = new Config();\r\n this.databases = {};\r\n this.initialized = false;\r\n\r\n Dbcube.instance = this;\r\n }\r\n\r\n async loadConfig() {\r\n const exists = await FileUtils.fileExists(this.configPath);\r\n exists ?? console.log('❌ Dont exists config file, please create a dbcube.config.js file');\r\n }\r\n\r\n\r\n async init(configCreate: { databaseName?: string; motor?: string; configAnswers?: any } = {}) {\r\n if (this.initialized) return;\r\n await this.loadConfig();\r\n const config = require(this.configPath);\r\n \r\n config(this.config);\r\n const databases = Object.keys(this.config.getAllDatabases());\r\n \r\n for (const database of databases) {\r\n this.databases[database] = new Database(database);\r\n }\r\n if(configCreate.databaseName){\r\n this.databases[configCreate.databaseName] = new Database(configCreate.databaseName);\r\n }\r\n }\r\n\r\n database(databaseName: string){\r\n return this.databases[databaseName];\r\n }\r\n}\r\n\r\nexport default Dbcube;","import * as fs from 'fs';\r\nimport * as path from 'path';\r\n\r\nexport class FileUtils {\r\n /**\r\n * Verifica si un archivo existe (asincrónico).\r\n * @param filePath - Ruta del archivo.\r\n * @returns Promise que resuelve true si el archivo existe, false si no.\r\n */\r\n static async fileExists(filePath: string): Promise<boolean> {\r\n return new Promise<boolean>((resolve) => {\r\n fs.access(path.resolve(filePath), fs.constants.F_OK, (err) => {\r\n resolve(!err);\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * Verifica si un archivo existe (sincrónico).\r\n * @param filePath - Ruta del archivo.\r\n * @returns True si el archivo existe, false si no.\r\n */\r\n static fileExistsSync(filePath: string): boolean {\r\n try {\r\n fs.accessSync(path.resolve(filePath), fs.constants.F_OK);\r\n return true;\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Extrae el nombre de la base de datos de un string con formato @database().\r\n * @param input - String de entrada que contiene la referencia a la base de datos.\r\n * @returns El nombre de la base de datos o null si no se encuentra.\r\n */\r\n static extractDatabaseName(input: string): string | null {\r\n const match = input.match(/@database\\([\"']?([\\w-]+)[\"']?\\)/);\r\n return match ? match[1] : null;\r\n }\r\n\r\n /**\r\n * Lee recursivamente archivos que terminan en un sufijo dado y los ordena numéricamente.\r\n * @param dir - Directorio base (relativo o absoluto).\r\n * @param suffix - Sufijo de archivo (como 'table.cube').\r\n * @returns Rutas absolutas de los archivos encontrados y ordenados.\r\n */\r\n static getCubeFilesRecursively(dir: string, suffix: string): string[] {\r\n const baseDir = path.resolve(dir); // ✅ Asegura que sea absoluto\r\n const cubeFiles: string[] = [];\r\n\r\n function recurse(currentDir: string): void {\r\n const entries = fs.readdirSync(currentDir, { withFileTypes: true });\r\n \r\n for (const entry of entries) {\r\n const fullPath = path.join(currentDir, entry.name);\r\n \r\n if (entry.isDirectory()) {\r\n recurse(fullPath);\r\n } else if (entry.isFile() && entry.name.endsWith(suffix)) {\r\n cubeFiles.push(fullPath); // Ya es absoluta\r\n }\r\n }\r\n }\r\n\r\n recurse(baseDir);\r\n\r\n // Ordenar por número si los archivos comienzan con un número\r\n cubeFiles.sort((a: string, b: string) => {\r\n const aNum = parseInt(path.basename(a));\r\n const bNum = parseInt(path.basename(b));\r\n return (isNaN(aNum) ? 0 : aNum) - (isNaN(bNum) ? 0 : bNum);\r\n });\r\n\r\n return cubeFiles;\r\n }\r\n}\r\n\r\nexport default FileUtils;"],"mappings":";;;;;;;;AAAA,SAAS,cAAc;AACvB,SAAS,gBAAgB;;;ACDzB,YAAY,QAAQ;AACpB,YAAY,UAAU;AAEf,IAAM,YAAN,MAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrB,aAAa,WAAW,UAAoC;AAC1D,WAAO,IAAI,QAAiB,CAACA,aAAY;AACvC,MAAG,UAAY,aAAQ,QAAQ,GAAM,aAAU,MAAM,CAAC,QAAQ;AAC5D,QAAAA,SAAQ,CAAC,GAAG;AAAA,MACd,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAO,eAAe,UAA2B;AAC/C,QAAI;AACF,MAAG,cAAgB,aAAQ,QAAQ,GAAM,aAAU,IAAI;AACvD,aAAO;AAAA,IACT,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAO,oBAAoB,OAA8B;AACvD,UAAM,QAAQ,MAAM,MAAM,iCAAiC;AAC3D,WAAO,QAAQ,MAAM,CAAC,IAAI;AAAA,EAC5B;A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,CAAC,GAAG;AAC1F,QAAI,KAAK,YAAa;AACtB,UAAM,KAAK,WAAW;AACtB,UAAM,SAAS,UAAQ,KAAK,UAAU;AAEtC,WAAO,KAAK,MAAM;AAClB,UAAM,YAAY,OAAO,KAAK,KAAK,OAAO,gBAAgB,CAAC;AAE3D,eAAW,YAAY,WAAW;AAC9B,WAAK,UAAU,QAAQ,IAAI,IAAI,SAAS,QAAQ;AAAA,IACpD;AACA,QAAG,aAAa,cAAa;AACzB,WAAK,UAAU,aAAa,YAAY,IAAI,IAAI,SAAS,aAAa,YAAY;AAAA,IACtF;AAAA,EACJ;AAAA,EAEA,SAAS,cAAqB;AAC1B,WAAO,KAAK,UAAU,YAAY;AAAA,EACtC;AACJ;","names":["resolve","path","path"]}
|
package/package.json
CHANGED
|
@@ -1,26 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dbcube",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"require": "./dist/index.cjs"
|
|
11
|
+
},
|
|
5
12
|
"scripts": {
|
|
6
|
-
"
|
|
7
|
-
"dbcube": "node
|
|
13
|
+
"build": "tsup",
|
|
14
|
+
"dbcube": "node dist/index.js"
|
|
8
15
|
},
|
|
9
16
|
"bin": {
|
|
10
|
-
"dbcube": "./
|
|
17
|
+
"dbcube": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"dbcube",
|
|
21
|
+
"mysql",
|
|
22
|
+
"mongodb",
|
|
23
|
+
"postgresql",
|
|
24
|
+
"sqlite",
|
|
25
|
+
"database",
|
|
26
|
+
"db",
|
|
27
|
+
"orm",
|
|
28
|
+
"sql",
|
|
29
|
+
"query builder",
|
|
30
|
+
"query",
|
|
31
|
+
"builder",
|
|
32
|
+
"nodejs",
|
|
33
|
+
"backend",
|
|
34
|
+
"library",
|
|
35
|
+
"database library",
|
|
36
|
+
"base de datos",
|
|
37
|
+
"sequelize alternative",
|
|
38
|
+
"lightweight orm",
|
|
39
|
+
"sql toolkit",
|
|
40
|
+
"query optimizer",
|
|
41
|
+
"typescript",
|
|
42
|
+
"javascript",
|
|
43
|
+
"async",
|
|
44
|
+
"modern database",
|
|
45
|
+
"dbcube-orm",
|
|
46
|
+
"@dbcube/query-builder",
|
|
47
|
+
"query-builder",
|
|
48
|
+
"dbcube-query-builder",
|
|
49
|
+
"@dbcube/query-builder",
|
|
50
|
+
"albert",
|
|
51
|
+
"araya",
|
|
52
|
+
"@dbcube",
|
|
53
|
+
"@albrtaraya"
|
|
54
|
+
],
|
|
55
|
+
"author": "Albert Araya",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
11
59
|
},
|
|
12
|
-
"keywords": [],
|
|
13
|
-
"author": "",
|
|
14
|
-
"license": "ISC",
|
|
15
|
-
"description": "",
|
|
16
60
|
"dependencies": {
|
|
17
|
-
"@dbcube/
|
|
18
|
-
"@
|
|
61
|
+
"@dbcube/core": "^1.0.1",
|
|
62
|
+
"@dbcube/query-builder": "^1.0.2"
|
|
63
|
+
},
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "https://github.com/Dbcube/query-builder"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/node": "^24.3.0",
|
|
19
70
|
"alwait": "^1.0.0",
|
|
20
|
-
"chalk": "^5.
|
|
21
|
-
"dotenv": "^17.
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
71
|
+
"chalk": "^5.6.0",
|
|
72
|
+
"dotenv": "^17.2.1",
|
|
73
|
+
"rollup": "^4.50.0",
|
|
74
|
+
"tsup": "^8.5.0",
|
|
75
|
+
"typescript": "^5.9.2"
|
|
25
76
|
}
|
|
26
77
|
}
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: ['src/index.ts'], // Punto de entrada
|
|
5
|
+
format: ['cjs', 'esm'], // Genera CommonJS y ES Modules
|
|
6
|
+
dts: true, // Genera archivos de tipos
|
|
7
|
+
clean: true, // Limpia el directorio de salida
|
|
8
|
+
outDir: 'dist', // Directorio de salida
|
|
9
|
+
splitting: false, // Desactiva la división de código
|
|
10
|
+
sourcemap: true, // Genera sourcemaps
|
|
11
|
+
outExtension: ({ format }) => ({ // Forzar extensiones personalizadas
|
|
12
|
+
js: format === 'cjs' ? '.cjs' : '.js',
|
|
13
|
+
}),
|
|
14
|
+
});
|
package/.lh/.lhignore
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# list file to not track by the local-history extension. comment line starts with a '#' character
|
|
2
|
-
# each line describe a regular expression pattern (search for 'Javascript regex')
|
|
3
|
-
# it will relate to the workspace directory root. for example:
|
|
4
|
-
# '.*\.txt' ignores any file with 'txt' extension
|
|
5
|
-
# '/test/.*' ignores all the files under the 'test' directory
|
|
6
|
-
# '.*/test/.*' ignores all the files under any 'test' directory (even under sub-folders)
|
package/.lh/package.json.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"sourceFile": "package.json",
|
|
3
|
-
"activeCommit": 0,
|
|
4
|
-
"commits": [
|
|
5
|
-
{
|
|
6
|
-
"activePatchIndex": 1,
|
|
7
|
-
"patches": [
|
|
8
|
-
{
|
|
9
|
-
"date": 1756705588331,
|
|
10
|
-
"content": "Index: \n===================================================================\n--- \n+++ \n"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"date": 1756705654448,
|
|
14
|
-
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -13,9 +13,8 @@\n \"author\": \"\",\n \"license\": \"ISC\",\n \"description\": \"\",\n \"dependencies\": {\n- \"@dbcube/schema-builder\": \"^1.0.0\",\n \"@inquirer/prompts\": \"^7.4.1\",\n \"alwait\": \"^1.0.0\",\n \"chalk\": \"^5.4.1\",\n \"dotenv\": \"^17.0.1\",\n"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"date": 1756705588331,
|
|
18
|
-
"name": "Commit-0",
|
|
19
|
-
"content": "{\n \"name\": \"dbcube\",\n \"version\": \"1.0.0\",\n \"main\": \"index.js\",\n \"scripts\": {\n \"start\": \"node example.js\",\n \"dbcube\": \"node src/index.js\"\n },\n \"bin\": {\n \"dbcube\": \"./src/index.js\"\n },\n \"keywords\": [],\n \"author\": \"\",\n \"license\": \"ISC\",\n \"description\": \"\",\n \"dependencies\": {\n \"@inquirer/prompts\": \"^7.4.1\",\n \"alwait\": \"^1.0.0\",\n \"chalk\": \"^5.4.1\",\n \"dotenv\": \"^17.0.1\",\n \"fs-extra\": \"^11.3.0\",\n \"glob\": \"^11.0.1\",\n \"ora\": \"^8.2.0\"\n }\n}\n"
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|