@resolveio/server-lib 2.2.0 → 2.2.1

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.
@@ -3,5 +3,5 @@ import { BillingLoggedInUserModel } from '../models/billing-logged-in-users.mode
3
3
  interface ResolveIOModel extends BillingLoggedInUserModel, Document {
4
4
  }
5
5
  export declare let BillingLoggedInUsers: Model<ResolveIOModel>;
6
- export declare const BillingLoggedInUserVersions: Model<ResolveIOModel>;
6
+ export declare let BillingLoggedInUserVersions: Model<ResolveIOModel>;
7
7
  export {};
@@ -64,5 +64,10 @@ var VersionSchema = new mongoose_1.Schema(vSchema, {
64
64
  versionKey: false,
65
65
  timestamps: true
66
66
  });
67
- exports.BillingLoggedInUsers['versionCollection'] = 'billing-logged-in-users.versions';
68
- exports.BillingLoggedInUserVersions = index_1.ResolveIOServer.getMainDB().model(exports.BillingLoggedInUsers['versionCollection'], VersionSchema);
67
+ if (index_1.ResolveIOServer.getSupportDB()) {
68
+ exports.BillingLoggedInUsers['versionCollection'] = 'billing-logged-in-users.versions';
69
+ }
70
+ exports.BillingLoggedInUserVersions = null;
71
+ if (index_1.ResolveIOServer.getSupportDB()) {
72
+ index_1.ResolveIOServer.getMainDB().model(exports.BillingLoggedInUsers['versionCollection'], VersionSchema);
73
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {