@mtg-tracker/common 1.0.4 → 1.0.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.
@@ -0,0 +1,2 @@
1
+ import mysql from 'mysql2/promise';
2
+ export declare function runMigrations(pool: mysql.Pool): Promise<void>;
@@ -30,7 +30,7 @@ function runMigrations(pool) {
30
30
  const migrationsDir = path_1.default.join(__dirname);
31
31
  const files = fs_1.default.readdirSync(migrationsDir)
32
32
  .filter(file => file.endsWith('_up.sql'))
33
- .sort(); // Sort to ensure correct order
33
+ .sort();
34
34
  // Check which migrations have already been run
35
35
  const [executedMigrations] = yield pool.query('SELECT filename FROM migrations_users');
36
36
  const executedFiles = new Set(executedMigrations.map(row => row.filename));
@@ -55,6 +55,6 @@ function runMigrations(pool) {
55
55
  throw error;
56
56
  }
57
57
  }
58
- console.log('All migrations completed');
58
+ console.log('All migrations complete on auth!');
59
59
  });
60
60
  }
@@ -0,0 +1 @@
1
+ export * from './functions/runMigrations';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtg-tracker/common",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "build/**/*"
9
9
  ],
10
10
  "scripts": {
11
- "clean": "del ./build/*",
11
+ "clean": "rm -rf ./build/*",
12
12
  "build": "npm run clean && tsc",
13
13
  "publ": "git add . && git commit -m \"Updates\" && npm version patch && npm run build && npm publish --access public && git push && git push --tags"
14
14
  },
@@ -16,6 +16,7 @@
16
16
  "author": "zhamburglar",
17
17
  "license": "ISC",
18
18
  "devDependencies": {
19
+ "@types/node": "^20.0.0",
19
20
  "del-cli": "^7.0.0",
20
21
  "typescript": "^5.9.3"
21
22
  },
@@ -27,6 +28,7 @@
27
28
  "express": "^4.21.0",
28
29
  "express-validator": "^7.2.0",
29
30
  "jsonwebtoken": "^9.0.2",
30
- "mysql2": "^3.15.3"
31
+ "mysql2": "^3.15.3",
32
+ "rimraf": "^6.1.0"
31
33
  }
32
34
  }