@decaf-ts/db-decorators 0.12.0 → 0.13.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 (203) hide show
  1. package/lib/cjs/identity/decorators.cjs +5 -4
  2. package/lib/cjs/identity/decorators.cjs.map +1 -0
  3. package/lib/cjs/identity/index.cjs +1 -0
  4. package/lib/cjs/identity/index.cjs.map +1 -0
  5. package/lib/cjs/index.cjs +2 -1
  6. package/lib/cjs/index.cjs.map +1 -0
  7. package/lib/cjs/interfaces/BulkCrudOperator.cjs +1 -0
  8. package/lib/cjs/interfaces/BulkCrudOperator.cjs.map +1 -0
  9. package/lib/cjs/interfaces/Contextual.cjs +1 -0
  10. package/lib/cjs/interfaces/Contextual.cjs.map +1 -0
  11. package/lib/cjs/interfaces/CrudOperator.cjs +1 -0
  12. package/lib/cjs/interfaces/CrudOperator.cjs.map +1 -0
  13. package/lib/cjs/interfaces/IRepository.cjs +1 -0
  14. package/lib/cjs/interfaces/IRepository.cjs.map +1 -0
  15. package/lib/cjs/interfaces/index.cjs +1 -0
  16. package/lib/cjs/interfaces/index.cjs.map +1 -0
  17. package/lib/cjs/model/constants.cjs +1 -0
  18. package/lib/cjs/model/constants.cjs.map +1 -0
  19. package/lib/cjs/model/decorators.cjs +25 -24
  20. package/lib/cjs/model/decorators.cjs.map +1 -0
  21. package/lib/cjs/model/index.cjs +1 -0
  22. package/lib/cjs/model/index.cjs.map +1 -0
  23. package/lib/cjs/model/model.cjs +1 -0
  24. package/lib/cjs/model/model.cjs.map +1 -0
  25. package/lib/cjs/model/validation.cjs +1 -0
  26. package/lib/cjs/model/validation.cjs.map +1 -0
  27. package/lib/cjs/operations/Operations.cjs +6 -5
  28. package/lib/cjs/operations/Operations.cjs.map +1 -0
  29. package/lib/cjs/operations/OperationsRegistry.cjs +1 -0
  30. package/lib/cjs/operations/OperationsRegistry.cjs.map +1 -0
  31. package/lib/cjs/operations/constants.cjs +15 -39
  32. package/lib/cjs/operations/constants.cjs.map +1 -0
  33. package/lib/cjs/operations/decorators.cjs +42 -41
  34. package/lib/cjs/operations/decorators.cjs.map +1 -0
  35. package/lib/cjs/operations/index.cjs +1 -0
  36. package/lib/cjs/operations/index.cjs.map +1 -0
  37. package/lib/cjs/operations/types.cjs +1 -0
  38. package/lib/cjs/operations/types.cjs.map +1 -0
  39. package/lib/cjs/overrides/Metadata.cjs +1 -0
  40. package/lib/cjs/overrides/Metadata.cjs.map +1 -0
  41. package/lib/cjs/overrides/Model.cjs +1 -0
  42. package/lib/cjs/overrides/Model.cjs.map +1 -0
  43. package/lib/cjs/overrides/ModelBuilderExtensions.cjs +8 -7
  44. package/lib/cjs/overrides/ModelBuilderExtensions.cjs.map +1 -0
  45. package/lib/cjs/overrides/index.cjs +1 -0
  46. package/lib/cjs/overrides/index.cjs.map +1 -0
  47. package/lib/cjs/overrides/overrides.cjs +21 -20
  48. package/lib/cjs/overrides/overrides.cjs.map +1 -0
  49. package/lib/cjs/repository/Context.cjs +3 -2
  50. package/lib/cjs/repository/Context.cjs.map +1 -0
  51. package/lib/cjs/repository/Repository.cjs +42 -41
  52. package/lib/cjs/repository/Repository.cjs.map +1 -0
  53. package/lib/cjs/repository/constants.cjs +1 -0
  54. package/lib/cjs/repository/constants.cjs.map +1 -0
  55. package/lib/cjs/repository/errors.cjs +1 -0
  56. package/lib/cjs/repository/errors.cjs.map +1 -0
  57. package/lib/cjs/repository/index.cjs +1 -0
  58. package/lib/cjs/repository/index.cjs.map +1 -0
  59. package/lib/cjs/repository/types.cjs +1 -0
  60. package/lib/cjs/repository/types.cjs.map +1 -0
  61. package/lib/cjs/repository/utils.cjs +10 -9
  62. package/lib/cjs/repository/utils.cjs.map +1 -0
  63. package/lib/cjs/repository/wrappers.cjs +8 -7
  64. package/lib/cjs/repository/wrappers.cjs.map +1 -0
  65. package/lib/cjs/validation/constants.cjs +4 -3
  66. package/lib/cjs/validation/constants.cjs.map +1 -0
  67. package/lib/cjs/validation/decorators.cjs +22 -21
  68. package/lib/cjs/validation/decorators.cjs.map +1 -0
  69. package/lib/cjs/validation/index.cjs +1 -0
  70. package/lib/cjs/validation/index.cjs.map +1 -0
  71. package/lib/cjs/validation/validation.cjs +3 -2
  72. package/lib/cjs/validation/validation.cjs.map +1 -0
  73. package/lib/cjs/validation/validators/ReadOnlyValidator.cjs +14 -8
  74. package/lib/cjs/validation/validators/ReadOnlyValidator.cjs.map +1 -0
  75. package/lib/cjs/validation/validators/TimestampValidator.cjs +14 -8
  76. package/lib/cjs/validation/validators/TimestampValidator.cjs.map +1 -0
  77. package/lib/cjs/validation/validators/UpdateValidator.cjs +1 -0
  78. package/lib/cjs/validation/validators/UpdateValidator.cjs.map +1 -0
  79. package/lib/cjs/validation/validators/index.cjs +1 -0
  80. package/lib/cjs/validation/validators/index.cjs.map +1 -0
  81. package/lib/esm/index.js +1 -1
  82. package/lib/types/identity/decorators.d.cts +8 -0
  83. package/lib/types/identity/decorators.d.mts +8 -0
  84. package/lib/types/identity/index.d.cts +6 -0
  85. package/lib/types/identity/index.d.mts +6 -0
  86. package/lib/types/index.d.cts +15 -0
  87. package/lib/types/index.d.mts +15 -0
  88. package/lib/types/index.d.ts +1 -1
  89. package/lib/types/interfaces/BulkCrudOperator.d.cts +47 -0
  90. package/lib/types/interfaces/BulkCrudOperator.d.mts +47 -0
  91. package/lib/types/interfaces/Contextual.d.cts +23 -0
  92. package/lib/types/interfaces/Contextual.d.mts +23 -0
  93. package/lib/types/interfaces/CrudOperator.d.cts +46 -0
  94. package/lib/types/interfaces/CrudOperator.d.mts +46 -0
  95. package/lib/types/interfaces/IRepository.d.cts +19 -0
  96. package/lib/types/interfaces/IRepository.d.mts +19 -0
  97. package/lib/types/interfaces/index.d.cts +9 -0
  98. package/lib/types/interfaces/index.d.mts +9 -0
  99. package/lib/types/model/constants.d.cts +37 -0
  100. package/lib/types/model/constants.d.mts +37 -0
  101. package/lib/types/model/decorators.d.cts +145 -0
  102. package/lib/types/model/decorators.d.mts +145 -0
  103. package/lib/types/model/index.d.cts +9 -0
  104. package/lib/types/model/index.d.mts +9 -0
  105. package/lib/types/model/model.d.cts +6 -0
  106. package/lib/types/model/model.d.mts +6 -0
  107. package/lib/types/model/validation.d.cts +57 -0
  108. package/lib/types/model/validation.d.mts +57 -0
  109. package/lib/types/operations/Operations.d.cts +80 -0
  110. package/lib/types/operations/Operations.d.mts +80 -0
  111. package/lib/types/operations/OperationsRegistry.d.cts +72 -0
  112. package/lib/types/operations/OperationsRegistry.d.mts +72 -0
  113. package/lib/types/operations/constants.d.cts +106 -0
  114. package/lib/types/operations/constants.d.mts +106 -0
  115. package/lib/types/operations/decorators.d.cts +348 -0
  116. package/lib/types/operations/decorators.d.mts +348 -0
  117. package/lib/types/operations/index.d.cts +10 -0
  118. package/lib/types/operations/index.d.mts +10 -0
  119. package/lib/types/operations/types.d.cts +60 -0
  120. package/lib/types/operations/types.d.mts +60 -0
  121. package/lib/types/overrides/Metadata.d.cts +54 -0
  122. package/lib/types/overrides/Metadata.d.mts +54 -0
  123. package/lib/types/overrides/Model.d.cts +84 -0
  124. package/lib/types/overrides/Model.d.mts +84 -0
  125. package/lib/types/overrides/ModelBuilderExtensions.d.cts +15 -0
  126. package/lib/types/overrides/ModelBuilderExtensions.d.mts +15 -0
  127. package/lib/types/overrides/index.d.cts +10 -0
  128. package/lib/types/overrides/index.d.mts +10 -0
  129. package/lib/types/overrides/overrides.d.cts +1 -0
  130. package/lib/types/overrides/overrides.d.mts +1 -0
  131. package/lib/types/repository/Context.d.cts +112 -0
  132. package/lib/types/repository/Context.d.mts +112 -0
  133. package/lib/types/repository/Repository.d.cts +352 -0
  134. package/lib/types/repository/Repository.d.mts +352 -0
  135. package/lib/types/repository/constants.d.cts +9 -0
  136. package/lib/types/repository/constants.d.mts +9 -0
  137. package/lib/types/repository/errors.d.cts +126 -0
  138. package/lib/types/repository/errors.d.mts +126 -0
  139. package/lib/types/repository/index.d.cts +12 -0
  140. package/lib/types/repository/index.d.mts +12 -0
  141. package/lib/types/repository/types.d.cts +62 -0
  142. package/lib/types/repository/types.d.mts +62 -0
  143. package/lib/types/repository/utils.d.cts +34 -0
  144. package/lib/types/repository/utils.d.mts +34 -0
  145. package/lib/types/repository/wrappers.d.cts +39 -0
  146. package/lib/types/repository/wrappers.d.mts +39 -0
  147. package/lib/types/validation/constants.d.cts +45 -0
  148. package/lib/types/validation/constants.d.mts +45 -0
  149. package/lib/types/validation/decorators.d.cts +143 -0
  150. package/lib/types/validation/decorators.d.mts +143 -0
  151. package/lib/types/validation/index.d.cts +4 -0
  152. package/lib/types/validation/index.d.mts +4 -0
  153. package/lib/types/validation/validation.d.cts +41 -0
  154. package/lib/types/validation/validation.d.mts +41 -0
  155. package/lib/types/validation/validators/ReadOnlyValidator.d.cts +47 -0
  156. package/lib/types/validation/validators/ReadOnlyValidator.d.mts +47 -0
  157. package/lib/types/validation/validators/TimestampValidator.d.cts +48 -0
  158. package/lib/types/validation/validators/TimestampValidator.d.mts +48 -0
  159. package/lib/types/validation/validators/UpdateValidator.d.cts +40 -0
  160. package/lib/types/validation/validators/UpdateValidator.d.mts +40 -0
  161. package/lib/types/validation/validators/index.d.cts +3 -0
  162. package/lib/types/validation/validators/index.d.mts +3 -0
  163. package/package.json +4 -4
  164. package/lib/cjs/identity/decorators.js.map +0 -1
  165. package/lib/cjs/identity/index.js.map +0 -1
  166. package/lib/cjs/index.js.map +0 -1
  167. package/lib/cjs/interfaces/BulkCrudOperator.js.map +0 -1
  168. package/lib/cjs/interfaces/Contextual.js.map +0 -1
  169. package/lib/cjs/interfaces/CrudOperator.js.map +0 -1
  170. package/lib/cjs/interfaces/IRepository.js.map +0 -1
  171. package/lib/cjs/interfaces/index.js.map +0 -1
  172. package/lib/cjs/model/constants.js.map +0 -1
  173. package/lib/cjs/model/decorators.js.map +0 -1
  174. package/lib/cjs/model/index.js.map +0 -1
  175. package/lib/cjs/model/model.js.map +0 -1
  176. package/lib/cjs/model/validation.js.map +0 -1
  177. package/lib/cjs/operations/Operations.js.map +0 -1
  178. package/lib/cjs/operations/OperationsRegistry.js.map +0 -1
  179. package/lib/cjs/operations/constants.js.map +0 -1
  180. package/lib/cjs/operations/decorators.js.map +0 -1
  181. package/lib/cjs/operations/index.js.map +0 -1
  182. package/lib/cjs/operations/types.js.map +0 -1
  183. package/lib/cjs/overrides/Metadata.js.map +0 -1
  184. package/lib/cjs/overrides/Model.js.map +0 -1
  185. package/lib/cjs/overrides/ModelBuilderExtensions.js.map +0 -1
  186. package/lib/cjs/overrides/index.js.map +0 -1
  187. package/lib/cjs/overrides/overrides.js.map +0 -1
  188. package/lib/cjs/repository/Context.js.map +0 -1
  189. package/lib/cjs/repository/Repository.js.map +0 -1
  190. package/lib/cjs/repository/constants.js.map +0 -1
  191. package/lib/cjs/repository/errors.js.map +0 -1
  192. package/lib/cjs/repository/index.js.map +0 -1
  193. package/lib/cjs/repository/types.js.map +0 -1
  194. package/lib/cjs/repository/utils.js.map +0 -1
  195. package/lib/cjs/repository/wrappers.js.map +0 -1
  196. package/lib/cjs/validation/constants.js.map +0 -1
  197. package/lib/cjs/validation/decorators.js.map +0 -1
  198. package/lib/cjs/validation/index.js.map +0 -1
  199. package/lib/cjs/validation/validation.js.map +0 -1
  200. package/lib/cjs/validation/validators/ReadOnlyValidator.js.map +0 -1
  201. package/lib/cjs/validation/validators/TimestampValidator.js.map +0 -1
  202. package/lib/cjs/validation/validators/UpdateValidator.js.map +0 -1
  203. package/lib/cjs/validation/validators/index.js.map +0 -1
@@ -20,23 +20,23 @@ exports.afterAny = afterAny;
20
20
  exports.after = after;
21
21
  exports.operation = operation;
22
22
  exports.storeHandlerMetadata = storeHandlerMetadata;
23
- const constants_1 = require("./constants.cjs");
24
- const Operations_1 = require("./Operations.cjs");
25
- const errors_1 = require("./../repository/errors.cjs");
23
+ const constants_js_1 = require("./constants.cjs");
24
+ const Operations_js_1 = require("./Operations.cjs");
25
+ const errors_js_1 = require("./../repository/errors.cjs");
26
26
  const decoration_1 = require("@decaf-ts/decoration");
27
27
  const defaultPriority = 50;
28
28
  const DefaultGroupSort = { priority: defaultPriority };
29
29
  const crudOperationSet = new Set([
30
- constants_1.OperationKeys.CREATE,
31
- constants_1.OperationKeys.READ,
32
- constants_1.OperationKeys.UPDATE,
33
- constants_1.OperationKeys.DELETE,
30
+ constants_js_1.OperationKeys.CREATE,
31
+ constants_js_1.OperationKeys.READ,
32
+ constants_js_1.OperationKeys.UPDATE,
33
+ constants_js_1.OperationKeys.DELETE,
34
34
  ]);
35
- const bulkOperationSet = new Set(Object.values(constants_1.BulkCrudOperationKeys));
35
+ const bulkOperationSet = new Set(Object.values(constants_js_1.BulkCrudOperationKeys));
36
36
  function resolveKindForString(value) {
37
37
  if (bulkOperationSet.has(value))
38
38
  return "bulk";
39
- if (value === constants_1.BulkOperationBlockTarget.ALL)
39
+ if (value === constants_js_1.BulkOperationBlockTarget.ALL)
40
40
  return "bulk";
41
41
  if (crudOperationSet.has(value))
42
42
  return "crud";
@@ -58,7 +58,7 @@ function normalizeBlockOperationsInput(input) {
58
58
  }
59
59
  if (typeof item === "string") {
60
60
  const kind = resolveKindForString(item);
61
- const value = kind === "bulk" && item === constants_1.BulkOperationBlockTarget.ALL
61
+ const value = kind === "bulk" && item === constants_js_1.BulkOperationBlockTarget.ALL
62
62
  ? item
63
63
  : kind === "bulk"
64
64
  ? item
@@ -84,7 +84,7 @@ function normalizeBlockOperationsInput(input) {
84
84
  */
85
85
  function handle(op, handler) {
86
86
  return (target, propertyKey) => {
87
- Operations_1.Operations.register(handler, op, target, propertyKey);
87
+ Operations_js_1.Operations.register(handler, op, target, propertyKey);
88
88
  };
89
89
  }
90
90
  /**
@@ -100,7 +100,7 @@ function handle(op, handler) {
100
100
  const getHandlerArgs = function (dec, prop, m, accum) {
101
101
  const name = m.constructor.name;
102
102
  if (!name)
103
- throw new errors_1.InternalError("Could not determine model class");
103
+ throw new errors_js_1.InternalError("Could not determine model class");
104
104
  accum = accum || {};
105
105
  if (dec.props.handlers[name] && dec.props.handlers[name][prop])
106
106
  accum = { ...dec.props.handlers[name][prop], ...accum };
@@ -133,17 +133,17 @@ function getHandlersDecorators(model, decorators, prefix) {
133
133
  const decs = decorators[prop];
134
134
  for (const dec of decs) {
135
135
  const { key } = dec;
136
- const handlers = Operations_1.Operations.get(model, prop, prefix + key);
136
+ const handlers = Operations_js_1.Operations.get(model, prop, prefix + key);
137
137
  if (!handlers || !handlers.length)
138
- throw new errors_1.InternalError(`Could not find registered handler for the operation ${prefix + key} under property ${prop}`);
138
+ throw new errors_js_1.InternalError(`Could not find registered handler for the operation ${prefix + key} under property ${prop}`);
139
139
  const handlerArgs = (0, exports.getHandlerArgs)(dec, prop, model);
140
140
  if (!handlerArgs)
141
- throw new errors_1.InternalError("Missing handler arguments for decorators");
141
+ throw new errors_js_1.InternalError("Missing handler arguments for decorators");
142
142
  for (const handler of handlers) {
143
- const handlerName = Operations_1.Operations.getHandlerName(handler);
143
+ const handlerName = Operations_js_1.Operations.getHandlerName(handler);
144
144
  const argsEntry = handlerArgs[handlerName];
145
145
  if (!argsEntry)
146
- throw new errors_1.InternalError(`Missing handler arguments for handler ${handlerName}`);
146
+ throw new errors_js_1.InternalError(`Missing handler arguments for handler ${handlerName}`);
147
147
  const data = argsEntry.data;
148
148
  accum.push({
149
149
  handler,
@@ -166,7 +166,7 @@ function getHandlersDecorators(model, decorators, prefix) {
166
166
  function groupDecorators(decorators) {
167
167
  const grouped = decorators.reduce((acc, dec) => {
168
168
  if (!dec || !dec.data || !dec.prop)
169
- throw new errors_1.InternalError("Missing decorator properties or data");
169
+ throw new errors_js_1.InternalError("Missing decorator properties or data");
170
170
  // If decorator have no group
171
171
  if (!dec.data[0].group) {
172
172
  acc.set(Symbol(), dec);
@@ -228,7 +228,7 @@ function sortDecorators(decorators) {
228
228
  * @category Property Decorators
229
229
  */
230
230
  function onCreateUpdate(handler, data, groupsort) {
231
- return on(constants_1.DBOperations.CREATE_UPDATE, handler, data, groupsort);
231
+ return on(constants_js_1.DBOperations.CREATE_UPDATE, handler, data, groupsort);
232
232
  }
233
233
  /**
234
234
  * @description Decorator for handling update operations
@@ -241,7 +241,7 @@ function onCreateUpdate(handler, data, groupsort) {
241
241
  * @category Property Decorators
242
242
  */
243
243
  function onUpdate(handler, data, groupsort) {
244
- return on(constants_1.DBOperations.UPDATE, handler, data, groupsort);
244
+ return on(constants_js_1.DBOperations.UPDATE, handler, data, groupsort);
245
245
  }
246
246
  /**
247
247
  * @description Decorator for handling create operations
@@ -254,7 +254,7 @@ function onUpdate(handler, data, groupsort) {
254
254
  * @category Property Decorators
255
255
  */
256
256
  function onCreate(handler, data, groupsort) {
257
- return on(constants_1.DBOperations.CREATE, handler, data, groupsort);
257
+ return on(constants_js_1.DBOperations.CREATE, handler, data, groupsort);
258
258
  }
259
259
  /**
260
260
  * @description Decorator for handling read operations
@@ -267,7 +267,7 @@ function onCreate(handler, data, groupsort) {
267
267
  * @category Property Decorators
268
268
  */
269
269
  function onRead(handler, data, groupsort) {
270
- return on(constants_1.DBOperations.READ, handler, data, groupsort);
270
+ return on(constants_js_1.DBOperations.READ, handler, data, groupsort);
271
271
  }
272
272
  /**
273
273
  * @description Decorator for handling delete operations
@@ -280,7 +280,7 @@ function onRead(handler, data, groupsort) {
280
280
  * @category Property Decorators
281
281
  */
282
282
  function onDelete(handler, data, groupsort) {
283
- return on(constants_1.DBOperations.DELETE, handler, data, groupsort);
283
+ return on(constants_js_1.DBOperations.DELETE, handler, data, groupsort);
284
284
  }
285
285
  /**
286
286
  * @description Decorator for handling all operation types
@@ -293,7 +293,7 @@ function onDelete(handler, data, groupsort) {
293
293
  * @category Property Decorators
294
294
  */
295
295
  function onAny(handler, data, groupsort) {
296
- return on(constants_1.DBOperations.ALL, handler, data, groupsort);
296
+ return on(constants_js_1.DBOperations.ALL, handler, data, groupsort);
297
297
  }
298
298
  /**
299
299
  * @description Base decorator for handling database operations
@@ -312,8 +312,8 @@ function onAny(handler, data, groupsort) {
312
312
  * myProperty: string;
313
313
  * }
314
314
  */
315
- function on(op = constants_1.DBOperations.ALL, handler, data, groupsort) {
316
- return operation(constants_1.OperationKeys.ON, op, handler, data, groupsort);
315
+ function on(op = constants_js_1.DBOperations.ALL, handler, data, groupsort) {
316
+ return operation(constants_js_1.OperationKeys.ON, op, handler, data, groupsort);
317
317
  }
318
318
  /**
319
319
  * @description Decorator for handling post-create and post-update operations
@@ -326,7 +326,7 @@ function on(op = constants_1.DBOperations.ALL, handler, data, groupsort) {
326
326
  * @category Property Decorators
327
327
  */
328
328
  function afterCreateUpdate(handler, data, groupsort) {
329
- return after(constants_1.DBOperations.CREATE_UPDATE, handler, data, groupsort);
329
+ return after(constants_js_1.DBOperations.CREATE_UPDATE, handler, data, groupsort);
330
330
  }
331
331
  /**
332
332
  * @description Decorator for handling post-update operations
@@ -339,7 +339,7 @@ function afterCreateUpdate(handler, data, groupsort) {
339
339
  * @category Property Decorators
340
340
  */
341
341
  function afterUpdate(handler, data, groupsort) {
342
- return after(constants_1.DBOperations.UPDATE, handler, data, groupsort);
342
+ return after(constants_js_1.DBOperations.UPDATE, handler, data, groupsort);
343
343
  }
344
344
  /**
345
345
  * @description Decorator for handling post-create operations
@@ -352,7 +352,7 @@ function afterUpdate(handler, data, groupsort) {
352
352
  * @category Property Decorators
353
353
  */
354
354
  function afterCreate(handler, data, groupsort) {
355
- return after(constants_1.DBOperations.CREATE, handler, data, groupsort);
355
+ return after(constants_js_1.DBOperations.CREATE, handler, data, groupsort);
356
356
  }
357
357
  /**
358
358
  * @description Decorator for handling post-read operations
@@ -365,7 +365,7 @@ function afterCreate(handler, data, groupsort) {
365
365
  * @category Property Decorators
366
366
  */
367
367
  function afterRead(handler, data, groupsort) {
368
- return after(constants_1.DBOperations.READ, handler, data, groupsort);
368
+ return after(constants_js_1.DBOperations.READ, handler, data, groupsort);
369
369
  }
370
370
  /**
371
371
  * @description Decorator for handling post-delete operations
@@ -378,7 +378,7 @@ function afterRead(handler, data, groupsort) {
378
378
  * @category Property Decorators
379
379
  */
380
380
  function afterDelete(handler, data, groupsort) {
381
- return after(constants_1.DBOperations.DELETE, handler, data, groupsort);
381
+ return after(constants_js_1.DBOperations.DELETE, handler, data, groupsort);
382
382
  }
383
383
  /**
384
384
  * @description Decorator for handling post-operation for all operation types
@@ -391,7 +391,7 @@ function afterDelete(handler, data, groupsort) {
391
391
  * @category Property Decorators
392
392
  */
393
393
  function afterAny(handler, data, groupsort) {
394
- return after(constants_1.DBOperations.ALL, handler, data, groupsort);
394
+ return after(constants_js_1.DBOperations.ALL, handler, data, groupsort);
395
395
  }
396
396
  /**
397
397
  * @description Base decorator for handling post-operation behaviors
@@ -410,8 +410,8 @@ function afterAny(handler, data, groupsort) {
410
410
  * myProperty: string;
411
411
  * }
412
412
  */
413
- function after(op = constants_1.DBOperations.ALL, handler, data, groupsort) {
414
- return operation(constants_1.OperationKeys.AFTER, op, handler, data, groupsort);
413
+ function after(op = constants_js_1.DBOperations.ALL, handler, data, groupsort) {
414
+ return operation(constants_js_1.OperationKeys.AFTER, op, handler, data, groupsort);
415
415
  }
416
416
  /**
417
417
  * @description Core decorator factory for operation handlers
@@ -441,7 +441,7 @@ function after(op = constants_1.DBOperations.ALL, handler, data, groupsort) {
441
441
  * Handler-->>Operations: Return result
442
442
  * Operations-->>Client: Return final result
443
443
  */
444
- function operation(baseOp, operation = constants_1.DBOperations.ALL, handler, dataToAdd, groupsort = DefaultGroupSort) {
444
+ function operation(baseOp, operation = constants_js_1.DBOperations.ALL, handler, dataToAdd, groupsort = DefaultGroupSort) {
445
445
  return (target, propertyKey) => {
446
446
  const name = target.constructor.name;
447
447
  const decorators = operation.reduce((accum, op) => {
@@ -452,11 +452,11 @@ function operation(baseOp, operation = constants_1.DBOperations.ALL, handler, da
452
452
  operation: op,
453
453
  handlers: {},
454
454
  };
455
- const handlerKey = Operations_1.Operations.getHandlerName(handler);
455
+ const handlerKey = Operations_js_1.Operations.getHandlerName(handler);
456
456
  let mergeData = groupsort;
457
457
  if (dataToAdd) {
458
458
  if (Object.keys(dataToAdd).filter((key) => key in groupsort).length > 0)
459
- throw new errors_1.InternalError(`Unable to merge groupSort into dataToAdd due to overlaping keys`);
459
+ throw new errors_js_1.InternalError(`Unable to merge groupSort into dataToAdd due to overlaping keys`);
460
460
  mergeData = { ...groupsort, ...dataToAdd };
461
461
  }
462
462
  if (!data.handlers[name] ||
@@ -468,7 +468,7 @@ function operation(baseOp, operation = constants_1.DBOperations.ALL, handler, da
468
468
  data.handlers[name][propertyKey][handlerKey] = {
469
469
  data: mergeData,
470
470
  };
471
- accum.push(handle(compoundKey, handler), (0, decoration_1.propMetadata)(decoration_1.Metadata.key(constants_1.ModelOperations.OPERATIONS, propertyKey, compoundKey), data));
471
+ accum.push(handle(compoundKey, handler), (0, decoration_1.propMetadata)(decoration_1.Metadata.key(constants_js_1.ModelOperations.OPERATIONS, propertyKey, compoundKey), data));
472
472
  }
473
473
  return accum;
474
474
  }, []);
@@ -547,14 +547,14 @@ function matchesTarget(target, kind, value) {
547
547
  if (target.kind !== kind)
548
548
  return false;
549
549
  if (target.kind === "bulk" &&
550
- target.value === constants_1.BulkOperationBlockTarget.ALL) {
550
+ target.value === constants_js_1.BulkOperationBlockTarget.ALL) {
551
551
  return true;
552
552
  }
553
553
  return target.value === value;
554
554
  }
555
555
  const BlockOperations = (operations) => {
556
556
  const targets = normalizeBlockOperationsInput(operations);
557
- return storeHandlerMetadata(constants_1.OperationKeys.REFLECT + constants_1.OperationKeys.BLOCK, (targets, kind, value) => {
557
+ return storeHandlerMetadata(constants_js_1.OperationKeys.REFLECT + constants_js_1.OperationKeys.BLOCK, (targets, kind, value) => {
558
558
  return targets.some((target) => matchesTarget(target, kind, value));
559
559
  })(targets);
560
560
  };
@@ -567,6 +567,7 @@ function invokeBlockOperationIfHandler(handler, targets, kind, value) {
567
567
  }
568
568
  return handler(targets, kind, value);
569
569
  }
570
- const BlockOperationIf = (handler) => storeHandlerMetadata(constants_1.OperationKeys.REFLECT + constants_1.OperationKeys.BLOCK, (targets, kind, value) => invokeBlockOperationIfHandler(handler, targets, kind, value))();
570
+ const BlockOperationIf = (handler) => storeHandlerMetadata(constants_js_1.OperationKeys.REFLECT + constants_js_1.OperationKeys.BLOCK, (targets, kind, value) => invokeBlockOperationIfHandler(handler, targets, kind, value))();
571
571
  exports.BlockOperationIf = BlockOperationIf;
572
+ //# sourceMappingURL=decorators.js.map
572
573
  //# sourceMappingURL=decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["decorators.js"],"names":[],"mappings":";;;AA0GA,sDA2BC;AASD,0CAoCC;AASD,wCAQC;AAWD,wCAEC;AAWD,4BAEC;AAWD,4BAEC;AAWD,wBAEC;AAWD,4BAEC;AAWD,sBAEC;AAkBD,gBAEC;AAWD,8CAEC;AAWD,kCAEC;AAWD,kCAEC;AAWD,8BAEC;AAWD,kCAEC;AAWD,4BAEC;AAkBD,sBAEC;AA6BD,8BAiCC;AAwCD,oDAIC;AAjfD,iDAAgI;AAChI,mDAA6C;AAC7C,yDAA0D;AAC1D,qDAAgF;AAChF,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,gBAAgB,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AACvD,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC;IAC7B,4BAAa,CAAC,MAAM;IACpB,4BAAa,CAAC,IAAI;IAClB,4BAAa,CAAC,MAAM;IACpB,4BAAa,CAAC,MAAM;CACvB,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,oCAAqB,CAAC,CAAC,CAAC;AACvE,SAAS,oBAAoB,CAAC,KAAK;IAC/B,IAAI,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC;QAC3B,OAAO,MAAM,CAAC;IAClB,IAAI,KAAK,KAAK,uCAAwB,CAAC,GAAG;QACtC,OAAO,MAAM,CAAC;IAClB,IAAI,gBAAg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K,CAAC,CAAC;AACzC,CAAC;AACM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC,oBAAoB,CAAC,4BAAa,CAAC,OAAO,GAAG,4BAAa,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,6BAA6B,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;AAA5L,QAAA,gBAAgB,oBAA4K;AACzM,sCAAsC"}
@@ -24,4 +24,5 @@ __exportStar(require("./decorators.cjs"), exports);
24
24
  __exportStar(require("./Operations.cjs"), exports);
25
25
  __exportStar(require("./OperationsRegistry.cjs"), exports);
26
26
  __exportStar(require("./types.cjs"), exports);
27
+ //# sourceMappingURL=index.js.map
27
28
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,0DAAwC;AACxC,6CAA2B;AAC3B,iCAAiC"}
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
3
4
  //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;AACA,iCAAiC"}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("@decaf-ts/decoration");
4
+ //# sourceMappingURL=Metadata.js.map
4
5
  //# sourceMappingURL=Metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Metadata.js","sourceRoot":"","sources":["Metadata.js"],"names":[],"mappings":";;AAAA,gCAA8B;AAC9B,oCAAoC"}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("@decaf-ts/decorator-validation");
4
+ //# sourceMappingURL=Model.js.map
4
5
  //# sourceMappingURL=Model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Model.js","sourceRoot":"","sources":["Model.js"],"names":[],"mappings":";;AAAA,0CAAwC;AACxC,iCAAiC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  require("@decaf-ts/decorator-validation");
4
4
  const decorator_validation_1 = require("@decaf-ts/decorator-validation");
5
- const decorators_1 = require("./../model/decorators.cjs");
5
+ const decorators_js_1 = require("./../model/decorators.cjs");
6
6
  const builderPrototype = decorator_validation_1.ModelBuilder.prototype;
7
7
  if (!builderPrototype.decorateClass) {
8
8
  builderPrototype.decorateClass = function (decorator) {
@@ -24,21 +24,22 @@ const applyDecorator = (builder, attr, decorator) => {
24
24
  return builder;
25
25
  };
26
26
  builderPrototype.generated = function (attr, type) {
27
- return applyDecorator(this, attr, (0, decorators_1.generated)(type));
27
+ return applyDecorator(this, attr, (0, decorators_js_1.generated)(type));
28
28
  };
29
29
  builderPrototype.hash = function (attr) {
30
- return applyDecorator(this, attr, (0, decorators_1.hash)());
30
+ return applyDecorator(this, attr, (0, decorators_js_1.hash)());
31
31
  };
32
32
  builderPrototype.composedFromKeys = function (attr, args, separator, filterEmpty, hashValue, prefix, suffix, groupsort) {
33
- return applyDecorator(this, attr, (0, decorators_1.composedFromKeys)(args, separator, filterEmpty, hashValue, prefix, suffix, groupsort));
33
+ return applyDecorator(this, attr, (0, decorators_js_1.composedFromKeys)(args, separator, filterEmpty, hashValue, prefix, suffix, groupsort));
34
34
  };
35
35
  builderPrototype.composed = function (attr, args, separator, filterEmpty, hashValue, prefix, suffix, groupsort) {
36
- return applyDecorator(this, attr, (0, decorators_1.composed)(args, separator, filterEmpty, hashValue, prefix, suffix, groupsort));
36
+ return applyDecorator(this, attr, (0, decorators_js_1.composed)(args, separator, filterEmpty, hashValue, prefix, suffix, groupsort));
37
37
  };
38
38
  builderPrototype.version = function (attr) {
39
- return applyDecorator(this, attr, (0, decorators_1.version)());
39
+ return applyDecorator(this, attr, (0, decorators_js_1.version)());
40
40
  };
41
41
  builderPrototype.transient = function (attr) {
42
- return applyDecorator(this, attr, (0, decorators_1.transient)());
42
+ return applyDecorator(this, attr, (0, decorators_js_1.transient)());
43
43
  };
44
+ //# sourceMappingURL=ModelBuilderExtensions.js.map
44
45
  //# sourceMappingURL=ModelBuilderExtensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelBuilderExtensions.js","sourceRoot":"","sources":["ModelBuilderExtensions.js"],"names":[],"mappings":";;AAAA,0CAAwC;AACxC,yEAAkF;AAClF,4DAA4G;AAC5G,MAAM,gBAAgB,GAAG,mCAAgB,CAAC,SAAS,CAAC;AACpD,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC;IAClC,gBAAgB,CAAC,aAAa,GAAG,UAAU,SAAS;QAChD,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACzB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;QAC/B,CAAC;QACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;AACN,CAAC;AACD,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;IAC7C,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,IAAI,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC;QACrB,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC,CAAC;AACF,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAChD,sBAAsB,CAAC,OA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,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAA,yBAAS,GAAE,CAAC,CAAC;AACnD,CAAC,CAAC;AACF,kDAAkD"}
@@ -24,4 +24,5 @@ __exportStar(require("./Model.cjs"), exports);
24
24
  __exportStar(require("./overrides.cjs"), exports);
25
25
  __exportStar(require("./Metadata.cjs"), exports);
26
26
  __exportStar(require("./ModelBuilderExtensions.cjs"), exports);
27
+ //# sourceMappingURL=index.js.map
27
28
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,0BAAwB;AACxB,6CAA2B;AAC3B,iDAA+B;AAC/B,gDAA8B;AAC9B,8DAA4C;AAC5C,iCAAiC"}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const decorator_validation_1 = require("@decaf-ts/decorator-validation");
4
- const validation_1 = require("./../model/validation.cjs");
4
+ const validation_js_1 = require("./../model/validation.cjs");
5
5
  const decoration_1 = require("@decaf-ts/decoration");
6
- const constants_1 = require("./../model/constants.cjs");
7
- const constants_2 = require("./../operations/constants.cjs");
8
- const errors_1 = require("./../repository/errors.cjs");
6
+ const constants_js_1 = require("./../model/constants.cjs");
7
+ const constants_js_2 = require("./../operations/constants.cjs");
8
+ const errors_js_1 = require("./../repository/errors.cjs");
9
9
  decorator_validation_1.Model.prototype.isTransient = function () {
10
10
  return decoration_1.Metadata.isTransient(this);
11
11
  };
@@ -31,13 +31,13 @@ decorator_validation_1.Model.prototype.hasErrors = function (previousVersion, ..
31
31
  if (resolvedErrs || !previousVersion) {
32
32
  return resolvedErrs;
33
33
  }
34
- return (0, validation_1.validateCompare)(previousVersion, this, async, ...exclusions);
34
+ return (0, validation_js_1.validateCompare)(previousVersion, this, async, ...exclusions);
35
35
  });
36
36
  }
37
37
  if (errs || !previousVersion)
38
38
  return errs;
39
39
  // @ts-expect-error Overriding Model prototype method with dynamic conditional return type.
40
- return (0, validation_1.validateCompare)(previousVersion, this, async, ...exclusions);
40
+ return (0, validation_js_1.validateCompare)(previousVersion, this, async, ...exclusions);
41
41
  };
42
42
  decorator_validation_1.Model.prototype.segregate = function segregate() {
43
43
  return decorator_validation_1.Model.segregate(this);
@@ -46,7 +46,7 @@ decorator_validation_1.Model.segregate = function segregate(model) {
46
46
  if (!decoration_1.Metadata.isTransient(model))
47
47
  return { model: model };
48
48
  const decoratedProperties = decoration_1.Metadata.validatableProperties(model.constructor);
49
- const transientProps = decoration_1.Metadata.get(model.constructor, constants_1.DBKeys.TRANSIENT);
49
+ const transientProps = decoration_1.Metadata.get(model.constructor, constants_js_1.DBKeys.TRANSIENT);
50
50
  const result = {
51
51
  model: {},
52
52
  transient: {},
@@ -59,7 +59,7 @@ decorator_validation_1.Model.segregate = function segregate(model) {
59
59
  result.transient[key] = model[key];
60
60
  }
61
61
  catch (e) {
62
- throw new errors_1.SerializationError(`Failed to serialize transient property ${key}: ${e}`);
62
+ throw new errors_js_1.SerializationError(`Failed to serialize transient property ${key}: ${e}`);
63
63
  }
64
64
  }
65
65
  else {
@@ -74,7 +74,7 @@ decoration_1.Metadata.pk = function pk(model, keyValue = false) {
74
74
  if (!model)
75
75
  throw new Error("No model was provided");
76
76
  const constr = model instanceof decorator_validation_1.Model ? model.constructor : model;
77
- const idProp = decoration_1.Metadata.get(constr, constants_1.DBKeys.ID);
77
+ const idProp = decoration_1.Metadata.get(constr, constants_js_1.DBKeys.ID);
78
78
  if (!idProp) {
79
79
  throw new Error(`No Id property defined for model ${constr?.name || "Unknown Model"}`);
80
80
  }
@@ -89,16 +89,16 @@ decorator_validation_1.Model.pk = function pk(model, keyValue = false) {
89
89
  return decoration_1.Metadata.pk(model, keyValue);
90
90
  }.bind(decorator_validation_1.Model);
91
91
  decorator_validation_1.Model.pkProps = function pkProps(model) {
92
- return decoration_1.Metadata.get(model, decoration_1.Metadata.key(constants_1.DBKeys.ID, decorator_validation_1.Model.pk(model)));
92
+ return decoration_1.Metadata.get(model, decoration_1.Metadata.key(constants_js_1.DBKeys.ID, decorator_validation_1.Model.pk(model)));
93
93
  }.bind(decorator_validation_1.Model);
94
94
  decorator_validation_1.Model.isTransient = function isTransient(model) {
95
- return !!decoration_1.Metadata.get(typeof model !== "function" ? model.constructor : model, constants_1.DBKeys.TRANSIENT);
95
+ return !!decoration_1.Metadata.get(typeof model !== "function" ? model.constructor : model, constants_js_1.DBKeys.TRANSIENT);
96
96
  }.bind(decorator_validation_1.Model);
97
97
  decorator_validation_1.Model.composed = function composed(model, prop) {
98
98
  const constr = model instanceof decorator_validation_1.Model ? model.constructor : model;
99
99
  if (prop)
100
- return decoration_1.Metadata.get(constr, decoration_1.Metadata.key(constants_1.DBKeys.COMPOSED, prop));
101
- return !!decoration_1.Metadata.get(constr, constants_1.DBKeys.COMPOSED);
100
+ return decoration_1.Metadata.get(constr, decoration_1.Metadata.key(constants_js_1.DBKeys.COMPOSED, prop));
101
+ return !!decoration_1.Metadata.get(constr, constants_js_1.DBKeys.COMPOSED);
102
102
  }.bind(decorator_validation_1.Model);
103
103
  /**
104
104
  * @description Merges two model instances into a new instance.
@@ -122,18 +122,18 @@ decorator_validation_1.Model.merge = function merge(oldModel, newModel, construc
122
122
  decoration_1.Metadata.saveOperation = function saveOperation(model, propertyKey, operation, metadata) {
123
123
  if (!propertyKey)
124
124
  return;
125
- decoration_1.Metadata.set(model, decoration_1.Metadata.key(constants_2.ModelOperations.OPERATIONS, propertyKey, operation), metadata);
125
+ decoration_1.Metadata.set(model, decoration_1.Metadata.key(constants_js_2.ModelOperations.OPERATIONS, propertyKey, operation), metadata);
126
126
  }.bind(decoration_1.Metadata);
127
127
  decoration_1.Metadata.readOperation = function readOperation(model, propertyKey, operation) {
128
128
  if (!propertyKey || !operation)
129
129
  return;
130
- return decoration_1.Metadata.get(model, decoration_1.Metadata.key(constants_2.ModelOperations.OPERATIONS, propertyKey, operation));
130
+ return decoration_1.Metadata.get(model, decoration_1.Metadata.key(constants_js_2.ModelOperations.OPERATIONS, propertyKey, operation));
131
131
  }.bind(decoration_1.Metadata);
132
132
  decoration_1.Metadata.isTransient = function isTransient(model) {
133
- return !!decoration_1.Metadata.get(typeof model !== "function" ? model.constructor : model, constants_1.DBKeys.TRANSIENT);
133
+ return !!decoration_1.Metadata.get(typeof model !== "function" ? model.constructor : model, constants_js_1.DBKeys.TRANSIENT);
134
134
  }.bind(decoration_1.Metadata);
135
135
  decorator_validation_1.Model.generated = function generated(model, prop) {
136
- return !!decoration_1.Metadata.get(typeof model !== "function" ? model.constructor : model, decoration_1.Metadata.key(constants_1.DBKeys.GENERATED, prop));
136
+ return !!decoration_1.Metadata.get(typeof model !== "function" ? model.constructor : model, decoration_1.Metadata.key(constants_js_1.DBKeys.GENERATED, prop));
137
137
  }.bind(decorator_validation_1.Model);
138
138
  decorator_validation_1.Model.shouldGenerate = function shouldGenerate(model, prop, ctx) {
139
139
  if (ctx.get("allowGenerationOverride") && typeof model[prop] !== "undefined")
@@ -142,14 +142,15 @@ decorator_validation_1.Model.shouldGenerate = function shouldGenerate(model, pro
142
142
  }.bind(decorator_validation_1.Model);
143
143
  decorator_validation_1.Model.versionProp = function versionProp(model) {
144
144
  const meta = decoration_1.Metadata.get(model.constructor);
145
- if (!meta || !meta[constants_1.DBKeys.VERSION])
146
- throw new errors_1.InternalError(`No version found for ${model.constructor.name}`);
145
+ if (!meta || !meta[constants_js_1.DBKeys.VERSION])
146
+ throw new errors_js_1.InternalError(`No version found for ${model.constructor.name}`);
147
147
  return Object.keys(meta)[0];
148
148
  }.bind(decorator_validation_1.Model);
149
149
  decorator_validation_1.Model.versionOf = function versionOf(model) {
150
150
  const version = model[decorator_validation_1.Model.versionProp(model)];
151
151
  if (typeof version !== "number" || version < 1)
152
- throw new errors_1.InternalError(`Invalid version number: ${version}`);
152
+ throw new errors_js_1.InternalError(`Invalid version number: ${version}`);
153
153
  return version;
154
154
  }.bind(decorator_validation_1.Model);
155
+ //# sourceMappingURL=overrides.js.map
155
156
  //# sourceMappingURL=overrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrides.js","sourceRoot":"","sources":["overrides.js"],"names":[],"mappings":";;AAAA,yEAAkE;AAClE,4DAA2D;AAC3D,qDAAgD;AAChD,0DAAiD;AACjD,+DAA+D;AAC/D,yDAA8E;AAC9E,4BAAK,CAAC,SAAS,CAAC,WAAW,GAAG;IAC1B,OAAO,qBAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC;AACF;;;;;;;;;GASG;AACH,4BAAK,CAAC,SAAS,CAAC,SAAS,GAAG,UAAU,eAAe,EAAE,GAAG,UAAU;IAChE,IAAI,eAAe,IAAI,CAAC,CAAC,eAAe,YAAY,4BAAK,CAAC,EAAE,CAAC;QACzD,UAAU,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACpC,eAAe,GAAG,SAAS,CAAC;IAChC,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,+BAAQ,EAAC,IAAI,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,CAAC;IAClD,IAAI,KAAK,EAAE,CAAC;QACR,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;YAC/C,IAAI,YAAY,IAAI,CAAC,eAAe,EAAE,CAAC;gBACnC,OAAO,YAAY,CAAC;YACxB,CAAC;YACD,OAAO,IAAA,+BAAe,EAAC,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;IACP,CAAC;IACD,IAAI,IAAI,IAAI,CAAC,eAAe;QACxB,OAAO,IAAI,CAAC;IAChB,2FAA2F;IAC3F,OAAO,IAAA,+BAAe,EAAC,eAAe,EAAE,IAAI,EAAE,KAAK,E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AS,CAAC,KAAK;IACtC,MAAM,OAAO,GAAG,KAAK,CAAC,4BAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC;QAC1C,MAAM,IAAI,yBAAa,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;IAClE,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC,IAAI,CAAC,4BAAK,CAAC,CAAC;AACd,qCAAqC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Context = exports.DefaultContextFactory = void 0;
4
- const constants_1 = require("./constants.cjs");
4
+ const constants_js_1 = require("./constants.cjs");
5
5
  const typed_object_accumulator_1 = require("typed-object-accumulator");
6
6
  const logging_1 = require("@decaf-ts/logging");
7
7
  /**
@@ -135,7 +135,7 @@ class Context {
135
135
  static async from(operation, overrides, model,
136
136
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
137
137
  ...args) {
138
- return Context.factory(Object.assign({}, constants_1.DefaultRepositoryFlags, overrides, {
138
+ return Context.factory(Object.assign({}, constants_js_1.DefaultRepositoryFlags, overrides, {
139
139
  operation: operation,
140
140
  model: model,
141
141
  logger: overrides.logger || logging_1.Logging.get(),
@@ -171,4 +171,5 @@ class Context {
171
171
  }
172
172
  }
173
173
  exports.Context = Context;
174
+ //# sourceMappingURL=Context.js.map
174
175
  //# sourceMappingURL=Context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.js","sourceRoot":"","sources":["Context.js"],"names":[],"mappings":";;;AAAA,iDAAwD;AACxD,uEAA6D;AAC7D,+CAA4C;AAC5C;;;;;;GAMG;AACI,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,EAAE;IACzC,OAAO,IAAI,OAAO,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE;QACnD,SAAS,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