@rvoh/dream 0.31.1 → 0.31.3

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 (221) hide show
  1. package/README.md +17 -17
  2. package/dist/cjs/src/Dream.js +15 -15
  3. package/dist/cjs/src/bin/helpers/sync.js +9 -2
  4. package/dist/cjs/src/bin/index.js +18 -19
  5. package/dist/cjs/src/cli/logger/DreamCliLogger.js +12 -46
  6. package/dist/cjs/src/cli/logger/loggable/DreamCliLoggable.js +1 -3
  7. package/dist/cjs/src/cli/logger/loggable/DreamCliLoggableText.js +2 -2
  8. package/dist/cjs/src/decorators/Decorators.js +28 -28
  9. package/dist/cjs/src/decorators/field/association/BelongsTo.js +2 -2
  10. package/dist/cjs/src/decorators/field/association/HasMany.js +2 -2
  11. package/dist/cjs/src/decorators/field/association/HasOne.js +2 -2
  12. package/dist/cjs/src/decorators/field/lifecycle/AfterCreateCommit.js +1 -1
  13. package/dist/cjs/src/decorators/field/lifecycle/AfterDestroyCommit.js +1 -1
  14. package/dist/cjs/src/decorators/field/lifecycle/AfterSaveCommit.js +1 -1
  15. package/dist/cjs/src/decorators/field/lifecycle/AfterUpdateCommit.js +1 -1
  16. package/dist/cjs/src/decorators/field/validation/Validates.js +1 -1
  17. package/dist/cjs/src/dream/DreamClassTransactionBuilder.js +2 -2
  18. package/dist/cjs/src/dream/Query.js +2 -2
  19. package/dist/cjs/src/helpers/cli/generateDreamContent.js +2 -2
  20. package/dist/cjs/src/helpers/db/runMigration.js +5 -5
  21. package/dist/cjs/src/helpers/sspawn.js +29 -3
  22. package/dist/cjs/src/serializer/decorators/associations/RendersMany.js +2 -2
  23. package/dist/cjs/src/serializer/decorators/associations/RendersOne.js +2 -2
  24. package/dist/esm/src/Dream.js +15 -15
  25. package/dist/esm/src/bin/helpers/sync.js +9 -2
  26. package/dist/esm/src/bin/index.js +18 -19
  27. package/dist/esm/src/cli/logger/DreamCliLogger.js +12 -46
  28. package/dist/esm/src/cli/logger/loggable/DreamCliLoggable.js +1 -3
  29. package/dist/esm/src/cli/logger/loggable/DreamCliLoggableText.js +2 -2
  30. package/dist/esm/src/decorators/Decorators.js +28 -28
  31. package/dist/esm/src/decorators/field/association/BelongsTo.js +2 -2
  32. package/dist/esm/src/decorators/field/association/HasMany.js +2 -2
  33. package/dist/esm/src/decorators/field/association/HasOne.js +2 -2
  34. package/dist/esm/src/decorators/field/lifecycle/AfterCreateCommit.js +1 -1
  35. package/dist/esm/src/decorators/field/lifecycle/AfterDestroyCommit.js +1 -1
  36. package/dist/esm/src/decorators/field/lifecycle/AfterSaveCommit.js +1 -1
  37. package/dist/esm/src/decorators/field/lifecycle/AfterUpdateCommit.js +1 -1
  38. package/dist/esm/src/decorators/field/validation/Validates.js +1 -1
  39. package/dist/esm/src/dream/DreamClassTransactionBuilder.js +2 -2
  40. package/dist/esm/src/dream/Query.js +2 -2
  41. package/dist/esm/src/helpers/cli/generateDreamContent.js +2 -2
  42. package/dist/esm/src/helpers/db/runMigration.js +5 -5
  43. package/dist/esm/src/helpers/sspawn.js +29 -3
  44. package/dist/esm/src/serializer/decorators/associations/RendersMany.js +2 -2
  45. package/dist/esm/src/serializer/decorators/associations/RendersOne.js +2 -2
  46. package/dist/types/src/Dream.d.ts +15 -15
  47. package/dist/types/src/cli/logger/DreamCliLogger.d.ts +4 -8
  48. package/dist/types/src/cli/logger/loggable/DreamCliLoggable.d.ts +1 -3
  49. package/dist/types/src/cli/logger/loggable/DreamCliLoggableText.d.ts +1 -2
  50. package/dist/types/src/decorators/Decorators.d.ts +22 -22
  51. package/dist/types/src/decorators/field/lifecycle/AfterCreateCommit.d.ts +1 -1
  52. package/dist/types/src/decorators/field/lifecycle/AfterDestroyCommit.d.ts +1 -1
  53. package/dist/types/src/decorators/field/lifecycle/AfterSaveCommit.d.ts +1 -1
  54. package/dist/types/src/decorators/field/lifecycle/AfterUpdateCommit.d.ts +1 -1
  55. package/dist/types/src/dream/DreamClassTransactionBuilder.d.ts +2 -2
  56. package/dist/types/src/dream/Query.d.ts +2 -2
  57. package/dist/types/src/helpers/sspawn.d.ts +6 -2
  58. package/dist/types/src/serializer/decorators/associations/RendersMany.d.ts +2 -2
  59. package/dist/types/src/serializer/decorators/associations/RendersOne.d.ts +2 -2
  60. package/dist/types/src/types/logger.d.ts +1 -5
  61. package/docs/classes/Benchmark.html +2 -2
  62. package/docs/classes/CalendarDate.html +2 -2
  63. package/docs/classes/CreateOrFindByFailedToCreateAndFind.html +3 -3
  64. package/docs/classes/Decorators.html +38 -38
  65. package/docs/classes/Dream.html +138 -138
  66. package/docs/classes/DreamApplication.html +4 -4
  67. package/docs/classes/DreamBin.html +2 -2
  68. package/docs/classes/DreamCLI.html +4 -4
  69. package/docs/classes/DreamDbConnection.html +2 -2
  70. package/docs/classes/DreamGlam.html +2 -2
  71. package/docs/classes/DreamImporter.html +2 -2
  72. package/docs/classes/DreamMigrationHelpers.html +7 -7
  73. package/docs/classes/DreamSerializer.html +2 -2
  74. package/docs/classes/DreamTransaction.html +2 -2
  75. package/docs/classes/Encrypt.html +2 -2
  76. package/docs/classes/Env.html +2 -2
  77. package/docs/classes/GlobalNameNotSet.html +3 -3
  78. package/docs/classes/NonLoadedAssociation.html +3 -3
  79. package/docs/classes/Query.html +51 -51
  80. package/docs/classes/Range.html +2 -2
  81. package/docs/classes/RecordNotFound.html +3 -3
  82. package/docs/classes/ValidationError.html +3 -3
  83. package/docs/functions/Attribute.html +1 -1
  84. package/docs/functions/RendersMany.html +2 -2
  85. package/docs/functions/RendersOne.html +2 -2
  86. package/docs/functions/ReplicaSafe.html +1 -1
  87. package/docs/functions/STI.html +1 -1
  88. package/docs/functions/SoftDelete.html +1 -1
  89. package/docs/functions/camelize.html +1 -1
  90. package/docs/functions/capitalize.html +1 -1
  91. package/docs/functions/closeAllDbConnections.html +1 -1
  92. package/docs/functions/compact.html +1 -1
  93. package/docs/functions/db.html +1 -1
  94. package/docs/functions/debug.html +1 -1
  95. package/docs/functions/dreamDbConnections.html +1 -1
  96. package/docs/functions/dreamPath.html +1 -1
  97. package/docs/functions/generateDream.html +1 -1
  98. package/docs/functions/globalClassNameFromFullyQualifiedModelName.html +1 -1
  99. package/docs/functions/hyphenize.html +1 -1
  100. package/docs/functions/inferSerializerFromDreamClassOrViewModelClass.html +1 -1
  101. package/docs/functions/inferSerializerFromDreamOrViewModel.html +1 -1
  102. package/docs/functions/isEmpty.html +1 -1
  103. package/docs/functions/loadRepl.html +1 -1
  104. package/docs/functions/lookupClassByGlobalName.html +1 -1
  105. package/docs/functions/pascalize.html +1 -1
  106. package/docs/functions/pgErrorType.html +1 -1
  107. package/docs/functions/range-1.html +1 -1
  108. package/docs/functions/relativeDreamPath.html +1 -1
  109. package/docs/functions/round.html +1 -1
  110. package/docs/functions/serializerNameFromFullyQualifiedModelName.html +1 -1
  111. package/docs/functions/sharedPathPrefix.html +1 -1
  112. package/docs/functions/snakeify.html +1 -1
  113. package/docs/functions/sort.html +1 -1
  114. package/docs/functions/sortBy.html +1 -1
  115. package/docs/functions/standardizeFullyQualifiedModelName.html +1 -1
  116. package/docs/functions/uncapitalize.html +1 -1
  117. package/docs/functions/uniq.html +1 -1
  118. package/docs/functions/validateColumn.html +1 -1
  119. package/docs/functions/validateTable.html +1 -1
  120. package/docs/index.html +5 -5
  121. package/docs/interfaces/AttributeStatement.html +2 -2
  122. package/docs/interfaces/DecoratorContext.html +2 -2
  123. package/docs/interfaces/DreamApplicationInitOptions.html +2 -2
  124. package/docs/interfaces/DreamApplicationOpts.html +2 -2
  125. package/docs/interfaces/DreamSerializerAssociationStatement.html +2 -2
  126. package/docs/interfaces/EncryptOptions.html +2 -2
  127. package/docs/interfaces/OpenapiSchemaProperties.html +1 -1
  128. package/docs/interfaces/OpenapiSchemaPropertiesShorthand.html +1 -1
  129. package/docs/interfaces/OpenapiTypeFieldObject.html +1 -1
  130. package/docs/types/Camelized.html +1 -1
  131. package/docs/types/CommonOpenapiSchemaObjectFields.html +1 -1
  132. package/docs/types/DateTime.html +1 -1
  133. package/docs/types/DreamAssociationMetadata.html +1 -1
  134. package/docs/types/DreamAttributes.html +1 -1
  135. package/docs/types/DreamClassColumn.html +1 -1
  136. package/docs/types/DreamColumn.html +1 -1
  137. package/docs/types/DreamColumnNames.html +1 -1
  138. package/docs/types/DreamLogLevel.html +1 -1
  139. package/docs/types/DreamLogger.html +1 -1
  140. package/docs/types/DreamOrViewModelSerializerKey.html +1 -1
  141. package/docs/types/DreamParamSafeAttributes.html +1 -1
  142. package/docs/types/DreamParamSafeColumnNames.html +1 -1
  143. package/docs/types/DreamSerializerKey.html +1 -1
  144. package/docs/types/DreamSerializers.html +1 -1
  145. package/docs/types/DreamTableSchema.html +1 -1
  146. package/docs/types/DreamVirtualColumns.html +1 -1
  147. package/docs/types/EncryptAlgorithm.html +1 -1
  148. package/docs/types/Hyphenized.html +1 -1
  149. package/docs/types/IdType.html +1 -1
  150. package/docs/types/OpenapiAllTypes.html +1 -1
  151. package/docs/types/OpenapiFormats.html +1 -1
  152. package/docs/types/OpenapiNumberFormats.html +1 -1
  153. package/docs/types/OpenapiPrimitiveTypes.html +1 -1
  154. package/docs/types/OpenapiSchemaArray.html +1 -1
  155. package/docs/types/OpenapiSchemaArrayShorthand.html +1 -1
  156. package/docs/types/OpenapiSchemaBase.html +1 -1
  157. package/docs/types/OpenapiSchemaBody.html +1 -1
  158. package/docs/types/OpenapiSchemaBodyShorthand.html +1 -1
  159. package/docs/types/OpenapiSchemaCommonFields.html +1 -1
  160. package/docs/types/OpenapiSchemaExpressionAllOf.html +1 -1
  161. package/docs/types/OpenapiSchemaExpressionAnyOf.html +1 -1
  162. package/docs/types/OpenapiSchemaExpressionOneOf.html +1 -1
  163. package/docs/types/OpenapiSchemaExpressionRef.html +1 -1
  164. package/docs/types/OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
  165. package/docs/types/OpenapiSchemaInteger.html +1 -1
  166. package/docs/types/OpenapiSchemaNull.html +1 -1
  167. package/docs/types/OpenapiSchemaNumber.html +1 -1
  168. package/docs/types/OpenapiSchemaObject.html +1 -1
  169. package/docs/types/OpenapiSchemaObjectAllOf.html +1 -1
  170. package/docs/types/OpenapiSchemaObjectAllOfShorthand.html +1 -1
  171. package/docs/types/OpenapiSchemaObjectAnyOf.html +1 -1
  172. package/docs/types/OpenapiSchemaObjectAnyOfShorthand.html +1 -1
  173. package/docs/types/OpenapiSchemaObjectBase.html +1 -1
  174. package/docs/types/OpenapiSchemaObjectBaseShorthand.html +1 -1
  175. package/docs/types/OpenapiSchemaObjectOneOf.html +1 -1
  176. package/docs/types/OpenapiSchemaObjectOneOfShorthand.html +1 -1
  177. package/docs/types/OpenapiSchemaObjectShorthand.html +1 -1
  178. package/docs/types/OpenapiSchemaPartialSegment.html +1 -1
  179. package/docs/types/OpenapiSchemaPrimitiveGeneric.html +1 -1
  180. package/docs/types/OpenapiSchemaShorthandExpressionAllOf.html +1 -1
  181. package/docs/types/OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
  182. package/docs/types/OpenapiSchemaShorthandExpressionOneOf.html +1 -1
  183. package/docs/types/OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
  184. package/docs/types/OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
  185. package/docs/types/OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
  186. package/docs/types/OpenapiSchemaString.html +1 -1
  187. package/docs/types/OpenapiShorthandAllTypes.html +1 -1
  188. package/docs/types/OpenapiShorthandPrimitiveTypes.html +1 -1
  189. package/docs/types/OpenapiTypeField.html +1 -1
  190. package/docs/types/Pascalized.html +1 -1
  191. package/docs/types/PrimaryKeyType.html +1 -1
  192. package/docs/types/RoundingPrecision.html +1 -1
  193. package/docs/types/SerializableClassOrSerializerCallback.html +1 -1
  194. package/docs/types/SerializableDreamClassOrViewModelClass.html +1 -1
  195. package/docs/types/SerializableDreamOrViewModel.html +1 -1
  196. package/docs/types/SerializableTypes.html +1 -1
  197. package/docs/types/Snakeified.html +1 -1
  198. package/docs/types/Timestamp.html +1 -1
  199. package/docs/types/UpdateableAssociationProperties.html +1 -1
  200. package/docs/types/UpdateableProperties.html +1 -1
  201. package/docs/types/ValidationType.html +1 -1
  202. package/docs/types/ViewModelSerializerKey.html +1 -1
  203. package/docs/types/WhereStatementForDream.html +1 -1
  204. package/docs/types/WhereStatementForDreamClass.html +1 -1
  205. package/docs/variables/DateTime-1.html +1 -1
  206. package/docs/variables/DreamConst.html +1 -1
  207. package/docs/variables/TRIGRAM_OPERATORS.html +1 -1
  208. package/docs/variables/openapiPrimitiveTypes-1.html +1 -1
  209. package/docs/variables/openapiShorthandPrimitiveTypes-1.html +1 -1
  210. package/docs/variables/ops.html +1 -1
  211. package/docs/variables/primaryKeyTypes.html +1 -1
  212. package/package.json +1 -2
  213. package/dist/cjs/src/cli/logger/helpers/createSpinner.js +0 -14
  214. package/dist/cjs/src/cli/logger/loggable/DreamCliLoggableSpinner.js +0 -31
  215. package/dist/cjs/src/cli/logger/loggable/spinners.js +0 -1185
  216. package/dist/esm/src/cli/logger/helpers/createSpinner.js +0 -11
  217. package/dist/esm/src/cli/logger/loggable/DreamCliLoggableSpinner.js +0 -28
  218. package/dist/esm/src/cli/logger/loggable/spinners.js +0 -1183
  219. package/dist/types/src/cli/logger/helpers/createSpinner.d.ts +0 -2
  220. package/dist/types/src/cli/logger/loggable/DreamCliLoggableSpinner.d.ts +0 -21
  221. package/dist/types/src/cli/logger/loggable/spinners.d.ts +0 -355
@@ -1,11 +0,0 @@
1
- import yoctoSpinner from 'yocto-spinner';
2
- import spinners from '../loggable/spinners.js';
3
- export default function createSpinner(text, spinnerKey = 'noise') {
4
- return yoctoSpinner({
5
- text,
6
- spinner: {
7
- interval: spinners[spinnerKey].interval,
8
- frames: [...spinners[spinnerKey].frames],
9
- },
10
- }).start();
11
- }
@@ -1,28 +0,0 @@
1
- import DreamCLI from '../../index.js';
2
- import createSpinner from '../helpers/createSpinner.js';
3
- import DreamCliLoggable from './DreamCliLoggable.js';
4
- export default class DreamCliLoggableSpinner extends DreamCliLoggable {
5
- text;
6
- spinner;
7
- currentIndex = 0;
8
- color;
9
- bgColor;
10
- lastRender;
11
- _spinner;
12
- constructor({ text, permanent, spinner, color, bgColor, }) {
13
- super({ permanent });
14
- this.text = text;
15
- this.spinner = spinner;
16
- this.color = color;
17
- this.bgColor = bgColor;
18
- }
19
- render() {
20
- this._spinner?.stop();
21
- this._spinner = createSpinner(this.text, this.spinner);
22
- }
23
- stop(message = this.text + ' done!') {
24
- this._spinner.stop();
25
- DreamCLI.logger.purge();
26
- DreamCLI.logger.log(message, { permanent: true });
27
- }
28
- }