dyna-record 0.5.0 → 0.5.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.
- package/dist/src/DynaRecord.d.ts +11 -18
- package/dist/src/DynaRecord.d.ts.map +1 -1
- package/dist/src/Logger.d.ts.map +1 -1
- package/dist/src/Logger.js +0 -1
- package/dist/src/decorators/Entity.d.ts +1 -1
- package/dist/src/decorators/Entity.d.ts.map +1 -1
- package/dist/src/decorators/Entity.js +3 -5
- package/dist/src/decorators/Table.d.ts +1 -1
- package/dist/src/decorators/Table.d.ts.map +1 -1
- package/dist/src/decorators/Table.js +2 -4
- package/dist/src/decorators/attributes/BooleanAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/BooleanAttribute.js +7 -9
- package/dist/src/decorators/attributes/DateAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/DateAttribute.js +8 -10
- package/dist/src/decorators/attributes/EnumAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/EnumAttribute.js +7 -9
- package/dist/src/decorators/attributes/ForeignKeyAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/ForeignKeyAttribute.js +9 -11
- package/dist/src/decorators/attributes/NumberAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/NumberAttribute.js +7 -9
- package/dist/src/decorators/attributes/ObjectAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/ObjectAttribute.js +14 -17
- package/dist/src/decorators/attributes/PartitionKeyAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/PartitionKeyAttribute.js +6 -8
- package/dist/src/decorators/attributes/SortKeyAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/SortKeyAttribute.js +6 -8
- package/dist/src/decorators/attributes/StringAttribute.d.ts.map +1 -1
- package/dist/src/decorators/attributes/StringAttribute.js +7 -9
- package/dist/src/decorators/attributes/serializers.d.ts +2 -2
- package/dist/src/decorators/attributes/serializers.d.ts.map +1 -1
- package/dist/src/decorators/attributes/serializers.js +1 -1
- package/dist/src/decorators/relationships/BelongsTo.d.ts.map +1 -1
- package/dist/src/decorators/relationships/BelongsTo.js +7 -9
- package/dist/src/decorators/relationships/HasAndBelongsToMany.d.ts.map +1 -1
- package/dist/src/decorators/relationships/HasAndBelongsToMany.js +13 -15
- package/dist/src/decorators/relationships/HasMany.d.ts.map +1 -1
- package/dist/src/decorators/relationships/HasMany.js +15 -17
- package/dist/src/decorators/relationships/HasOne.d.ts.map +1 -1
- package/dist/src/decorators/relationships/HasOne.js +7 -9
- package/dist/src/metadata/EntityMetadata.d.ts +7 -2
- package/dist/src/metadata/EntityMetadata.d.ts.map +1 -1
- package/dist/src/metadata/EntityMetadata.js +17 -2
- package/dist/src/metadata/MetadataStorage.d.ts.map +1 -1
- package/dist/src/metadata/MetadataStorage.js +6 -6
- package/dist/src/metadata/TableMetadata.d.ts.map +1 -1
- package/dist/src/metadata/TableMetadata.js +7 -1
- package/dist/src/metadata/relationship-metadata/BelongsToRelationship.d.ts.map +1 -1
- package/dist/src/metadata/relationship-metadata/BelongsToRelationship.js +1 -3
- package/dist/src/metadata/relationship-metadata/HasAndBelongsToManyRelationship.d.ts.map +1 -1
- package/dist/src/metadata/relationship-metadata/HasAndBelongsToManyRelationship.js +1 -3
- package/dist/src/metadata/relationship-metadata/HasManyRelationship.d.ts.map +1 -1
- package/dist/src/metadata/relationship-metadata/HasManyRelationship.js +1 -3
- package/dist/src/metadata/relationship-metadata/HasOneRelationship.d.ts.map +1 -1
- package/dist/src/metadata/relationship-metadata/HasOneRelationship.js +1 -3
- package/dist/src/metadata/relationship-metadata/OwnedByRelationship.d.ts.map +1 -1
- package/dist/src/metadata/relationship-metadata/OwnedByRelationship.js +1 -3
- package/dist/src/metadata/schemas.d.ts +40 -262
- package/dist/src/metadata/schemas.d.ts.map +1 -1
- package/dist/src/metadata/schemas.js +6 -6
- package/dist/src/metadata/types.d.ts +3 -3
- package/dist/src/metadata/types.d.ts.map +1 -1
- package/dist/src/metadata/utils.js +4 -4
- package/dist/src/operations/Create/Create.js +3 -5
- package/dist/src/operations/Delete/Delete.d.ts.map +1 -1
- package/dist/src/operations/Delete/Delete.js +3 -2
- package/dist/src/operations/FindById/FindById.d.ts.map +1 -1
- package/dist/src/operations/FindById/FindById.js +4 -4
- package/dist/src/operations/Query/Query.d.ts.map +1 -1
- package/dist/src/operations/Query/Query.js +2 -1
- package/dist/src/operations/Update/Update.d.ts.map +1 -1
- package/dist/src/operations/Update/Update.js +17 -15
- package/dist/src/operations/types.d.ts +1 -1
- package/dist/src/operations/types.d.ts.map +1 -1
- package/dist/src/operations/utils/expressionBuilder.js +3 -0
- package/dist/src/operations/utils/flattenObjectForUpdate.d.ts.map +1 -1
- package/dist/src/operations/utils/flattenObjectForUpdate.js +2 -2
- package/dist/src/operations/utils/mergePartialObjectAttributes.d.ts.map +1 -1
- package/dist/src/operations/utils/mergePartialObjectAttributes.js +11 -3
- package/dist/src/operations/utils/utils.d.ts +2 -2
- package/dist/src/operations/utils/utils.d.ts.map +1 -1
- package/dist/src/query-utils/QueryBuilder.d.ts.map +1 -1
- package/dist/src/query-utils/QueryBuilder.js +11 -7
- package/dist/src/query-utils/types.d.ts.map +1 -1
- package/dist/src/relationships/JoinTable.d.ts.map +1 -1
- package/dist/src/relationships/JoinTable.js +4 -3
- package/dist/src/utils.d.ts +4 -4
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +13 -11
- package/package.json +11 -13
package/dist/src/DynaRecord.d.ts
CHANGED
|
@@ -73,12 +73,12 @@ declare abstract class DynaRecord implements DynaRecordBase {
|
|
|
73
73
|
static findById<T extends DynaRecord>(this: EntityClass<T>, id: string, options?: undefined): Promise<Optional<EntityAttributesInstance<T>>>;
|
|
74
74
|
static findById<T extends DynaRecord, Inc extends IncludedAssociations<T> = []>(this: EntityClass<T>, id: string, options: FindByIdOptions<T, Inc>): Promise<Optional<FindByIdIncludesRes<T, Inc>>>;
|
|
75
75
|
/**
|
|
76
|
-
* Query an EntityPartition by EntityId
|
|
77
|
-
* QueryByIndex not supported. Use Query with keys
|
|
78
|
-
* @param {string}
|
|
76
|
+
* Query an EntityPartition by EntityId (string) or by PartitionKey/SortKey conditions (object).
|
|
77
|
+
* QueryByIndex not supported with this overload. Use Query with keys and indexName option if needed.
|
|
78
|
+
* @param {string | EntityKeyConditions<T>} key - Entity Id (string) or an object with PartitionKey and optional SortKey conditions.
|
|
79
79
|
* @param {Object=} options - QueryOptions. Supports filter, consistentRead and skCondition. indexName is not supported
|
|
80
80
|
*
|
|
81
|
-
* @example By partition key only
|
|
81
|
+
* @example By partition key only (string shorthand)
|
|
82
82
|
* ```typescript
|
|
83
83
|
* const user = await User.query("123");
|
|
84
84
|
* ```
|
|
@@ -101,36 +101,29 @@ declare abstract class DynaRecord implements DynaRecordBase {
|
|
|
101
101
|
* createdAt: "2023-11-21T12:31:21.148Z"
|
|
102
102
|
* }
|
|
103
103
|
* });
|
|
104
|
+
* ```
|
|
104
105
|
*
|
|
105
106
|
* @example Query as consistent read
|
|
106
107
|
* ```typescript
|
|
107
108
|
* const user = await User.query("123", { consistentRead: true })
|
|
108
109
|
* ```
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
static query<T extends DynaRecord>(this: EntityClass<T>, key: string, options?: OptionsWithoutIndex): Promise<QueryResults<T>>;
|
|
112
|
-
/**
|
|
113
|
-
* Query by PartitionKey and optional SortKey/Filter/Index conditions without and index
|
|
114
|
-
* When querying without an index the key conditions must be the PartitionKey and SortKey defined on the entity
|
|
115
|
-
* @param {Object} key - PartitionKey value and optional SortKey condition. Keys must be attributes defined on the model
|
|
116
|
-
* @param {Object=} options - QueryBuilderOptions
|
|
117
110
|
*
|
|
118
|
-
* @example By partition key only
|
|
111
|
+
* @example By partition key only (object form)
|
|
119
112
|
* ```typescript
|
|
120
113
|
* const user = await User.query({ pk: "User#123" });
|
|
121
114
|
* ```
|
|
122
115
|
*
|
|
123
|
-
* @example By partition key and sort key exact match
|
|
116
|
+
* @example By partition key and sort key exact match (object form)
|
|
124
117
|
* ```typescript
|
|
125
118
|
* const user = await User.query({ pk: "User#123", sk: "Profile#123" });
|
|
126
119
|
* ```
|
|
127
120
|
*
|
|
128
|
-
* @example By partition key and sort key begins with
|
|
121
|
+
* @example By partition key and sort key begins with (object form)
|
|
129
122
|
* ```typescript
|
|
130
123
|
* const user = await User.query({ pk: "User#123", sk: { $beginsWith: "Profile" } });
|
|
131
124
|
* ```
|
|
132
125
|
*
|
|
133
|
-
* @example With filter (arbitrary example)
|
|
126
|
+
* @example With filter (object form, arbitrary example)
|
|
134
127
|
* ```typescript
|
|
135
128
|
* const result = await User.query(
|
|
136
129
|
* {
|
|
@@ -143,7 +136,7 @@ declare abstract class DynaRecord implements DynaRecordBase {
|
|
|
143
136
|
* $or: [
|
|
144
137
|
* {
|
|
145
138
|
* name: "John",
|
|
146
|
-
* email: { $beginsWith: "testing }
|
|
139
|
+
* email: { $beginsWith: "testing" }
|
|
147
140
|
* },
|
|
148
141
|
* {
|
|
149
142
|
* name: "Jane",
|
|
@@ -163,7 +156,7 @@ declare abstract class DynaRecord implements DynaRecordBase {
|
|
|
163
156
|
* const user = await User.query({ pk: "User#123", consistentRead: true });
|
|
164
157
|
* ```
|
|
165
158
|
*/
|
|
166
|
-
static query<T extends DynaRecord>(this: EntityClass<T>, key: EntityKeyConditions<T>, options?: OptionsWithoutIndex): Promise<QueryResults<T>>;
|
|
159
|
+
static query<T extends DynaRecord>(this: EntityClass<T>, key: string | EntityKeyConditions<T>, options?: OptionsWithoutIndex): Promise<QueryResults<T>>;
|
|
167
160
|
/**
|
|
168
161
|
* Query by PartitionKey and optional SortKey/Filter/Index conditions with an index
|
|
169
162
|
* When querying on an index, any of the entities attributes can be part of the key condition
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynaRecord.d.ts","sourceRoot":"","sources":["../../src/DynaRecord.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAsB,KAAK,aAAa,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iB,MAAM,CAAC,CAAC,SAAS,UAAU,EAC7C,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EACpB,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,EAC5B,OAAO,CAAC,EAAE;QAAE,yBAAyB,CAAC,EAAE,OAAO,CAAA;KAAE,GAChD,OAAO,CAAC,IAAI,CAAC;IAKhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACU,MAAM,CAAC,CAAC,SAAS,IAAI,EAChC,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,EAC5B,OAAO,CAAC,EAAE;QAAE,yBAAyB,CAAC,EAAE,OAAO,CAAA;KAAE,GAChD,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC;IAuBvC;;;;;;;;;;OAUG;WACiB,MAAM,CAAC,CAAC,SAAS,UAAU,EAC7C,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EACpB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC;IAKhB;;;;;;;;;OASG;WACW,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAKnD;;OAEG;WACW,iBAAiB,CAAC,CAAC,SAAS,UAAU,EAClD,IAAI,EAAE,UAAU,CAAC,EACjB,SAAS,EAAE,eAAe,GACzB,wBAAwB,CAAC,CAAC,CAAC;IAW9B;;;OAGG;IACI,iBAAiB,IAAI,MAAM;IAIlC;;;;;;;;;;;;OAYG;WACW,QAAQ,IAAI,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;CAK9D;AAED,eAAe,UAAU,CAAC"}
|
package/dist/src/Logger.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/Logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/Logger.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,cAAM,MAAM;IACV;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,IAAI;IAMnB;;;OAGG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI;IAIzD;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI;IAI3D;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI;IAI7D;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI;CAG5D;AAED,eAAe,MAAM,CAAC"}
|
package/dist/src/Logger.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-extraneous-class */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
4
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
4
|
/**
|
|
6
5
|
* Facilitates logging throughout the ORM system with support for different log levels: log, warn, error, and info. Logging can be toggled through the `DYNA_RECORD_LOGGING_ENABLED` environment variable. When enabled, logs are output to the console, allowing for easy tracking and debugging of the system's operations.
|
|
@@ -18,6 +18,6 @@ import type DynaRecord from "../DynaRecord";
|
|
|
18
18
|
* ```
|
|
19
19
|
* In this example, the `User` class is marked as an entity using the `@Entity` decorator. This designation registers the `User` class within the ORM's metadata system, making it a recognized entity for the ORM to manage. The registration process involves associating the class with its corresponding table name and any additional metadata required by the ORM to handle instances of this class effectively.
|
|
20
20
|
*/
|
|
21
|
-
declare function Entity
|
|
21
|
+
declare function Entity(target: new () => DynaRecord, _context: ClassDecoratorContext): void;
|
|
22
22
|
export default Entity;
|
|
23
23
|
//# sourceMappingURL=Entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../src/decorators/Entity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../src/decorators/Entity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,MAAM,CACb,MAAM,EAAE,UAAU,UAAU,EAC5B,QAAQ,EAAE,qBAAqB,GAC9B,IAAI,CAKN;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -23,10 +23,8 @@ const metadata_1 = __importDefault(require("../metadata"));
|
|
|
23
23
|
* ```
|
|
24
24
|
* In this example, the `User` class is marked as an entity using the `@Entity` decorator. This designation registers the `User` class within the ORM's metadata system, making it a recognized entity for the ORM to manage. The registration process involves associating the class with its corresponding table name and any additional metadata required by the ORM to handle instances of this class effectively.
|
|
25
25
|
*/
|
|
26
|
-
function Entity(target,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
metadata_1.default.addEntity(target, tableClassName);
|
|
30
|
-
}
|
|
26
|
+
function Entity(target, _context) {
|
|
27
|
+
const tableClassName = Object.getPrototypeOf(target).name;
|
|
28
|
+
metadata_1.default.addEntity(target, tableClassName);
|
|
31
29
|
}
|
|
32
30
|
exports.default = Entity;
|
|
@@ -17,6 +17,6 @@ import type DynaRecord from "../DynaRecord";
|
|
|
17
17
|
* ```
|
|
18
18
|
* In this example, the `@Table` decorator is applied to the `User` class, specifying custom table metadata options, including the table name (`users`) and the schema (`public`). These options are registered with the ORM, which then uses them to correctly map the `User` entity to the corresponding table in the database. This mapping is critical for executing ORM operations such as querying, inserting, and updating records in the `users` table.
|
|
19
19
|
*/
|
|
20
|
-
declare function Table(props: TableMetadataOptions): (target: typeof DynaRecord,
|
|
20
|
+
declare function Table(props: TableMetadataOptions): (target: typeof DynaRecord, _context: ClassDecoratorContext) => void;
|
|
21
21
|
export default Table;
|
|
22
22
|
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/decorators/Table.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,oBAAoB,YACf,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/decorators/Table.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,KAAK,CAAC,KAAK,EAAE,oBAAoB,YACf,OAAO,UAAU,YAAY,qBAAqB,UAG5E;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -22,10 +22,8 @@ const metadata_1 = __importDefault(require("../metadata"));
|
|
|
22
22
|
* In this example, the `@Table` decorator is applied to the `User` class, specifying custom table metadata options, including the table name (`users`) and the schema (`public`). These options are registered with the ORM, which then uses them to correctly map the `User` entity to the corresponding table in the database. This mapping is critical for executing ORM operations such as querying, inserting, and updating records in the `users` table.
|
|
23
23
|
*/
|
|
24
24
|
function Table(props) {
|
|
25
|
-
return function (target,
|
|
26
|
-
|
|
27
|
-
metadata_1.default.addTable(target.name, props);
|
|
28
|
-
}
|
|
25
|
+
return function (target, _context) {
|
|
26
|
+
metadata_1.default.addTable(target.name, props);
|
|
29
27
|
};
|
|
30
28
|
}
|
|
31
29
|
exports.default = Table;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/BooleanAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,gBAAgB,CACvB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"BooleanAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/BooleanAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,gBAAgB,CACvB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,OAAO,EACjB,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,UAW9C;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -30,16 +30,14 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
30
30
|
*/
|
|
31
31
|
function BooleanAttribute(props) {
|
|
32
32
|
return function (_value, context) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
33
|
+
context.addInitializer(function () {
|
|
34
|
+
metadata_1.default.addEntityAttribute(this.constructor.name, {
|
|
35
|
+
attributeName: context.name.toString(),
|
|
36
|
+
nullable: props?.nullable,
|
|
37
|
+
type: zod_1.z.boolean(),
|
|
38
|
+
...props
|
|
41
39
|
});
|
|
42
|
-
}
|
|
40
|
+
});
|
|
43
41
|
};
|
|
44
42
|
}
|
|
45
43
|
exports.default = BooleanAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/DateAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iBAAS,aAAa,CACpB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,IAAI,EACd,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"DateAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/DateAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iBAAS,aAAa,CACpB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,IAAI,EACd,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,UAY9C;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -33,17 +33,15 @@ const serializers_1 = require("./serializers");
|
|
|
33
33
|
*/
|
|
34
34
|
function DateAttribute(props) {
|
|
35
35
|
return function (_value, context) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
...props
|
|
44
|
-
});
|
|
36
|
+
context.addInitializer(function () {
|
|
37
|
+
metadata_1.default.addEntityAttribute(this.constructor.name, {
|
|
38
|
+
attributeName: context.name.toString(),
|
|
39
|
+
nullable: props?.nullable,
|
|
40
|
+
serializers: serializers_1.dateSerializer,
|
|
41
|
+
type: zod_1.z.date(),
|
|
42
|
+
...props
|
|
45
43
|
});
|
|
46
|
-
}
|
|
44
|
+
});
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
exports.default = DateAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/EnumAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAG5D,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,aAAa,CACpB,CAAC,SAAS,UAAU,EACpB,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EACnC,KAAK,CAAC,CAAC,SAAS,oBAAoB,EACpC,KAAK,EAAE,CAAC,YAEE,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"EnumAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/EnumAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAG5D,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,iBAAS,aAAa,CACpB,CAAC,SAAS,UAAU,EACpB,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EACnC,KAAK,CAAC,CAAC,SAAS,oBAAoB,EACpC,KAAK,EAAE,CAAC,YAEE,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,UAW9C;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -28,16 +28,14 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
28
28
|
*/
|
|
29
29
|
function EnumAttribute(props) {
|
|
30
30
|
return function (_value, context) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
...props
|
|
38
|
-
});
|
|
31
|
+
context.addInitializer(function () {
|
|
32
|
+
metadata_1.default.addEntityAttribute(this.constructor.name, {
|
|
33
|
+
attributeName: context.name.toString(),
|
|
34
|
+
nullable: props.nullable,
|
|
35
|
+
type: zod_1.z.enum(props.values),
|
|
36
|
+
...props
|
|
39
37
|
});
|
|
40
|
-
}
|
|
38
|
+
});
|
|
41
39
|
};
|
|
42
40
|
}
|
|
43
41
|
exports.default = EnumAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForeignKeyAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/ForeignKeyAttribute.ts"],"names":[],"mapp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Y,CAAC,GAChC,UAAU,CAAC,YAAY,CAAC,EAC5B,CAAC,CACF,UAcJ;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -41,18 +41,16 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
41
41
|
*/
|
|
42
42
|
function ForeignKeyAttribute(getTarget, props) {
|
|
43
43
|
return function (_value, context) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
...props
|
|
53
|
-
});
|
|
44
|
+
context.addInitializer(function () {
|
|
45
|
+
const targetEntity = getTarget();
|
|
46
|
+
metadata_1.default.addEntityAttribute(this.constructor.name, {
|
|
47
|
+
attributeName: context.name.toString(),
|
|
48
|
+
nullable: props?.nullable,
|
|
49
|
+
type: zod_1.z.string(),
|
|
50
|
+
foreignKeyTarget: targetEntity,
|
|
51
|
+
...props
|
|
54
52
|
});
|
|
55
|
-
}
|
|
53
|
+
});
|
|
56
54
|
};
|
|
57
55
|
}
|
|
58
56
|
exports.default = ForeignKeyAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/NumberAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,eAAe,CACtB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"NumberAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/NumberAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,eAAe,CACtB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,UAW9C;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -30,16 +30,14 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
30
30
|
*/
|
|
31
31
|
function NumberAttribute(props) {
|
|
32
32
|
return function (_value, context) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
33
|
+
context.addInitializer(function () {
|
|
34
|
+
metadata_1.default.addEntityAttribute(this.constructor.name, {
|
|
35
|
+
attributeName: context.name.toString(),
|
|
36
|
+
nullable: props?.nullable,
|
|
37
|
+
type: zod_1.z.number(),
|
|
38
|
+
...props
|
|
41
39
|
});
|
|
42
|
-
}
|
|
40
|
+
});
|
|
43
41
|
};
|
|
44
42
|
}
|
|
45
43
|
exports.default = NumberAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/ObjectAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAY,MAAM,SAAS,CAAC;AAGzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,YAAY,CAC5D,SAAQ,uBAAuB;IAC/B;;;;OAIG;IACH,MAAM,EAAE,CAAC,CAAC;CACX;
|
|
1
|
+
{"version":3,"file":"ObjectAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/ObjectAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAY,MAAM,SAAS,CAAC;AAGzE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,YAAY,CAC5D,SAAQ,uBAAuB;IAC/B;;;;OAIG;IACH,MAAM,EAAE,CAAC,CAAC;CACX;AA6GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,iBAAS,eAAe,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,CAAC,CAAC,SAAS,YAAY,EACzE,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,YAGtB,SAAS,WACR,yBAAyB,CAChC,CAAC,EACD,iBAAiB,CAAC,CAAC,CAAC,EACpB,sBAAsB,CAAC,CAAC,CAAC,CAC1B,UAmBJ;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -91,7 +91,6 @@ function fieldDefToZod(fieldDef) {
|
|
|
91
91
|
zodType = zod_1.z.enum(fieldDef.values);
|
|
92
92
|
break;
|
|
93
93
|
default: {
|
|
94
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
95
94
|
const _exhaustiveCheck = fieldDef;
|
|
96
95
|
throw new Error("Unsupported field type");
|
|
97
96
|
}
|
|
@@ -189,23 +188,21 @@ function fieldDefToZod(fieldDef) {
|
|
|
189
188
|
*/
|
|
190
189
|
function ObjectAttribute(props) {
|
|
191
190
|
return function (_value, context) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
...restProps
|
|
206
|
-
});
|
|
191
|
+
context.addInitializer(function () {
|
|
192
|
+
const { schema, ...restProps } = props;
|
|
193
|
+
const zodSchema = objectSchemaToZod(schema);
|
|
194
|
+
const partialZodSchema = objectSchemaToZodPartial(schema);
|
|
195
|
+
const serializers = (0, serializers_1.createObjectSerializer)(schema);
|
|
196
|
+
metadata_1.default.addEntityAttribute(this.constructor.name, {
|
|
197
|
+
attributeName: context.name.toString(),
|
|
198
|
+
type: zodSchema,
|
|
199
|
+
partialType: partialZodSchema,
|
|
200
|
+
serializers,
|
|
201
|
+
nullable: false,
|
|
202
|
+
objectSchema: schema,
|
|
203
|
+
...restProps
|
|
207
204
|
});
|
|
208
|
-
}
|
|
205
|
+
});
|
|
209
206
|
};
|
|
210
207
|
}
|
|
211
208
|
exports.default = ObjectAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartitionKeyAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/PartitionKeyAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,qBAAqB,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,YAAY,EACzE,KAAK,CAAC,EAAE,uBAAuB,YAGrB,SAAS,WACR,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"PartitionKeyAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/PartitionKeyAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,qBAAqB,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,YAAY,EACzE,KAAK,CAAC,EAAE,uBAAuB,YAGrB,SAAS,WACR,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,UAU5C;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -25,15 +25,13 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
25
25
|
*/
|
|
26
26
|
function PartitionKeyAttribute(props) {
|
|
27
27
|
return function (_value, context) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
...props
|
|
34
|
-
});
|
|
28
|
+
context.addInitializer(function () {
|
|
29
|
+
metadata_1.default.addPartitionKeyAttribute(this, {
|
|
30
|
+
attributeName: context.name.toString(),
|
|
31
|
+
type: zod_1.z.string(),
|
|
32
|
+
...props
|
|
35
33
|
});
|
|
36
|
-
}
|
|
34
|
+
});
|
|
37
35
|
};
|
|
38
36
|
}
|
|
39
37
|
exports.default = PartitionKeyAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortKeyAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/SortKeyAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,gBAAgB,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,OAAO,EAC/D,KAAK,CAAC,EAAE,uBAAuB,YAGrB,SAAS,WACR,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"SortKeyAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/SortKeyAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,gBAAgB,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,OAAO,EAC/D,KAAK,CAAC,EAAE,uBAAuB,YAGrB,SAAS,WACR,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,UAU5C;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -25,15 +25,13 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
25
25
|
*/
|
|
26
26
|
function SortKeyAttribute(props) {
|
|
27
27
|
return function (_value, context) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
...props
|
|
34
|
-
});
|
|
28
|
+
context.addInitializer(function () {
|
|
29
|
+
metadata_1.default.addSortKeyAttribute(this, {
|
|
30
|
+
attributeName: context.name.toString(),
|
|
31
|
+
type: zod_1.z.string(),
|
|
32
|
+
...props
|
|
35
33
|
});
|
|
36
|
-
}
|
|
34
|
+
});
|
|
37
35
|
};
|
|
38
36
|
}
|
|
39
37
|
exports.default = SortKeyAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/StringAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EAChB,aAAa,EACd,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,eAAe,CACtB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"StringAttribute.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/StringAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EAChB,aAAa,EACd,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,eAAe,CACtB,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,gBAAgB,EAC1B,KAAK,CAAC,EAAE,CAAC,YAEC,SAAS,WACR,yBAAyB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAW7D;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -30,16 +30,14 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
30
30
|
*/
|
|
31
31
|
function StringAttribute(props) {
|
|
32
32
|
return function (_value, context) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
...props
|
|
40
|
-
});
|
|
33
|
+
context.addInitializer(function () {
|
|
34
|
+
metadata_1.default.addEntityAttribute(this.constructor.name, {
|
|
35
|
+
attributeName: context.name.toString(),
|
|
36
|
+
nullable: props?.nullable,
|
|
37
|
+
type: zod_1.z.string(),
|
|
38
|
+
...props
|
|
41
39
|
});
|
|
42
|
-
}
|
|
40
|
+
});
|
|
43
41
|
};
|
|
44
42
|
}
|
|
45
43
|
exports.default = StringAttribute;
|
|
@@ -9,8 +9,8 @@ import type { Serializers } from "../../metadata/types";
|
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
11
|
export declare const dateSerializer: {
|
|
12
|
-
toEntityAttribute: (val: NativeAttributeValue) =>
|
|
13
|
-
toTableAttribute: (val
|
|
12
|
+
toEntityAttribute: (val: NativeAttributeValue) => unknown;
|
|
13
|
+
toTableAttribute: (val: unknown) => string | undefined;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* Recursively walks an {@link ObjectSchema} and converts the entity value to its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializers.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/serializers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;6BACA,oBAAoB;
|
|
1
|
+
{"version":3,"file":"serializers.d.ts","sourceRoot":"","sources":["../../../../src/decorators/attributes/serializers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;6BACA,oBAAoB,KAAG,OAAO;4BAM/B,OAAO;CAEhC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUzB;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,OAAO,GACX,OAAO,CAaT;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUzB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CAOxE"}
|
|
@@ -19,7 +19,7 @@ exports.dateSerializer = {
|
|
|
19
19
|
}
|
|
20
20
|
return val;
|
|
21
21
|
},
|
|
22
|
-
toTableAttribute: (val) => val
|
|
22
|
+
toTableAttribute: (val) => val instanceof Date ? val.toISOString() : undefined
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Recursively walks an {@link ObjectSchema} and converts the entity value to its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BelongsTo.d.ts","sourceRoot":"","sources":["../../../../src/decorators/relationships/BelongsTo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,iBAAS,SAAS,CAChB,MAAM,SAAS,UAAU,EACzB,EAAE,SAAS,sBAAsB,CAAC,MAAM,CAAC,EAEzC,SAAS,EAAE,MAAM,WAAW,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EACzD,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,CAAC,YAGvB,SAAS,WACR,0BAA0B,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"BelongsTo.d.ts","sourceRoot":"","sources":["../../../../src/decorators/relationships/BelongsTo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,iBAAS,SAAS,CAChB,MAAM,SAAS,UAAU,EACzB,EAAE,SAAS,sBAAsB,CAAC,MAAM,CAAC,EAEzC,SAAS,EAAE,MAAM,WAAW,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EACzD,KAAK,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,CAAC,YAGvB,SAAS,WACR,0BAA0B,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,UAW1E;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -34,16 +34,14 @@ const metadata_1 = __importDefault(require("../../metadata"));
|
|
|
34
34
|
*/
|
|
35
35
|
function BelongsTo(getTarget, props) {
|
|
36
36
|
return function (_value, context) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
foreignKey: props.foreignKey
|
|
44
|
-
});
|
|
37
|
+
context.addInitializer(function () {
|
|
38
|
+
metadata_1.default.addEntityRelationship(this.constructor.name, {
|
|
39
|
+
type: "BelongsTo",
|
|
40
|
+
propertyName: context.name,
|
|
41
|
+
target: getTarget(),
|
|
42
|
+
foreignKey: props.foreignKey
|
|
45
43
|
});
|
|
46
|
-
}
|
|
44
|
+
});
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
exports.default = BelongsTo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HasAndBelongsToMany.d.ts","sourceRoot":"","sources":["../../../../src/decorators/relationships/HasAndBelongsToMany.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK;CAC7C,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX;;;GAGG;AACH,KAAK,eAAe,CAAC,CAAC,SAAS,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,MAAM;IACxE;;;;OAIG;
|
|
1
|
+
{"version":3,"file":"HasAndBelongsToMany.d.ts","sourceRoot":"","sources":["../../../../src/decorators/relationships/HasAndBelongsToMany.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,GAAG,C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*/
|
|
49
49
|
function HasAndBelongsToMany(getTarget, props) {
|
|
50
50
|
return (_value, context) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
joinTableName: joinTable.name
|
|
60
|
-
});
|
|
61
|
-
metadata_1.default.addJoinTable(joinTable.name, {
|
|
62
|
-
entity: target,
|
|
63
|
-
foreignKey: foreignKey
|
|
64
|
-
});
|
|
51
|
+
context.addInitializer(function () {
|
|
52
|
+
const target = getTarget();
|
|
53
|
+
const { joinTable, foreignKey } = props.through();
|
|
54
|
+
metadata_1.default.addEntityRelationship(this.constructor.name, {
|
|
55
|
+
type: "HasAndBelongsToMany",
|
|
56
|
+
propertyName: context.name,
|
|
57
|
+
target,
|
|
58
|
+
joinTableName: joinTable.name
|
|
65
59
|
});
|
|
66
|
-
|
|
60
|
+
metadata_1.default.addJoinTable(joinTable.name, {
|
|
61
|
+
entity: target,
|
|
62
|
+
foreignKey: foreignKey
|
|
63
|
+
});
|
|
64
|
+
});
|
|
67
65
|
};
|
|
68
66
|
}
|
|
69
67
|
exports.default = HasAndBelongsToMany;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HasMany.d.ts","sourceRoot":"","sources":["../../../../src/decorators/relationships/HasMany.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,UAAU,YAAY,CAAC,CAAC,SAAS,UAAU;IACzC,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,OAAO,CAAC,CAAC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