@ccci/micro-server 1.0.22 → 1.0.24

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/dist/index.js CHANGED
@@ -87560,6 +87560,9 @@ class DatabaseConnector {
87560
87560
  static getModel(modelName) {
87561
87561
  return DatabaseConnector.connection.models[modelName];
87562
87562
  }
87563
+ static sync(modelName, force = false) {
87564
+ DatabaseConnector.connection.models[modelName].sync({ force });
87565
+ }
87563
87566
  }
87564
87567
 
87565
87568
  // src/utils/RouterFactory.ts
@@ -87654,10 +87657,8 @@ import fs3 from "node:fs";
87654
87657
  import path2 from "node:path";
87655
87658
  class WebSocketServer {
87656
87659
  constructor(port = 5001, dir, folder = "sockets") {
87657
- console.log("dir :>> ", dir);
87658
87660
  let handlers = [];
87659
87661
  let fullDir = path2.join(dir, folder);
87660
- console.log("fullDir :>> ", fullDir);
87661
87662
  fs3.readdirSync(fullDir).forEach((file) => {
87662
87663
  if (file.toLowerCase().indexOf(".ts")) {
87663
87664
  let filePath = path2.join(fullDir, file);
@@ -8,7 +8,7 @@ export default class ApplicationServer {
8
8
  /**
9
9
  * Initializes the application server
10
10
  * @param {number} port port for the micro service
11
- * @param {ApplicationOptionType=} options additional server configuration
11
+ * @param {ApplicationOptionType} options additional server configuration
12
12
  */
13
13
  static bootstrap(port: number, options?: ApplicationOptionType): Promise<void>;
14
14
  getInstance(): express.Application;
@@ -18,5 +18,6 @@ export default class DatabaseConnector {
18
18
  static getConnection(): Sequelize;
19
19
  connect(connection: Sequelize): Promise<void>;
20
20
  static getModel(modelName: string): ModelStatic<Model>;
21
+ static sync(modelName: string, force?: boolean): void;
21
22
  }
22
23
  //# sourceMappingURL=DatabaseConnector.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",