@e22m4u/js-repository 0.7.0 → 0.8.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.
Files changed (105) hide show
  1. package/.mocharc.json +2 -3
  2. package/README.md +123 -164
  3. package/dist/cjs/index.cjs +8 -114
  4. package/eslint.config.js +29 -58
  5. package/jsconfig.json +7 -0
  6. package/package.json +11 -19
  7. package/src/adapter/adapter-loader.js +3 -4
  8. package/src/adapter/adapter.js +8 -5
  9. package/src/adapter/adapter.spec.js +10 -9
  10. package/src/adapter/builtin/memory-adapter.js +8 -7
  11. package/src/adapter/builtin/memory-adapter.spec.js +5 -2
  12. package/src/adapter/decorator/default-values-decorator.spec.js +1 -2
  13. package/src/database-schema.js +1 -2
  14. package/src/{database-schema.spec.ts → database-schema.spec.js} +5 -17
  15. package/src/definition/model/index.js +0 -1
  16. package/src/definition/model/model-definition-utils.js +1 -2
  17. package/src/definition/model/model-definition-utils.spec.js +5 -2
  18. package/src/definition/model/properties/index.js +0 -1
  19. package/src/definition/model/relations/index.js +0 -1
  20. package/src/definition/model/relations/relations-definition-validator.js +4 -5
  21. package/src/filter/include-clause-tool.js +8 -6
  22. package/src/index.js +0 -1
  23. package/src/relations/belongs-to-resolver.js +1 -2
  24. package/src/relations/belongs-to-resolver.spec.js +6 -3
  25. package/src/relations/has-many-resolver.js +1 -2
  26. package/src/relations/has-many-resolver.spec.js +6 -3
  27. package/src/relations/has-one-resolver.js +1 -2
  28. package/src/relations/has-one-resolver.spec.js +6 -3
  29. package/src/relations/references-many-resolver.js +1 -2
  30. package/src/relations/references-many-resolver.spec.js +6 -3
  31. package/src/repository/repository.js +1 -2
  32. package/src/utils/is-plain-object.js +4 -4
  33. package/src/adapter/adapter-loader.d.ts +0 -16
  34. package/src/adapter/adapter-registry.d.ts +0 -14
  35. package/src/adapter/adapter.d.ts +0 -153
  36. package/src/adapter/builtin/memory-adapter.d.ts +0 -148
  37. package/src/adapter/decorator/data-sanitizing-decorator.d.ts +0 -14
  38. package/src/adapter/decorator/default-values-decorator.d.ts +0 -14
  39. package/src/adapter/decorator/fields-filtering-decorator.d.ts +0 -14
  40. package/src/adapter/decorator/inclusion-decorator.d.ts +0 -14
  41. package/src/adapter/decorator/index.d.ts +0 -5
  42. package/src/adapter/decorator/property-uniqueness-decorator.d.ts +0 -14
  43. package/src/adapter/index.d.ts +0 -3
  44. package/src/database-schema.d.ts +0 -37
  45. package/src/definition/datasource/datasource-definition-validator.d.ts +0 -14
  46. package/src/definition/datasource/datasource-definition.d.ts +0 -8
  47. package/src/definition/datasource/index.d.ts +0 -2
  48. package/src/definition/definition-registry.d.ts +0 -50
  49. package/src/definition/index.d.ts +0 -3
  50. package/src/definition/model/index.d.ts +0 -6
  51. package/src/definition/model/model-data-sanitizer.d.ts +0 -15
  52. package/src/definition/model/model-definition-utils.d.ts +0 -180
  53. package/src/definition/model/model-definition-validator.d.ts +0 -14
  54. package/src/definition/model/model-definition.d.ts +0 -28
  55. package/src/definition/model/model-definition.js +0 -1
  56. package/src/definition/model/properties/data-type.d.ts +0 -16
  57. package/src/definition/model/properties/index.d.ts +0 -6
  58. package/src/definition/model/properties/primary-keys-definition-validator.d.ts +0 -15
  59. package/src/definition/model/properties/properties-definition-validator.d.ts +0 -15
  60. package/src/definition/model/properties/property-definition.d.ts +0 -23
  61. package/src/definition/model/properties/property-definition.js +0 -1
  62. package/src/definition/model/properties/property-uniqueness-validator.d.ts +0 -31
  63. package/src/definition/model/properties/property-uniqueness.d.ts +0 -14
  64. package/src/definition/model/relations/index.d.ts +0 -3
  65. package/src/definition/model/relations/relation-definition.d.ts +0 -236
  66. package/src/definition/model/relations/relation-definition.js +0 -1
  67. package/src/definition/model/relations/relation-type.d.ts +0 -14
  68. package/src/definition/model/relations/relations-definition-validator.d.ts +0 -15
  69. package/src/errors/index.d.ts +0 -3
  70. package/src/errors/invalid-argument-error.d.ts +0 -6
  71. package/src/errors/invalid-operator-value-error.d.ts +0 -13
  72. package/src/errors/not-implemented-error.d.ts +0 -6
  73. package/src/filter/fields-clause-tool.d.ts +0 -38
  74. package/src/filter/filter-clause.d.ts +0 -348
  75. package/src/filter/include-clause-tool.d.ts +0 -55
  76. package/src/filter/index.d.ts +0 -7
  77. package/src/filter/operator-clause-tool.d.ts +0 -224
  78. package/src/filter/order-clause-tool.d.ts +0 -32
  79. package/src/filter/slice-clause-tool.d.ts +0 -30
  80. package/src/filter/where-clause-tool.d.ts +0 -23
  81. package/src/index.d.ts +0 -9
  82. package/src/relations/belongs-to-resolver.d.ts +0 -46
  83. package/src/relations/has-many-resolver.d.ts +0 -67
  84. package/src/relations/has-one-resolver.d.ts +0 -67
  85. package/src/relations/index.d.ts +0 -4
  86. package/src/relations/references-many-resolver.d.ts +0 -27
  87. package/src/repository/index.d.ts +0 -2
  88. package/src/repository/repository-registry.d.ts +0 -29
  89. package/src/repository/repository.d.ts +0 -183
  90. package/src/types.d.ts +0 -43
  91. package/src/types.js +0 -1
  92. package/src/utils/capitalize.d.ts +0 -6
  93. package/src/utils/clone-deep.d.ts +0 -6
  94. package/src/utils/exclude-object-keys.d.ts +0 -10
  95. package/src/utils/get-value-by-path.d.ts +0 -12
  96. package/src/utils/index.d.ts +0 -12
  97. package/src/utils/is-deep-equal.d.ts +0 -10
  98. package/src/utils/is-plain-object.d.ts +0 -6
  99. package/src/utils/is-promise.d.ts +0 -10
  100. package/src/utils/like-to-regexp.d.ts +0 -14
  101. package/src/utils/model-name-to-model-key.d.ts +0 -6
  102. package/src/utils/select-object-keys.d.ts +0 -10
  103. package/src/utils/singularize.d.ts +0 -6
  104. package/src/utils/string-to-regexp.d.ts +0 -10
  105. package/tsconfig.json +0 -11
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -46,7 +45,6 @@ function isPromise(value) {
46
45
  }
47
46
  var init_is_promise = __esm({
48
47
  "src/utils/is-promise.js"() {
49
- "use strict";
50
48
  __name(isPromise, "isPromise");
51
49
  }
52
50
  });
@@ -58,7 +56,6 @@ function capitalize(string) {
58
56
  }
59
57
  var init_capitalize = __esm({
60
58
  "src/utils/capitalize.js"() {
61
- "use strict";
62
59
  __name(capitalize, "capitalize");
63
60
  }
64
61
  });
@@ -102,7 +99,6 @@ function cloneDeep(value) {
102
99
  }
103
100
  var init_clone_deep = __esm({
104
101
  "src/utils/clone-deep.js"() {
105
- "use strict";
106
102
  __name(cloneDeep, "cloneDeep");
107
103
  }
108
104
  });
@@ -126,7 +122,6 @@ function singularize(noun) {
126
122
  }
127
123
  var init_singularize = __esm({
128
124
  "src/utils/singularize.js"() {
129
- "use strict";
130
125
  __name(singularize, "singularize");
131
126
  }
132
127
  });
@@ -175,7 +170,6 @@ function isDeepEqual(firstValue, secondValue) {
175
170
  }
176
171
  var init_is_deep_equal = __esm({
177
172
  "src/utils/is-deep-equal.js"() {
178
- "use strict";
179
173
  __name(isDeepEqual, "isDeepEqual");
180
174
  }
181
175
  });
@@ -184,7 +178,6 @@ var init_is_deep_equal = __esm({
184
178
  var import_js_format, _NotImplementedError, NotImplementedError;
185
179
  var init_not_implemented_error = __esm({
186
180
  "src/errors/not-implemented-error.js"() {
187
- "use strict";
188
181
  import_js_format = require("@e22m4u/js-format");
189
182
  _NotImplementedError = class _NotImplementedError extends import_js_format.Errorf {
190
183
  };
@@ -197,7 +190,6 @@ var init_not_implemented_error = __esm({
197
190
  var import_js_format2, _InvalidArgumentError, InvalidArgumentError;
198
191
  var init_invalid_argument_error = __esm({
199
192
  "src/errors/invalid-argument-error.js"() {
200
- "use strict";
201
193
  import_js_format2 = require("@e22m4u/js-format");
202
194
  _InvalidArgumentError = class _InvalidArgumentError extends import_js_format2.Errorf {
203
195
  };
@@ -210,7 +202,6 @@ var init_invalid_argument_error = __esm({
210
202
  var import_js_format3, _InvalidOperatorValueError, InvalidOperatorValueError;
211
203
  var init_invalid_operator_value_error = __esm({
212
204
  "src/errors/invalid-operator-value-error.js"() {
213
- "use strict";
214
205
  import_js_format3 = require("@e22m4u/js-format");
215
206
  _InvalidOperatorValueError = class _InvalidOperatorValueError extends Error {
216
207
  /**
@@ -239,7 +230,6 @@ var init_invalid_operator_value_error = __esm({
239
230
  // src/errors/index.js
240
231
  var init_errors = __esm({
241
232
  "src/errors/index.js"() {
242
- "use strict";
243
233
  init_not_implemented_error();
244
234
  init_invalid_argument_error();
245
235
  init_invalid_operator_value_error();
@@ -281,7 +271,6 @@ function likeToRegexp(pattern, isCaseInsensitive = false) {
281
271
  }
282
272
  var init_like_to_regexp = __esm({
283
273
  "src/utils/like-to-regexp.js"() {
284
- "use strict";
285
274
  init_errors();
286
275
  __name(likeToRegexp, "likeToRegexp");
287
276
  }
@@ -295,7 +284,6 @@ function isPlainObject(value) {
295
284
  }
296
285
  var init_is_plain_object = __esm({
297
286
  "src/utils/is-plain-object.js"() {
298
- "use strict";
299
287
  __name(isPlainObject, "isPlainObject");
300
288
  }
301
289
  });
@@ -309,7 +297,6 @@ function stringToRegexp(pattern, flags = void 0) {
309
297
  }
310
298
  var init_string_to_regexp = __esm({
311
299
  "src/utils/string-to-regexp.js"() {
312
- "use strict";
313
300
  __name(stringToRegexp, "stringToRegexp");
314
301
  }
315
302
  });
@@ -332,7 +319,6 @@ function getValueByPath(obj, path, orElse = void 0) {
332
319
  }
333
320
  var init_get_value_by_path = __esm({
334
321
  "src/utils/get-value-by-path.js"() {
335
- "use strict";
336
322
  __name(getValueByPath, "getValueByPath");
337
323
  }
338
324
  });
@@ -365,7 +351,6 @@ function selectObjectKeys(obj, keys) {
365
351
  }
366
352
  var init_select_object_keys = __esm({
367
353
  "src/utils/select-object-keys.js"() {
368
- "use strict";
369
354
  init_errors();
370
355
  __name(selectObjectKeys, "selectObjectKeys");
371
356
  }
@@ -385,7 +370,6 @@ function excludeObjectKeys(obj, keys) {
385
370
  }
386
371
  var init_exclude_object_keys = __esm({
387
372
  "src/utils/exclude-object-keys.js"() {
388
- "use strict";
389
373
  init_errors();
390
374
  __name(excludeObjectKeys, "excludeObjectKeys");
391
375
  }
@@ -402,7 +386,6 @@ function modelNameToModelKey(modelName) {
402
386
  }
403
387
  var init_model_name_to_model_key = __esm({
404
388
  "src/utils/model-name-to-model-key.js"() {
405
- "use strict";
406
389
  init_errors();
407
390
  __name(modelNameToModelKey, "modelNameToModelKey");
408
391
  }
@@ -411,7 +394,6 @@ var init_model_name_to_model_key = __esm({
411
394
  // src/utils/index.js
412
395
  var init_utils = __esm({
413
396
  "src/utils/index.js"() {
414
- "use strict";
415
397
  init_is_promise();
416
398
  init_capitalize();
417
399
  init_clone_deep();
@@ -431,7 +413,6 @@ var init_utils = __esm({
431
413
  var import_js_service, _SliceClauseTool, SliceClauseTool;
432
414
  var init_slice_clause_tool = __esm({
433
415
  "src/filter/slice-clause-tool.js"() {
434
- "use strict";
435
416
  import_js_service = require("@e22m4u/js-service");
436
417
  init_errors();
437
418
  _SliceClauseTool = class _SliceClauseTool extends import_js_service.Service {
@@ -514,7 +495,6 @@ function compareFn(a, b) {
514
495
  var import_js_service2, _OrderClauseTool, OrderClauseTool;
515
496
  var init_order_clause_tool = __esm({
516
497
  "src/filter/order-clause-tool.js"() {
517
- "use strict";
518
498
  import_js_service2 = require("@e22m4u/js-service");
519
499
  init_utils();
520
500
  init_errors();
@@ -593,7 +573,6 @@ var init_order_clause_tool = __esm({
593
573
  var import_js_service3, _OperatorClauseTool, OperatorClauseTool;
594
574
  var init_operator_clause_tool = __esm({
595
575
  "src/filter/operator-clause-tool.js"() {
596
- "use strict";
597
576
  import_js_service3 = require("@e22m4u/js-service");
598
577
  init_utils();
599
578
  init_errors();
@@ -1055,7 +1034,6 @@ var init_operator_clause_tool = __esm({
1055
1034
  var import_js_service4, _WhereClauseTool, WhereClauseTool;
1056
1035
  var init_where_clause_tool = __esm({
1057
1036
  "src/filter/where-clause-tool.js"() {
1058
- "use strict";
1059
1037
  import_js_service4 = require("@e22m4u/js-service");
1060
1038
  init_errors();
1061
1039
  init_operator_clause_tool();
@@ -1201,7 +1179,6 @@ var init_where_clause_tool = __esm({
1201
1179
  var RelationType;
1202
1180
  var init_relation_type = __esm({
1203
1181
  "src/definition/model/relations/relation-type.js"() {
1204
- "use strict";
1205
1182
  RelationType = {
1206
1183
  BELONGS_TO: "belongsTo",
1207
1184
  HAS_ONE: "hasOne",
@@ -1211,21 +1188,12 @@ var init_relation_type = __esm({
1211
1188
  }
1212
1189
  });
1213
1190
 
1214
- // src/definition/model/relations/relation-definition.js
1215
- var init_relation_definition = __esm({
1216
- "src/definition/model/relations/relation-definition.js"() {
1217
- "use strict";
1218
- }
1219
- });
1220
-
1221
1191
  // src/definition/model/relations/relations-definition-validator.js
1222
1192
  var import_js_service5, _RelationsDefinitionValidator, RelationsDefinitionValidator;
1223
1193
  var init_relations_definition_validator = __esm({
1224
1194
  "src/definition/model/relations/relations-definition-validator.js"() {
1225
- "use strict";
1226
1195
  import_js_service5 = require("@e22m4u/js-service");
1227
1196
  init_relation_type();
1228
- init_relation_type();
1229
1197
  init_errors();
1230
1198
  _RelationsDefinitionValidator = class _RelationsDefinitionValidator extends import_js_service5.Service {
1231
1199
  /**
@@ -1612,9 +1580,7 @@ var init_relations_definition_validator = __esm({
1612
1580
  // src/definition/model/relations/index.js
1613
1581
  var init_relations = __esm({
1614
1582
  "src/definition/model/relations/index.js"() {
1615
- "use strict";
1616
1583
  init_relation_type();
1617
- init_relation_definition();
1618
1584
  init_relations_definition_validator();
1619
1585
  }
1620
1586
  });
@@ -1623,7 +1589,6 @@ var init_relations = __esm({
1623
1589
  var DataType;
1624
1590
  var init_data_type = __esm({
1625
1591
  "src/definition/model/properties/data-type.js"() {
1626
- "use strict";
1627
1592
  DataType = {
1628
1593
  ANY: "any",
1629
1594
  STRING: "string",
@@ -1635,18 +1600,10 @@ var init_data_type = __esm({
1635
1600
  }
1636
1601
  });
1637
1602
 
1638
- // src/definition/model/properties/property-definition.js
1639
- var init_property_definition = __esm({
1640
- "src/definition/model/properties/property-definition.js"() {
1641
- "use strict";
1642
- }
1643
- });
1644
-
1645
1603
  // src/definition/model/properties/property-uniqueness.js
1646
1604
  var PropertyUniqueness;
1647
1605
  var init_property_uniqueness = __esm({
1648
1606
  "src/definition/model/properties/property-uniqueness.js"() {
1649
- "use strict";
1650
1607
  PropertyUniqueness = {
1651
1608
  STRICT: "strict",
1652
1609
  SPARSE: "sparse",
@@ -1659,7 +1616,6 @@ var init_property_uniqueness = __esm({
1659
1616
  var import_js_service6, _DefinitionRegistry, DefinitionRegistry;
1660
1617
  var init_definition_registry = __esm({
1661
1618
  "src/definition/definition-registry.js"() {
1662
- "use strict";
1663
1619
  import_js_service6 = require("@e22m4u/js-service");
1664
1620
  init_utils();
1665
1621
  init_errors();
@@ -1762,14 +1718,12 @@ var init_definition_registry = __esm({
1762
1718
  var import_js_service7, import_js_empty_values, DEFAULT_PRIMARY_KEY_PROPERTY_NAME, _ModelDefinitionUtils, ModelDefinitionUtils;
1763
1719
  var init_model_definition_utils = __esm({
1764
1720
  "src/definition/model/model-definition-utils.js"() {
1765
- "use strict";
1766
1721
  import_js_service7 = require("@e22m4u/js-service");
1767
1722
  init_properties();
1768
- init_utils();
1769
- init_utils();
1770
1723
  import_js_empty_values = require("@e22m4u/js-empty-values");
1771
1724
  init_errors();
1772
1725
  init_definition_registry();
1726
+ init_utils();
1773
1727
  DEFAULT_PRIMARY_KEY_PROPERTY_NAME = "id";
1774
1728
  _ModelDefinitionUtils = class _ModelDefinitionUtils extends import_js_service7.Service {
1775
1729
  /**
@@ -2176,7 +2130,6 @@ var init_model_definition_utils = __esm({
2176
2130
  var import_js_service8, import_js_empty_values2, _PropertyUniquenessValidator, PropertyUniquenessValidator;
2177
2131
  var init_property_uniqueness_validator = __esm({
2178
2132
  "src/definition/model/properties/property-uniqueness-validator.js"() {
2179
- "use strict";
2180
2133
  init_data_type();
2181
2134
  import_js_service8 = require("@e22m4u/js-service");
2182
2135
  init_utils();
@@ -2296,7 +2249,6 @@ var init_property_uniqueness_validator = __esm({
2296
2249
  var import_js_service9, _PrimaryKeysDefinitionValidator, PrimaryKeysDefinitionValidator;
2297
2250
  var init_primary_keys_definition_validator = __esm({
2298
2251
  "src/definition/model/properties/primary-keys-definition-validator.js"() {
2299
- "use strict";
2300
2252
  import_js_service9 = require("@e22m4u/js-service");
2301
2253
  init_errors();
2302
2254
  init_model_definition_utils();
@@ -2348,7 +2300,6 @@ var init_primary_keys_definition_validator = __esm({
2348
2300
  var import_js_service10, _PropertiesDefinitionValidator, PropertiesDefinitionValidator;
2349
2301
  var init_properties_definition_validator = __esm({
2350
2302
  "src/definition/model/properties/properties-definition-validator.js"() {
2351
- "use strict";
2352
2303
  import_js_service10 = require("@e22m4u/js-service");
2353
2304
  init_data_type();
2354
2305
  init_utils();
@@ -2572,9 +2523,7 @@ var init_properties_definition_validator = __esm({
2572
2523
  // src/definition/model/properties/index.js
2573
2524
  var init_properties = __esm({
2574
2525
  "src/definition/model/properties/index.js"() {
2575
- "use strict";
2576
2526
  init_data_type();
2577
- init_property_definition();
2578
2527
  init_property_uniqueness();
2579
2528
  init_property_uniqueness_validator();
2580
2529
  init_properties_definition_validator();
@@ -2582,18 +2531,10 @@ var init_properties = __esm({
2582
2531
  }
2583
2532
  });
2584
2533
 
2585
- // src/definition/model/model-definition.js
2586
- var init_model_definition = __esm({
2587
- "src/definition/model/model-definition.js"() {
2588
- "use strict";
2589
- }
2590
- });
2591
-
2592
2534
  // src/definition/model/model-data-sanitizer.js
2593
2535
  var import_js_service11, _ModelDataSanitizer, ModelDataSanitizer;
2594
2536
  var init_model_data_sanitizer = __esm({
2595
2537
  "src/definition/model/model-data-sanitizer.js"() {
2596
- "use strict";
2597
2538
  import_js_service11 = require("@e22m4u/js-service");
2598
2539
  init_errors();
2599
2540
  init_model_definition_utils();
@@ -2630,7 +2571,6 @@ var init_model_data_sanitizer = __esm({
2630
2571
  var import_js_service12, _ModelDefinitionValidator, ModelDefinitionValidator;
2631
2572
  var init_model_definition_validator = __esm({
2632
2573
  "src/definition/model/model-definition-validator.js"() {
2633
- "use strict";
2634
2574
  import_js_service12 = require("@e22m4u/js-service");
2635
2575
  init_errors();
2636
2576
  init_relations();
@@ -2706,10 +2646,8 @@ var init_model_definition_validator = __esm({
2706
2646
  // src/definition/model/index.js
2707
2647
  var init_model = __esm({
2708
2648
  "src/definition/model/index.js"() {
2709
- "use strict";
2710
2649
  init_relations();
2711
2650
  init_properties();
2712
- init_model_definition();
2713
2651
  init_model_data_sanitizer();
2714
2652
  init_model_definition_utils();
2715
2653
  init_model_definition_validator();
@@ -2720,7 +2658,6 @@ var init_model = __esm({
2720
2658
  var import_js_service13, _DatasourceDefinitionValidator, DatasourceDefinitionValidator;
2721
2659
  var init_datasource_definition_validator = __esm({
2722
2660
  "src/definition/datasource/datasource-definition-validator.js"() {
2723
- "use strict";
2724
2661
  import_js_service13 = require("@e22m4u/js-service");
2725
2662
  init_errors();
2726
2663
  _DatasourceDefinitionValidator = class _DatasourceDefinitionValidator extends import_js_service13.Service {
@@ -2756,7 +2693,6 @@ var init_datasource_definition_validator = __esm({
2756
2693
  // src/definition/datasource/index.js
2757
2694
  var init_datasource = __esm({
2758
2695
  "src/definition/datasource/index.js"() {
2759
- "use strict";
2760
2696
  init_datasource_definition_validator();
2761
2697
  }
2762
2698
  });
@@ -2764,7 +2700,6 @@ var init_datasource = __esm({
2764
2700
  // src/definition/index.js
2765
2701
  var init_definition = __esm({
2766
2702
  "src/definition/index.js"() {
2767
- "use strict";
2768
2703
  init_model();
2769
2704
  init_datasource();
2770
2705
  init_definition_registry();
@@ -2775,7 +2710,6 @@ var init_definition = __esm({
2775
2710
  var import_js_service14, _FieldsClauseTool, FieldsClauseTool;
2776
2711
  var init_fields_clause_tool = __esm({
2777
2712
  "src/filter/fields-clause-tool.js"() {
2778
- "use strict";
2779
2713
  import_js_service14 = require("@e22m4u/js-service");
2780
2714
  init_utils();
2781
2715
  init_errors();
@@ -2867,7 +2801,6 @@ var init_fields_clause_tool = __esm({
2867
2801
  var import_js_service15, _InclusionDecorator, InclusionDecorator;
2868
2802
  var init_inclusion_decorator = __esm({
2869
2803
  "src/adapter/decorator/inclusion-decorator.js"() {
2870
- "use strict";
2871
2804
  init_adapter();
2872
2805
  import_js_service15 = require("@e22m4u/js-service");
2873
2806
  init_filter();
@@ -2956,7 +2889,6 @@ var init_inclusion_decorator = __esm({
2956
2889
  var import_js_service16, _DefaultValuesDecorator, DefaultValuesDecorator;
2957
2890
  var init_default_values_decorator = __esm({
2958
2891
  "src/adapter/decorator/default-values-decorator.js"() {
2959
- "use strict";
2960
2892
  init_adapter();
2961
2893
  import_js_service16 = require("@e22m4u/js-service");
2962
2894
  init_errors();
@@ -3021,7 +2953,6 @@ var init_default_values_decorator = __esm({
3021
2953
  var import_js_service17, _DataSanitizingDecorator, DataSanitizingDecorator;
3022
2954
  var init_data_sanitizing_decorator = __esm({
3023
2955
  "src/adapter/decorator/data-sanitizing-decorator.js"() {
3024
- "use strict";
3025
2956
  init_adapter();
3026
2957
  import_js_service17 = require("@e22m4u/js-service");
3027
2958
  init_errors();
@@ -3076,7 +3007,6 @@ var init_data_sanitizing_decorator = __esm({
3076
3007
  var import_js_service18, _FieldsFilteringDecorator, FieldsFilteringDecorator;
3077
3008
  var init_fields_filtering_decorator = __esm({
3078
3009
  "src/adapter/decorator/fields-filtering-decorator.js"() {
3079
- "use strict";
3080
3010
  init_adapter();
3081
3011
  import_js_service18 = require("@e22m4u/js-service");
3082
3012
  init_filter();
@@ -3159,7 +3089,6 @@ var init_fields_filtering_decorator = __esm({
3159
3089
  var import_js_service19, _PropertyUniquenessDecorator, PropertyUniquenessDecorator;
3160
3090
  var init_property_uniqueness_decorator = __esm({
3161
3091
  "src/adapter/decorator/property-uniqueness-decorator.js"() {
3162
- "use strict";
3163
3092
  init_adapter();
3164
3093
  import_js_service19 = require("@e22m4u/js-service");
3165
3094
  init_errors();
@@ -3234,7 +3163,6 @@ var init_property_uniqueness_decorator = __esm({
3234
3163
  // src/adapter/decorator/index.js
3235
3164
  var init_decorator = __esm({
3236
3165
  "src/adapter/decorator/index.js"() {
3237
- "use strict";
3238
3166
  init_inclusion_decorator();
3239
3167
  init_default_values_decorator();
3240
3168
  init_data_sanitizing_decorator();
@@ -3247,14 +3175,9 @@ var init_decorator = __esm({
3247
3175
  var import_js_service20, ADAPTER_CLASS_NAME, _Adapter, Adapter;
3248
3176
  var init_adapter = __esm({
3249
3177
  "src/adapter/adapter.js"() {
3250
- "use strict";
3251
3178
  import_js_service20 = require("@e22m4u/js-service");
3252
3179
  init_errors();
3253
3180
  init_decorator();
3254
- init_decorator();
3255
- init_decorator();
3256
- init_decorator();
3257
- init_decorator();
3258
3181
  ADAPTER_CLASS_NAME = "Adapter";
3259
3182
  _Adapter = class _Adapter extends import_js_service20.Service {
3260
3183
  /**
@@ -3459,16 +3382,11 @@ __export(memory_adapter_exports, {
3459
3382
  var _MemoryAdapter, MemoryAdapter;
3460
3383
  var init_memory_adapter = __esm({
3461
3384
  "src/adapter/builtin/memory-adapter.js"() {
3462
- "use strict";
3463
3385
  init_adapter();
3464
3386
  init_utils();
3465
- init_utils();
3466
- init_definition();
3467
- init_filter();
3468
- init_filter();
3469
- init_filter();
3470
3387
  init_errors();
3471
3388
  init_definition();
3389
+ init_filter();
3472
3390
  _MemoryAdapter = class _MemoryAdapter extends Adapter {
3473
3391
  /**
3474
3392
  * Tables.
@@ -3879,11 +3797,9 @@ function findAdapterCtorInModule(module2) {
3879
3797
  var import_js_service21, _AdapterLoader, AdapterLoader;
3880
3798
  var init_adapter_loader = __esm({
3881
3799
  "src/adapter/adapter-loader.js"() {
3882
- "use strict";
3883
- init_adapter();
3884
3800
  import_js_service21 = require("@e22m4u/js-service");
3885
- init_adapter();
3886
3801
  init_errors();
3802
+ init_adapter();
3887
3803
  init_();
3888
3804
  _AdapterLoader = class _AdapterLoader extends import_js_service21.Service {
3889
3805
  /**
@@ -3903,13 +3819,13 @@ var init_adapter_loader = __esm({
3903
3819
  try {
3904
3820
  const module2 = await globImport_builtin_adapter_js(`./builtin/${adapterName}-adapter.js`);
3905
3821
  adapterCtor = findAdapterCtorInModule(module2);
3906
- } catch (e) {
3822
+ } catch {
3907
3823
  }
3908
3824
  if (!adapterCtor)
3909
3825
  try {
3910
3826
  const module2 = await Promise.resolve().then(() => __toESM(require(`@e22m4u/js-repository-${adapterName}-adapter`)));
3911
3827
  adapterCtor = findAdapterCtorInModule(module2);
3912
- } catch (e) {
3828
+ } catch {
3913
3829
  }
3914
3830
  if (!adapterCtor)
3915
3831
  throw new InvalidArgumentError(
@@ -3929,7 +3845,6 @@ var init_adapter_loader = __esm({
3929
3845
  var import_js_service22, _AdapterRegistry, AdapterRegistry;
3930
3846
  var init_adapter_registry = __esm({
3931
3847
  "src/adapter/adapter-registry.js"() {
3932
- "use strict";
3933
3848
  init_adapter();
3934
3849
  import_js_service22 = require("@e22m4u/js-service");
3935
3850
  init_adapter_loader();
@@ -3968,7 +3883,6 @@ var init_adapter_registry = __esm({
3968
3883
  // src/adapter/index.js
3969
3884
  var init_adapter2 = __esm({
3970
3885
  "src/adapter/index.js"() {
3971
- "use strict";
3972
3886
  init_adapter();
3973
3887
  init_adapter_loader();
3974
3888
  init_adapter_registry();
@@ -3979,12 +3893,10 @@ var init_adapter2 = __esm({
3979
3893
  var import_js_service23, _Repository, Repository;
3980
3894
  var init_repository = __esm({
3981
3895
  "src/repository/repository.js"() {
3982
- "use strict";
3983
3896
  import_js_service23 = require("@e22m4u/js-service");
3984
- init_adapter2();
3985
- init_adapter2();
3986
3897
  init_errors();
3987
3898
  init_definition();
3899
+ init_adapter2();
3988
3900
  _Repository = class _Repository extends import_js_service23.Service {
3989
3901
  /**
3990
3902
  * Model name.
@@ -4182,7 +4094,6 @@ var init_repository = __esm({
4182
4094
  var import_js_service24, _RepositoryRegistry, RepositoryRegistry;
4183
4095
  var init_repository_registry = __esm({
4184
4096
  "src/repository/repository-registry.js"() {
4185
- "use strict";
4186
4097
  import_js_service24 = require("@e22m4u/js-service");
4187
4098
  init_repository();
4188
4099
  init_utils();
@@ -4238,7 +4149,6 @@ var init_repository_registry = __esm({
4238
4149
  // src/repository/index.js
4239
4150
  var init_repository2 = __esm({
4240
4151
  "src/repository/index.js"() {
4241
- "use strict";
4242
4152
  init_repository();
4243
4153
  init_repository_registry();
4244
4154
  }
@@ -4248,10 +4158,8 @@ var init_repository2 = __esm({
4248
4158
  var import_js_service25, _HasOneResolver, HasOneResolver;
4249
4159
  var init_has_one_resolver = __esm({
4250
4160
  "src/relations/has-one-resolver.js"() {
4251
- "use strict";
4252
4161
  import_js_service25 = require("@e22m4u/js-service");
4253
4162
  init_utils();
4254
- init_definition();
4255
4163
  init_errors();
4256
4164
  init_repository2();
4257
4165
  init_definition();
@@ -4503,10 +4411,8 @@ var init_has_one_resolver = __esm({
4503
4411
  var import_js_service26, _HasManyResolver, HasManyResolver;
4504
4412
  var init_has_many_resolver = __esm({
4505
4413
  "src/relations/has-many-resolver.js"() {
4506
- "use strict";
4507
4414
  import_js_service26 = require("@e22m4u/js-service");
4508
4415
  init_utils();
4509
- init_definition();
4510
4416
  init_errors();
4511
4417
  init_repository2();
4512
4418
  init_definition();
@@ -4768,11 +4674,9 @@ var init_has_many_resolver = __esm({
4768
4674
  var import_js_service27, _BelongsToResolver, BelongsToResolver;
4769
4675
  var init_belongs_to_resolver = __esm({
4770
4676
  "src/relations/belongs-to-resolver.js"() {
4771
- "use strict";
4772
4677
  import_js_service27 = require("@e22m4u/js-service");
4773
- init_utils();
4774
- init_utils();
4775
4678
  init_errors();
4679
+ init_utils();
4776
4680
  init_repository2();
4777
4681
  init_definition();
4778
4682
  _BelongsToResolver = class _BelongsToResolver extends import_js_service27.Service {
@@ -4976,11 +4880,9 @@ var init_belongs_to_resolver = __esm({
4976
4880
  var import_js_service28, _ReferencesManyResolver, ReferencesManyResolver;
4977
4881
  var init_references_many_resolver = __esm({
4978
4882
  "src/relations/references-many-resolver.js"() {
4979
- "use strict";
4980
4883
  import_js_service28 = require("@e22m4u/js-service");
4981
- init_utils();
4982
- init_utils();
4983
4884
  init_errors();
4885
+ init_utils();
4984
4886
  init_repository2();
4985
4887
  init_definition();
4986
4888
  _ReferencesManyResolver = class _ReferencesManyResolver extends import_js_service28.Service {
@@ -5076,7 +4978,6 @@ var init_references_many_resolver = __esm({
5076
4978
  // src/relations/index.js
5077
4979
  var init_relations2 = __esm({
5078
4980
  "src/relations/index.js"() {
5079
- "use strict";
5080
4981
  init_has_one_resolver();
5081
4982
  init_has_many_resolver();
5082
4983
  init_belongs_to_resolver();
@@ -5088,16 +4989,11 @@ var init_relations2 = __esm({
5088
4989
  var import_js_service29, _IncludeClauseTool, IncludeClauseTool;
5089
4990
  var init_include_clause_tool = __esm({
5090
4991
  "src/filter/include-clause-tool.js"() {
5091
- "use strict";
5092
4992
  import_js_service29 = require("@e22m4u/js-service");
5093
- init_definition();
5094
- init_relations2();
5095
- init_relations2();
5096
4993
  init_where_clause_tool();
5097
4994
  init_order_clause_tool();
5098
4995
  init_slice_clause_tool();
5099
4996
  init_errors();
5100
- init_relations2();
5101
4997
  init_fields_clause_tool();
5102
4998
  init_definition();
5103
4999
  init_relations2();
@@ -5427,7 +5323,6 @@ var init_include_clause_tool = __esm({
5427
5323
  // src/filter/index.js
5428
5324
  var init_filter = __esm({
5429
5325
  "src/filter/index.js"() {
5430
- "use strict";
5431
5326
  init_slice_clause_tool();
5432
5327
  init_order_clause_tool();
5433
5328
  init_where_clause_tool();
@@ -5494,7 +5389,6 @@ init_adapter2();
5494
5389
 
5495
5390
  // src/database-schema.js
5496
5391
  var import_js_service30 = require("@e22m4u/js-service");
5497
- init_repository2();
5498
5392
  init_definition();
5499
5393
  init_repository2();
5500
5394
  var _DatabaseSchema = class _DatabaseSchema extends import_js_service30.Service {
package/eslint.config.js CHANGED
@@ -1,68 +1,39 @@
1
1
  import globals from 'globals';
2
2
  import eslintJs from '@eslint/js';
3
- import eslintTypescript from 'typescript-eslint';
4
3
  import eslintJsdocPlugin from 'eslint-plugin-jsdoc';
5
4
  import eslintMochaPlugin from 'eslint-plugin-mocha';
5
+ import eslintImportPlugin from 'eslint-plugin-import';
6
6
  import eslintPrettierConfig from 'eslint-config-prettier';
7
7
  import eslintChaiExpectPlugin from 'eslint-plugin-chai-expect';
8
8
 
9
- export default [
10
- {
11
- files: ['src/**/*.js'],
12
- languageOptions: {
13
- globals: {
14
- ...globals.node,
15
- ...globals.es2021,
16
- ...globals.mocha,
17
- },
18
- },
19
- plugins: {
20
- 'jsdoc': eslintJsdocPlugin,
21
- 'mocha': eslintMochaPlugin,
22
- 'chai-expect': eslintChaiExpectPlugin,
23
- },
24
- rules: {
25
- ...eslintJs.configs.recommended.rules,
26
- ...eslintPrettierConfig.rules,
27
- ...eslintMochaPlugin.configs.recommended.rules,
28
- ...eslintChaiExpectPlugin.configs['recommended-flat'].rules,
29
- ...eslintJsdocPlugin.configs['flat/recommended-error'].rules,
30
- 'no-unused-vars': ['error', {'caughtErrors': 'none'}],
31
- 'jsdoc/reject-any-type': 0,
32
- 'jsdoc/reject-function-type': 0,
33
- 'jsdoc/require-param-description': 0,
34
- 'jsdoc/require-returns-description': 0,
35
- 'jsdoc/require-property-description': 0,
36
- 'jsdoc/tag-lines': ['error', 'any', {startLines: 1}],
9
+ export default [{
10
+ languageOptions: {
11
+ globals: {
12
+ ...globals.node,
13
+ ...globals.es2021,
14
+ ...globals.mocha,
37
15
  },
38
16
  },
39
- {
40
- files: ['src/**/*.ts'],
41
- ignores: ['src/**/*.d.ts'],
42
- languageOptions: {
43
- globals: {
44
- ...globals.node,
45
- ...globals.es2021,
46
- ...globals.mocha,
47
- },
48
- parser: eslintTypescript.parser,
49
- parserOptions: {
50
- projectService: true,
51
- tsconfigRootDir: import.meta.dirname,
52
- },
53
- },
54
- plugins: {
55
- '@typescript-eslint': eslintTypescript.plugin,
56
- 'mocha': eslintMochaPlugin,
57
- 'chai-expect': eslintChaiExpectPlugin,
58
- },
59
- rules: {
60
- ...eslintJs.configs.recommended.rules,
61
- ...eslintPrettierConfig.rules,
62
- ...eslintTypescript.configs.recommended.rules,
63
- '@typescript-eslint/no-namespace': 0,
64
- '@typescript-eslint/no-var-requires': 0,
65
- '@typescript-eslint/no-unnecessary-type-constraint': 0,
66
- },
17
+ plugins: {
18
+ 'jsdoc': eslintJsdocPlugin,
19
+ 'mocha': eslintMochaPlugin,
20
+ 'import': eslintImportPlugin,
21
+ 'chai-expect': eslintChaiExpectPlugin,
22
+ },
23
+ rules: {
24
+ ...eslintJs.configs.recommended.rules,
25
+ ...eslintPrettierConfig.rules,
26
+ ...eslintImportPlugin.flatConfigs.recommended.rules,
27
+ ...eslintMochaPlugin.configs.recommended.rules,
28
+ ...eslintChaiExpectPlugin.configs['recommended-flat'].rules,
29
+ ...eslintJsdocPlugin.configs['flat/recommended-error'].rules,
30
+ 'no-duplicate-imports': 'error',
31
+ 'jsdoc/reject-any-type': 0,
32
+ 'jsdoc/reject-function-type': 0,
33
+ 'jsdoc/require-param-description': 0,
34
+ 'jsdoc/require-returns-description': 0,
35
+ 'jsdoc/require-property-description': 0,
36
+ 'jsdoc/tag-lines': ['error', 'any', {startLines: 1}],
67
37
  },
68
- ];
38
+ files: ['src/**/*.js'],
39
+ }];
package/jsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2022",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext"
6
+ }
7
+ }