@dbcube/cli 5.1.2 → 5.1.4

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 CHANGED
@@ -4,12 +4,12 @@
4
4
  "": {
5
5
  "name": "@dbcube/cli",
6
6
  "dependencies": {
7
- "@dbcube/schema-builder": "^5.1.4",
7
+ "@dbcube/schema-builder": "^5.1.6",
8
8
  "@inquirer/prompts": "^8.4.2",
9
9
  "alwait": "^1.0.0",
10
10
  "chalk": "4.1.2",
11
11
  "dotenv": "^17.4.2",
12
- "fs-extra": "^11.3.4",
12
+ "fs-extra": "^11.3.5",
13
13
  "glob": "^13.0.6",
14
14
  "ora": "5.4.1",
15
15
  "unzipper": "^0.12.3",
@@ -21,9 +21,9 @@
21
21
  "ora": "5.4.1",
22
22
  },
23
23
  "packages": {
24
- "@dbcube/core": ["@dbcube/core@5.1.11", "", { "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-XsoVlZItjB1wspzbIFD+DQs1hoDSEK4VR+ImK4/KLdWVAL+RooS669d7j95NolFwwFAoaiixByZZp13IYBAeow=="],
24
+ "@dbcube/core": ["@dbcube/core@5.1.13", "", { "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-4hMKROF9w1bwR55pYKHHndOqMZUgOIxc1B/mE1zzc7ka0V10WK5Zc46bsRqb2bqiPZp16l+xmgHgeIOaewafFg=="],
25
25
 
26
- "@dbcube/schema-builder": ["@dbcube/schema-builder@5.1.4", "", { "dependencies": { "@dbcube/core": "^5.1.11", "chalk": "^5.6.2", "ora": "^9.4.0" } }, "sha512-GhooyaFvNIvSw5eDmgQCfCBBeOeH6DxEvBQeYAlev+UmBIbz3QG8z0TYPs3XX6b47GU+vbDqH/IQMG9St+ezkQ=="],
26
+ "@dbcube/schema-builder": ["@dbcube/schema-builder@5.1.6", "", { "dependencies": { "@dbcube/core": "^5.1.13", "chalk": "^5.6.2", "ora": "^9.4.0" } }, "sha512-tGvxdX+72X+/zACgGT05R5cVMSiU/D6/vAlXpTMgy33ybZOXES+U6KBs5HN5fRMF2wwegqt4JjdxeBtYwOimAQ=="],
27
27
 
28
28
  "@inquirer/ansi": ["@inquirer/ansi@2.0.5", "", {}, "sha512-doc2sWgJpbFQ64UflSVd17ibMGDuxO1yKgOgLMwavzESnXjFWJqUeG8saYosqKpHp4kWiM5x1nXvEjbpx90gzw=="],
29
29
 
@@ -113,7 +113,7 @@
113
113
 
114
114
  "follow-redirects": ["follow-redirects@1.16.0", "", {}, "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw=="],
115
115
 
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=="],
116
+ "fs-extra": ["fs-extra@11.3.5", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-eKpRKAovdpZtR1WopLHxlBWvAgPny3c4gX1G5Jhwmmw4XJj0ifSD5qB5TOo8hmA0wlRKDAOAhEE1yVPgs6Fgcg=="],
117
117
 
118
118
  "glob": ["glob@13.0.6", "", { "dependencies": { "minimatch": "^10.2.2", "minipass": "^7.1.3", "path-scurry": "^2.0.2" } }, "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw=="],
119
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbcube/cli",
3
- "version": "5.1.2",
3
+ "version": "5.1.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "dbcube": "node src/index.js"
@@ -13,12 +13,12 @@
13
13
  "license": "ISC",
14
14
  "description": "",
15
15
  "dependencies": {
16
- "@dbcube/schema-builder": "^5.1.4",
16
+ "@dbcube/schema-builder": "^5.1.6",
17
17
  "@inquirer/prompts": "^8.4.2",
18
18
  "alwait": "^1.0.0",
19
19
  "chalk": "4.1.2",
20
20
  "dotenv": "^17.4.2",
21
- "fs-extra": "^11.3.4",
21
+ "fs-extra": "^11.3.5",
22
22
  "glob": "^13.0.6",
23
23
  "ora": "5.4.1",
24
24
  "unzipper": "^0.12.3"
@@ -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'")) {