@chevre/domain 21.5.0-alpha.4 → 21.5.0

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.
@@ -4,7 +4,7 @@ import * as mongoose from 'mongoose';
4
4
  import { chevre } from '../../../lib/index';
5
5
 
6
6
  export async function main() {
7
- await mongoose.connect(<string>process.env.MONGOLAB_URI);
7
+ await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: true });
8
8
 
9
9
  const assetTransactionRepo = new chevre.repository.AssetTransaction(mongoose.connection);
10
10
  const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
@@ -33,7 +33,7 @@ class MongoRepository {
33
33
  }
34
34
  // tslint:disable-next-line:max-func-body-length
35
35
  static CREATE_MONGO_CONDITIONS(params) {
36
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
36
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
37
37
  // MongoDB検索条件
38
38
  const andConditions = [
39
39
  {
@@ -140,31 +140,15 @@ class MongoRepository {
140
140
  }
141
141
  });
142
142
  }
143
- // tslint:disable-next-line:no-single-line-block-comment
144
- /* istanbul ignore else */
145
- if (params.offers !== undefined) {
146
- // tslint:disable-next-line:no-single-line-block-comment
147
- /* istanbul ignore else */
148
- if (params.offers.availableFrom instanceof Date) {
149
- andConditions.push({
150
- 'offers.availabilityEnds': {
151
- $exists: true,
152
- $gte: params.offers.availableFrom
153
- }
154
- });
155
- }
156
- // tslint:disable-next-line:no-single-line-block-comment
157
- /* istanbul ignore else */
158
- if (params.offers.availableThrough instanceof Date) {
159
- andConditions.push({
160
- 'offers.availabilityStarts': {
161
- $exists: true,
162
- $lte: params.offers.availableThrough
163
- }
164
- });
165
- }
143
+ const offersAvailableFrom = (_k = params.offers) === null || _k === void 0 ? void 0 : _k.availableFrom;
144
+ if (offersAvailableFrom instanceof Date) {
145
+ andConditions.push({ 'offers.availabilityEnds': { $exists: true, $gte: offersAvailableFrom } });
146
+ }
147
+ const offersAvailableThrough = (_l = params.offers) === null || _l === void 0 ? void 0 : _l.availableThrough;
148
+ if (offersAvailableThrough instanceof Date) {
149
+ andConditions.push({ 'offers.availabilityStarts': { $exists: true, $lte: offersAvailableThrough } });
166
150
  }
167
- const additionalPropertyElemMatch = (_k = params.additionalProperty) === null || _k === void 0 ? void 0 : _k.$elemMatch;
151
+ const additionalPropertyElemMatch = (_m = params.additionalProperty) === null || _m === void 0 ? void 0 : _m.$elemMatch;
168
152
  if (additionalPropertyElemMatch !== undefined && additionalPropertyElemMatch !== null) {
169
153
  andConditions.push({
170
154
  additionalProperty: {
package/package.json CHANGED
@@ -9,8 +9,8 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "4.321.0",
13
- "@cinerino/sdk": "3.162.0-alpha.7",
12
+ "@chevre/factory": "4.321.1",
13
+ "@cinerino/sdk": "3.162.1",
14
14
  "@motionpicture/coa-service": "9.2.0",
15
15
  "@motionpicture/gmo-service": "5.2.0",
16
16
  "@sendgrid/mail": "6.4.0",
@@ -117,5 +117,5 @@
117
117
  "postversion": "git push origin --tags",
118
118
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
119
119
  },
120
- "version": "21.5.0-alpha.4"
120
+ "version": "21.5.0"
121
121
  }