@rvoh/dream 0.43.0-beta.4 → 0.43.0-beta.6

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 (254) hide show
  1. package/dist/cjs/src/Dream.js +3 -4
  2. package/dist/cjs/src/dream/Query.js +15 -11
  3. package/dist/cjs/src/dream/internal/similarity/SimilarityBuilder.js +3 -3
  4. package/dist/cjs/src/helpers/allNestedObjectKeys.js +2 -2
  5. package/dist/cjs/src/helpers/cloneDeepSafe.js +15 -14
  6. package/dist/cjs/src/helpers/groupBy.js +11 -0
  7. package/dist/cjs/src/helpers/{typechecks.js → isObject.js} +2 -7
  8. package/dist/cjs/src/helpers/normalizeString.js +1 -2
  9. package/dist/cjs/src/helpers/sortObjectByValue.js +16 -0
  10. package/dist/cjs/src/helpers/sqlAttributes.js +1 -2
  11. package/dist/cjs/src/helpers/stringCasing.js +4 -4
  12. package/dist/cjs/src/index.js +10 -10
  13. package/dist/cjs/src/serializer/SerializerRenderer.js +134 -123
  14. package/dist/cjs/src/serializer/builders/DreamSerializerBuilder.js +10 -8
  15. package/dist/cjs/src/serializer/builders/ObjectSerializerBuilder.js +10 -8
  16. package/dist/esm/src/Dream.js +3 -4
  17. package/dist/esm/src/dream/Query.js +11 -7
  18. package/dist/esm/src/dream/internal/similarity/SimilarityBuilder.js +1 -1
  19. package/dist/esm/src/helpers/allNestedObjectKeys.js +1 -1
  20. package/dist/esm/src/helpers/cloneDeepSafe.js +14 -13
  21. package/dist/esm/src/helpers/groupBy.js +8 -0
  22. package/dist/esm/src/helpers/isObject.js +8 -0
  23. package/dist/esm/src/helpers/normalizeString.js +1 -2
  24. package/dist/esm/src/helpers/sortObjectByValue.js +13 -0
  25. package/dist/esm/src/helpers/sqlAttributes.js +1 -2
  26. package/dist/esm/src/helpers/stringCasing.js +3 -3
  27. package/dist/esm/src/index.js +4 -4
  28. package/dist/esm/src/serializer/SerializerRenderer.js +134 -123
  29. package/dist/esm/src/serializer/builders/DreamSerializerBuilder.js +10 -8
  30. package/dist/esm/src/serializer/builders/ObjectSerializerBuilder.js +10 -8
  31. package/dist/types/src/helpers/cloneDeepSafe.d.ts +9 -10
  32. package/dist/types/src/helpers/groupBy.d.ts +1 -0
  33. package/dist/types/src/helpers/isObject.d.ts +1 -0
  34. package/dist/types/src/helpers/sortObjectByValue.d.ts +3 -0
  35. package/dist/types/src/index.d.ts +8 -7
  36. package/dist/types/src/serializer/builders/DreamSerializerBuilder.d.ts +14 -18
  37. package/dist/types/src/serializer/builders/ObjectSerializerBuilder.d.ts +17 -21
  38. package/dist/types/src/types/dream.d.ts +10 -1
  39. package/dist/types/src/types/dream.ts +20 -8
  40. package/dist/types/src/types/serializer.d.ts +6 -10
  41. package/dist/types/src/types/serializer.ts +6 -15
  42. package/docs/assets/navigation.js +1 -1
  43. package/docs/assets/search.js +1 -1
  44. package/docs/classes/Benchmark.html +2 -2
  45. package/docs/classes/CalendarDate.html +2 -2
  46. package/docs/classes/CreateOrFindByFailedToCreateAndFind.html +3 -3
  47. package/docs/classes/Decorators.html +19 -19
  48. package/docs/classes/Dream.html +131 -131
  49. package/docs/classes/DreamApp.html +4 -4
  50. package/docs/classes/DreamBin.html +2 -2
  51. package/docs/classes/DreamCLI.html +4 -4
  52. package/docs/classes/DreamImporter.html +2 -2
  53. package/docs/classes/DreamLogos.html +2 -2
  54. package/docs/classes/DreamMigrationHelpers.html +7 -7
  55. package/docs/classes/DreamSerializerBuilder.html +2 -6
  56. package/docs/classes/DreamTransaction.html +2 -2
  57. package/docs/classes/Encrypt.html +2 -2
  58. package/docs/classes/Env.html +2 -2
  59. package/docs/classes/GlobalNameNotSet.html +3 -3
  60. package/docs/classes/NonLoadedAssociation.html +3 -3
  61. package/docs/classes/ObjectSerializerBuilder.html +2 -6
  62. package/docs/classes/Query.html +51 -51
  63. package/docs/classes/Range.html +2 -2
  64. package/docs/classes/RecordNotFound.html +3 -3
  65. package/docs/classes/ValidationError.html +3 -3
  66. package/docs/functions/DreamSerializer.html +1 -1
  67. package/docs/functions/ObjectSerializer.html +1 -1
  68. package/docs/functions/ReplicaSafe.html +1 -1
  69. package/docs/functions/STI.html +1 -1
  70. package/docs/functions/SoftDelete.html +1 -1
  71. package/docs/functions/camelize.html +1 -1
  72. package/docs/functions/capitalize.html +1 -1
  73. package/docs/functions/cloneDeepSafe.html +9 -0
  74. package/docs/functions/closeAllDbConnections.html +1 -1
  75. package/docs/functions/compact.html +1 -1
  76. package/docs/functions/dreamDbConnections.html +1 -1
  77. package/docs/functions/dreamPath.html +1 -1
  78. package/docs/functions/expandStiClasses.html +1 -0
  79. package/docs/functions/generateDream.html +1 -1
  80. package/docs/functions/globalClassNameFromFullyQualifiedModelName.html +1 -1
  81. package/docs/functions/groupBy.html +1 -0
  82. package/docs/functions/hyphenize.html +1 -1
  83. package/docs/functions/inferSerializerFromDreamOrViewModel.html +1 -1
  84. package/docs/functions/inferSerializersFromDreamClassOrViewModelClass.html +1 -1
  85. package/docs/functions/intersection.html +1 -1
  86. package/docs/functions/isDreamSerializer.html +1 -1
  87. package/docs/functions/isEmpty.html +1 -1
  88. package/docs/functions/loadRepl.html +1 -1
  89. package/docs/functions/lookupClassByGlobalName.html +1 -1
  90. package/docs/functions/pascalize.html +1 -1
  91. package/docs/functions/pgErrorType.html +1 -1
  92. package/docs/functions/range-1.html +1 -1
  93. package/docs/functions/relativeDreamPath.html +1 -1
  94. package/docs/functions/round.html +1 -1
  95. package/docs/functions/serializerNameFromFullyQualifiedModelName.html +1 -1
  96. package/docs/functions/sharedPathPrefix.html +1 -1
  97. package/docs/functions/snakeify.html +1 -1
  98. package/docs/functions/sort.html +1 -1
  99. package/docs/functions/sortBy.html +1 -1
  100. package/docs/functions/sortObjectByKey.html +1 -1
  101. package/docs/functions/sortObjectByValue.html +1 -0
  102. package/docs/functions/standardizeFullyQualifiedModelName.html +1 -1
  103. package/docs/functions/uncapitalize.html +1 -1
  104. package/docs/functions/uniq.html +1 -1
  105. package/docs/functions/untypedDb.html +1 -1
  106. package/docs/functions/validateColumn.html +1 -1
  107. package/docs/functions/validateTable.html +1 -1
  108. package/docs/interfaces/DecoratorContext.html +2 -2
  109. package/docs/interfaces/DreamAppInitOptions.html +2 -2
  110. package/docs/interfaces/DreamAppOpts.html +2 -2
  111. package/docs/interfaces/EncryptOptions.html +2 -2
  112. package/docs/interfaces/InternalAnyTypedSerializerRendersMany.html +4 -0
  113. package/docs/interfaces/InternalAnyTypedSerializerRendersOne.html +4 -0
  114. package/docs/interfaces/OpenapiDescription.html +2 -0
  115. package/docs/interfaces/OpenapiSchemaProperties.html +1 -1
  116. package/docs/interfaces/OpenapiSchemaPropertiesShorthand.html +1 -1
  117. package/docs/interfaces/OpenapiTypeFieldObject.html +1 -1
  118. package/docs/interfaces/SerializerRendererOpts.html +2 -0
  119. package/docs/modules.html +9 -4
  120. package/docs/types/Camelized.html +1 -1
  121. package/docs/types/CommonOpenapiSchemaObjectFields.html +1 -1
  122. package/docs/types/DateTime.html +1 -1
  123. package/docs/types/DbConnectionType.html +1 -1
  124. package/docs/types/DbTypes.html +1 -0
  125. package/docs/types/DreamAssociationMetadata.html +1 -1
  126. package/docs/types/DreamAttributes.html +1 -1
  127. package/docs/types/DreamClassColumn.html +1 -1
  128. package/docs/types/DreamColumn.html +1 -1
  129. package/docs/types/DreamColumnNames.html +1 -1
  130. package/docs/types/DreamLogLevel.html +1 -1
  131. package/docs/types/DreamLogger.html +1 -1
  132. package/docs/types/DreamModelSerializerType.html +1 -1
  133. package/docs/types/DreamOrViewModelClassSerializerArrayKeys.html +1 -1
  134. package/docs/types/DreamOrViewModelClassSerializerKey.html +1 -1
  135. package/docs/types/DreamOrViewModelSerializerKey.html +1 -1
  136. package/docs/types/DreamParamSafeAttributes.html +1 -1
  137. package/docs/types/DreamParamSafeColumnNames.html +1 -1
  138. package/docs/types/DreamSerializable.html +1 -1
  139. package/docs/types/DreamSerializableArray.html +1 -1
  140. package/docs/types/DreamSerializerKey.html +1 -1
  141. package/docs/types/DreamSerializers.html +1 -1
  142. package/docs/types/DreamTableSchema.html +1 -1
  143. package/docs/types/DreamVirtualColumns.html +1 -1
  144. package/docs/types/EncryptAlgorithm.html +1 -1
  145. package/docs/types/Hyphenized.html +1 -1
  146. package/docs/types/IdType.html +1 -1
  147. package/docs/types/OpenapiAllTypes.html +1 -1
  148. package/docs/types/OpenapiFormats.html +1 -1
  149. package/docs/types/OpenapiNumberFormats.html +1 -1
  150. package/docs/types/OpenapiPrimitiveBaseTypes.html +1 -1
  151. package/docs/types/OpenapiPrimitiveTypes.html +1 -1
  152. package/docs/types/OpenapiSchemaArray.html +1 -1
  153. package/docs/types/OpenapiSchemaArrayShorthand.html +1 -1
  154. package/docs/types/OpenapiSchemaBase.html +1 -1
  155. package/docs/types/OpenapiSchemaBody.html +1 -1
  156. package/docs/types/OpenapiSchemaBodyShorthand.html +1 -1
  157. package/docs/types/OpenapiSchemaCommonFields.html +1 -1
  158. package/docs/types/OpenapiSchemaExpressionAllOf.html +1 -1
  159. package/docs/types/OpenapiSchemaExpressionAnyOf.html +1 -1
  160. package/docs/types/OpenapiSchemaExpressionOneOf.html +1 -1
  161. package/docs/types/OpenapiSchemaExpressionRef.html +1 -1
  162. package/docs/types/OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
  163. package/docs/types/OpenapiSchemaInteger.html +1 -1
  164. package/docs/types/OpenapiSchemaNull.html +1 -1
  165. package/docs/types/OpenapiSchemaNumber.html +1 -1
  166. package/docs/types/OpenapiSchemaObject.html +1 -1
  167. package/docs/types/OpenapiSchemaObjectAllOf.html +1 -1
  168. package/docs/types/OpenapiSchemaObjectAllOfShorthand.html +1 -1
  169. package/docs/types/OpenapiSchemaObjectAnyOf.html +1 -1
  170. package/docs/types/OpenapiSchemaObjectAnyOfShorthand.html +1 -1
  171. package/docs/types/OpenapiSchemaObjectBase.html +1 -1
  172. package/docs/types/OpenapiSchemaObjectBaseShorthand.html +1 -1
  173. package/docs/types/OpenapiSchemaObjectOneOf.html +1 -1
  174. package/docs/types/OpenapiSchemaObjectOneOfShorthand.html +1 -1
  175. package/docs/types/OpenapiSchemaObjectShorthand.html +1 -1
  176. package/docs/types/OpenapiSchemaPrimitiveGeneric.html +1 -1
  177. package/docs/types/OpenapiSchemaShorthandExpressionAllOf.html +1 -1
  178. package/docs/types/OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
  179. package/docs/types/OpenapiSchemaShorthandExpressionOneOf.html +1 -1
  180. package/docs/types/OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
  181. package/docs/types/OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
  182. package/docs/types/OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
  183. package/docs/types/OpenapiSchemaString.html +1 -1
  184. package/docs/types/OpenapiShorthandAllTypes.html +1 -1
  185. package/docs/types/OpenapiShorthandPrimitiveBaseTypes.html +1 -1
  186. package/docs/types/OpenapiShorthandPrimitiveTypes.html +1 -1
  187. package/docs/types/OpenapiTypeField.html +1 -1
  188. package/docs/types/Pascalized.html +1 -1
  189. package/docs/types/PrimaryKeyType.html +1 -1
  190. package/docs/types/RoundingPrecision.html +1 -1
  191. package/docs/types/SerializerCasing.html +1 -1
  192. package/docs/types/SimpleObjectSerializerType.html +1 -1
  193. package/docs/types/Snakeified.html +1 -1
  194. package/docs/types/Timestamp.html +1 -1
  195. package/docs/types/UpdateableAssociationProperties.html +1 -1
  196. package/docs/types/UpdateableProperties.html +1 -1
  197. package/docs/types/ValidationType.html +1 -1
  198. package/docs/types/ViewModel.html +1 -1
  199. package/docs/types/ViewModelClass.html +1 -1
  200. package/docs/types/WhereStatementForDream.html +1 -1
  201. package/docs/types/WhereStatementForDreamClass.html +1 -1
  202. package/docs/variables/DateTime-1.html +1 -1
  203. package/docs/variables/DreamConst.html +1 -1
  204. package/docs/variables/TRIGRAM_OPERATORS.html +1 -1
  205. package/docs/variables/openapiPrimitiveTypes-1.html +1 -1
  206. package/docs/variables/openapiShorthandPrimitiveTypes-1.html +1 -1
  207. package/docs/variables/ops.html +1 -1
  208. package/docs/variables/primaryKeyTypes.html +1 -1
  209. package/package.json +1 -1
  210. package/dist/cjs/src/errors/serializers/AttemptedToDeriveDescendentSerializersFromNonSerializer.js +0 -16
  211. package/dist/cjs/src/errors/serializers/NoSerializerFoundForRendersOneAndMany.js +0 -16
  212. package/dist/cjs/src/errors/serializers/NonSerializerPassedToSerializerOpenapiRenderer.js +0 -16
  213. package/dist/cjs/src/errors/serializers/NonSerializerSerializerOverrideProvided.js +0 -23
  214. package/dist/cjs/src/errors/serializers/ObjectSerializerRendersOneAndManyRequireClassType.js +0 -19
  215. package/dist/cjs/src/errors/serializers/SerializerInsteadOfSerializerCallback.js +0 -49
  216. package/dist/cjs/src/openapi/allSerializersFromHandWrittenOpenapi.js +0 -26
  217. package/dist/cjs/src/openapi/allSerializersToRefsInOpenapi.js +0 -41
  218. package/dist/cjs/src/openapi/dreamAttributeOpenapiShape.js +0 -138
  219. package/dist/cjs/src/openapi/isOpenapiShorthand.js +0 -11
  220. package/dist/cjs/src/openapi/maybeNullOpenapiShorthandToOpenapiShorthand.js +0 -17
  221. package/dist/cjs/src/openapi/openapiShorthandToOpenapi.js +0 -106
  222. package/dist/cjs/src/serializer/SerializerOpenapiRenderer.js +0 -325
  223. package/dist/esm/src/errors/serializers/AttemptedToDeriveDescendentSerializersFromNonSerializer.js +0 -13
  224. package/dist/esm/src/errors/serializers/NoSerializerFoundForRendersOneAndMany.js +0 -13
  225. package/dist/esm/src/errors/serializers/NonSerializerPassedToSerializerOpenapiRenderer.js +0 -13
  226. package/dist/esm/src/errors/serializers/NonSerializerSerializerOverrideProvided.js +0 -20
  227. package/dist/esm/src/errors/serializers/ObjectSerializerRendersOneAndManyRequireClassType.js +0 -16
  228. package/dist/esm/src/errors/serializers/SerializerInsteadOfSerializerCallback.js +0 -46
  229. package/dist/esm/src/helpers/typechecks.js +0 -12
  230. package/dist/esm/src/openapi/allSerializersFromHandWrittenOpenapi.js +0 -23
  231. package/dist/esm/src/openapi/allSerializersToRefsInOpenapi.js +0 -38
  232. package/dist/esm/src/openapi/dreamAttributeOpenapiShape.js +0 -132
  233. package/dist/esm/src/openapi/isOpenapiShorthand.js +0 -8
  234. package/dist/esm/src/openapi/maybeNullOpenapiShorthandToOpenapiShorthand.js +0 -14
  235. package/dist/esm/src/openapi/openapiShorthandToOpenapi.js +0 -100
  236. package/dist/esm/src/serializer/SerializerOpenapiRenderer.js +0 -322
  237. package/dist/types/src/errors/serializers/AttemptedToDeriveDescendentSerializersFromNonSerializer.d.ts +0 -5
  238. package/dist/types/src/errors/serializers/NoSerializerFoundForRendersOneAndMany.d.ts +0 -5
  239. package/dist/types/src/errors/serializers/NonSerializerPassedToSerializerOpenapiRenderer.d.ts +0 -5
  240. package/dist/types/src/errors/serializers/NonSerializerSerializerOverrideProvided.d.ts +0 -6
  241. package/dist/types/src/errors/serializers/ObjectSerializerRendersOneAndManyRequireClassType.d.ts +0 -5
  242. package/dist/types/src/errors/serializers/SerializerInsteadOfSerializerCallback.d.ts +0 -8
  243. package/dist/types/src/helpers/typechecks.d.ts +0 -2
  244. package/dist/types/src/openapi/allSerializersFromHandWrittenOpenapi.d.ts +0 -3
  245. package/dist/types/src/openapi/allSerializersToRefsInOpenapi.d.ts +0 -2
  246. package/dist/types/src/openapi/dreamAttributeOpenapiShape.d.ts +0 -796
  247. package/dist/types/src/openapi/isOpenapiShorthand.d.ts +0 -1
  248. package/dist/types/src/openapi/maybeNullOpenapiShorthandToOpenapiShorthand.d.ts +0 -2
  249. package/dist/types/src/openapi/openapiShorthandToOpenapi.d.ts +0 -16
  250. package/dist/types/src/serializer/SerializerOpenapiRenderer.d.ts +0 -23
  251. package/docs/classes/SerializerOpenapiRenderer.html +0 -6
  252. package/docs/functions/isOpenapiShorthand.html +0 -1
  253. package/docs/functions/maybeNullOpenapiShorthandToOpenapiShorthand.html +0 -1
  254. package/docs/functions/openapiShorthandToOpenapi.html +0 -1
@@ -48,7 +48,6 @@ const DateTime_js_1 = require("./helpers/DateTime.js");
48
48
  const cachedTypeForAttribute_js_1 = require("./helpers/db/cachedTypeForAttribute.js");
49
49
  const isJsonColumn_js_1 = require("./helpers/db/types/isJsonColumn.js");
50
50
  const notEqual_js_1 = require("./helpers/notEqual.js");
51
- const typechecks_js_1 = require("./helpers/typechecks.js");
52
51
  class Dream {
53
52
  DB;
54
53
  /**
@@ -2077,7 +2076,7 @@ class Dream {
2077
2076
  ? null
2078
2077
  : val === undefined
2079
2078
  ? undefined
2080
- : (0, typechecks_js_1.isString)(val)
2079
+ : typeof val === 'string'
2081
2080
  ? val
2082
2081
  : JSON.stringify(val));
2083
2082
  },
@@ -2480,7 +2479,7 @@ class Dream {
2480
2479
  unknownValueToMillis(currentValue) {
2481
2480
  if (!currentValue)
2482
2481
  return;
2483
- if ((0, typechecks_js_1.isString)(currentValue))
2482
+ if (typeof currentValue === 'string')
2484
2483
  currentValue = DateTime_js_1.DateTime.fromISO(currentValue);
2485
2484
  if (currentValue instanceof CalendarDate_js_1.default)
2486
2485
  currentValue = currentValue.toDateTime();
@@ -2493,7 +2492,7 @@ class Dream {
2493
2492
  unknownValueToDateString(currentValue) {
2494
2493
  if (!currentValue)
2495
2494
  return;
2496
- if ((0, typechecks_js_1.isString)(currentValue))
2495
+ if (typeof currentValue === 'string')
2497
2496
  currentValue = CalendarDate_js_1.default.fromISO(currentValue);
2498
2497
  if (currentValue instanceof DateTime_js_1.DateTime)
2499
2498
  currentValue = CalendarDate_js_1.default.fromDateTime(currentValue);
@@ -32,13 +32,13 @@ const cloneDeepSafe_js_1 = require("../helpers/cloneDeepSafe.js");
32
32
  const compact_js_1 = require("../helpers/compact.js");
33
33
  const DateTime_js_1 = require("../helpers/DateTime.js");
34
34
  const isEmpty_js_1 = require("../helpers/isEmpty.js");
35
+ const isObject_js_1 = require("../helpers/isObject.js");
35
36
  const namespaceColumn_js_1 = require("../helpers/namespaceColumn.js");
36
37
  const normalizeString_js_1 = require("../helpers/normalizeString.js");
37
38
  const objectPathsToArrays_js_1 = require("../helpers/objectPathsToArrays.js");
38
39
  const protectAgainstPollutingAssignment_js_1 = require("../helpers/protectAgainstPollutingAssignment.js");
39
40
  const range_js_1 = require("../helpers/range.js");
40
41
  const snakeify_js_1 = require("../helpers/snakeify.js");
41
- const typechecks_js_1 = require("../helpers/typechecks.js");
42
42
  const uniq_js_1 = require("../helpers/uniq.js");
43
43
  const curried_ops_statement_js_1 = require("../ops/curried-ops-statement.js");
44
44
  const index_js_2 = require("../ops/index.js");
@@ -551,7 +551,7 @@ class Query extends ConnectedToDB_js_1.default {
551
551
  if (nextAssociationStatement === undefined) {
552
552
  // just satisfying typing
553
553
  }
554
- else if ((0, typechecks_js_1.isString)(nextAssociationStatement)) {
554
+ else if (typeof nextAssociationStatement === 'string') {
555
555
  const nextStatement = nextAssociationStatement;
556
556
  if (!joinStatements[nextStatement])
557
557
  joinStatements[(0, protectAgainstPollutingAssignment_js_1.default)(nextStatement)] = {};
@@ -573,7 +573,7 @@ class Query extends ConnectedToDB_js_1.default {
573
573
  });
574
574
  //
575
575
  }
576
- else if ((0, typechecks_js_1.isObject)(nextAssociationStatement) && previousAssociationName) {
576
+ else if ((0, isObject_js_1.default)(nextAssociationStatement) && previousAssociationName) {
577
577
  const clonedNextAssociationStatement = (0, cloneDeepSafe_js_1.default)(nextAssociationStatement);
578
578
  const keys = Object.keys(clonedNextAssociationStatement);
579
579
  keys.forEach((key) => {
@@ -908,7 +908,7 @@ class Query extends ConnectedToDB_js_1.default {
908
908
  order(arg) {
909
909
  if (arg === null)
910
910
  return this.clone({ order: null });
911
- if ((0, typechecks_js_1.isString)(arg))
911
+ if (typeof arg === 'string')
912
912
  return this.clone({ order: [{ column: arg, direction: 'asc' }] });
913
913
  let query = this.clone();
914
914
  Object.keys(arg).forEach(key => {
@@ -1190,7 +1190,7 @@ class Query extends ConnectedToDB_js_1.default {
1190
1190
  kyselyQuery = kyselyQuery.select(`${this.namespaceColumn(dbColumnName, association.through)} as ${columnAlias}`);
1191
1191
  };
1192
1192
  if (association.through && association.preloadThroughColumns) {
1193
- if ((0, typechecks_js_1.isObject)(association.preloadThroughColumns)) {
1193
+ if ((0, isObject_js_1.default)(association.preloadThroughColumns)) {
1194
1194
  const preloadMap = association.preloadThroughColumns;
1195
1195
  Object.keys(preloadMap).forEach(columnName => setupPreloadData(columnName));
1196
1196
  }
@@ -1302,7 +1302,7 @@ class Query extends ConnectedToDB_js_1.default {
1302
1302
  return;
1303
1303
  let columnNames = [];
1304
1304
  const columnNameToPreloadedThroughColumnNameMap = {};
1305
- if ((0, typechecks_js_1.isObject)(association.preloadThroughColumns)) {
1305
+ if ((0, isObject_js_1.default)(association.preloadThroughColumns)) {
1306
1306
  const preloadMap = association.preloadThroughColumns;
1307
1307
  columnNames = Object.keys(preloadMap).map(columnName => {
1308
1308
  columnNameToPreloadedThroughColumnNameMap[columnName] = preloadMap[columnName];
@@ -1935,7 +1935,7 @@ class Query extends ConnectedToDB_js_1.default {
1935
1935
  const columnsToPluck = dreamClassToHydrateColumns.map(column => this.namespaceColumn(column.toString(), alias));
1936
1936
  const asHasAssociation = association;
1937
1937
  if (asHasAssociation.through && asHasAssociation.preloadThroughColumns) {
1938
- if ((0, typechecks_js_1.isObject)(asHasAssociation.preloadThroughColumns)) {
1938
+ if ((0, isObject_js_1.default)(asHasAssociation.preloadThroughColumns)) {
1939
1939
  const preloadMap = asHasAssociation.preloadThroughColumns;
1940
1940
  Object.keys(preloadMap).forEach(preloadThroughColumn => {
1941
1941
  throughColumnsToHydrate.push(preloadMap[preloadThroughColumn]);
@@ -2364,7 +2364,7 @@ class Query extends ConnectedToDB_js_1.default {
2364
2364
  return query;
2365
2365
  let selectQuery = query;
2366
2366
  const orderStatement = association.order;
2367
- if ((0, typechecks_js_1.isString)(orderStatement)) {
2367
+ if (typeof orderStatement === 'string') {
2368
2368
  selectQuery = selectQuery.orderBy(this.namespaceColumn(orderStatement, tableNameOrAlias), 'asc');
2369
2369
  }
2370
2370
  else {
@@ -2501,7 +2501,11 @@ class Query extends ConnectedToDB_js_1.default {
2501
2501
  else if (Array.isArray(val)) {
2502
2502
  a = attr;
2503
2503
  b = 'in';
2504
- c = val.map(v => v instanceof DateTime_js_1.DateTime || v instanceof CalendarDate_js_1.default ? v.toSQL() : (0, typechecks_js_1.isString)(v) ? (0, normalizeString_js_1.default)(v) : v);
2504
+ c = val.map(v => v instanceof DateTime_js_1.DateTime || v instanceof CalendarDate_js_1.default
2505
+ ? v.toSQL()
2506
+ : typeof v === 'string'
2507
+ ? (0, normalizeString_js_1.default)(v)
2508
+ : v);
2505
2509
  }
2506
2510
  else if (val instanceof curried_ops_statement_js_1.default) {
2507
2511
  val = val.toOpsStatement(this.dreamClass, attr);
@@ -2544,11 +2548,11 @@ class Query extends ConnectedToDB_js_1.default {
2544
2548
  }
2545
2549
  if (c instanceof DateTime_js_1.DateTime || c instanceof CalendarDate_js_1.default)
2546
2550
  c = c.toSQL();
2547
- else if ((0, typechecks_js_1.isString)(c))
2551
+ else if (typeof c === 'string')
2548
2552
  c = (0, normalizeString_js_1.default)(c);
2549
2553
  if (c2 instanceof DateTime_js_1.DateTime || c2 instanceof CalendarDate_js_1.default)
2550
2554
  c2 = c2.toSQL();
2551
- else if ((0, typechecks_js_1.isString)(c2))
2555
+ else if (typeof c2 === 'string')
2552
2556
  c2 = (0, normalizeString_js_1.default)(c2);
2553
2557
  if (a && c === undefined)
2554
2558
  throw new CannotPassUndefinedAsAValueToAWhereClause_js_1.default(this.dreamClass, a);
@@ -6,8 +6,8 @@ const ConnectedToDB_js_1 = require("../../../db/ConnectedToDB.js");
6
6
  const validateColumn_js_1 = require("../../../db/validators/validateColumn.js");
7
7
  const validateTable_js_1 = require("../../../db/validators/validateTable.js");
8
8
  const validateTableAlias_js_1 = require("../../../db/validators/validateTableAlias.js");
9
+ const isObject_js_1 = require("../../../helpers/isObject.js");
9
10
  const namespaceColumn_js_1 = require("../../../helpers/namespaceColumn.js");
10
- const typechecks_js_1 = require("../../../helpers/typechecks.js");
11
11
  const constants_js_1 = require("../../constants.js");
12
12
  const similaritySelectSql_js_1 = require("./similaritySelectSql.js");
13
13
  const similarityWhereSql_js_1 = require("./similarityWhereSql.js");
@@ -193,7 +193,7 @@ class SimilarityBuilder extends ConnectedToDB_js_1.default {
193
193
  opsStatement: statementOrValueOrNestedObject,
194
194
  });
195
195
  }
196
- else if ((0, typechecks_js_1.isObject)(statementOrValueOrNestedObject) &&
196
+ else if ((0, isObject_js_1.default)(statementOrValueOrNestedObject) &&
197
197
  !statementOrValueOrNestedObject?.isOpsStatement) {
198
198
  // if it is an object, but not an array, it is likely a nested joins statement,
199
199
  // since joinsWhere objects can take a recursive shape, like:
@@ -319,7 +319,7 @@ function removeJoinAndFromObjectHierarchy(obj) {
319
319
  const result = {};
320
320
  for (const key in obj) {
321
321
  if (Object.prototype.hasOwnProperty.call(obj, key)) {
322
- if ((0, typechecks_js_1.isObject)(obj[key])) {
322
+ if ((0, isObject_js_1.default)(obj[key])) {
323
323
  result[key] = removeJoinAndFromObjectHierarchy(obj[key].and || obj[key]);
324
324
  }
325
325
  else {
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = allNestedObjectKeys;
4
- const typechecks_js_1 = require("./typechecks.js");
4
+ const isObject_js_1 = require("./isObject.js");
5
5
  function allNestedObjectKeys(obj) {
6
6
  return Object.keys(obj).flatMap(key => {
7
7
  const next = obj[key];
8
- if ((0, typechecks_js_1.isObject)(next))
8
+ if ((0, isObject_js_1.default)(next))
9
9
  return [key, allNestedObjectKeys(next)].flat();
10
10
  return [key];
11
11
  });
@@ -5,21 +5,20 @@ exports.default = cloneDeepSafe;
5
5
  const ops_statement_js_1 = require("../ops/ops-statement.js");
6
6
  const CalendarDate_js_1 = require("./CalendarDate.js");
7
7
  const DateTime_js_1 = require("./DateTime.js");
8
+ const isObject_js_1 = require("./isObject.js");
8
9
  const range_js_1 = require("./range.js");
9
- const typechecks_js_1 = require("./typechecks.js");
10
10
  /**
11
- * @internal
11
+ * Accepts any value and returns a valid clone of that object.
12
+ * Dream instances, Query instances, and other special types are
13
+ * automatically cloned using their specialized cloning methods.
12
14
  *
13
- * accepts any value, and will return a valid clone of
14
- * that object. Any dream or query instances passed
15
- * will automatically be cloned using special cloning
16
- * methods.
17
- *
18
- * @param original - the value to clone
19
- * @param includePrimaryKey - Whether or not to copy the primary key when cloning a dream instance
20
- * @returns Either a clone, or else the original value
15
+ * @param original - The value to clone
16
+ * @param unsupportedTypeCloneFunction - Optional function to handle cloning of unsupported types.
17
+ * If not provided, an error will be thrown for unsupported types.
18
+ * @returns Either a clone of the original value, or the original value itself for immutable types
19
+ * @throws {TypeUnsupportedByClone} When an unsupported type is encountered and no unsupportedTypeCloneFunction is provided
21
20
  */
22
- function cloneDeepSafe(original) {
21
+ function cloneDeepSafe(original, unsupportedTypeCloneFunction) {
23
22
  if (original === undefined)
24
23
  return original;
25
24
  if (original === null)
@@ -43,12 +42,14 @@ function cloneDeepSafe(original) {
43
42
  if (original?.isSelectQueryBuilder)
44
43
  return original;
45
44
  if (Array.isArray(original))
46
- return original.map(value => cloneDeepSafe(value));
47
- if ((0, typechecks_js_1.isObject)(original) && original.constructor.name === 'Object') {
45
+ return original.map(value => cloneDeepSafe(value, unsupportedTypeCloneFunction));
46
+ if ((0, isObject_js_1.default)(original) && original.constructor.name === 'Object') {
48
47
  const clone = { ...original };
49
- Object.keys(clone).forEach(key => (clone[key] = cloneDeepSafe(clone[key])));
48
+ Object.keys(clone).forEach(key => (clone[key] = cloneDeepSafe(clone[key], unsupportedTypeCloneFunction)));
50
49
  return clone;
51
50
  }
51
+ if (unsupportedTypeCloneFunction)
52
+ return unsupportedTypeCloneFunction(original);
52
53
  throw new TypeUnsupportedByClone(original);
53
54
  }
54
55
  class TypeUnsupportedByClone extends Error {
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = groupBy;
4
+ function groupBy(arr, toKey) {
5
+ return arr.reduce((acc, val) => {
6
+ const key = toKey(val);
7
+ acc[key] ||= [];
8
+ acc[key].push(val);
9
+ return acc;
10
+ }, {});
11
+ }
@@ -1,15 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isString = isString;
4
- exports.isObject = isObject;
5
- function isString(x) {
6
- return typeof x === 'string' || x instanceof String;
7
- }
3
+ exports.default = isObject;
4
+ // also in Psychic
8
5
  function isObject(x) {
9
6
  if (x === null)
10
7
  return false;
11
- if (isString(x))
12
- return false;
13
8
  if (Array.isArray(x))
14
9
  return false;
15
10
  return typeof x === 'object';
@@ -2,10 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = normalizeString;
4
4
  const index_js_1 = require("../dream-app/index.js");
5
- const typechecks_js_1 = require("./typechecks.js");
6
5
  function normalizeString(val) {
7
6
  const normalizationForm = index_js_1.default.getOrFail().unicodeNormalization;
8
7
  if (normalizationForm === 'none')
9
8
  return val;
10
- return (0, typechecks_js_1.isString)(val) ? val.normalize(normalizationForm) : val;
9
+ return typeof val === 'string' ? val.normalize(normalizationForm) : val;
11
10
  }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = sortObjectByValue;
4
+ const sortBy_js_1 = require("./sortBy.js");
5
+ function sortObjectByValue(obj, valueToCompare = x => x) {
6
+ const tuples = Object.entries(obj);
7
+ const sortedTuples = (0, sortBy_js_1.default)(tuples, (tuple) => {
8
+ const t = tuple[1];
9
+ return valueToCompare(t);
10
+ });
11
+ return sortedTuples.reduce((accumulator, tuple) => {
12
+ ;
13
+ accumulator[tuple[0]] = tuple[1];
14
+ return accumulator;
15
+ }, {});
16
+ }
@@ -6,7 +6,6 @@ const DateTime_js_1 = require("./DateTime.js");
6
6
  const isDatetimeOrDatetimeArrayColumn_js_1 = require("./db/types/isDatetimeOrDatetimeArrayColumn.js");
7
7
  const isTextOrTextArrayColumn_js_1 = require("./db/types/isTextOrTextArrayColumn.js");
8
8
  const normalizeString_js_1 = require("./normalizeString.js");
9
- const typechecks_js_1 = require("./typechecks.js");
10
9
  function sqlAttributes(dream) {
11
10
  const attributes = dream.dirtyAttributes();
12
11
  const dreamClass = dream.constructor;
@@ -42,5 +41,5 @@ function sqlAttributes(dream) {
42
41
  }, {});
43
42
  }
44
43
  function valueToDatetime(val) {
45
- return (0, typechecks_js_1.isString)(val) ? DateTime_js_1.DateTime.fromISO(val, { zone: 'UTC' }) : val;
44
+ return typeof val === 'string' ? DateTime_js_1.DateTime.fromISO(val, { zone: 'UTC' }) : val;
46
45
  }
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = stringCase;
4
4
  const CalendarDate_js_1 = require("./CalendarDate.js");
5
5
  const DateTime_js_1 = require("./DateTime.js");
6
- const typechecks_js_1 = require("./typechecks.js");
6
+ const isObject_js_1 = require("./isObject.js");
7
7
  function stringCase(target, stringCaser) {
8
- if ((0, typechecks_js_1.isString)(target))
8
+ if (typeof target === 'string')
9
9
  return stringCaser(target);
10
10
  return recursiveStringCase(target, stringCaser);
11
11
  }
@@ -14,11 +14,11 @@ function recursiveStringCase(target, stringCaser) {
14
14
  return null;
15
15
  if (target === undefined)
16
16
  return undefined;
17
- if ((0, typechecks_js_1.isString)(target))
17
+ if (typeof target === 'string')
18
18
  return target;
19
19
  if (Array.isArray(target))
20
20
  return target.map(s => recursiveStringCase(s, stringCaser));
21
- if ((0, typechecks_js_1.isObject)(target)) {
21
+ if ((0, isObject_js_1.default)(target)) {
22
22
  if (target instanceof DateTime_js_1.DateTime)
23
23
  return target;
24
24
  if (target instanceof CalendarDate_js_1.default)
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.snakeify = exports.round = exports.range = exports.Range = exports.sharedPathPrefix = exports.relativeDreamPath = exports.dreamPath = exports.pascalize = exports.loadRepl = exports.isEmpty = exports.intersection = exports.hyphenize = exports.globalClassNameFromFullyQualifiedModelName = exports.Env = exports.DreamLogos = exports.DateTime = exports.compact = exports.generateDream = exports.capitalize = exports.camelize = exports.CalendarDate = exports.Benchmark = exports.ValidationError = exports.RecordNotFound = exports.GlobalNameNotSet = exports.CreateOrFindByFailedToCreateAndFind = exports.NonLoadedAssociation = exports.Encrypt = exports.Query = exports.DreamTransaction = exports.openapiShorthandPrimitiveTypes = exports.openapiPrimitiveTypes = exports.DreamConst = exports.Dream = exports.DreamApp = exports.lookupClassByGlobalName = exports.DreamImporter = exports.Decorators = exports.STI = exports.SoftDelete = exports.ReplicaSafe = exports.validateTable = exports.validateColumn = exports.DreamMigrationHelpers = exports.untypedDb = exports.pgErrorType = exports.dreamDbConnections = exports.closeAllDbConnections = exports.DreamCLI = exports.DreamBin = void 0;
4
- exports.ObjectSerializerBuilder = exports.DreamSerializerBuilder = exports.ObjectSerializer = exports.DreamSerializer = exports.SerializerOpenapiRenderer = exports.serializerNameFromFullyQualifiedModelName = exports.isDreamSerializer = exports.inferSerializersFromDreamClassOrViewModelClass = exports.inferSerializerFromDreamOrViewModel = exports.ops = exports.openapiShorthandToOpenapi = exports.maybeNullOpenapiShorthandToOpenapiShorthand = exports.isOpenapiShorthand = exports.uniq = exports.uncapitalize = exports.standardizeFullyQualifiedModelName = exports.sortObjectByKey = exports.sortBy = exports.sort = void 0;
3
+ exports.range = exports.Range = exports.sharedPathPrefix = exports.relativeDreamPath = exports.dreamPath = exports.pascalize = exports.loadRepl = exports.isEmpty = exports.intersection = exports.hyphenize = exports.groupBy = exports.globalClassNameFromFullyQualifiedModelName = exports.Env = exports.DreamLogos = exports.DateTime = exports.compact = exports.cloneDeepSafe = exports.generateDream = exports.capitalize = exports.camelize = exports.CalendarDate = exports.Benchmark = exports.ValidationError = exports.RecordNotFound = exports.GlobalNameNotSet = exports.CreateOrFindByFailedToCreateAndFind = exports.NonLoadedAssociation = exports.Encrypt = exports.Query = exports.DreamTransaction = exports.openapiShorthandPrimitiveTypes = exports.openapiPrimitiveTypes = exports.DreamConst = exports.Dream = exports.DreamApp = exports.lookupClassByGlobalName = exports.DreamImporter = exports.Decorators = exports.STI = exports.SoftDelete = exports.ReplicaSafe = exports.validateTable = exports.validateColumn = exports.DreamMigrationHelpers = exports.untypedDb = exports.pgErrorType = exports.dreamDbConnections = exports.closeAllDbConnections = exports.DreamCLI = exports.DreamBin = void 0;
4
+ exports.ObjectSerializerBuilder = exports.DreamSerializerBuilder = exports.ObjectSerializer = exports.DreamSerializer = exports.serializerNameFromFullyQualifiedModelName = exports.isDreamSerializer = exports.inferSerializersFromDreamClassOrViewModelClass = exports.inferSerializerFromDreamOrViewModel = exports.ops = exports.uniq = exports.uncapitalize = exports.expandStiClasses = exports.standardizeFullyQualifiedModelName = exports.sortObjectByValue = exports.sortObjectByKey = exports.sortBy = exports.sort = exports.snakeify = exports.round = void 0;
5
5
  var index_js_1 = require("./bin/index.js");
6
6
  Object.defineProperty(exports, "DreamBin", { enumerable: true, get: function () { return index_js_1.default; } });
7
7
  var index_js_2 = require("./cli/index.js");
@@ -65,6 +65,8 @@ var capitalize_js_1 = require("./helpers/capitalize.js");
65
65
  Object.defineProperty(exports, "capitalize", { enumerable: true, get: function () { return capitalize_js_1.default; } });
66
66
  var generateDream_js_1 = require("./helpers/cli/generateDream.js");
67
67
  Object.defineProperty(exports, "generateDream", { enumerable: true, get: function () { return generateDream_js_1.default; } });
68
+ var cloneDeepSafe_js_1 = require("./helpers/cloneDeepSafe.js");
69
+ Object.defineProperty(exports, "cloneDeepSafe", { enumerable: true, get: function () { return cloneDeepSafe_js_1.default; } });
68
70
  var compact_js_1 = require("./helpers/compact.js");
69
71
  Object.defineProperty(exports, "compact", { enumerable: true, get: function () { return compact_js_1.default; } });
70
72
  var DateTime_js_1 = require("./helpers/DateTime.js");
@@ -75,6 +77,8 @@ var Env_js_1 = require("./helpers/Env.js");
75
77
  Object.defineProperty(exports, "Env", { enumerable: true, get: function () { return Env_js_1.default; } });
76
78
  var globalClassNameFromFullyQualifiedModelName_js_1 = require("./helpers/globalClassNameFromFullyQualifiedModelName.js");
77
79
  Object.defineProperty(exports, "globalClassNameFromFullyQualifiedModelName", { enumerable: true, get: function () { return globalClassNameFromFullyQualifiedModelName_js_1.default; } });
80
+ var groupBy_js_1 = require("./helpers/groupBy.js");
81
+ Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_js_1.default; } });
78
82
  var hyphenize_js_1 = require("./helpers/hyphenize.js");
79
83
  Object.defineProperty(exports, "hyphenize", { enumerable: true, get: function () { return hyphenize_js_1.default; } });
80
84
  var intersection_js_1 = require("./helpers/intersection.js");
@@ -104,18 +108,16 @@ var sortBy_js_1 = require("./helpers/sortBy.js");
104
108
  Object.defineProperty(exports, "sortBy", { enumerable: true, get: function () { return sortBy_js_1.default; } });
105
109
  var sortObjectByKey_js_1 = require("./helpers/sortObjectByKey.js");
106
110
  Object.defineProperty(exports, "sortObjectByKey", { enumerable: true, get: function () { return sortObjectByKey_js_1.default; } });
111
+ var sortObjectByValue_js_1 = require("./helpers/sortObjectByValue.js");
112
+ Object.defineProperty(exports, "sortObjectByValue", { enumerable: true, get: function () { return sortObjectByValue_js_1.default; } });
107
113
  var standardizeFullyQualifiedModelName_js_1 = require("./helpers/standardizeFullyQualifiedModelName.js");
108
114
  Object.defineProperty(exports, "standardizeFullyQualifiedModelName", { enumerable: true, get: function () { return standardizeFullyQualifiedModelName_js_1.default; } });
115
+ var expandStiClasses_js_1 = require("./helpers/sti/expandStiClasses.js");
116
+ Object.defineProperty(exports, "expandStiClasses", { enumerable: true, get: function () { return expandStiClasses_js_1.default; } });
109
117
  var uncapitalize_js_1 = require("./helpers/uncapitalize.js");
110
118
  Object.defineProperty(exports, "uncapitalize", { enumerable: true, get: function () { return uncapitalize_js_1.default; } });
111
119
  var uniq_js_1 = require("./helpers/uniq.js");
112
120
  Object.defineProperty(exports, "uniq", { enumerable: true, get: function () { return uniq_js_1.default; } });
113
- var isOpenapiShorthand_js_1 = require("./openapi/isOpenapiShorthand.js");
114
- Object.defineProperty(exports, "isOpenapiShorthand", { enumerable: true, get: function () { return isOpenapiShorthand_js_1.default; } });
115
- var maybeNullOpenapiShorthandToOpenapiShorthand_js_1 = require("./openapi/maybeNullOpenapiShorthandToOpenapiShorthand.js");
116
- Object.defineProperty(exports, "maybeNullOpenapiShorthandToOpenapiShorthand", { enumerable: true, get: function () { return maybeNullOpenapiShorthandToOpenapiShorthand_js_1.default; } });
117
- var openapiShorthandToOpenapi_js_1 = require("./openapi/openapiShorthandToOpenapi.js");
118
- Object.defineProperty(exports, "openapiShorthandToOpenapi", { enumerable: true, get: function () { return openapiShorthandToOpenapi_js_1.default; } });
119
121
  var index_js_6 = require("./ops/index.js");
120
122
  Object.defineProperty(exports, "ops", { enumerable: true, get: function () { return index_js_6.default; } });
121
123
  var inferSerializerFromDreamOrViewModel_js_1 = require("./serializer/helpers/inferSerializerFromDreamOrViewModel.js");
@@ -125,8 +127,6 @@ var isDreamSerializer_js_1 = require("./serializer/helpers/isDreamSerializer.js"
125
127
  Object.defineProperty(exports, "isDreamSerializer", { enumerable: true, get: function () { return isDreamSerializer_js_1.default; } });
126
128
  var serializerNameFromFullyQualifiedModelName_js_1 = require("./serializer/helpers/serializerNameFromFullyQualifiedModelName.js");
127
129
  Object.defineProperty(exports, "serializerNameFromFullyQualifiedModelName", { enumerable: true, get: function () { return serializerNameFromFullyQualifiedModelName_js_1.default; } });
128
- var SerializerOpenapiRenderer_js_1 = require("./serializer/SerializerOpenapiRenderer.js");
129
- Object.defineProperty(exports, "SerializerOpenapiRenderer", { enumerable: true, get: function () { return SerializerOpenapiRenderer_js_1.default; } });
130
130
  var DreamSerializer_js_1 = require("./serializer/DreamSerializer.js");
131
131
  Object.defineProperty(exports, "DreamSerializer", { enumerable: true, get: function () { return DreamSerializer_js_1.default; } });
132
132
  var ObjectSerializer_js_1 = require("./serializer/ObjectSerializer.js");