@dbcube/cli 5.1.1 → 5.1.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/bun.lock +23 -23
- package/package.json +4 -4
- package/src/commands/run/seeder/add.js +4 -2
- package/src/commands/run/table/fresh.js +6 -1
package/bun.lock
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"": {
|
|
5
5
|
"name": "@dbcube/cli",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@dbcube/schema-builder": "^5.1.
|
|
8
|
-
"@inquirer/prompts": "^8.
|
|
7
|
+
"@dbcube/schema-builder": "^5.1.5",
|
|
8
|
+
"@inquirer/prompts": "^8.4.2",
|
|
9
9
|
"alwait": "^1.0.0",
|
|
10
10
|
"chalk": "4.1.2",
|
|
11
|
-
"dotenv": "^17.
|
|
11
|
+
"dotenv": "^17.4.2",
|
|
12
12
|
"fs-extra": "^11.3.4",
|
|
13
13
|
"glob": "^13.0.6",
|
|
14
14
|
"ora": "5.4.1",
|
|
@@ -21,41 +21,41 @@
|
|
|
21
21
|
"ora": "5.4.1",
|
|
22
22
|
},
|
|
23
23
|
"packages": {
|
|
24
|
-
"@dbcube/core": ["@dbcube/core@5.1.
|
|
24
|
+
"@dbcube/core": ["@dbcube/core@5.1.12", "", { "dependencies": { "chalk": "4.1.2", "deasync": "^0.1.31", "follow-redirects": "^1.16.0", "ora": "5.4.1", "unzipper": "^0.12.3" }, "bin": { "dbcube-core": "dist/bin.cjs" } }, "sha512-s98vjAdkVTht1DdE16HzrWu2kgpWSVBGINuSRM4l+blgn7sSZTjWoT31rwd8srnhnZf3Cld0HvHiCq2qIArCHg=="],
|
|
25
25
|
|
|
26
|
-
"@dbcube/schema-builder": ["@dbcube/schema-builder@5.1.
|
|
26
|
+
"@dbcube/schema-builder": ["@dbcube/schema-builder@5.1.5", "", { "dependencies": { "@dbcube/core": "^5.1.12", "chalk": "^5.6.2", "ora": "^9.4.0" } }, "sha512-zKzu8Wg8KKCCDI6OBsChQ+qp7QUnUwdIQbHMUZQnPWQLuPk+5kFcgJbYMfFevzVW5uy0VD0kK3F9gd2Z1VuLOw=="],
|
|
27
27
|
|
|
28
|
-
"@inquirer/ansi": ["@inquirer/ansi@2.0.
|
|
28
|
+
"@inquirer/ansi": ["@inquirer/ansi@2.0.5", "", {}, "sha512-doc2sWgJpbFQ64UflSVd17ibMGDuxO1yKgOgLMwavzESnXjFWJqUeG8saYosqKpHp4kWiM5x1nXvEjbpx90gzw=="],
|
|
29
29
|
|
|
30
|
-
"@inquirer/checkbox": ["@inquirer/checkbox@5.1.
|
|
30
|
+
"@inquirer/checkbox": ["@inquirer/checkbox@5.1.4", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/core": "^11.1.9", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-w6KF8ZYRvqHhROkOTHXYC3qIV/KYEu5o12oLqQySvch61vrYtRxNSHTONSdJqWiFJPlCUQAHT5OgOIyuTr+MHQ=="],
|
|
31
31
|
|
|
32
|
-
"@inquirer/confirm": ["@inquirer/confirm@6.0.
|
|
32
|
+
"@inquirer/confirm": ["@inquirer/confirm@6.0.12", "", { "dependencies": { "@inquirer/core": "^11.1.9", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-h9FgGun3QwVYNj5TWIZZ+slii73bMoBFjPfVIGtnFuL4t8gBiNDV9PcSfIzkuxvgquJKt9nr1QzszpBzTbH8Og=="],
|
|
33
33
|
|
|
34
|
-
"@inquirer/core": ["@inquirer/core@11.1.
|
|
34
|
+
"@inquirer/core": ["@inquirer/core@11.1.9", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-BDE4fG22uYh1bGSifcj7JSx119TVYNViMhMu85usp4Fswrzh6M0DV3yld64jA98uOAa2GSQ4Bg4bZRm2d2cwSg=="],
|
|
35
35
|
|
|
36
|
-
"@inquirer/editor": ["@inquirer/editor@5.
|
|
36
|
+
"@inquirer/editor": ["@inquirer/editor@5.1.1", "", { "dependencies": { "@inquirer/core": "^11.1.9", "@inquirer/external-editor": "^3.0.0", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-6y11LgmNpmn5D2aB5FgnCfBUBK8ZstwLCalyJmORcJZ/WrhOjm16mu6eSqIx8DnErxDqSLr+Jkp+GP8/Nwd5tA=="],
|
|
37
37
|
|
|
38
|
-
"@inquirer/expand": ["@inquirer/expand@5.0.
|
|
38
|
+
"@inquirer/expand": ["@inquirer/expand@5.0.13", "", { "dependencies": { "@inquirer/core": "^11.1.9", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-dF2zvrFo9LshkcB23/O1il13kBkBltWIXzut1evfbuBLXMiGIuC45c+ZQ0uukjCDsvI8OWqun4FRYMnzFCQa3g=="],
|
|
39
39
|
|
|
40
|
-
"@inquirer/external-editor": ["@inquirer/external-editor@
|
|
40
|
+
"@inquirer/external-editor": ["@inquirer/external-editor@3.0.0", "", { "dependencies": { "chardet": "^2.1.1", "iconv-lite": "^0.7.2" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-lDSwMgg+M5rq6JKBYaJwSX6T9e/HK2qqZ1oxmOwn4AQoJE5D+7TumsxLGC02PWS//rkIVqbZv3XA3ejsc9FYvg=="],
|
|
41
41
|
|
|
42
|
-
"@inquirer/figures": ["@inquirer/figures@2.0.
|
|
42
|
+
"@inquirer/figures": ["@inquirer/figures@2.0.5", "", {}, "sha512-NsSs4kzfm12lNetHwAn3GEuH317IzpwrMCbOuMIVytpjnJ90YYHNwdRgYGuKmVxwuIqSgqk3M5qqQt1cDk0tGQ=="],
|
|
43
43
|
|
|
44
|
-
"@inquirer/input": ["@inquirer/input@5.0.
|
|
44
|
+
"@inquirer/input": ["@inquirer/input@5.0.12", "", { "dependencies": { "@inquirer/core": "^11.1.9", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-uiMFBl4LqFzJClh80Q3f9hbOFJ6kgkDWI4LjAeBuyO6EanVVMF69AgOvpi1qdqjDSjDN6578B6nky9ceEpI+1Q=="],
|
|
45
45
|
|
|
46
|
-
"@inquirer/number": ["@inquirer/number@4.0.
|
|
46
|
+
"@inquirer/number": ["@inquirer/number@4.0.12", "", { "dependencies": { "@inquirer/core": "^11.1.9", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-/vrwhEf7Xsuh+YlHF4IjSy3g1cyrQuPaSiHIxCEbLu8qnfvrcvJyCkoktOOF+xV9gSb77/G0n3h04RbMDW2sIg=="],
|
|
47
47
|
|
|
48
|
-
"@inquirer/password": ["@inquirer/password@5.0.
|
|
48
|
+
"@inquirer/password": ["@inquirer/password@5.0.12", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/core": "^11.1.9", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-CBh7YHju623lxJRcAOo498ZUwIuMy63bqW/vVq0tQAZVv+lkWlHkP9ealYE1utWSisEShY5VMdzIXRmyEODzcQ=="],
|
|
49
49
|
|
|
50
|
-
"@inquirer/prompts": ["@inquirer/prompts@8.
|
|
50
|
+
"@inquirer/prompts": ["@inquirer/prompts@8.4.2", "", { "dependencies": { "@inquirer/checkbox": "^5.1.4", "@inquirer/confirm": "^6.0.12", "@inquirer/editor": "^5.1.1", "@inquirer/expand": "^5.0.13", "@inquirer/input": "^5.0.12", "@inquirer/number": "^4.0.12", "@inquirer/password": "^5.0.12", "@inquirer/rawlist": "^5.2.8", "@inquirer/search": "^4.1.8", "@inquirer/select": "^5.1.4" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-XJmn/wY4AX56l1BRU+ZjDrFtg9+2uBEi4JvJQj82kwJDQKiPgSn4CEsbfGGygS4Gw6rkL4W18oATjfVfaqub2Q=="],
|
|
51
51
|
|
|
52
|
-
"@inquirer/rawlist": ["@inquirer/rawlist@5.2.
|
|
52
|
+
"@inquirer/rawlist": ["@inquirer/rawlist@5.2.8", "", { "dependencies": { "@inquirer/core": "^11.1.9", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-Su7FQvp5buZmCymN3PPoYv31ZQQX4ve2j02k7piGgKAWgE+AQRB5YoYVveGXcl3TZ9ldgRMSxj56YfDFmmaqLg=="],
|
|
53
53
|
|
|
54
|
-
"@inquirer/search": ["@inquirer/search@4.1.
|
|
54
|
+
"@inquirer/search": ["@inquirer/search@4.1.8", "", { "dependencies": { "@inquirer/core": "^11.1.9", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-fGiHKGD6DyPIYUWxoXnQTeXeyYqSOUrasDMABBmMHUalH/LxkuzY0xVRtimXAt1sUeeyYkVuKQx1bebMuN11Kw=="],
|
|
55
55
|
|
|
56
|
-
"@inquirer/select": ["@inquirer/select@5.1.
|
|
56
|
+
"@inquirer/select": ["@inquirer/select@5.1.4", "", { "dependencies": { "@inquirer/ansi": "^2.0.5", "@inquirer/core": "^11.1.9", "@inquirer/figures": "^2.0.5", "@inquirer/type": "^4.0.5" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-2kWcGKPMLAXAWRp1AH1SLsQmX+j0QjeljyXMUji9WMZC8nRDO0b7qquIGr6143E7KMLt3VAIGNXzwa/6PXQs4Q=="],
|
|
57
57
|
|
|
58
|
-
"@inquirer/type": ["@inquirer/type@4.0.
|
|
58
|
+
"@inquirer/type": ["@inquirer/type@4.0.5", "", { "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-aetVUNeKNc/VriqXlw1NRSW0zhMBB0W4bNbWRJgzRl/3d0QNDQFfk0GO5SDdtjMZVg6o8ZKEiadd7SCCzoOn5Q=="],
|
|
59
59
|
|
|
60
60
|
"alwait": ["alwait@1.0.0", "", {}, "sha512-o+jEoGVTJyvYDT5mOWkj2i4IsOC7SNCWGc/+o6rAfGx1x3jCBIeFsCwgW/3ZiNJ2dE3Hr1lzxC2a++6dLRLGqQ=="],
|
|
61
61
|
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
|
|
100
100
|
"defaults": ["defaults@1.0.4", "", { "dependencies": { "clone": "^1.0.2" } }, "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A=="],
|
|
101
101
|
|
|
102
|
-
"dotenv": ["dotenv@17.
|
|
102
|
+
"dotenv": ["dotenv@17.4.2", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="],
|
|
103
103
|
|
|
104
104
|
"duplexer2": ["duplexer2@0.1.4", "", { "dependencies": { "readable-stream": "^2.0.2" } }, "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA=="],
|
|
105
105
|
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
|
|
112
112
|
"file-uri-to-path": ["file-uri-to-path@1.0.0", "", {}, "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="],
|
|
113
113
|
|
|
114
|
-
"follow-redirects": ["follow-redirects@1.
|
|
114
|
+
"follow-redirects": ["follow-redirects@1.16.0", "", {}, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="],
|
|
115
115
|
|
|
116
116
|
"fs-extra": ["fs-extra@11.3.4", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA=="],
|
|
117
117
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbcube/cli",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dbcube": "node src/index.js"
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"description": "",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dbcube/schema-builder": "^5.1.
|
|
17
|
-
"@inquirer/prompts": "^8.
|
|
16
|
+
"@dbcube/schema-builder": "^5.1.5",
|
|
17
|
+
"@inquirer/prompts": "^8.4.2",
|
|
18
18
|
"alwait": "^1.0.0",
|
|
19
19
|
"chalk": "4.1.2",
|
|
20
|
-
"dotenv": "^17.
|
|
20
|
+
"dotenv": "^17.4.2",
|
|
21
21
|
"fs-extra": "^11.3.4",
|
|
22
22
|
"glob": "^13.0.6",
|
|
23
23
|
"ora": "5.4.1",
|
|
@@ -3,12 +3,14 @@ const ConfigFileUtils = require('./../../../utils/ConfigFileUtils');
|
|
|
3
3
|
|
|
4
4
|
async function main() {
|
|
5
5
|
try {
|
|
6
|
+
const args = process.argv.slice(2);
|
|
7
|
+
const seederName = args.find(a => !a.startsWith('--'));
|
|
8
|
+
|
|
6
9
|
const configuredDatabases = await ConfigFileUtils.getConfiguredDatabases();
|
|
7
10
|
|
|
8
|
-
// Recorrer cada archivo y mostrar su contenido
|
|
9
11
|
for (const config of configuredDatabases) {
|
|
10
12
|
const schema = new Schema(config.name);
|
|
11
|
-
await schema.executeSeeders();
|
|
13
|
+
await schema.executeSeeders(seederName);
|
|
12
14
|
}
|
|
13
15
|
} catch (error) {
|
|
14
16
|
if (error.message.includes("reading 'init'")) {
|
|
@@ -3,12 +3,17 @@ const ConfigFileUtils = require('./../../../utils/ConfigFileUtils');
|
|
|
3
3
|
|
|
4
4
|
async function main() {
|
|
5
5
|
try {
|
|
6
|
+
const args = process.argv.slice(2);
|
|
7
|
+
const runSeeders = args.includes('--seeder');
|
|
8
|
+
|
|
6
9
|
const configuredDatabases = await ConfigFileUtils.getConfiguredDatabases();
|
|
7
10
|
|
|
8
|
-
// Recorrer cada archivo y mostrar su contenido
|
|
9
11
|
for (const config of configuredDatabases) {
|
|
10
12
|
const schema = new Schema(config.name);
|
|
11
13
|
await schema.freshTables();
|
|
14
|
+
if (runSeeders) {
|
|
15
|
+
await schema.executeSeeders();
|
|
16
|
+
}
|
|
12
17
|
}
|
|
13
18
|
} catch (error) {
|
|
14
19
|
if (error.message.includes("reading 'init'")) {
|