@arcaelas/dynamite 1.0.19 → 1.0.23

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 (34) hide show
  1. package/package.json +11 -42
  2. package/src/scripts/load_seed.d.ts +5 -0
  3. package/src/scripts/load_seed.js +54 -0
  4. package/src/src/@types/index.d.ts +188 -0
  5. package/src/src/@types/index.js +9 -0
  6. package/src/{core → src/core}/client.d.ts +4 -16
  7. package/src/{core → src/core}/client.js +115 -38
  8. package/src/{core → src/core}/decorator.d.ts +0 -15
  9. package/src/{core → src/core}/decorator.js +5 -35
  10. package/src/src/core/table.d.ts +81 -0
  11. package/src/src/core/table.js +892 -0
  12. package/src/{decorators → src/decorators}/indexes.d.ts +1 -1
  13. package/src/{decorators → src/decorators}/indexes.js +12 -20
  14. package/src/{decorators → src/decorators}/relations.d.ts +20 -1
  15. package/src/{decorators → src/decorators}/relations.js +32 -2
  16. package/src/{decorators → src/decorators}/timestamps.d.ts +4 -4
  17. package/src/{decorators → src/decorators}/timestamps.js +11 -6
  18. package/src/{decorators → src/decorators}/transforms.d.ts +17 -4
  19. package/src/{decorators → src/decorators}/transforms.js +40 -28
  20. package/src/src/index.d.ts +15 -0
  21. package/src/{index.js → src/index.js} +8 -22
  22. package/src/src/index.test.d.ts +6 -0
  23. package/src/src/index.test.js +789 -0
  24. package/src/{utils → src/utils}/relations.d.ts +5 -3
  25. package/src/src/utils/relations.js +216 -0
  26. package/src/@types/index.d.ts +0 -137
  27. package/src/core/method.d.ts +0 -73
  28. package/src/core/method.js +0 -140
  29. package/src/core/table.d.ts +0 -56
  30. package/src/core/table.js +0 -659
  31. package/src/index.d.ts +0 -16
  32. package/src/index.test.d.ts +0 -13
  33. package/src/index.test.js +0 -1992
  34. package/src/utils/relations.js +0 -141
@@ -35,4 +35,4 @@ export declare const IndexSort: (...params: any[]) => (target: any, propertyKey:
35
35
  * }
36
36
  * ```
37
37
  */
38
- export declare function PrimaryKey(): PropertyDecorator;
38
+ export declare const PrimaryKey: (...params: any[]) => (target: any, propertyKey: string | symbol) => void;
@@ -6,8 +6,7 @@
6
6
  * @fecha 2025-01-28
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.IndexSort = exports.Index = void 0;
10
- exports.PrimaryKey = PrimaryKey;
9
+ exports.PrimaryKey = exports.IndexSort = exports.Index = void 0;
11
10
  const decorator_1 = require("../core/decorator");
12
11
  /**
13
12
  * @description Decorador para marcar propiedad como Partition Key
@@ -46,22 +45,15 @@ exports.IndexSort = (0, decorator_1.decorator)((_schema, col) => {
46
45
  * }
47
46
  * ```
48
47
  */
49
- function PrimaryKey() {
50
- return (target, prop) => {
51
- const table_class = target.constructor;
52
- const column_name = String(prop);
53
- const schema = (0, decorator_1.ensureSchema)(table_class);
54
- // Crear columna si no existe
55
- if (!schema.columns[column_name]) {
56
- schema.columns[column_name] = { name: column_name, get: [], set: [], store: {} };
57
- }
58
- // Configurar como primary key
59
- Object.assign(schema.columns[column_name].store, {
60
- index: true,
61
- primaryKey: true,
62
- nullable: false
63
- });
64
- schema.primary_key = column_name;
65
- };
66
- }
48
+ exports.PrimaryKey = (0, decorator_1.decorator)((table_class, col) => {
49
+ const schema = table_class[decorator_1.SCHEMA];
50
+ // Configurar como primary key
51
+ Object.assign(col.store, {
52
+ index: true,
53
+ primaryKey: true,
54
+ nullable: false
55
+ });
56
+ // Obtener nombre de columna desde col.name
57
+ schema.primary_key = col.name;
58
+ });
67
59
  //# sourceMappingURL=indexes.js.map
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @file relations.ts
3
- * @description Decoradores de relaciones: @HasMany, @HasOne, @BelongsTo
3
+ * @description Decoradores de relaciones: @HasMany, @HasOne, @BelongsTo, @ManyToMany
4
4
  * @autor Miguel Alejandro
5
5
  * @fecha 2025-01-28
6
6
  */
@@ -53,3 +53,22 @@ export declare const HasOne: (...params: any[]) => (target: any, propertyKey: st
53
53
  * ```
54
54
  */
55
55
  export declare const BelongsTo: (...params: any[]) => (target: any, propertyKey: string | symbol) => void;
56
+ /**
57
+ * @description Decorador para relaciones muchos a muchos (N:M)
58
+ * @param model Función que retorna la clase del modelo relacionado
59
+ * @param pivotTable Nombre de la tabla pivot
60
+ * @param foreignKey Clave foránea en la tabla pivot que apunta al modelo actual
61
+ * @param relatedKey Clave foránea en la tabla pivot que apunta al modelo relacionado
62
+ * @param localKey Clave local (por defecto 'id')
63
+ * @param relatedPK Clave primaria del modelo relacionado (por defecto 'id')
64
+ * @example
65
+ * ```typescript
66
+ * class User extends Table<User> {
67
+ * @PrimaryKey() id: string;
68
+ *
69
+ * @ManyToMany(() => Role, 'users_roles', 'user_id', 'role_id')
70
+ * declare roles: NonAttribute<Role[]>;
71
+ * }
72
+ * ```
73
+ */
74
+ export declare const ManyToMany: (...params: any[]) => (target: any, propertyKey: string | symbol) => void;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @file relations.ts
4
- * @description Decoradores de relaciones: @HasMany, @HasOne, @BelongsTo
4
+ * @description Decoradores de relaciones: @HasMany, @HasOne, @BelongsTo, @ManyToMany
5
5
  * @autor Miguel Alejandro
6
6
  * @fecha 2025-01-28
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.BelongsTo = exports.HasOne = exports.HasMany = void 0;
9
+ exports.ManyToMany = exports.BelongsTo = exports.HasOne = exports.HasMany = void 0;
10
10
  const decorator_1 = require("../core/decorator");
11
11
  /**
12
12
  * @description Decorador para relaciones uno a muchos (1:N)
@@ -81,4 +81,34 @@ exports.BelongsTo = (0, decorator_1.decorator)((_schema, col, params) => {
81
81
  localKey
82
82
  };
83
83
  });
84
+ /**
85
+ * @description Decorador para relaciones muchos a muchos (N:M)
86
+ * @param model Función que retorna la clase del modelo relacionado
87
+ * @param pivotTable Nombre de la tabla pivot
88
+ * @param foreignKey Clave foránea en la tabla pivot que apunta al modelo actual
89
+ * @param relatedKey Clave foránea en la tabla pivot que apunta al modelo relacionado
90
+ * @param localKey Clave local (por defecto 'id')
91
+ * @param relatedPK Clave primaria del modelo relacionado (por defecto 'id')
92
+ * @example
93
+ * ```typescript
94
+ * class User extends Table<User> {
95
+ * @PrimaryKey() id: string;
96
+ *
97
+ * @ManyToMany(() => Role, 'users_roles', 'user_id', 'role_id')
98
+ * declare roles: NonAttribute<Role[]>;
99
+ * }
100
+ * ```
101
+ */
102
+ exports.ManyToMany = (0, decorator_1.decorator)((_schema, col, params) => {
103
+ const [model, pivotTable, foreignKey, relatedKey, localKey = 'id', relatedPK = 'id'] = params;
104
+ col.store.relation = {
105
+ type: 'ManyToMany',
106
+ model,
107
+ foreignKey,
108
+ relatedKey,
109
+ pivotTable,
110
+ localKey,
111
+ relatedPK
112
+ };
113
+ });
84
114
  //# sourceMappingURL=relations.js.map
@@ -5,8 +5,8 @@
5
5
  * @fecha 2025-01-28
6
6
  */
7
7
  /**
8
- * @description Decorador que establece automáticamente la fecha/hora de creación.
9
- * El valor se genera solo si no existe uno previo.
8
+ * @description Decorador que establece automáticamente la fecha/hora de creación usando pipelines.
9
+ * El valor se genera en el getter si no existe, y se preserva en el setter.
10
10
  * @example
11
11
  * ```typescript
12
12
  * class User extends Table<User> {
@@ -17,8 +17,8 @@
17
17
  */
18
18
  export declare const CreatedAt: (...params: any[]) => (target: any, propertyKey: string | symbol) => void;
19
19
  /**
20
- * @description Decorador que marca una propiedad para que se actualice automáticamente
21
- * con la fecha/hora actual cada vez que se guarde el modelo.
20
+ * @description Decorador que actualiza automáticamente la fecha/hora en cada asignación usando pipelines.
21
+ * El timestamp se actualiza cada vez que se escribe en la propiedad.
22
22
  * @example
23
23
  * ```typescript
24
24
  * class User extends Table<User> {
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.DeleteAt = exports.UpdatedAt = exports.CreatedAt = void 0;
10
10
  const decorator_1 = require("../core/decorator");
11
11
  /**
12
- * @description Decorador que establece automáticamente la fecha/hora de creación.
13
- * El valor se genera solo si no existe uno previo.
12
+ * @description Decorador que establece automáticamente la fecha/hora de creación usando pipelines.
13
+ * El valor se genera en el getter si no existe, y se preserva en el setter.
14
14
  * @example
15
15
  * ```typescript
16
16
  * class User extends Table<User> {
@@ -20,12 +20,14 @@ const decorator_1 = require("../core/decorator");
20
20
  * ```
21
21
  */
22
22
  exports.CreatedAt = (0, decorator_1.decorator)((_schema, col) => {
23
- col.store.createdAt = true;
23
+ // Getter: asignar timestamp si no existe (solo primera vez)
24
24
  col.get.push((value) => value ?? new Date().toISOString());
25
+ // Setter: preservar valor si ya existe, ignorar intentos de cambio
26
+ col.set.push((current, next) => current ?? next ?? new Date().toISOString());
25
27
  });
26
28
  /**
27
- * @description Decorador que marca una propiedad para que se actualice automáticamente
28
- * con la fecha/hora actual cada vez que se guarde el modelo.
29
+ * @description Decorador que actualiza automáticamente la fecha/hora en cada asignación usando pipelines.
30
+ * El timestamp se actualiza cada vez que se escribe en la propiedad.
29
31
  * @example
30
32
  * ```typescript
31
33
  * class User extends Table<User> {
@@ -36,7 +38,10 @@ exports.CreatedAt = (0, decorator_1.decorator)((_schema, col) => {
36
38
  * ```
37
39
  */
38
40
  exports.UpdatedAt = (0, decorator_1.decorator)((_schema, col) => {
39
- col.store.updatedAt = true;
41
+ // Getter: retornar valor actual o timestamp si no existe
42
+ col.get.push((value) => value ?? new Date().toISOString());
43
+ // Setter: siempre actualizar con nuevo timestamp (ignora el valor pasado)
44
+ col.set.push((_current, _next) => new Date().toISOString());
40
45
  });
41
46
  /**
42
47
  * @description Decorador que marca una propiedad como columna de soft delete.
@@ -5,7 +5,7 @@
5
5
  * @fecha 2025-01-28
6
6
  */
7
7
  /**
8
- * @description Decorador para establecer valor por defecto
8
+ * @description Decorador para establecer valor por defecto usando pipeline de getter
9
9
  * @param factory Valor por defecto o función que lo genera
10
10
  * @example
11
11
  * ```typescript
@@ -32,16 +32,15 @@ export declare const Default: (...params: any[]) => (target: any, propertyKey: s
32
32
  */
33
33
  export declare const Mutate: (...params: any[]) => (target: any, propertyKey: string | symbol) => void;
34
34
  /**
35
- * @description Decorador para validar valores
35
+ * @description Decorador para validar valores (se ejecuta en el setter)
36
36
  * @param validators Función o array de funciones validadoras
37
- * @param options Opciones de validación (lazy: true para validar en save())
38
37
  * @example
39
38
  * ```typescript
40
39
  * class User extends Table<User> {
41
40
  * @Validate((v) => v.length > 0 || 'Email requerido')
42
41
  * declare email: string;
43
42
  *
44
- * @Validate([isEmail, isNotEmpty], { lazy: true })
43
+ * @Validate([isEmail, isNotEmpty])
45
44
  * declare email2: string;
46
45
  * }
47
46
  * ```
@@ -84,3 +83,17 @@ export declare const NotNull: (...params: any[]) => (target: any, propertyKey: s
84
83
  * ```
85
84
  */
86
85
  export declare function Name(label: string): ClassDecorator & PropertyDecorator;
86
+ /**
87
+ * @description Decorador para marcar una propiedad como columna sin agregar comportamiento especial
88
+ * @example
89
+ * ```typescript
90
+ * class Product extends Table<Product> {
91
+ * @Column()
92
+ * price!: number;
93
+ *
94
+ * @Column()
95
+ * category_id!: string;
96
+ * }
97
+ * ```
98
+ */
99
+ export declare const Column: (...params: any[]) => (target: any, propertyKey: string | symbol) => void;
@@ -6,11 +6,11 @@
6
6
  * @fecha 2025-01-28
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.NotNull = exports.Serialize = exports.Validate = exports.Mutate = exports.Default = void 0;
9
+ exports.Column = exports.NotNull = exports.Serialize = exports.Validate = exports.Mutate = exports.Default = void 0;
10
10
  exports.Name = Name;
11
11
  const decorator_1 = require("../core/decorator");
12
12
  /**
13
- * @description Decorador para establecer valor por defecto
13
+ * @description Decorador para establecer valor por defecto usando pipeline de getter
14
14
  * @param factory Valor por defecto o función que lo genera
15
15
  * @example
16
16
  * ```typescript
@@ -25,6 +25,7 @@ const decorator_1 = require("../core/decorator");
25
25
  */
26
26
  exports.Default = (0, decorator_1.decorator)((_schema, col, params) => {
27
27
  const fallback = params[0];
28
+ // Usar pipeline de getter con ?? para valores nullish
28
29
  col.get.push((value) => value ?? (typeof fallback === 'function' ? fallback() : fallback));
29
30
  });
30
31
  /**
@@ -40,44 +41,37 @@ exports.Default = (0, decorator_1.decorator)((_schema, col, params) => {
40
41
  */
41
42
  exports.Mutate = (0, decorator_1.decorator)((_schema, col, params) => {
42
43
  const fn = params[0];
43
- col.set.push((value) => fn(value));
44
+ col.set.push((current, next) => fn(next));
44
45
  });
45
46
  /**
46
- * @description Decorador para validar valores
47
+ * @description Decorador para validar valores (se ejecuta en el setter)
47
48
  * @param validators Función o array de funciones validadoras
48
- * @param options Opciones de validación (lazy: true para validar en save())
49
49
  * @example
50
50
  * ```typescript
51
51
  * class User extends Table<User> {
52
52
  * @Validate((v) => v.length > 0 || 'Email requerido')
53
53
  * declare email: string;
54
54
  *
55
- * @Validate([isEmail, isNotEmpty], { lazy: true })
55
+ * @Validate([isEmail, isNotEmpty])
56
56
  * declare email2: string;
57
57
  * }
58
58
  * ```
59
59
  */
60
60
  exports.Validate = (0, decorator_1.decorator)((_schema, col, params) => {
61
- const [validators, options] = params;
61
+ const validators = params[0];
62
62
  const list = Array.isArray(validators) ? validators : [validators];
63
- const is_lazy = options?.lazy ?? false;
64
63
  if (!list.length || list.some((v) => typeof v !== 'function')) {
65
64
  throw new TypeError('@Validate requiere funciones');
66
65
  }
67
- if (is_lazy) {
68
- col.store.lazy_validators = list;
69
- }
70
- else {
71
- col.set.push((value) => {
72
- for (const fn of list) {
73
- const result = fn(value);
74
- if (result !== true) {
75
- throw new Error(typeof result === 'string' ? result : 'Validación fallida');
76
- }
66
+ col.set.push((current, next) => {
67
+ for (const fn of list) {
68
+ const result = fn(next);
69
+ if (result !== true) {
70
+ throw new Error(typeof result === 'string' ? result : 'Validación fallida');
77
71
  }
78
- return value;
79
- });
80
- }
72
+ }
73
+ return next;
74
+ });
81
75
  });
82
76
  /**
83
77
  * @description Decorador para transformar valores entre DB y aplicación
@@ -96,7 +90,7 @@ exports.Serialize = (0, decorator_1.decorator)((_schema, col, params) => {
96
90
  if (fromDB)
97
91
  col.get.push((v) => v !== null && v !== undefined ? fromDB(v) : v);
98
92
  if (toDB)
99
- col.set.push((v) => v !== null && v !== undefined ? toDB(v) : v);
93
+ col.set.push((current, next) => next !== null && next !== undefined ? toDB(next) : next);
100
94
  });
101
95
  /**
102
96
  * @description Decorador que valida que el valor no sea null, undefined o string vacío
@@ -108,14 +102,16 @@ exports.Serialize = (0, decorator_1.decorator)((_schema, col, params) => {
108
102
  * }
109
103
  * ```
110
104
  */
111
- exports.NotNull = (0, decorator_1.decorator)((_schema, col) => {
105
+ exports.NotNull = (0, decorator_1.decorator)((_schema, col, params) => {
106
+ const custom_message = params[0];
112
107
  col.store.nullable = false;
113
- col.set.push((value) => {
114
- const is_empty = value === null || value === undefined || (typeof value === 'string' && value.trim() === '');
108
+ col.store.notNullMessage = custom_message;
109
+ col.set.push((current, next) => {
110
+ const is_empty = next === null || next === undefined || (typeof next === 'string' && next.trim() === '');
115
111
  if (is_empty) {
116
- throw new Error(`El campo ${col.name} no puede estar vacío`);
112
+ throw new Error(custom_message || `El campo ${col.name} no puede estar vacío`);
117
113
  }
118
- return value;
114
+ return next;
119
115
  });
120
116
  });
121
117
  /**
@@ -136,7 +132,7 @@ function Name(label) {
136
132
  }
137
133
  return (target, prop) => {
138
134
  const ctor = prop === undefined ? target : target.constructor;
139
- const schema = (0, decorator_1.ensureSchema)(ctor);
135
+ const schema = ctor[decorator_1.SCHEMA];
140
136
  if (prop === undefined) {
141
137
  // @Name en clase - renombrar tabla
142
138
  schema.name = label;
@@ -151,4 +147,20 @@ function Name(label) {
151
147
  }
152
148
  };
153
149
  }
150
+ /**
151
+ * @description Decorador para marcar una propiedad como columna sin agregar comportamiento especial
152
+ * @example
153
+ * ```typescript
154
+ * class Product extends Table<Product> {
155
+ * @Column()
156
+ * price!: number;
157
+ *
158
+ * @Column()
159
+ * category_id!: string;
160
+ * }
161
+ * ```
162
+ */
163
+ exports.Column = (0, decorator_1.decorator)((_schema, _col) => {
164
+ // No hace nada, solo marca la propiedad como columna en schema.columns
165
+ });
154
166
  //# sourceMappingURL=transforms.js.map
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @file index.ts
3
+ * @description Punto de entrada público de la librería - Arquitectura Minimalista
4
+ * @autor Miguel Alejandro
5
+ * @fecha 2025-01-28
6
+ */
7
+ export { Dynamite } from "./core/client";
8
+ export { default as Table } from "./core/table";
9
+ export { decorator, relationDecorator, SCHEMA } from "./core/decorator";
10
+ export { Index, IndexSort, PrimaryKey } from "./decorators/indexes";
11
+ export { CreatedAt, UpdatedAt, DeleteAt } from "./decorators/timestamps";
12
+ export { Default, Mutate, Validate, Serialize, NotNull, Name, Column } from "./decorators/transforms";
13
+ export { HasMany, BelongsTo, HasOne, ManyToMany } from "./decorators/relations";
14
+ export type { NonAttribute, CreationOptional, InferAttributes, InferRelations, WhereOptions, QueryOperator, CreateInput, UpdateInput, PickRelations, } from "./@types/index";
15
+ export { TransactionContext } from "./core/client";
@@ -5,25 +5,11 @@
5
5
  * @autor Miguel Alejandro
6
6
  * @fecha 2025-01-28
7
7
  */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
- };
22
8
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
9
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
10
  };
25
11
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.TransactionContext = exports.HasOne = exports.HasMany = exports.BelongsTo = exports.Validate = exports.Serialize = exports.NotNull = exports.Name = exports.Mutate = exports.Default = exports.UpdatedAt = exports.DeleteAt = exports.CreatedAt = exports.PrimaryKey = exports.IndexSort = exports.Index = exports.VALUES = exports.SCHEMA = exports.relationDecorator = exports.decorator = exports.Table = exports.Dynamite = void 0;
12
+ exports.TransactionContext = exports.ManyToMany = exports.HasOne = exports.BelongsTo = exports.HasMany = exports.Column = exports.Name = exports.NotNull = exports.Serialize = exports.Validate = exports.Mutate = exports.Default = exports.DeleteAt = exports.UpdatedAt = exports.CreatedAt = exports.PrimaryKey = exports.IndexSort = exports.Index = exports.SCHEMA = exports.relationDecorator = exports.decorator = exports.Table = exports.Dynamite = void 0;
27
13
  // Clases núcleo
28
14
  var client_1 = require("./core/client");
29
15
  Object.defineProperty(exports, "Dynamite", { enumerable: true, get: function () { return client_1.Dynamite; } });
@@ -34,7 +20,6 @@ var decorator_1 = require("./core/decorator");
34
20
  Object.defineProperty(exports, "decorator", { enumerable: true, get: function () { return decorator_1.decorator; } });
35
21
  Object.defineProperty(exports, "relationDecorator", { enumerable: true, get: function () { return decorator_1.relationDecorator; } });
36
22
  Object.defineProperty(exports, "SCHEMA", { enumerable: true, get: function () { return decorator_1.SCHEMA; } });
37
- Object.defineProperty(exports, "VALUES", { enumerable: true, get: function () { return decorator_1.VALUES; } });
38
23
  // Decoradores - Índices
39
24
  var indexes_1 = require("./decorators/indexes");
40
25
  Object.defineProperty(exports, "Index", { enumerable: true, get: function () { return indexes_1.Index; } });
@@ -43,23 +28,24 @@ Object.defineProperty(exports, "PrimaryKey", { enumerable: true, get: function (
43
28
  // Decoradores - Timestamps
44
29
  var timestamps_1 = require("./decorators/timestamps");
45
30
  Object.defineProperty(exports, "CreatedAt", { enumerable: true, get: function () { return timestamps_1.CreatedAt; } });
46
- Object.defineProperty(exports, "DeleteAt", { enumerable: true, get: function () { return timestamps_1.DeleteAt; } });
47
31
  Object.defineProperty(exports, "UpdatedAt", { enumerable: true, get: function () { return timestamps_1.UpdatedAt; } });
32
+ Object.defineProperty(exports, "DeleteAt", { enumerable: true, get: function () { return timestamps_1.DeleteAt; } });
48
33
  // Decoradores - Transformación
49
34
  var transforms_1 = require("./decorators/transforms");
50
35
  Object.defineProperty(exports, "Default", { enumerable: true, get: function () { return transforms_1.Default; } });
51
36
  Object.defineProperty(exports, "Mutate", { enumerable: true, get: function () { return transforms_1.Mutate; } });
52
- Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return transforms_1.Name; } });
53
- Object.defineProperty(exports, "NotNull", { enumerable: true, get: function () { return transforms_1.NotNull; } });
54
- Object.defineProperty(exports, "Serialize", { enumerable: true, get: function () { return transforms_1.Serialize; } });
55
37
  Object.defineProperty(exports, "Validate", { enumerable: true, get: function () { return transforms_1.Validate; } });
38
+ Object.defineProperty(exports, "Serialize", { enumerable: true, get: function () { return transforms_1.Serialize; } });
39
+ Object.defineProperty(exports, "NotNull", { enumerable: true, get: function () { return transforms_1.NotNull; } });
40
+ Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return transforms_1.Name; } });
41
+ Object.defineProperty(exports, "Column", { enumerable: true, get: function () { return transforms_1.Column; } });
56
42
  // Decoradores - Relaciones
57
43
  var relations_1 = require("./decorators/relations");
58
- Object.defineProperty(exports, "BelongsTo", { enumerable: true, get: function () { return relations_1.BelongsTo; } });
59
44
  Object.defineProperty(exports, "HasMany", { enumerable: true, get: function () { return relations_1.HasMany; } });
45
+ Object.defineProperty(exports, "BelongsTo", { enumerable: true, get: function () { return relations_1.BelongsTo; } });
60
46
  Object.defineProperty(exports, "HasOne", { enumerable: true, get: function () { return relations_1.HasOne; } });
47
+ Object.defineProperty(exports, "ManyToMany", { enumerable: true, get: function () { return relations_1.ManyToMany; } });
61
48
  // Re-exportar TransactionContext para compatibilidad
62
- __exportStar(require("./@types/index"), exports);
63
49
  var client_2 = require("./core/client");
64
50
  Object.defineProperty(exports, "TransactionContext", { enumerable: true, get: function () { return client_2.TransactionContext; } });
65
51
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @file index.test.ts
3
+ * @description Test suite para Dynamite ORM
4
+ * @run tsx --tsconfig tsx.config.json src/index.test.ts
5
+ */
6
+ export {};