@klapeks/micro-db-utils 0.0.2 → 0.0.3

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.
@@ -85,8 +85,9 @@ var MongoDBConnection = /** @class */ (function () {
85
85
  MongoDBConnection.createCounter = function (name) {
86
86
  var _this = this;
87
87
  if (name === void 0) { name = 'Counter'; }
88
- // @ts-ignore
89
- var _CounterSchema = new mongoose.Schema({
88
+ if (!mongooseModule)
89
+ throw "No mongoose module";
90
+ var _CounterSchema = new mongooseModule.Schema({
90
91
  model: { type: String, required: true, unique: true },
91
92
  counter: { type: Number, default: 0 }
92
93
  }, {
@@ -174,7 +175,6 @@ function _createDefaultMongoSchemas() {
174
175
  if (!mongooseModule)
175
176
  return {};
176
177
  return {
177
- // @ts-ignore
178
178
  MongoGeoPoint: new mongooseModule.Schema({
179
179
  type: {
180
180
  type: String,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@klapeks/micro-db-utils",
3
3
  "description": "klapeks utils for db and other storages",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "type": "commonjs",
6
6
  "author": "Klapeks",
7
7
  "license": "ISC",