@rvoh/dream 0.35.1 → 0.35.2

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 (181) hide show
  1. package/dist/cjs/src/Dream.js +1 -12
  2. package/dist/cjs/src/bin/helpers/sync.js +2 -3
  3. package/dist/cjs/src/bin/index.js +17 -17
  4. package/dist/cjs/src/db/DreamDbConnection.js +10 -16
  5. package/dist/cjs/src/dream-application/index.js +22 -0
  6. package/dist/cjs/src/helpers/db/createDb.js +3 -3
  7. package/dist/cjs/src/helpers/db/dropDb.js +8 -5
  8. package/dist/esm/src/Dream.js +1 -12
  9. package/dist/esm/src/bin/helpers/sync.js +2 -3
  10. package/dist/esm/src/bin/index.js +17 -17
  11. package/dist/esm/src/db/DreamDbConnection.js +10 -16
  12. package/dist/esm/src/dream-application/index.js +22 -0
  13. package/dist/esm/src/helpers/db/createDb.js +3 -3
  14. package/dist/esm/src/helpers/db/dropDb.js +8 -5
  15. package/dist/types/src/Dream.d.ts +2 -2
  16. package/dist/types/src/db/DreamDbConnection.d.ts +1 -0
  17. package/dist/types/src/dream/Query.d.ts +2 -2
  18. package/dist/types/src/dream-application/index.d.ts +5 -0
  19. package/dist/types/src/types/query.d.ts +38 -0
  20. package/docs/assets/icons.js +1 -1
  21. package/docs/assets/icons.svg +1 -1
  22. package/docs/assets/main.js +1 -1
  23. package/docs/assets/navigation.js +1 -1
  24. package/docs/assets/search.js +1 -1
  25. package/docs/assets/style.css +66 -21
  26. package/docs/classes/Benchmark.html +2 -2
  27. package/docs/classes/CalendarDate.html +2 -2
  28. package/docs/classes/CreateOrFindByFailedToCreateAndFind.html +6 -5
  29. package/docs/classes/Decorators.html +19 -19
  30. package/docs/classes/Dream.html +132 -132
  31. package/docs/classes/DreamApplication.html +9 -5
  32. package/docs/classes/DreamBin.html +2 -2
  33. package/docs/classes/DreamCLI.html +4 -4
  34. package/docs/classes/DreamImporter.html +2 -2
  35. package/docs/classes/DreamLogos.html +2 -2
  36. package/docs/classes/DreamMigrationHelpers.html +7 -7
  37. package/docs/classes/DreamSerializer.html +2 -2
  38. package/docs/classes/DreamTransaction.html +2 -2
  39. package/docs/classes/Encrypt.html +2 -2
  40. package/docs/classes/Env.html +2 -2
  41. package/docs/classes/GlobalNameNotSet.html +6 -5
  42. package/docs/classes/NonLoadedAssociation.html +6 -5
  43. package/docs/classes/Query.html +51 -51
  44. package/docs/classes/Range.html +2 -2
  45. package/docs/classes/RecordNotFound.html +6 -5
  46. package/docs/classes/ValidationError.html +6 -5
  47. package/docs/functions/Attribute.html +1 -1
  48. package/docs/functions/RendersMany.html +1 -1
  49. package/docs/functions/RendersOne.html +1 -1
  50. package/docs/functions/ReplicaSafe.html +1 -1
  51. package/docs/functions/STI.html +1 -1
  52. package/docs/functions/SoftDelete.html +1 -1
  53. package/docs/functions/camelize.html +1 -1
  54. package/docs/functions/capitalize.html +1 -1
  55. package/docs/functions/closeAllDbConnections.html +1 -1
  56. package/docs/functions/compact.html +1 -1
  57. package/docs/functions/debug.html +1 -1
  58. package/docs/functions/dreamDbConnections.html +1 -1
  59. package/docs/functions/dreamPath.html +1 -1
  60. package/docs/functions/generateDream.html +1 -1
  61. package/docs/functions/globalClassNameFromFullyQualifiedModelName.html +1 -1
  62. package/docs/functions/hyphenize.html +1 -1
  63. package/docs/functions/inferSerializerFromDreamClassOrViewModelClass.html +1 -1
  64. package/docs/functions/inferSerializerFromDreamOrViewModel.html +1 -1
  65. package/docs/functions/isEmpty.html +1 -1
  66. package/docs/functions/loadRepl.html +1 -1
  67. package/docs/functions/lookupClassByGlobalName.html +1 -1
  68. package/docs/functions/pascalize.html +1 -1
  69. package/docs/functions/pgErrorType.html +1 -1
  70. package/docs/functions/range-1.html +1 -1
  71. package/docs/functions/relativeDreamPath.html +1 -1
  72. package/docs/functions/round.html +1 -1
  73. package/docs/functions/serializerNameFromFullyQualifiedModelName.html +1 -1
  74. package/docs/functions/sharedPathPrefix.html +1 -1
  75. package/docs/functions/snakeify.html +1 -1
  76. package/docs/functions/sort.html +1 -1
  77. package/docs/functions/sortBy.html +1 -1
  78. package/docs/functions/standardizeFullyQualifiedModelName.html +1 -1
  79. package/docs/functions/uncapitalize.html +1 -1
  80. package/docs/functions/uniq.html +1 -1
  81. package/docs/functions/untypedDb.html +1 -1
  82. package/docs/functions/validateColumn.html +1 -1
  83. package/docs/functions/validateTable.html +1 -1
  84. package/docs/index.html +7 -7
  85. package/docs/interfaces/AttributeStatement.html +2 -2
  86. package/docs/interfaces/DecoratorContext.html +2 -2
  87. package/docs/interfaces/DreamApplicationInitOptions.html +2 -2
  88. package/docs/interfaces/DreamApplicationOpts.html +2 -2
  89. package/docs/interfaces/DreamSerializerAssociationStatement.html +2 -2
  90. package/docs/interfaces/EncryptOptions.html +2 -2
  91. package/docs/interfaces/OpenapiSchemaProperties.html +1 -1
  92. package/docs/interfaces/OpenapiSchemaPropertiesShorthand.html +1 -1
  93. package/docs/interfaces/OpenapiTypeFieldObject.html +1 -1
  94. package/docs/modules.html +8 -8
  95. package/docs/types/Camelized.html +1 -1
  96. package/docs/types/CommonOpenapiSchemaObjectFields.html +1 -1
  97. package/docs/types/DateTime.html +1 -1
  98. package/docs/types/DbConnectionType.html +1 -1
  99. package/docs/types/DreamAssociationMetadata.html +1 -1
  100. package/docs/types/DreamAttributes.html +1 -1
  101. package/docs/types/DreamClassColumn.html +1 -1
  102. package/docs/types/DreamColumn.html +1 -1
  103. package/docs/types/DreamColumnNames.html +1 -1
  104. package/docs/types/DreamLogLevel.html +1 -1
  105. package/docs/types/DreamLogger.html +1 -1
  106. package/docs/types/DreamOrViewModelSerializerKey.html +1 -1
  107. package/docs/types/DreamParamSafeAttributes.html +1 -1
  108. package/docs/types/DreamParamSafeColumnNames.html +1 -1
  109. package/docs/types/DreamSerializerKey.html +1 -1
  110. package/docs/types/DreamSerializers.html +1 -1
  111. package/docs/types/DreamTableSchema.html +1 -1
  112. package/docs/types/DreamVirtualColumns.html +1 -1
  113. package/docs/types/EncryptAlgorithm.html +1 -1
  114. package/docs/types/Hyphenized.html +1 -1
  115. package/docs/types/IdType.html +1 -1
  116. package/docs/types/OpenapiAllTypes.html +1 -1
  117. package/docs/types/OpenapiFormats.html +1 -1
  118. package/docs/types/OpenapiNumberFormats.html +1 -1
  119. package/docs/types/OpenapiPrimitiveTypes.html +1 -1
  120. package/docs/types/OpenapiSchemaArray.html +1 -1
  121. package/docs/types/OpenapiSchemaArrayShorthand.html +1 -1
  122. package/docs/types/OpenapiSchemaBase.html +1 -1
  123. package/docs/types/OpenapiSchemaBody.html +1 -1
  124. package/docs/types/OpenapiSchemaBodyShorthand.html +1 -1
  125. package/docs/types/OpenapiSchemaCommonFields.html +1 -1
  126. package/docs/types/OpenapiSchemaExpressionAllOf.html +1 -1
  127. package/docs/types/OpenapiSchemaExpressionAnyOf.html +1 -1
  128. package/docs/types/OpenapiSchemaExpressionOneOf.html +1 -1
  129. package/docs/types/OpenapiSchemaExpressionRef.html +1 -1
  130. package/docs/types/OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
  131. package/docs/types/OpenapiSchemaInteger.html +1 -1
  132. package/docs/types/OpenapiSchemaNull.html +1 -1
  133. package/docs/types/OpenapiSchemaNumber.html +1 -1
  134. package/docs/types/OpenapiSchemaObject.html +1 -1
  135. package/docs/types/OpenapiSchemaObjectAllOf.html +1 -1
  136. package/docs/types/OpenapiSchemaObjectAllOfShorthand.html +1 -1
  137. package/docs/types/OpenapiSchemaObjectAnyOf.html +1 -1
  138. package/docs/types/OpenapiSchemaObjectAnyOfShorthand.html +1 -1
  139. package/docs/types/OpenapiSchemaObjectBase.html +1 -1
  140. package/docs/types/OpenapiSchemaObjectBaseShorthand.html +1 -1
  141. package/docs/types/OpenapiSchemaObjectOneOf.html +1 -1
  142. package/docs/types/OpenapiSchemaObjectOneOfShorthand.html +1 -1
  143. package/docs/types/OpenapiSchemaObjectShorthand.html +1 -1
  144. package/docs/types/OpenapiSchemaPartialSegment.html +1 -1
  145. package/docs/types/OpenapiSchemaPrimitiveGeneric.html +1 -1
  146. package/docs/types/OpenapiSchemaShorthandExpressionAllOf.html +1 -1
  147. package/docs/types/OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
  148. package/docs/types/OpenapiSchemaShorthandExpressionOneOf.html +1 -1
  149. package/docs/types/OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
  150. package/docs/types/OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
  151. package/docs/types/OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
  152. package/docs/types/OpenapiSchemaString.html +1 -1
  153. package/docs/types/OpenapiShorthandAllTypes.html +1 -1
  154. package/docs/types/OpenapiShorthandPrimitiveTypes.html +1 -1
  155. package/docs/types/OpenapiTypeField.html +1 -1
  156. package/docs/types/Pascalized.html +1 -1
  157. package/docs/types/PrimaryKeyType.html +1 -1
  158. package/docs/types/RoundingPrecision.html +1 -1
  159. package/docs/types/SerializableClassOrSerializerCallback.html +1 -1
  160. package/docs/types/SerializableDreamClassOrViewModelClass.html +1 -1
  161. package/docs/types/SerializableDreamOrViewModel.html +1 -1
  162. package/docs/types/SerializableTypes.html +1 -1
  163. package/docs/types/Snakeified.html +1 -1
  164. package/docs/types/Timestamp.html +1 -1
  165. package/docs/types/UpdateableAssociationProperties.html +1 -1
  166. package/docs/types/UpdateableProperties.html +1 -1
  167. package/docs/types/ValidationType.html +1 -1
  168. package/docs/types/ViewModelSerializerKey.html +1 -1
  169. package/docs/types/WhereStatementForDream.html +1 -1
  170. package/docs/types/WhereStatementForDreamClass.html +1 -1
  171. package/docs/variables/DateTime-1.html +1 -1
  172. package/docs/variables/DreamConst.html +1 -1
  173. package/docs/variables/TRIGRAM_OPERATORS.html +1 -1
  174. package/docs/variables/openapiPrimitiveTypes-1.html +1 -1
  175. package/docs/variables/openapiShorthandPrimitiveTypes-1.html +1 -1
  176. package/docs/variables/ops.html +1 -1
  177. package/docs/variables/primaryKeyTypes.html +1 -1
  178. package/package.json +3 -3
  179. package/dist/cjs/src/db/ConnectionConfRetriever.js +0 -22
  180. package/dist/esm/src/db/ConnectionConfRetriever.js +0 -19
  181. package/dist/types/src/db/ConnectionConfRetriever.d.ts +0 -6
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_js_1 = require("../dream-application/index.js");
4
- const EnvInternal_js_1 = require("../helpers/EnvInternal.js");
5
- class ConnectionConfRetriever {
6
- getConnectionConf(connection) {
7
- const dreamApplication = index_js_1.default.getOrFail();
8
- const conf = dreamApplication.dbCredentials?.[connection] || dreamApplication.dbCredentials?.primary;
9
- if (!conf)
10
- throw new Error(`
11
- Cannot find a connection config given the following connection and node environment:
12
- connection: ${connection}
13
- NODE_ENV: ${EnvInternal_js_1.default.nodeEnv}
14
- `);
15
- return conf;
16
- }
17
- hasReplicaConfig() {
18
- const dreamApplication = index_js_1.default.getOrFail();
19
- return !!dreamApplication.dbCredentials.replica;
20
- }
21
- }
22
- exports.default = ConnectionConfRetriever;
@@ -1,19 +0,0 @@
1
- import DreamApplication from '../dream-application/index.js';
2
- import EnvInternal from '../helpers/EnvInternal.js';
3
- export default class ConnectionConfRetriever {
4
- getConnectionConf(connection) {
5
- const dreamApplication = DreamApplication.getOrFail();
6
- const conf = dreamApplication.dbCredentials?.[connection] || dreamApplication.dbCredentials?.primary;
7
- if (!conf)
8
- throw new Error(`
9
- Cannot find a connection config given the following connection and node environment:
10
- connection: ${connection}
11
- NODE_ENV: ${EnvInternal.nodeEnv}
12
- `);
13
- return conf;
14
- }
15
- hasReplicaConfig() {
16
- const dreamApplication = DreamApplication.getOrFail();
17
- return !!dreamApplication.dbCredentials.replica;
18
- }
19
- }
@@ -1,6 +0,0 @@
1
- import { SingleDbCredential } from '../dream-application/index.js';
2
- import { DbConnectionType } from '../types/db.js';
3
- export default class ConnectionConfRetriever {
4
- getConnectionConf(connection: DbConnectionType): SingleDbCredential;
5
- hasReplicaConfig(): boolean;
6
- }