@ccci/micro-server 1.0.23 → 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
@@ -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.23",
3
+ "version": "1.0.24",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",