@hackthedev/dsync-sql 1.0.2 → 1.0.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.
@@ -0,0 +1,43 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ persist-credentials: true
19
+
20
+ - name: Skip version bump commits
21
+ run: |
22
+ if git log -1 --pretty=%B | grep -q "chore: bump version"; then
23
+ echo "Version bump commit detected, skipping."
24
+ exit 0
25
+ fi
26
+
27
+ - uses: actions/setup-node@v4
28
+ with:
29
+ node-version: 20
30
+ registry-url: https://registry.npmjs.org/
31
+
32
+ - run: npm ci
33
+
34
+ - run: |
35
+ git config user.name "github-actions"
36
+ git config user.email "actions@github.com"
37
+ npm version patch -m "chore: bump version %s"
38
+ git push
39
+
40
+ - run: npm publish --access public
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43
+
package/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import mysql from "mysql2/promise";
2
2
  import Logger from "@hackthedev/terminal-logger"
3
- import {serverconfig} from "../../dcts/index.mjs";
4
3
  import {spawn} from "node:child_process";
5
4
  import fs from "fs";
6
5
 
@@ -17,7 +16,6 @@ export default class dSyncSql {
17
16
 
18
17
  if(!host) throw new Error('host address is required');
19
18
  if(!user) throw new Error('username is required');
20
- if(!password) throw new Error('password is required');
21
19
  if(!database) throw new Error('database is required');
22
20
 
23
21
  this.connection_info = {host, user, password, database};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackthedev/dsync-sql",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "dSyncSql is supposed to be a helper for handling MySQL / MariaDB connections and executing queries. In addition it will also allow you to automatically create a database's structure like tables, column and such and will automatically create missing columns and tables based off a json Object.",
5
5
  "homepage": "https://github.com/NETWORK-Z-Dev/dSyncSql#readme",
6
6
  "bugs": {