pg-mvc-service 2.0.118 → 2.0.119

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.
@@ -207,12 +207,7 @@ class RequestType extends ReqResType_1.default {
207
207
  break;
208
208
  }
209
209
  errorMessage = errorMessage.replace("{property}", keys.join('.'));
210
- if (value === undefined) {
211
- errorMessage = errorMessage.replace("{value}", value);
212
- }
213
- else {
214
- errorMessage = errorMessage.replace("{value}", "");
215
- }
210
+ errorMessage = errorMessage.replace("{value}", value !== null && value !== void 0 ? value : "");
216
211
  return errorMessage;
217
212
  }
218
213
  /**
@@ -1049,7 +1044,9 @@ class RequestType extends ReqResType_1.default {
1049
1044
  code: code + '-ARRAY_01',
1050
1045
  description: this.createErrorMessage('ARRAY_01', [key])
1051
1046
  });
1047
+ console.log(property.description, property.type);
1052
1048
  errorList = [...errorList, ...this.getErrorArray([key], code)];
1049
+ console.log("errorList", errorList);
1053
1050
  break;
1054
1051
  case 'map':
1055
1052
  case 'map?':
@@ -1173,6 +1170,7 @@ class RequestType extends ReqResType_1.default {
1173
1170
  getErrorArray(keys, code) {
1174
1171
  let errorList = [];
1175
1172
  const property = this.getProperty(keys);
1173
+ console.log(keys, property);
1176
1174
  if (property.type !== 'array' && property.type !== 'array?') {
1177
1175
  throw new Error(`setArrayメソッドでArray型以外が入力された場合はエラー\n keys: ${keys.join(',')}`);
1178
1176
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.118",
3
+ "version": "2.0.119",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -248,11 +248,7 @@ export class RequestType extends ReqResType {
248
248
  }
249
249
 
250
250
  errorMessage = errorMessage.replace("{property}", keys.join('.'));
251
- if (value === undefined) {
252
- errorMessage = errorMessage.replace("{value}", value);
253
- } else {
254
- errorMessage = errorMessage.replace("{value}", "");
255
- }
251
+ errorMessage = errorMessage.replace("{value}", value ?? "");
256
252
 
257
253
  return errorMessage;
258
254
  }
@@ -1153,7 +1149,9 @@ export class RequestType extends ReqResType {
1153
1149
  description: this.createErrorMessage('ARRAY_01', [key])
1154
1150
  });
1155
1151
 
1152
+ console.log(property.description, property.type)
1156
1153
  errorList = [...errorList, ...this.getErrorArray([key], code)];
1154
+ console.log("errorList", errorList)
1157
1155
  break;
1158
1156
  case 'map':
1159
1157
  case 'map?':
@@ -1287,6 +1285,7 @@ export class RequestType extends ReqResType {
1287
1285
  let errorList: Array<IError> = [];
1288
1286
 
1289
1287
  const property = this.getProperty(keys);
1288
+ console.log(keys, property);
1290
1289
  if (property.type !== 'array' && property.type !== 'array?') {
1291
1290
  throw new Error(`setArrayメソッドでArray型以外が入力された場合はエラー\n keys: ${keys.join(',')}`);
1292
1291
  }