@rvoh/dream 2.2.2 → 2.3.0-alpha.1
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.
- package/dist/cjs/src/Dream.js +10 -15
- package/dist/cjs/src/db/dataTypes.js +1 -0
- package/dist/cjs/src/db/index.js +2 -2
- package/dist/cjs/src/dream/QueryDriver/Base.js +2 -2
- package/dist/cjs/src/dream/QueryDriver/Kysely.js +2 -2
- package/dist/cjs/src/dream/QueryDriver/helpers/kysely/checkForNeedToBeRunMigrations.js +2 -2
- package/dist/cjs/src/dream/QueryDriver/helpers/kysely/migrationFolderPath.js +6 -1
- package/dist/cjs/src/dream/QueryDriver/helpers/kysely/runMigration.js +2 -2
- package/dist/cjs/src/dream/internal/saveDream.js +1 -1
- package/dist/cjs/src/dream/internal/softDeleteDream.js +1 -1
- package/dist/cjs/src/dream-app/helpers/globalModelKeyFromPath.js +5 -2
- package/dist/cjs/src/dream-app/helpers/globalSerializerKeyFromPath.js +5 -2
- package/dist/cjs/src/dream-app/helpers/importers/importModels.js +1 -0
- package/dist/cjs/src/dream-app/helpers/normalizeFilePath.js +3 -0
- package/dist/cjs/src/dream-app/index.js +3 -3
- package/dist/cjs/src/helpers/areEqual.js +2 -2
- package/dist/cjs/src/helpers/cli/ASTBuilder.js +2 -2
- package/dist/cjs/src/helpers/cloneDeepSafe.js +2 -2
- package/dist/cjs/src/helpers/customPgParsers.js +2 -2
- package/dist/cjs/src/helpers/loadRepl.js +2 -2
- package/dist/cjs/src/helpers/path/PathHelpers.js +27 -0
- package/dist/cjs/src/helpers/path/convertToFileURL.js +7 -0
- package/dist/cjs/src/helpers/path/windowsSafePath.js +22 -0
- package/dist/cjs/src/helpers/sortBy.js +2 -2
- package/dist/cjs/src/helpers/sqlAttributes.js +2 -2
- package/dist/cjs/src/helpers/stringCasing.js +2 -2
- package/dist/cjs/src/package-exports/errors.js +2 -1
- package/dist/cjs/src/package-exports/index.js +2 -2
- package/dist/cjs/src/package-exports/system.js +1 -0
- package/dist/cjs/src/serializer/SerializerRenderer.js +2 -2
- package/dist/cjs/src/types/calendardate.js +1 -0
- package/dist/cjs/src/types/datetime.js +1 -0
- package/dist/cjs/src/utils/datetime/CalendarDate.js +489 -0
- package/dist/cjs/src/utils/datetime/DateTime.js +919 -0
- package/dist/cjs/src/utils/datetime/helpers/isoTimeDecimalString.js +8 -0
- package/dist/cjs/src/utils/datetime/helpers/microsecondParts.js +16 -0
- package/dist/cjs/src/utils/datetime/helpers/replaceISOMicroseconds.js +10 -0
- package/dist/esm/src/Dream.js +10 -15
- package/dist/esm/src/db/dataTypes.js +1 -0
- package/dist/esm/src/db/index.js +2 -2
- package/dist/esm/src/dream/QueryDriver/Base.js +2 -2
- package/dist/esm/src/dream/QueryDriver/Kysely.js +2 -2
- package/dist/esm/src/dream/QueryDriver/helpers/kysely/checkForNeedToBeRunMigrations.js +2 -2
- package/dist/esm/src/dream/QueryDriver/helpers/kysely/migrationFolderPath.js +6 -1
- package/dist/esm/src/dream/QueryDriver/helpers/kysely/runMigration.js +2 -2
- package/dist/esm/src/dream/internal/saveDream.js +1 -1
- package/dist/esm/src/dream/internal/softDeleteDream.js +1 -1
- package/dist/esm/src/dream-app/helpers/globalModelKeyFromPath.js +5 -2
- package/dist/esm/src/dream-app/helpers/globalSerializerKeyFromPath.js +5 -2
- package/dist/esm/src/dream-app/helpers/importers/importModels.js +1 -0
- package/dist/esm/src/dream-app/helpers/normalizeFilePath.js +3 -0
- package/dist/esm/src/dream-app/index.js +3 -3
- package/dist/esm/src/helpers/areEqual.js +2 -2
- package/dist/esm/src/helpers/cli/ASTBuilder.js +2 -2
- package/dist/esm/src/helpers/cloneDeepSafe.js +2 -2
- package/dist/esm/src/helpers/customPgParsers.js +2 -2
- package/dist/esm/src/helpers/loadRepl.js +2 -2
- package/dist/esm/src/helpers/path/PathHelpers.js +27 -0
- package/dist/esm/src/helpers/path/convertToFileURL.js +7 -0
- package/dist/esm/src/helpers/path/windowsSafePath.js +22 -0
- package/dist/esm/src/helpers/sortBy.js +2 -2
- package/dist/esm/src/helpers/sqlAttributes.js +2 -2
- package/dist/esm/src/helpers/stringCasing.js +2 -2
- package/dist/esm/src/package-exports/errors.js +2 -1
- package/dist/esm/src/package-exports/index.js +2 -2
- package/dist/esm/src/package-exports/system.js +1 -0
- package/dist/esm/src/serializer/SerializerRenderer.js +2 -2
- package/dist/esm/src/types/calendardate.js +1 -0
- package/dist/esm/src/types/datetime.js +1 -0
- package/dist/esm/src/utils/datetime/CalendarDate.js +489 -0
- package/dist/esm/src/utils/datetime/DateTime.js +919 -0
- package/dist/esm/src/utils/datetime/helpers/isoTimeDecimalString.js +8 -0
- package/dist/esm/src/utils/datetime/helpers/microsecondParts.js +16 -0
- package/dist/esm/src/utils/datetime/helpers/replaceISOMicroseconds.js +10 -0
- package/dist/types/src/Dream.d.ts +2 -2
- package/dist/types/src/db/dataTypes.d.ts +2 -2
- package/dist/types/src/dream-app/helpers/normalizeFilePath.d.ts +1 -0
- package/dist/types/src/helpers/customPgParsers.d.ts +3 -2
- package/dist/types/src/helpers/path/PathHelpers.d.ts +21 -0
- package/dist/types/src/helpers/path/convertToFileURL.d.ts +1 -0
- package/dist/types/src/helpers/path/windowsSafePath.d.ts +20 -0
- package/dist/types/src/helpers/range.d.ts +2 -2
- package/dist/types/src/helpers/sort.d.ts +2 -2
- package/dist/types/src/helpers/sortBy.d.ts +2 -2
- package/dist/types/src/package-exports/errors.d.ts +2 -1
- package/dist/types/src/package-exports/index.d.ts +2 -2
- package/dist/types/src/package-exports/system.d.ts +1 -0
- package/dist/types/src/package-exports/types.d.ts +2 -0
- package/dist/types/src/types/associations/shared.d.ts +2 -2
- package/dist/types/src/types/associations/shared.ts +2 -2
- package/dist/types/src/types/calendardate.d.ts +4 -0
- package/dist/types/src/types/calendardate.ts +8 -0
- package/dist/types/src/types/datetime.d.ts +102 -0
- package/dist/types/src/types/datetime.ts +141 -0
- package/dist/types/src/types/dream.d.ts +2 -2
- package/dist/types/src/types/dream.ts +2 -2
- package/dist/types/src/types/moduleDeclarations/luxon.d.ts +5 -6
- package/dist/types/src/utils/datetime/CalendarDate.d.ts +375 -0
- package/dist/types/src/utils/datetime/DateTime.d.ts +597 -0
- package/dist/types/src/utils/datetime/helpers/isoTimeDecimalString.d.ts +4 -0
- package/dist/types/src/utils/datetime/helpers/microsecondParts.d.ts +10 -0
- package/dist/types/src/utils/datetime/helpers/replaceISOMicroseconds.d.ts +3 -0
- package/docs/assets/highlight.css +7 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/db.DreamMigrationHelpers.html +9 -9
- package/docs/classes/db.KyselyQueryDriver.html +33 -33
- package/docs/classes/db.PostgresQueryDriver.html +34 -34
- package/docs/classes/db.QueryDriverBase.html +32 -32
- package/docs/classes/errors.CheckConstraintViolation.html +3 -3
- package/docs/classes/errors.ColumnOverflow.html +3 -3
- package/docs/classes/errors.CreateOrFindByFailedToCreateAndFind.html +3 -3
- package/docs/classes/errors.DataIncompatibleWithDatabaseField.html +3 -3
- package/docs/classes/errors.DataTypeColumnTypeMismatch.html +3 -3
- package/docs/classes/errors.GlobalNameNotSet.html +3 -3
- package/docs/classes/errors.InvalidCalendarDate.html +7 -2
- package/docs/classes/errors.InvalidDateTime.html +17 -0
- package/docs/classes/errors.MissingSerializersDefinition.html +3 -3
- package/docs/classes/errors.NonLoadedAssociation.html +3 -3
- package/docs/classes/errors.NotNullViolation.html +3 -3
- package/docs/classes/errors.RecordNotFound.html +3 -3
- package/docs/classes/errors.ValidationError.html +3 -3
- package/docs/classes/index.CalendarDate.html +195 -2
- package/docs/classes/index.DateTime.html +375 -0
- package/docs/classes/index.Decorators.html +19 -19
- package/docs/classes/index.Dream.html +121 -121
- package/docs/classes/index.DreamApp.html +5 -5
- package/docs/classes/index.DreamTransaction.html +2 -2
- package/docs/classes/index.Env.html +2 -2
- package/docs/classes/index.Query.html +59 -59
- package/docs/classes/system.CliFileWriter.html +2 -2
- package/docs/classes/system.DreamBin.html +2 -2
- package/docs/classes/system.DreamCLI.html +5 -5
- package/docs/classes/system.DreamImporter.html +2 -2
- package/docs/classes/system.DreamLogos.html +2 -2
- package/docs/classes/system.DreamSerializerBuilder.html +8 -8
- package/docs/classes/system.ObjectSerializerBuilder.html +8 -8
- package/docs/classes/system.PathHelpers.html +13 -0
- package/docs/classes/utils.Encrypt.html +2 -2
- package/docs/classes/utils.Range.html +2 -2
- package/docs/functions/db.closeAllDbConnections.html +1 -1
- package/docs/functions/db.dreamDbConnections.html +1 -1
- package/docs/functions/db.untypedDb.html +1 -1
- package/docs/functions/db.validateColumn.html +1 -1
- package/docs/functions/db.validateTable.html +1 -1
- package/docs/functions/errors.pgErrorType.html +1 -1
- package/docs/functions/index.DreamSerializer.html +1 -1
- package/docs/functions/index.ObjectSerializer.html +1 -1
- package/docs/functions/index.ReplicaSafe.html +1 -1
- package/docs/functions/index.STI.html +1 -1
- package/docs/functions/index.SoftDelete.html +1 -1
- package/docs/functions/utils.camelize.html +1 -1
- package/docs/functions/utils.capitalize.html +1 -1
- package/docs/functions/utils.cloneDeepSafe.html +1 -1
- package/docs/functions/utils.compact.html +2 -2
- package/docs/functions/utils.groupBy.html +1 -1
- package/docs/functions/utils.hyphenize.html +1 -1
- package/docs/functions/utils.intersection.html +1 -1
- package/docs/functions/utils.isEmpty.html +1 -1
- package/docs/functions/utils.normalizeUnicode.html +1 -1
- package/docs/functions/utils.pascalize.html +1 -1
- package/docs/functions/utils.percent.html +1 -1
- package/docs/functions/utils.range-1.html +1 -1
- package/docs/functions/utils.round.html +1 -1
- package/docs/functions/utils.sanitizeString.html +1 -1
- package/docs/functions/utils.snakeify.html +1 -1
- package/docs/functions/utils.sort.html +1 -1
- package/docs/functions/utils.sortBy.html +1 -1
- package/docs/functions/utils.sortObjectByKey.html +1 -1
- package/docs/functions/utils.sortObjectByValue.html +1 -1
- package/docs/functions/utils.uncapitalize.html +1 -1
- package/docs/functions/utils.uniq.html +1 -1
- package/docs/interfaces/openapi.OpenapiDescription.html +2 -2
- package/docs/interfaces/openapi.OpenapiSchemaProperties.html +1 -1
- package/docs/interfaces/openapi.OpenapiSchemaPropertiesShorthand.html +1 -1
- package/docs/interfaces/openapi.OpenapiTypeFieldObject.html +1 -1
- package/docs/interfaces/types.BelongsToStatement.html +2 -2
- package/docs/interfaces/types.DecoratorContext.html +2 -2
- package/docs/interfaces/types.DreamAppInitOptions.html +2 -2
- package/docs/interfaces/types.DreamAppOpts.html +2 -2
- package/docs/interfaces/types.DurationObject.html +12 -0
- package/docs/interfaces/types.EncryptOptions.html +2 -2
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersMany.html +2 -2
- package/docs/interfaces/types.InternalAnyTypedSerializerRendersOne.html +2 -2
- package/docs/interfaces/types.SerializerRendererOpts.html +2 -2
- package/docs/modules/db.html +1 -1
- package/docs/modules/errors.html +2 -1
- package/docs/modules/index.html +3 -4
- package/docs/modules/openapi.html +1 -1
- package/docs/modules/system.html +2 -1
- package/docs/modules/types.html +6 -2
- package/docs/modules/utils.html +1 -1
- package/docs/types/openapi.CommonOpenapiSchemaObjectFields.html +1 -1
- package/docs/types/openapi.OpenapiAllTypes.html +1 -1
- package/docs/types/openapi.OpenapiFormats.html +1 -1
- package/docs/types/openapi.OpenapiNumberFormats.html +1 -1
- package/docs/types/openapi.OpenapiPrimitiveBaseTypes.html +1 -1
- package/docs/types/openapi.OpenapiPrimitiveTypes.html +1 -1
- package/docs/types/openapi.OpenapiSchemaArray.html +1 -1
- package/docs/types/openapi.OpenapiSchemaArrayShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBase.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBody.html +1 -1
- package/docs/types/openapi.OpenapiSchemaBodyShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaCommonFields.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionOneOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionRef.html +1 -1
- package/docs/types/openapi.OpenapiSchemaExpressionRefSchemaShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaInteger.html +1 -1
- package/docs/types/openapi.OpenapiSchemaNull.html +1 -1
- package/docs/types/openapi.OpenapiSchemaNumber.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObject.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAllOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectAnyOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectBase.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectBaseShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectOneOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectOneOfShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaObjectShorthand.html +1 -1
- package/docs/types/openapi.OpenapiSchemaPrimitiveGeneric.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionAllOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionAnyOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionOneOf.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializableRef.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandExpressionSerializerRef.html +1 -1
- package/docs/types/openapi.OpenapiSchemaShorthandPrimitiveGeneric.html +1 -1
- package/docs/types/openapi.OpenapiSchemaString.html +1 -1
- package/docs/types/openapi.OpenapiShorthandAllTypes.html +1 -1
- package/docs/types/openapi.OpenapiShorthandPrimitiveBaseTypes.html +1 -1
- package/docs/types/openapi.OpenapiShorthandPrimitiveTypes.html +1 -1
- package/docs/types/openapi.OpenapiTypeField.html +1 -1
- package/docs/types/system.DreamAppAllowedPackageManagersEnum.html +1 -1
- package/docs/types/types.CalendarDateDurationUnit.html +1 -0
- package/docs/types/types.Camelized.html +1 -1
- package/docs/types/types.DbConnectionType.html +1 -1
- package/docs/types/types.DbTypes.html +1 -1
- package/docs/types/types.DreamAssociationMetadata.html +1 -1
- package/docs/types/types.DreamAttributes.html +1 -1
- package/docs/types/types.DreamClassAssociationAndStatement.html +1 -1
- package/docs/types/types.DreamClassColumn.html +1 -1
- package/docs/types/types.DreamColumn.html +1 -1
- package/docs/types/types.DreamColumnNames.html +1 -1
- package/docs/types/types.DreamLogLevel.html +1 -1
- package/docs/types/types.DreamLogger.html +1 -1
- package/docs/types/types.DreamModelSerializerType.html +1 -1
- package/docs/types/types.DreamOrViewModelClassSerializerKey.html +1 -1
- package/docs/types/types.DreamOrViewModelSerializerKey.html +1 -1
- package/docs/types/types.DreamParamSafeAttributes.html +1 -1
- package/docs/types/types.DreamParamSafeColumnNames.html +1 -1
- package/docs/types/types.DreamSerializable.html +1 -1
- package/docs/types/types.DreamSerializableArray.html +1 -1
- package/docs/types/types.DreamSerializerKey.html +1 -1
- package/docs/types/types.DreamSerializers.html +1 -1
- package/docs/types/types.DreamVirtualColumns.html +1 -1
- package/docs/types/types.DurationUnit.html +4 -0
- package/docs/types/types.EncryptAlgorithm.html +1 -1
- package/docs/types/types.HasManyStatement.html +1 -1
- package/docs/types/types.HasOneStatement.html +1 -1
- package/docs/types/types.Hyphenized.html +1 -1
- package/docs/types/types.Pascalized.html +1 -1
- package/docs/types/types.PrimaryKeyType.html +1 -1
- package/docs/types/types.RoundingPrecision.html +1 -1
- package/docs/types/types.SerializerCasing.html +1 -1
- package/docs/types/types.SimpleObjectSerializerType.html +1 -1
- package/docs/types/types.Snakeified.html +1 -1
- package/docs/types/types.StrictInterface.html +1 -1
- package/docs/types/types.UpdateableAssociationProperties.html +1 -1
- package/docs/types/types.UpdateableProperties.html +1 -1
- package/docs/types/types.ValidationType.html +1 -1
- package/docs/types/types.ViewModel.html +1 -1
- package/docs/types/types.ViewModelClass.html +1 -1
- package/docs/types/types.WeekdayName.html +2 -0
- package/docs/types/types.WhereStatementForDream.html +1 -1
- package/docs/types/types.WhereStatementForDreamClass.html +1 -1
- package/docs/variables/index.DreamConst.html +1 -1
- package/docs/variables/index.ops.html +1 -1
- package/docs/variables/openapi.openapiPrimitiveTypes-1.html +1 -1
- package/docs/variables/openapi.openapiShorthandPrimitiveTypes-1.html +1 -1
- package/docs/variables/system.DreamAppAllowedPackageManagersEnumValues.html +1 -1
- package/docs/variables/system.primaryKeyTypes.html +1 -1
- package/package.json +9 -3
- package/dist/cjs/src/helpers/CalendarDate.js +0 -151
- package/dist/cjs/src/helpers/DateTime.js +0 -4
- package/dist/esm/src/helpers/CalendarDate.js +0 -151
- package/dist/esm/src/helpers/DateTime.js +0 -4
- package/dist/types/src/helpers/CalendarDate.d.ts +0 -56
- package/dist/types/src/helpers/DateTime.d.ts +0 -6
- package/dist/types/src/types/luxon/_util.d.ts +0 -20
- package/dist/types/src/types/luxon/datetime.d.ts +0 -1759
- package/dist/types/src/types/luxon/duration.d.ts +0 -494
- package/dist/types/src/types/luxon/info.d.ts +0 -217
- package/dist/types/src/types/luxon/interval.d.ts +0 -357
- package/dist/types/src/types/luxon/misc.d.ts +0 -67
- package/dist/types/src/types/luxon/settings.d.ts +0 -91
- package/dist/types/src/types/luxon/zone.d.ts +0 -172
- package/docs/types/index.DateTime.html +0 -1
- package/docs/variables/index.DateTime-1.html +0 -1
package/dist/cjs/src/Dream.js
CHANGED
|
@@ -44,14 +44,14 @@ import DreamMissingRequiredOverride from './errors/DreamMissingRequiredOverride.
|
|
|
44
44
|
import NonExistentScopeProvidedToResort from './errors/NonExistentScopeProvidedToResort.js';
|
|
45
45
|
import RecordNotFound from './errors/RecordNotFound.js';
|
|
46
46
|
import MissingSerializersDefinition from './errors/serializers/MissingSerializersDefinition.js';
|
|
47
|
-
import CalendarDate from './helpers/CalendarDate.js';
|
|
48
47
|
import cloneDeepSafe from './helpers/cloneDeepSafe.js';
|
|
49
48
|
import compact from './helpers/compact.js';
|
|
50
|
-
import { DateTime } from './helpers/DateTime.js';
|
|
51
49
|
import cachedTypeForAttribute from './helpers/db/cachedTypeForAttribute.js';
|
|
52
50
|
import isJsonColumn from './helpers/db/types/isJsonColumn.js';
|
|
53
51
|
import notEqual from './helpers/notEqual.js';
|
|
54
52
|
import { inferSerializersFromDreamClassOrViewModelClass } from './serializer/helpers/inferSerializerFromDreamOrViewModel.js';
|
|
53
|
+
import CalendarDate from './utils/datetime/CalendarDate.js';
|
|
54
|
+
import { DateTime } from './utils/datetime/DateTime.js';
|
|
55
55
|
const RECURSIVE_SERIALIZATION_MAX_REPEATS = 4;
|
|
56
56
|
export default class Dream {
|
|
57
57
|
DB;
|
|
@@ -2381,7 +2381,7 @@ export default class Dream {
|
|
|
2381
2381
|
if (!additionalOpts._internalUseOnly)
|
|
2382
2382
|
throw new ConstructorOnlyForInternalUse();
|
|
2383
2383
|
this.isPersisted = additionalOpts?.isPersisted || false;
|
|
2384
|
-
this
|
|
2384
|
+
ensureSTITypeFieldIsSet(this);
|
|
2385
2385
|
if (opts) {
|
|
2386
2386
|
const marshalledOpts = this._setAttributes(opts, additionalOpts);
|
|
2387
2387
|
// if id is set, then we freeze attributes after setting them, so that
|
|
@@ -2483,17 +2483,13 @@ export default class Dream {
|
|
|
2483
2483
|
* defines attribute setters and getters for every column
|
|
2484
2484
|
* set within your types/dream.ts file
|
|
2485
2485
|
*/
|
|
2486
|
-
defineAttributeAccessors() {
|
|
2487
|
-
const dreamClass = this
|
|
2486
|
+
static defineAttributeAccessors() {
|
|
2487
|
+
const dreamClass = this;
|
|
2488
2488
|
const columns = dreamClass.columns();
|
|
2489
|
-
const dreamPrototype =
|
|
2489
|
+
const dreamPrototype = dreamClass.prototype;
|
|
2490
2490
|
columns.forEach(column => {
|
|
2491
|
-
// this ensures that the currentAttributes object will contain keys
|
|
2492
|
-
// for each of the properties
|
|
2493
|
-
if (this.getAttribute(column) === undefined)
|
|
2494
|
-
this.setAttribute(column, undefined);
|
|
2495
2491
|
if (!Object.getOwnPropertyDescriptor(dreamPrototype, column)?.set) {
|
|
2496
|
-
if (isJsonColumn(
|
|
2492
|
+
if (isJsonColumn(dreamClass, column)) {
|
|
2497
2493
|
// handle JSON columns
|
|
2498
2494
|
Object.defineProperty(dreamPrototype, column, {
|
|
2499
2495
|
get() {
|
|
@@ -2560,7 +2556,6 @@ export default class Dream {
|
|
|
2560
2556
|
}
|
|
2561
2557
|
}
|
|
2562
2558
|
});
|
|
2563
|
-
ensureSTITypeFieldIsSet(this);
|
|
2564
2559
|
}
|
|
2565
2560
|
/**
|
|
2566
2561
|
* @internal
|
|
@@ -2912,7 +2907,7 @@ export default class Dream {
|
|
|
2912
2907
|
if (this.isNewRecord)
|
|
2913
2908
|
return true;
|
|
2914
2909
|
if (frozenValue instanceof DateTime) {
|
|
2915
|
-
return frozenValue.
|
|
2910
|
+
return frozenValue.toMicroseconds() !== this.unknownValueToMicroseconds(currentValue);
|
|
2916
2911
|
}
|
|
2917
2912
|
else if (frozenValue instanceof CalendarDate) {
|
|
2918
2913
|
return frozenValue.toISO() !== this.unknownValueToDateString(currentValue);
|
|
@@ -2924,7 +2919,7 @@ export default class Dream {
|
|
|
2924
2919
|
/**
|
|
2925
2920
|
* @internal
|
|
2926
2921
|
*/
|
|
2927
|
-
|
|
2922
|
+
unknownValueToMicroseconds(currentValue) {
|
|
2928
2923
|
if (!currentValue)
|
|
2929
2924
|
return;
|
|
2930
2925
|
if (typeof currentValue === 'string')
|
|
@@ -2932,7 +2927,7 @@ export default class Dream {
|
|
|
2932
2927
|
if (currentValue instanceof CalendarDate)
|
|
2933
2928
|
currentValue = currentValue.toDateTime();
|
|
2934
2929
|
if (currentValue instanceof DateTime)
|
|
2935
|
-
return currentValue.
|
|
2930
|
+
return currentValue.toMicroseconds();
|
|
2936
2931
|
}
|
|
2937
2932
|
/**
|
|
2938
2933
|
* @internal
|
package/dist/cjs/src/db/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import PostgresQueryDriver from '../dream/QueryDriver/Postgres.js';
|
|
2
2
|
import EnvInternal from '../helpers/EnvInternal.js';
|
|
3
|
+
import { Settings } from '../utils/datetime/DateTime.js';
|
|
3
4
|
import DreamDbConnection from './DreamDbConnection.js';
|
|
4
|
-
import PostgresQueryDriver from '../dream/QueryDriver/Postgres.js';
|
|
5
5
|
if (EnvInternal.string('TZ', { optional: true }))
|
|
6
6
|
Settings.defaultZone = EnvInternal.string('TZ');
|
|
7
7
|
export default function db(connectionName = 'default', connectionType = 'primary', dialectProvider = PostgresQueryDriver.dialectProvider(connectionName, connectionType)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import CalendarDate from '../../
|
|
2
|
-
import { DateTime } from '../../
|
|
1
|
+
import CalendarDate from '../../utils/datetime/CalendarDate.js';
|
|
2
|
+
import { DateTime } from '../../utils/datetime/DateTime.js';
|
|
3
3
|
export default class QueryDriverBase {
|
|
4
4
|
query;
|
|
5
5
|
dreamClass;
|
|
@@ -32,13 +32,11 @@ import ColumnOverflow from '../../errors/db/ColumnOverflow.js';
|
|
|
32
32
|
import DataTypeColumnTypeMismatch from '../../errors/db/DataTypeColumnTypeMismatch.js';
|
|
33
33
|
import NotNullViolation from '../../errors/db/NotNullViolation.js';
|
|
34
34
|
import UnexpectedUndefined from '../../errors/UnexpectedUndefined.js';
|
|
35
|
-
import CalendarDate from '../../helpers/CalendarDate.js';
|
|
36
35
|
import camelize from '../../helpers/camelize.js';
|
|
37
36
|
import ASTGlobalSchemaBuilder from '../../helpers/cli/ASTGlobalSchemaBuilder.js';
|
|
38
37
|
import ASTSchemaBuilder from '../../helpers/cli/ASTSchemaBuilder.js';
|
|
39
38
|
import generateMigration from '../../helpers/cli/generateMigration.js';
|
|
40
39
|
import compact from '../../helpers/compact.js';
|
|
41
|
-
import { DateTime } from '../../helpers/DateTime.js';
|
|
42
40
|
import EnvInternal from '../../helpers/EnvInternal.js';
|
|
43
41
|
import groupBy from '../../helpers/groupBy.js';
|
|
44
42
|
import isEmpty from '../../helpers/isEmpty.js';
|
|
@@ -54,6 +52,8 @@ import sqlAttributes from '../../helpers/sqlAttributes.js';
|
|
|
54
52
|
import uniq from '../../helpers/uniq.js';
|
|
55
53
|
import CurriedOpsStatement from '../../ops/curried-ops-statement.js';
|
|
56
54
|
import OpsStatement from '../../ops/ops-statement.js';
|
|
55
|
+
import CalendarDate from '../../utils/datetime/CalendarDate.js';
|
|
56
|
+
import { DateTime } from '../../utils/datetime/DateTime.js';
|
|
57
57
|
import { DreamConst, primaryKeyTypes } from '../constants.js';
|
|
58
58
|
import DreamTransaction from '../DreamTransaction.js';
|
|
59
59
|
import throughAssociationHasOptionsBesidesThroughAndSource from '../internal/associations/throughAssociationHasOptionsBesidesThroughAndSource.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FileMigrationProvider, Migrator } from 'kysely';
|
|
2
2
|
import * as fs from 'node:fs/promises';
|
|
3
|
-
import * as path from 'node:path';
|
|
4
3
|
import { closeAllConnectionsForConnectionName } from '../../../../db/DreamDbConnection.js';
|
|
5
4
|
import db from '../../../../db/index.js';
|
|
5
|
+
import windowsSafePath from '../../../../helpers/path/windowsSafePath.js';
|
|
6
6
|
import migrationFolderPath from './migrationFolderPath.js';
|
|
7
7
|
export default async function checkForNeedToBeRunMigrations({ connectionName, dialectProvider, }) {
|
|
8
8
|
const migrationFolder = migrationFolderPath(connectionName);
|
|
@@ -14,7 +14,7 @@ export default async function checkForNeedToBeRunMigrations({ connectionName, di
|
|
|
14
14
|
allowUnorderedMigrations: true,
|
|
15
15
|
provider: new FileMigrationProvider({
|
|
16
16
|
fs,
|
|
17
|
-
path,
|
|
17
|
+
path: windowsSafePath,
|
|
18
18
|
migrationFolder,
|
|
19
19
|
}),
|
|
20
20
|
});
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as path from 'node:path';
|
|
2
2
|
import DreamApp from '../../../../dream-app/index.js';
|
|
3
|
+
import normalizeFilePath from '../../../../dream-app/helpers/normalizeFilePath.js';
|
|
3
4
|
export default function migrationFolderPath(connectionName) {
|
|
4
5
|
const dreamApp = DreamApp.getOrFail();
|
|
5
|
-
|
|
6
|
+
const migrationPath = connectionName === 'default'
|
|
6
7
|
? path.join(dreamApp.projectRoot, dreamApp.paths.db, 'migrations')
|
|
7
8
|
: path.join(dreamApp.projectRoot, dreamApp.paths.db, 'migrations', connectionName);
|
|
9
|
+
// Normalize the path to use forward slashes on Windows to avoid ESM URL scheme issues
|
|
10
|
+
// This ensures kysely's FileMigrationProvider can properly construct import paths
|
|
11
|
+
// when it dynamically imports migration files
|
|
12
|
+
return normalizeFilePath(path.resolve(migrationPath));
|
|
8
13
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FileMigrationProvider, Migrator } from 'kysely';
|
|
2
2
|
import * as fs from 'node:fs/promises';
|
|
3
|
-
import * as path from 'node:path';
|
|
4
3
|
import DreamCLI from '../../../../cli/index.js';
|
|
5
4
|
import colorize from '../../../../cli/logger/loggable/colorize.js';
|
|
6
5
|
import { closeAllConnectionsForConnectionName, closeAllDbConnections, } from '../../../../db/DreamDbConnection.js';
|
|
7
6
|
import db from '../../../../db/index.js';
|
|
8
7
|
import DreamApp from '../../../../dream-app/index.js';
|
|
8
|
+
import windowsSafePath from '../../../../helpers/path/windowsSafePath.js';
|
|
9
9
|
import migrationFolderPath from './migrationFolderPath.js';
|
|
10
10
|
export default async function runMigration({ connectionName, mode = 'migrate', dialectProvider, }) {
|
|
11
11
|
const migrationFolder = migrationFolderPath(connectionName);
|
|
@@ -17,7 +17,7 @@ export default async function runMigration({ connectionName, mode = 'migrate', d
|
|
|
17
17
|
allowUnorderedMigrations: true,
|
|
18
18
|
provider: new FileMigrationProvider({
|
|
19
19
|
fs,
|
|
20
|
-
path,
|
|
20
|
+
path: windowsSafePath,
|
|
21
21
|
migrationFolder,
|
|
22
22
|
}),
|
|
23
23
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ValidationError from '../../errors/ValidationError.js';
|
|
2
|
-
import { DateTime } from '../../helpers/DateTime.js';
|
|
3
2
|
import sqlAttributes from '../../helpers/sqlAttributes.js';
|
|
3
|
+
import { DateTime } from '../../utils/datetime/DateTime.js';
|
|
4
4
|
import Query from '../Query.js';
|
|
5
5
|
import runHooksFor from './runHooksFor.js';
|
|
6
6
|
export default async function saveDream(dream, txn = null, { skipHooks = false } = {}) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import MissingDeletedAtFieldForSoftDelete from '../../errors/MissingDeletedAtFieldForSoftDelete.js';
|
|
2
|
-
import { DateTime } from '../../helpers/DateTime.js';
|
|
3
2
|
import isDatetimeOrDatetimeArrayColumn from '../../helpers/db/types/isDatetimeOrDatetimeArrayColumn.js';
|
|
3
|
+
import { DateTime } from '../../utils/datetime/DateTime.js';
|
|
4
4
|
export default async function softDeleteDream(dream, txn) {
|
|
5
5
|
const deletedAtField = dream['_deletedAtField'];
|
|
6
6
|
const dreamClass = dream.constructor;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import normalizeFilePath from './normalizeFilePath.js';
|
|
1
2
|
export default function (filepath, dirPath) {
|
|
2
|
-
const
|
|
3
|
-
|
|
3
|
+
const normalizedDirPath = normalizeFilePath(dirPath);
|
|
4
|
+
const normalizedFilepath = normalizeFilePath(filepath);
|
|
5
|
+
const prefixPath = normalizedDirPath;
|
|
6
|
+
return normalizedFilepath
|
|
4
7
|
.replace(prefixPath, '')
|
|
5
8
|
.replace(/\.[jt]s$/, '')
|
|
6
9
|
.replace(/^\//, '');
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import normalizeFilePath from './normalizeFilePath.js';
|
|
1
2
|
export default function globalSerializerKeyFromPath(filepath, dirPath, exportKey = 'default') {
|
|
2
|
-
const
|
|
3
|
-
const
|
|
3
|
+
const normalizedDirPath = normalizeFilePath(dirPath);
|
|
4
|
+
const normalizedFilepath = normalizeFilePath(filepath);
|
|
5
|
+
const prefixPath = normalizedDirPath;
|
|
6
|
+
const defaultExport = normalizedFilepath
|
|
4
7
|
.replace(prefixPath, '')
|
|
5
8
|
.replace(/\.[jt]s$/, '')
|
|
6
9
|
.replace(/^\//, '');
|
|
@@ -22,6 +22,7 @@ export default async function importModels(modelsPath, modelImportCb) {
|
|
|
22
22
|
// Don't create a global lookup for ApplicationModel
|
|
23
23
|
// ApplicationModel does not have a table
|
|
24
24
|
if (modelClass.table) {
|
|
25
|
+
modelClass['defineAttributeAccessors']();
|
|
25
26
|
const modelKey = globalModelKeyFromPath(modelPath, modelsPath);
|
|
26
27
|
modelClass['setGlobalName'](modelKey);
|
|
27
28
|
_models[modelKey] = modelClass;
|
|
@@ -5,9 +5,8 @@ import PostgresQueryDriver from '../dream/QueryDriver/Postgres.js';
|
|
|
5
5
|
import Encrypt from '../encrypt/index.js';
|
|
6
6
|
import DreamAppInitMissingCallToLoadModels from '../errors/dream-app/DreamAppInitMissingCallToLoadModels.js';
|
|
7
7
|
import DreamAppInitMissingMissingProjectRoot from '../errors/dream-app/DreamAppInitMissingMissingProjectRoot.js';
|
|
8
|
-
import
|
|
8
|
+
import DreamAppInitMissingPackageManager from '../errors/dream-app/DreamAppInitMissingPackageManager.js';
|
|
9
9
|
import autogeneratedFileDisclaimer from '../helpers/cli/autoGeneratedFileDisclaimer.js';
|
|
10
|
-
import { DateTime, Settings } from '../helpers/DateTime.js';
|
|
11
10
|
import EnvInternal from '../helpers/EnvInternal.js';
|
|
12
11
|
import globalClassNameFromFullyQualifiedModelName from '../helpers/globalClassNameFromFullyQualifiedModelName.js';
|
|
13
12
|
import absoluteDreamPath from '../helpers/path/absoluteDreamPath.js';
|
|
@@ -17,11 +16,12 @@ import expandStiClasses from '../helpers/sti/expandStiClasses.js';
|
|
|
17
16
|
import inferSerializerFromDreamOrViewModel, { inferSerializersFromDreamClassOrViewModelClass, } from '../serializer/helpers/inferSerializerFromDreamOrViewModel.js';
|
|
18
17
|
import isDreamSerializer from '../serializer/helpers/isDreamSerializer.js';
|
|
19
18
|
import serializerNameFromFullyQualifiedModelName from '../serializer/helpers/serializerNameFromFullyQualifiedModelName.js';
|
|
19
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
20
|
+
import { DateTime, Settings } from '../utils/datetime/DateTime.js';
|
|
20
21
|
import { cacheDreamApp, getCachedDreamAppOrFail } from './cache.js';
|
|
21
22
|
import importModels, { getModelsOrFail } from './helpers/importers/importModels.js';
|
|
22
23
|
import importSerializers, { getSerializersOrFail, setCachedSerializers, } from './helpers/importers/importSerializers.js';
|
|
23
24
|
import lookupClassByGlobalName from './helpers/lookupClassByGlobalName.js';
|
|
24
|
-
import DreamAppInitMissingPackageManager from '../errors/dream-app/DreamAppInitMissingPackageManager.js';
|
|
25
25
|
// this needs to be done top-level to ensure proper configuration
|
|
26
26
|
Settings.defaultZone = 'UTC';
|
|
27
27
|
export default class DreamApp {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Dream from '../Dream.js';
|
|
2
|
-
import CalendarDate from '
|
|
3
|
-
import { DateTime } from '
|
|
2
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
3
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
4
4
|
/**
|
|
5
5
|
* Performs a deep equality check between two values, supporting primitives, arrays,
|
|
6
6
|
* Dream instances, CalendarDate, DateTime, and objects.
|
|
@@ -220,7 +220,7 @@ export default class ASTBuilder {
|
|
|
220
220
|
dateAndDateTimeImports() {
|
|
221
221
|
if (EnvInternal.boolean('DREAM_CORE_DEVELOPMENT')) {
|
|
222
222
|
const calendarImport = ts.factory.createImportClause(true, f.createIdentifier('CalendarDate'), undefined);
|
|
223
|
-
const calendarImportDeclaration = ts.factory.createImportDeclaration(undefined, calendarImport, ts.factory.createStringLiteral('../../src/
|
|
223
|
+
const calendarImportDeclaration = ts.factory.createImportDeclaration(undefined, calendarImport, ts.factory.createStringLiteral('../../src/utils/datetime/CalendarDate.js'));
|
|
224
224
|
const dateTimeNamedImports = ts.factory.createNamedImports([
|
|
225
225
|
f.createImportSpecifier(true, undefined, ts.factory.createIdentifier('DateTime')),
|
|
226
226
|
]);
|
|
@@ -228,7 +228,7 @@ export default class ASTBuilder {
|
|
|
228
228
|
undefined, // name: undefined for default import
|
|
229
229
|
dateTimeNamedImports // namedBindings
|
|
230
230
|
);
|
|
231
|
-
const dateTimeImportDeclaration = ts.factory.createImportDeclaration(undefined, dateTimeImportClause, ts.factory.createStringLiteral('../../src/
|
|
231
|
+
const dateTimeImportDeclaration = ts.factory.createImportDeclaration(undefined, dateTimeImportClause, ts.factory.createStringLiteral('../../src/utils/datetime/DateTime.js'));
|
|
232
232
|
return [calendarImportDeclaration, dateTimeImportDeclaration];
|
|
233
233
|
}
|
|
234
234
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Dream from '../Dream.js';
|
|
2
2
|
import OpsStatement from '../ops/ops-statement.js';
|
|
3
|
-
import CalendarDate from '
|
|
4
|
-
import { DateTime } from '
|
|
3
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
4
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
5
5
|
import isObject from './isObject.js';
|
|
6
6
|
import { Range } from './range.js';
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import CalendarDate from '
|
|
2
|
-
import { DateTime } from '
|
|
1
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
2
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
3
3
|
export async function findEnumArrayOids(kyselyDb) {
|
|
4
4
|
const result = await kyselyDb.selectFrom('pg_type').select('typarray').where('typtype', '=', 'e').execute();
|
|
5
5
|
return result.map(values => values.typarray);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import DreamApp from '../dream-app/index.js';
|
|
2
2
|
import Encrypt from '../encrypt/index.js';
|
|
3
3
|
import ops from '../ops/index.js';
|
|
4
|
-
import CalendarDate from '
|
|
4
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
5
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
5
6
|
import camelize from './camelize.js';
|
|
6
7
|
import capitalize from './capitalize.js';
|
|
7
8
|
import compact from './compact.js';
|
|
8
|
-
import { DateTime } from './DateTime.js';
|
|
9
9
|
import hyphenize from './hyphenize.js';
|
|
10
10
|
import pascalize from './pascalize.js';
|
|
11
11
|
import pascalizePath from './pascalizePath.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import normalizeFilePath from '../../dream-app/helpers/normalizeFilePath.js';
|
|
2
|
+
import convertToFileURL from './convertToFileURL.js';
|
|
3
|
+
export default class PathHelpers {
|
|
4
|
+
/**
|
|
5
|
+
* converts a filepath with windows path delimiters into a path with linux/unix path delimiters
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* PathHelpers.normalize("\My\Path\To\File.ts")
|
|
9
|
+
* // "/My/Path/To/File.ts"
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @param filepath - string
|
|
13
|
+
* @returns the same filepath, with any windows path delimiters replaced to their linux/unix counterparts
|
|
14
|
+
*/
|
|
15
|
+
static normalize(filepath) {
|
|
16
|
+
return normalizeFilePath(filepath);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* uses node's pathToFileURL to convert filepaths
|
|
20
|
+
*
|
|
21
|
+
* @param filepath - string
|
|
22
|
+
* @returns the filepath, converted using pathToFileURL, returning the href property
|
|
23
|
+
*/
|
|
24
|
+
static fileUrl(filepath) {
|
|
25
|
+
return convertToFileURL(filepath);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Create a path wrapper that converts absolute Windows paths to file:// URLs
|
|
2
|
+
// This is needed because kysely's FileMigrationProvider uses dynamic imports,
|
|
3
|
+
import * as path from 'node:path';
|
|
4
|
+
import convertToFileURL from './convertToFileURL.js';
|
|
5
|
+
import normalizeFilePath from '../../dream-app/helpers/normalizeFilePath.js';
|
|
6
|
+
// and on Windows, absolute paths must be file:// URLs for dynamic imports to work
|
|
7
|
+
const windowsSafePath = {
|
|
8
|
+
...path,
|
|
9
|
+
join: (...paths) => {
|
|
10
|
+
const joined = normalizeFilePath(path.join(...paths));
|
|
11
|
+
return convertToFileURL(joined);
|
|
12
|
+
},
|
|
13
|
+
resolve: (...paths) => {
|
|
14
|
+
const resolved = normalizeFilePath(path.resolve(...paths));
|
|
15
|
+
return convertToFileURL(resolved);
|
|
16
|
+
},
|
|
17
|
+
normalize: (p) => {
|
|
18
|
+
const normalized = normalizeFilePath(path.normalize(p));
|
|
19
|
+
return convertToFileURL(normalized);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export default windowsSafePath;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import CalendarDate from '
|
|
2
|
-
import { DateTime } from '
|
|
1
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
2
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
3
3
|
/**
|
|
4
4
|
* Returns a copy of the array, sorted by the value returned by calling the function in the second argument on each element in the array.
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DreamApp from '../dream-app/index.js';
|
|
2
2
|
import DataTypeColumnTypeMismatch from '../errors/db/DataTypeColumnTypeMismatch.js';
|
|
3
|
-
import CalendarDate from '
|
|
4
|
-
import { DateTime } from '
|
|
3
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
4
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
5
5
|
import isDatetimeOrDatetimeArrayColumn from './db/types/isDatetimeOrDatetimeArrayColumn.js';
|
|
6
6
|
import isTextOrTextArrayColumn from './db/types/isTextOrTextArrayColumn.js';
|
|
7
7
|
import normalizeUnicode from './normalizeUnicode.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Dream from '../Dream.js';
|
|
2
|
-
import CalendarDate from '
|
|
3
|
-
import { DateTime } from '
|
|
2
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
3
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
4
4
|
import isObject from './isObject.js';
|
|
5
5
|
export default function stringCase(target, stringCaser) {
|
|
6
6
|
if (typeof target === 'string')
|
|
@@ -10,4 +10,5 @@ export { default as GlobalNameNotSet } from '../errors/dream-app/GlobalNameNotSe
|
|
|
10
10
|
export { default as RecordNotFound } from '../errors/RecordNotFound.js';
|
|
11
11
|
export { default as MissingSerializersDefinition } from '../errors/serializers/MissingSerializersDefinition.js';
|
|
12
12
|
export { default as ValidationError } from '../errors/ValidationError.js';
|
|
13
|
-
export { InvalidCalendarDate } from '../
|
|
13
|
+
export { InvalidCalendarDate } from '../utils/datetime/CalendarDate.js';
|
|
14
|
+
export { InvalidDateTime } from '../utils/datetime/DateTime.js';
|
|
@@ -7,9 +7,9 @@ export { default as Dream } from '../Dream.js';
|
|
|
7
7
|
export { DreamConst } from '../dream/constants.js';
|
|
8
8
|
export { default as DreamTransaction } from '../dream/DreamTransaction.js';
|
|
9
9
|
export { default as Query } from '../dream/Query.js';
|
|
10
|
-
export { default as CalendarDate } from '../helpers/CalendarDate.js';
|
|
11
|
-
export { DateTime } from '../helpers/DateTime.js';
|
|
12
10
|
export { default as Env } from '../helpers/Env.js';
|
|
13
11
|
export { default as ops } from '../ops/index.js';
|
|
14
12
|
export { default as DreamSerializer } from '../serializer/DreamSerializer.js';
|
|
15
13
|
export { default as ObjectSerializer } from '../serializer/ObjectSerializer.js';
|
|
14
|
+
export { default as CalendarDate } from '../utils/datetime/CalendarDate.js';
|
|
15
|
+
export { DateTime } from '../utils/datetime/DateTime.js';
|
|
@@ -5,5 +5,6 @@ export { default as DreamImporter } from '../dream-app/helpers/DreamImporter.js'
|
|
|
5
5
|
export { DreamAppAllowedPackageManagersEnumValues, } from '../dream-app/index.js';
|
|
6
6
|
export { primaryKeyTypes } from '../dream/constants.js';
|
|
7
7
|
export { default as DreamLogos } from '../helpers/DreamLogos/DreamLogos.js';
|
|
8
|
+
export { default as PathHelpers } from '../helpers/path/PathHelpers.js';
|
|
8
9
|
export { default as DreamSerializerBuilder } from '../serializer/builders/DreamSerializerBuilder.js';
|
|
9
10
|
export { default as ObjectSerializerBuilder } from '../serializer/builders/ObjectSerializerBuilder.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import RendersManyMustReceiveArray from '../errors/serializers/RendersManyMustReceiveArray.js';
|
|
2
|
-
import CalendarDate from '../helpers/CalendarDate.js';
|
|
3
2
|
import compact from '../helpers/compact.js';
|
|
4
|
-
import { DateTime } from '../helpers/DateTime.js';
|
|
5
3
|
import round from '../helpers/round.js';
|
|
6
4
|
import snakeify from '../helpers/snakeify.js';
|
|
5
|
+
import CalendarDate from '../utils/datetime/CalendarDate.js';
|
|
6
|
+
import { DateTime } from '../utils/datetime/DateTime.js';
|
|
7
7
|
import DreamSerializerBuilder from './builders/DreamSerializerBuilder.js';
|
|
8
8
|
import ObjectSerializerBuilder from './builders/ObjectSerializerBuilder.js';
|
|
9
9
|
import inferSerializerFromDreamOrViewModel from './helpers/inferSerializerFromDreamOrViewModel.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|