@deessejs/collections 0.0.51 → 0.2.0
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/LICENSE +21 -0
- package/README.md +204 -0
- package/dist/index.js +868 -22
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +821 -0
- package/dist/index.mjs.map +1 -0
- package/dist/next/index.js +421 -51
- package/dist/next/index.js.map +1 -0
- package/dist/next/index.mjs +377 -0
- package/dist/next/index.mjs.map +1 -0
- package/package.json +76 -72
- package/dist/collections/define.d.ts +0 -43
- package/dist/collections/define.js +0 -13
- package/dist/collections/extend-fields.d.ts +0 -3
- package/dist/collections/extend-fields.js +0 -13
- package/dist/collections/index.d.ts +0 -1
- package/dist/collections/index.js +0 -17
- package/dist/collections/types.d.ts +0 -29
- package/dist/collections/types.js +0 -2
- package/dist/config/index.d.ts +0 -2
- package/dist/config/index.js +0 -45
- package/dist/config/orchestrator.d.ts +0 -8
- package/dist/config/orchestrator.js +0 -70
- package/dist/config/types.d.ts +0 -14
- package/dist/config/types.js +0 -2
- package/dist/database/types.d.ts +0 -10
- package/dist/database/types.js +0 -2
- package/dist/drizzle/generate.d.ts +0 -2
- package/dist/drizzle/generate.js +0 -49
- package/dist/drizzle/index.d.ts +0 -31
- package/dist/drizzle/index.js +0 -24
- package/dist/drizzle/types.js +0 -1
- package/dist/dsl/collections.d.ts +0 -13
- package/dist/dsl/collections.js +0 -14
- package/dist/dsl/index.d.ts +0 -1
- package/dist/dsl/index.js +0 -17
- package/dist/dsl/types.d.ts +0 -1
- package/dist/dsl/types.js +0 -2
- package/dist/esm/collections/define.d.ts +0 -43
- package/dist/esm/collections/define.js +0 -9
- package/dist/esm/collections/extend-fields.d.ts +0 -3
- package/dist/esm/collections/extend-fields.js +0 -9
- package/dist/esm/collections/index.d.ts +0 -1
- package/dist/esm/collections/index.js +0 -1
- package/dist/esm/collections/types.d.ts +0 -29
- package/dist/esm/collections/types.js +0 -1
- package/dist/esm/config/index.d.ts +0 -5
- package/dist/esm/config/index.js +0 -13
- package/dist/esm/config/orchestrator.d.ts +0 -8
- package/dist/esm/config/orchestrator.js +0 -66
- package/dist/esm/config/types.d.ts +0 -14
- package/dist/esm/config/types.js +0 -1
- package/dist/esm/database/types.d.ts +0 -10
- package/dist/esm/database/types.js +0 -1
- package/dist/esm/drizzle/generate.d.ts +0 -2
- package/dist/esm/drizzle/generate.js +0 -30
- package/dist/esm/drizzle/index.d.ts +0 -31
- package/dist/esm/drizzle/index.js +0 -20
- package/dist/esm/drizzle/types.d.ts +0 -0
- package/dist/esm/drizzle/types.js +0 -1
- package/dist/esm/dsl/collections.d.ts +0 -13
- package/dist/esm/dsl/collections.js +0 -10
- package/dist/esm/dsl/index.d.ts +0 -1
- package/dist/esm/dsl/index.js +0 -1
- package/dist/esm/fields/constraints.d.ts +0 -6
- package/dist/esm/fields/constraints.js +0 -59
- package/dist/esm/fields/core.d.ts +0 -71
- package/dist/esm/fields/core.js +0 -27
- package/dist/esm/fields/field.d.ts +0 -24
- package/dist/esm/fields/field.js +0 -33
- package/dist/esm/fields/index.d.ts +0 -4
- package/dist/esm/fields/index.js +0 -4
- package/dist/esm/fields/types.d.ts +0 -48
- package/dist/esm/fields/types.js +0 -1
- package/dist/esm/index.d.ts +0 -8
- package/dist/esm/index.js +0 -8
- package/dist/esm/next/index.d.ts +0 -5
- package/dist/esm/next/index.js +0 -17
- package/dist/esm/plugins/index.d.ts +0 -2
- package/dist/esm/plugins/index.js +0 -3
- package/dist/esm/plugins/types.d.ts +0 -1
- package/dist/esm/plugins/types.js +0 -1
- package/dist/esm/providers/index.d.ts +0 -2
- package/dist/esm/providers/index.js +0 -53
- package/dist/esm/providers/types.d.ts +0 -8
- package/dist/esm/providers/types.js +0 -1
- package/dist/esm/utils/deep-partial.d.ts +0 -3
- package/dist/esm/utils/deep-partial.js +0 -1
- package/dist/esm/utils/exact.d.ts +0 -1
- package/dist/esm/utils/exact.js +0 -1
- package/dist/esm/utils/union-intersection.d.ts +0 -1
- package/dist/esm/utils/union-intersection.js +0 -1
- package/dist/esm/worker/index.d.ts +0 -2
- package/dist/esm/worker/index.js +0 -32
- package/dist/fields/constraints.d.ts +0 -6
- package/dist/fields/constraints.js +0 -67
- package/dist/fields/core.d.ts +0 -71
- package/dist/fields/core.js +0 -33
- package/dist/fields/field.d.ts +0 -24
- package/dist/fields/field.js +0 -38
- package/dist/fields/index.d.ts +0 -4
- package/dist/fields/index.js +0 -20
- package/dist/fields/types.d.ts +0 -48
- package/dist/fields/types.js +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/next/index.d.ts +0 -5
- package/dist/plugins/index.d.ts +0 -2
- package/dist/plugins/index.js +0 -7
- package/dist/plugins/types.d.ts +0 -1
- package/dist/plugins/types.js +0 -2
- package/dist/providers/index.d.ts +0 -2
- package/dist/providers/index.js +0 -57
- package/dist/providers/types.d.ts +0 -8
- package/dist/providers/types.js +0 -2
- package/dist/utils/deep-partial.d.ts +0 -3
- package/dist/utils/deep-partial.js +0 -2
- package/dist/utils/exact.d.ts +0 -1
- package/dist/utils/exact.js +0 -1
- package/dist/utils/union-intersection.d.ts +0 -1
- package/dist/utils/union-intersection.js +0 -2
- package/dist/worker/index.d.ts +0 -1
- package/dist/worker/index.js +0 -101
- /package/{dist/drizzle/types.d.ts → public/.gitkeep} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,24 +1,870 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc2) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
array: () => array,
|
|
24
|
+
boolean: () => boolean,
|
|
25
|
+
buildSchema: () => buildSchema,
|
|
26
|
+
buildTable: () => buildTable,
|
|
27
|
+
collection: () => collection,
|
|
28
|
+
createCollectionOperations: () => createCollectionOperations,
|
|
29
|
+
date: () => date,
|
|
30
|
+
defineConfig: () => defineConfig,
|
|
31
|
+
email: () => email,
|
|
32
|
+
f: () => f,
|
|
33
|
+
field: () => field,
|
|
34
|
+
fieldType: () => fieldType,
|
|
35
|
+
generate: () => generate,
|
|
36
|
+
json: () => json,
|
|
37
|
+
migrate: () => migrate,
|
|
38
|
+
number: () => number,
|
|
39
|
+
pgAdapter: () => pgAdapter,
|
|
40
|
+
push: () => push,
|
|
41
|
+
relation: () => relation,
|
|
42
|
+
select: () => select,
|
|
43
|
+
text: () => text,
|
|
44
|
+
timestamp: () => timestamp,
|
|
45
|
+
url: () => url
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(index_exports);
|
|
48
|
+
|
|
49
|
+
// src/field-type.ts
|
|
50
|
+
var fieldType = (config) => {
|
|
51
|
+
return () => ({
|
|
52
|
+
schema: config.schema,
|
|
53
|
+
database: config.database ?? {}
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// src/field.ts
|
|
58
|
+
var field = (config) => {
|
|
59
|
+
return {
|
|
60
|
+
fieldType: config.fieldType,
|
|
61
|
+
required: config.required ?? false,
|
|
62
|
+
unique: config.unique ?? false,
|
|
63
|
+
indexed: config.indexed ?? false,
|
|
64
|
+
default: config.default,
|
|
65
|
+
label: config.label,
|
|
66
|
+
description: config.description
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// src/fields/f.ts
|
|
71
|
+
var import_zod = require("zod");
|
|
72
|
+
var getItemType = (itemSchema) => {
|
|
73
|
+
if (itemSchema instanceof import_zod.z.ZodString) return "text";
|
|
74
|
+
if (itemSchema instanceof import_zod.z.ZodNumber) return "integer";
|
|
75
|
+
if (itemSchema instanceof import_zod.z.ZodBoolean) return "boolean";
|
|
76
|
+
if (itemSchema instanceof import_zod.z.ZodDate) return "timestamp";
|
|
77
|
+
if (itemSchema instanceof import_zod.z.ZodEnum) return "text";
|
|
78
|
+
if (itemSchema instanceof import_zod.z.ZodArray) return "array";
|
|
79
|
+
if (itemSchema instanceof import_zod.z.ZodObject) return "jsonb";
|
|
80
|
+
return "text";
|
|
81
|
+
};
|
|
82
|
+
var f = {
|
|
83
|
+
/**
|
|
84
|
+
* Text field type
|
|
85
|
+
*/
|
|
86
|
+
text: () => fieldType({
|
|
87
|
+
schema: import_zod.z.string(),
|
|
88
|
+
database: { type: "text" }
|
|
89
|
+
})(),
|
|
90
|
+
/**
|
|
91
|
+
* Email field type with built-in validation
|
|
92
|
+
*/
|
|
93
|
+
email: () => fieldType({
|
|
94
|
+
schema: import_zod.z.string().email(),
|
|
95
|
+
database: { type: "text" }
|
|
96
|
+
})(),
|
|
97
|
+
/**
|
|
98
|
+
* URL field type with built-in validation
|
|
99
|
+
*/
|
|
100
|
+
url: () => fieldType({
|
|
101
|
+
schema: import_zod.z.string().url(),
|
|
102
|
+
database: { type: "text" }
|
|
103
|
+
})(),
|
|
104
|
+
/**
|
|
105
|
+
* Number field type
|
|
106
|
+
*/
|
|
107
|
+
number: () => fieldType({
|
|
108
|
+
schema: import_zod.z.number(),
|
|
109
|
+
database: { type: "integer" }
|
|
110
|
+
})(),
|
|
111
|
+
/**
|
|
112
|
+
* Boolean field type
|
|
113
|
+
*/
|
|
114
|
+
boolean: () => fieldType({
|
|
115
|
+
schema: import_zod.z.boolean(),
|
|
116
|
+
database: { type: "boolean" }
|
|
117
|
+
})(),
|
|
118
|
+
/**
|
|
119
|
+
* Date field type (date only, no time)
|
|
120
|
+
*/
|
|
121
|
+
date: () => fieldType({
|
|
122
|
+
schema: import_zod.z.date(),
|
|
123
|
+
database: { type: "date" }
|
|
124
|
+
})(),
|
|
125
|
+
/**
|
|
126
|
+
* Timestamp field type (date with time)
|
|
127
|
+
*/
|
|
128
|
+
timestamp: () => fieldType({
|
|
129
|
+
schema: import_zod.z.date(),
|
|
130
|
+
database: { type: "timestamp" }
|
|
131
|
+
})(),
|
|
132
|
+
/**
|
|
133
|
+
* Creates a select field type
|
|
134
|
+
*/
|
|
135
|
+
select: (options) => fieldType({
|
|
136
|
+
schema: import_zod.z.enum(options),
|
|
137
|
+
database: { type: "text" }
|
|
138
|
+
})(),
|
|
139
|
+
/**
|
|
140
|
+
* JSON field type for storing JSON data
|
|
141
|
+
*/
|
|
142
|
+
json: (schema) => fieldType({
|
|
143
|
+
schema: schema ?? import_zod.z.any(),
|
|
144
|
+
database: { type: "jsonb" }
|
|
145
|
+
})(),
|
|
146
|
+
/**
|
|
147
|
+
* Array field type for storing lists
|
|
148
|
+
*/
|
|
149
|
+
array: (itemSchema) => fieldType({
|
|
150
|
+
schema: import_zod.z.array(itemSchema),
|
|
151
|
+
database: { type: "array", itemType: getItemType(itemSchema) }
|
|
152
|
+
})(),
|
|
153
|
+
/**
|
|
154
|
+
* Creates a relation field type for foreign key relationships
|
|
155
|
+
*/
|
|
156
|
+
relation: (options) => {
|
|
157
|
+
const isMany = options.many ?? false;
|
|
158
|
+
const isSingular = options.singular ?? false;
|
|
159
|
+
return fieldType({
|
|
160
|
+
schema: isMany ? import_zod.z.array(import_zod.z.string()) : import_zod.z.string(),
|
|
161
|
+
database: {
|
|
162
|
+
type: "integer",
|
|
163
|
+
references: options.collection,
|
|
164
|
+
through: options.through,
|
|
165
|
+
many: isMany,
|
|
166
|
+
singular: isSingular
|
|
167
|
+
}
|
|
168
|
+
})();
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
var text = f.text;
|
|
172
|
+
var email = f.email;
|
|
173
|
+
var url = f.url;
|
|
174
|
+
var number = f.number;
|
|
175
|
+
var boolean = f.boolean;
|
|
176
|
+
var date = f.date;
|
|
177
|
+
var timestamp = f.timestamp;
|
|
178
|
+
var select = f.select;
|
|
179
|
+
var json = f.json;
|
|
180
|
+
var array = f.array;
|
|
181
|
+
var relation = f.relation;
|
|
182
|
+
|
|
183
|
+
// src/collection.ts
|
|
184
|
+
var collection = (config) => {
|
|
185
|
+
return {
|
|
186
|
+
slug: config.slug,
|
|
187
|
+
name: config.name,
|
|
188
|
+
fields: config.fields,
|
|
189
|
+
hooks: config.hooks,
|
|
190
|
+
dataType: config.dataType
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// src/operations/collection-operations.ts
|
|
195
|
+
var import_drizzle_orm = require("drizzle-orm");
|
|
196
|
+
var buildWhereClause = (tableColumns, where) => {
|
|
197
|
+
if (!where) return void 0;
|
|
198
|
+
const conditions = [];
|
|
199
|
+
for (const [key, value] of Object.entries(where)) {
|
|
200
|
+
const column = tableColumns[key];
|
|
201
|
+
if (!column) continue;
|
|
202
|
+
if (value === null || typeof value !== "object") {
|
|
203
|
+
conditions.push((0, import_drizzle_orm.eq)(column, value));
|
|
204
|
+
} else {
|
|
205
|
+
const operator = value;
|
|
206
|
+
if ("eq" in operator) {
|
|
207
|
+
conditions.push((0, import_drizzle_orm.eq)(column, operator.eq));
|
|
208
|
+
} else if ("neq" in operator) {
|
|
209
|
+
conditions.push((0, import_drizzle_orm.not)((0, import_drizzle_orm.eq)(column, operator.neq)));
|
|
210
|
+
} else if ("gt" in operator) {
|
|
211
|
+
conditions.push((0, import_drizzle_orm.gt)(column, operator.gt));
|
|
212
|
+
} else if ("gte" in operator) {
|
|
213
|
+
conditions.push((0, import_drizzle_orm.gte)(column, operator.gte));
|
|
214
|
+
} else if ("lt" in operator) {
|
|
215
|
+
conditions.push((0, import_drizzle_orm.lt)(column, operator.lt));
|
|
216
|
+
} else if ("lte" in operator) {
|
|
217
|
+
conditions.push((0, import_drizzle_orm.lte)(column, operator.lte));
|
|
218
|
+
} else if ("in" in operator) {
|
|
219
|
+
conditions.push((0, import_drizzle_orm.inArray)(column, operator.in));
|
|
220
|
+
} else if ("notIn" in operator) {
|
|
221
|
+
conditions.push((0, import_drizzle_orm.not)((0, import_drizzle_orm.inArray)(column, operator.notIn)));
|
|
222
|
+
} else if ("contains" in operator) {
|
|
223
|
+
conditions.push((0, import_drizzle_orm.like)(column, `%${operator.contains}%`));
|
|
224
|
+
} else if ("startsWith" in operator) {
|
|
225
|
+
conditions.push((0, import_drizzle_orm.like)(column, `${operator.startsWith}%`));
|
|
226
|
+
} else if ("endsWith" in operator) {
|
|
227
|
+
conditions.push((0, import_drizzle_orm.like)(column, `%${operator.endsWith}`));
|
|
228
|
+
} else if ("isNull" in operator) {
|
|
229
|
+
if (operator.isNull) {
|
|
230
|
+
conditions.push((0, import_drizzle_orm.isNull)(column));
|
|
231
|
+
}
|
|
232
|
+
} else if ("not" in operator) {
|
|
233
|
+
conditions.push((0, import_drizzle_orm.not)((0, import_drizzle_orm.eq)(column, operator.not)));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (conditions.length === 0) return void 0;
|
|
238
|
+
if (conditions.length === 1) return conditions[0];
|
|
239
|
+
return (0, import_drizzle_orm.and)(...conditions);
|
|
240
|
+
};
|
|
241
|
+
var buildOrderBy = (tableColumns, orderBy) => {
|
|
242
|
+
if (!orderBy) return [];
|
|
243
|
+
const orders = Array.isArray(orderBy) ? orderBy : [orderBy];
|
|
244
|
+
return orders.map((order) => {
|
|
245
|
+
for (const [key, direction] of Object.entries(order)) {
|
|
246
|
+
const column = tableColumns[key];
|
|
247
|
+
if (!column) continue;
|
|
248
|
+
return direction === "desc" ? (0, import_drizzle_orm.desc)(column) : (0, import_drizzle_orm.asc)(column);
|
|
7
249
|
}
|
|
8
|
-
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
250
|
+
return void 0;
|
|
251
|
+
}).filter(Boolean);
|
|
252
|
+
};
|
|
253
|
+
var executeBeforeOperationHooks = async (hooks, context) => {
|
|
254
|
+
if (!hooks?.beforeOperation) return;
|
|
255
|
+
for (const hook of hooks.beforeOperation) {
|
|
256
|
+
await hook(context);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
var executeAfterOperationHooks = async (hooks, context) => {
|
|
260
|
+
if (!hooks?.afterOperation) return;
|
|
261
|
+
for (const hook of hooks.afterOperation) {
|
|
262
|
+
await hook(context);
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
var executeBeforeCreateHooks = async (hooks, context) => {
|
|
266
|
+
if (!hooks?.beforeCreate) return;
|
|
267
|
+
for (const hook of hooks.beforeCreate) {
|
|
268
|
+
await hook(context);
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
var executeAfterCreateHooks = async (hooks, context) => {
|
|
272
|
+
if (!hooks?.afterCreate) return;
|
|
273
|
+
for (const hook of hooks.afterCreate) {
|
|
274
|
+
await hook(context);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
var executeBeforeUpdateHooks = async (hooks, context) => {
|
|
278
|
+
if (!hooks?.beforeUpdate) return;
|
|
279
|
+
for (const hook of hooks.beforeUpdate) {
|
|
280
|
+
await hook(context);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
var executeAfterUpdateHooks = async (hooks, context) => {
|
|
284
|
+
if (!hooks?.afterUpdate) return;
|
|
285
|
+
for (const hook of hooks.afterUpdate) {
|
|
286
|
+
await hook(context);
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
var executeBeforeDeleteHooks = async (hooks, context) => {
|
|
290
|
+
if (!hooks?.beforeDelete) return;
|
|
291
|
+
for (const hook of hooks.beforeDelete) {
|
|
292
|
+
await hook(context);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
var executeAfterDeleteHooks = async (hooks, context) => {
|
|
296
|
+
if (!hooks?.afterDelete) return;
|
|
297
|
+
for (const hook of hooks.afterDelete) {
|
|
298
|
+
await hook(context);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
var executeBeforeReadHooks = async (hooks, context) => {
|
|
302
|
+
if (!hooks?.beforeRead) return;
|
|
303
|
+
for (const hook of hooks.beforeRead) {
|
|
304
|
+
await hook(context);
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
var executeAfterReadHooks = async (hooks, context) => {
|
|
308
|
+
if (!hooks?.afterRead) return;
|
|
309
|
+
for (const hook of hooks.afterRead) {
|
|
310
|
+
await hook(context);
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
var createCollectionOperations = (_collection, _slug, _db, _table, _hooks) => {
|
|
314
|
+
const tableColumns = _table;
|
|
315
|
+
const db = _db;
|
|
316
|
+
const hooks = _hooks;
|
|
317
|
+
if (!db) {
|
|
318
|
+
return {
|
|
319
|
+
findMany: async () => [],
|
|
320
|
+
findUnique: async () => void 0,
|
|
321
|
+
findFirst: async () => void 0,
|
|
322
|
+
create: async () => void 0,
|
|
323
|
+
createMany: async () => 0,
|
|
324
|
+
update: async () => void 0,
|
|
325
|
+
updateMany: async () => 0,
|
|
326
|
+
delete: async () => void 0,
|
|
327
|
+
deleteMany: async () => 0,
|
|
328
|
+
count: async () => 0,
|
|
329
|
+
exists: async () => false
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
return {
|
|
333
|
+
findMany: async (options) => {
|
|
334
|
+
const whereClause = buildWhereClause(tableColumns, options?.where);
|
|
335
|
+
const orderByClause = buildOrderBy(tableColumns, options?.orderBy);
|
|
336
|
+
await executeBeforeOperationHooks(hooks, {
|
|
337
|
+
collection: _slug,
|
|
338
|
+
operation: "read",
|
|
339
|
+
where: options?.where
|
|
340
|
+
});
|
|
341
|
+
await executeBeforeReadHooks(hooks, {
|
|
342
|
+
collection: _slug,
|
|
343
|
+
operation: "read",
|
|
344
|
+
query: options,
|
|
345
|
+
db
|
|
346
|
+
});
|
|
347
|
+
let query = db.select().from(_table);
|
|
348
|
+
if (whereClause) {
|
|
349
|
+
query = query.where(whereClause);
|
|
350
|
+
}
|
|
351
|
+
if (orderByClause.length > 0) {
|
|
352
|
+
query = query.orderBy(...orderByClause);
|
|
353
|
+
}
|
|
354
|
+
if (options?.offset) {
|
|
355
|
+
query = query.offset(options.offset);
|
|
356
|
+
}
|
|
357
|
+
if (options?.limit) {
|
|
358
|
+
query = query.limit(options.limit);
|
|
359
|
+
}
|
|
360
|
+
const result = await query;
|
|
361
|
+
await executeAfterReadHooks(hooks, {
|
|
362
|
+
collection: _slug,
|
|
363
|
+
operation: "read",
|
|
364
|
+
query: options,
|
|
365
|
+
result,
|
|
366
|
+
db
|
|
367
|
+
});
|
|
368
|
+
await executeAfterOperationHooks(hooks, {
|
|
369
|
+
collection: _slug,
|
|
370
|
+
operation: "read",
|
|
371
|
+
where: options?.where,
|
|
372
|
+
result
|
|
373
|
+
});
|
|
374
|
+
return result;
|
|
375
|
+
},
|
|
376
|
+
findUnique: async (options) => {
|
|
377
|
+
const whereClause = buildWhereClause(tableColumns, options.where);
|
|
378
|
+
if (!whereClause) return void 0;
|
|
379
|
+
await executeBeforeOperationHooks(hooks, {
|
|
380
|
+
collection: _slug,
|
|
381
|
+
operation: "read",
|
|
382
|
+
where: options.where
|
|
383
|
+
});
|
|
384
|
+
await executeBeforeReadHooks(hooks, {
|
|
385
|
+
collection: _slug,
|
|
386
|
+
operation: "read",
|
|
387
|
+
query: options,
|
|
388
|
+
db
|
|
389
|
+
});
|
|
390
|
+
const result = await db.select().from(_table).where(whereClause).limit(1);
|
|
391
|
+
const returnValue = result[0];
|
|
392
|
+
await executeAfterReadHooks(hooks, {
|
|
393
|
+
collection: _slug,
|
|
394
|
+
operation: "read",
|
|
395
|
+
query: options,
|
|
396
|
+
result: returnValue ? [returnValue] : [],
|
|
397
|
+
db
|
|
398
|
+
});
|
|
399
|
+
await executeAfterOperationHooks(hooks, {
|
|
400
|
+
collection: _slug,
|
|
401
|
+
operation: "read",
|
|
402
|
+
where: options.where,
|
|
403
|
+
result: returnValue
|
|
404
|
+
});
|
|
405
|
+
return returnValue;
|
|
406
|
+
},
|
|
407
|
+
findFirst: async (options) => {
|
|
408
|
+
const whereClause = buildWhereClause(tableColumns, options.where);
|
|
409
|
+
const orderByClause = buildOrderBy(tableColumns, options.orderBy);
|
|
410
|
+
await executeBeforeOperationHooks(hooks, {
|
|
411
|
+
collection: _slug,
|
|
412
|
+
operation: "read",
|
|
413
|
+
where: options.where
|
|
414
|
+
});
|
|
415
|
+
await executeBeforeReadHooks(hooks, {
|
|
416
|
+
collection: _slug,
|
|
417
|
+
operation: "read",
|
|
418
|
+
query: options,
|
|
419
|
+
db
|
|
420
|
+
});
|
|
421
|
+
let query = db.select().from(_table);
|
|
422
|
+
if (whereClause) {
|
|
423
|
+
query = query.where(whereClause);
|
|
424
|
+
}
|
|
425
|
+
if (orderByClause.length > 0) {
|
|
426
|
+
query = query.orderBy(...orderByClause);
|
|
427
|
+
}
|
|
428
|
+
const result = await query.limit(1);
|
|
429
|
+
const returnValue = result[0];
|
|
430
|
+
await executeAfterReadHooks(hooks, {
|
|
431
|
+
collection: _slug,
|
|
432
|
+
operation: "read",
|
|
433
|
+
query: options,
|
|
434
|
+
result: returnValue ? [returnValue] : [],
|
|
435
|
+
db
|
|
436
|
+
});
|
|
437
|
+
await executeAfterOperationHooks(hooks, {
|
|
438
|
+
collection: _slug,
|
|
439
|
+
operation: "read",
|
|
440
|
+
where: options.where,
|
|
441
|
+
result: returnValue
|
|
442
|
+
});
|
|
443
|
+
return returnValue;
|
|
444
|
+
},
|
|
445
|
+
create: async (options) => {
|
|
446
|
+
const data = Array.isArray(options.data) ? options.data : [options.data];
|
|
447
|
+
const firstData = data[0];
|
|
448
|
+
await executeBeforeOperationHooks(hooks, {
|
|
449
|
+
collection: _slug,
|
|
450
|
+
operation: "create",
|
|
451
|
+
data: firstData,
|
|
452
|
+
where: void 0
|
|
453
|
+
});
|
|
454
|
+
await executeBeforeCreateHooks(hooks, {
|
|
455
|
+
collection: _slug,
|
|
456
|
+
operation: "create",
|
|
457
|
+
data: firstData,
|
|
458
|
+
db
|
|
459
|
+
});
|
|
460
|
+
const result = await db.insert(_table).values(data).returning();
|
|
461
|
+
const returnValue = options.returning ? result[0] : void 0;
|
|
462
|
+
await executeAfterCreateHooks(hooks, {
|
|
463
|
+
collection: _slug,
|
|
464
|
+
operation: "create",
|
|
465
|
+
data: firstData,
|
|
466
|
+
result: returnValue,
|
|
467
|
+
db
|
|
468
|
+
});
|
|
469
|
+
await executeAfterOperationHooks(hooks, {
|
|
470
|
+
collection: _slug,
|
|
471
|
+
operation: "create",
|
|
472
|
+
data: firstData,
|
|
473
|
+
result: returnValue
|
|
474
|
+
});
|
|
475
|
+
return returnValue;
|
|
476
|
+
},
|
|
477
|
+
createMany: async (options) => {
|
|
478
|
+
const dataArray = Array.isArray(options.data) ? options.data : [options.data];
|
|
479
|
+
for (const data of dataArray) {
|
|
480
|
+
await executeBeforeOperationHooks(hooks, {
|
|
481
|
+
collection: _slug,
|
|
482
|
+
operation: "create",
|
|
483
|
+
data,
|
|
484
|
+
where: void 0
|
|
485
|
+
});
|
|
486
|
+
await executeBeforeCreateHooks(hooks, {
|
|
487
|
+
collection: _slug,
|
|
488
|
+
operation: "create",
|
|
489
|
+
data,
|
|
490
|
+
db
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
const result = await db.insert(_table).values(options.data);
|
|
494
|
+
for (let i = 0; i < dataArray.length; i++) {
|
|
495
|
+
await executeAfterCreateHooks(hooks, {
|
|
496
|
+
collection: _slug,
|
|
497
|
+
operation: "create",
|
|
498
|
+
data: dataArray[i],
|
|
499
|
+
result: result[i],
|
|
500
|
+
db
|
|
501
|
+
});
|
|
502
|
+
await executeAfterOperationHooks(hooks, {
|
|
503
|
+
collection: _slug,
|
|
504
|
+
operation: "create",
|
|
505
|
+
data: dataArray[i],
|
|
506
|
+
result: result[i]
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
return result.length || 0;
|
|
510
|
+
},
|
|
511
|
+
update: async (options) => {
|
|
512
|
+
const whereClause = buildWhereClause(tableColumns, options.where);
|
|
513
|
+
if (!whereClause) return void 0;
|
|
514
|
+
const previousResult = await db.select().from(_table).where(whereClause).limit(1);
|
|
515
|
+
const previousData = previousResult[0];
|
|
516
|
+
await executeBeforeOperationHooks(hooks, {
|
|
517
|
+
collection: _slug,
|
|
518
|
+
operation: "update",
|
|
519
|
+
data: options.data,
|
|
520
|
+
where: options.where
|
|
521
|
+
});
|
|
522
|
+
await executeBeforeUpdateHooks(hooks, {
|
|
523
|
+
collection: _slug,
|
|
524
|
+
operation: "update",
|
|
525
|
+
data: options.data,
|
|
526
|
+
where: options.where,
|
|
527
|
+
previousData,
|
|
528
|
+
db
|
|
529
|
+
});
|
|
530
|
+
const result = await db.update(_table).set(options.data).where(whereClause).returning();
|
|
531
|
+
const returnValue = options.returning ? result[0] : void 0;
|
|
532
|
+
await executeAfterUpdateHooks(hooks, {
|
|
533
|
+
collection: _slug,
|
|
534
|
+
operation: "update",
|
|
535
|
+
data: options.data,
|
|
536
|
+
where: options.where,
|
|
537
|
+
previousData,
|
|
538
|
+
result: returnValue,
|
|
539
|
+
db
|
|
540
|
+
});
|
|
541
|
+
await executeAfterOperationHooks(hooks, {
|
|
542
|
+
collection: _slug,
|
|
543
|
+
operation: "update",
|
|
544
|
+
data: options.data,
|
|
545
|
+
where: options.where,
|
|
546
|
+
result: returnValue
|
|
547
|
+
});
|
|
548
|
+
return returnValue;
|
|
549
|
+
},
|
|
550
|
+
updateMany: async (options) => {
|
|
551
|
+
const whereClause = buildWhereClause(tableColumns, options.where);
|
|
552
|
+
if (!whereClause) return 0;
|
|
553
|
+
const previousResults = await db.select().from(_table).where(whereClause);
|
|
554
|
+
await executeBeforeOperationHooks(hooks, {
|
|
555
|
+
collection: _slug,
|
|
556
|
+
operation: "update",
|
|
557
|
+
data: options.data,
|
|
558
|
+
where: options.where
|
|
559
|
+
});
|
|
560
|
+
for (const previousData of previousResults) {
|
|
561
|
+
await executeBeforeUpdateHooks(hooks, {
|
|
562
|
+
collection: _slug,
|
|
563
|
+
operation: "update",
|
|
564
|
+
data: options.data,
|
|
565
|
+
where: options.where,
|
|
566
|
+
previousData,
|
|
567
|
+
db
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
const result = await db.update(_table).set(options.data).where(whereClause);
|
|
571
|
+
for (const previousData of previousResults) {
|
|
572
|
+
await executeAfterUpdateHooks(hooks, {
|
|
573
|
+
collection: _slug,
|
|
574
|
+
operation: "update",
|
|
575
|
+
data: options.data,
|
|
576
|
+
where: options.where,
|
|
577
|
+
previousData,
|
|
578
|
+
db
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
await executeAfterOperationHooks(hooks, {
|
|
582
|
+
collection: _slug,
|
|
583
|
+
operation: "update",
|
|
584
|
+
data: options.data,
|
|
585
|
+
where: options.where
|
|
586
|
+
});
|
|
587
|
+
return result.length || 0;
|
|
588
|
+
},
|
|
589
|
+
delete: async (options) => {
|
|
590
|
+
const whereClause = buildWhereClause(tableColumns, options.where);
|
|
591
|
+
if (!whereClause) return void 0;
|
|
592
|
+
const previousResult = await db.select().from(_table).where(whereClause).limit(1);
|
|
593
|
+
const previousData = previousResult[0];
|
|
594
|
+
await executeBeforeOperationHooks(hooks, {
|
|
595
|
+
collection: _slug,
|
|
596
|
+
operation: "delete",
|
|
597
|
+
where: options.where
|
|
598
|
+
});
|
|
599
|
+
await executeBeforeDeleteHooks(hooks, {
|
|
600
|
+
collection: _slug,
|
|
601
|
+
operation: "delete",
|
|
602
|
+
where: options.where,
|
|
603
|
+
previousData,
|
|
604
|
+
db
|
|
605
|
+
});
|
|
606
|
+
const result = await db.delete(_table).where(whereClause).returning();
|
|
607
|
+
const returnValue = options.returning ? result[0] : void 0;
|
|
608
|
+
await executeAfterDeleteHooks(hooks, {
|
|
609
|
+
collection: _slug,
|
|
610
|
+
operation: "delete",
|
|
611
|
+
where: options.where,
|
|
612
|
+
previousData,
|
|
613
|
+
result: returnValue,
|
|
614
|
+
db
|
|
615
|
+
});
|
|
616
|
+
await executeAfterOperationHooks(hooks, {
|
|
617
|
+
collection: _slug,
|
|
618
|
+
operation: "delete",
|
|
619
|
+
where: options.where,
|
|
620
|
+
result: returnValue
|
|
621
|
+
});
|
|
622
|
+
return returnValue;
|
|
623
|
+
},
|
|
624
|
+
deleteMany: async (options) => {
|
|
625
|
+
const whereClause = buildWhereClause(tableColumns, options.where);
|
|
626
|
+
if (!whereClause) return 0;
|
|
627
|
+
const previousResults = await db.select().from(_table).where(whereClause);
|
|
628
|
+
await executeBeforeOperationHooks(hooks, {
|
|
629
|
+
collection: _slug,
|
|
630
|
+
operation: "delete",
|
|
631
|
+
where: options.where
|
|
632
|
+
});
|
|
633
|
+
for (const previousData of previousResults) {
|
|
634
|
+
await executeBeforeDeleteHooks(hooks, {
|
|
635
|
+
collection: _slug,
|
|
636
|
+
operation: "delete",
|
|
637
|
+
where: options.where,
|
|
638
|
+
previousData,
|
|
639
|
+
db
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
const result = await db.delete(_table).where(whereClause);
|
|
643
|
+
for (const previousData of previousResults) {
|
|
644
|
+
await executeAfterDeleteHooks(hooks, {
|
|
645
|
+
collection: _slug,
|
|
646
|
+
operation: "delete",
|
|
647
|
+
where: options.where,
|
|
648
|
+
previousData,
|
|
649
|
+
db
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
await executeAfterOperationHooks(hooks, {
|
|
653
|
+
collection: _slug,
|
|
654
|
+
operation: "delete",
|
|
655
|
+
where: options.where
|
|
656
|
+
});
|
|
657
|
+
return result.length || 0;
|
|
658
|
+
},
|
|
659
|
+
count: async (options) => {
|
|
660
|
+
const whereClause = buildWhereClause(tableColumns, options?.where);
|
|
661
|
+
await executeBeforeOperationHooks(hooks, {
|
|
662
|
+
collection: _slug,
|
|
663
|
+
operation: "read",
|
|
664
|
+
where: options?.where
|
|
665
|
+
});
|
|
666
|
+
await executeBeforeReadHooks(hooks, {
|
|
667
|
+
collection: _slug,
|
|
668
|
+
operation: "read",
|
|
669
|
+
query: options,
|
|
670
|
+
db
|
|
671
|
+
});
|
|
672
|
+
const result = whereClause ? await db.select().from(_table).where(whereClause) : await db.select().from(_table);
|
|
673
|
+
await executeAfterReadHooks(hooks, {
|
|
674
|
+
collection: _slug,
|
|
675
|
+
operation: "read",
|
|
676
|
+
query: options,
|
|
677
|
+
result,
|
|
678
|
+
db
|
|
679
|
+
});
|
|
680
|
+
await executeAfterOperationHooks(hooks, {
|
|
681
|
+
collection: _slug,
|
|
682
|
+
operation: "read",
|
|
683
|
+
where: options?.where,
|
|
684
|
+
result
|
|
685
|
+
});
|
|
686
|
+
return result.length;
|
|
687
|
+
},
|
|
688
|
+
exists: async (options) => {
|
|
689
|
+
const whereClause = buildWhereClause(tableColumns, options.where);
|
|
690
|
+
if (!whereClause) return false;
|
|
691
|
+
await executeBeforeOperationHooks(hooks, {
|
|
692
|
+
collection: _slug,
|
|
693
|
+
operation: "read",
|
|
694
|
+
where: options.where
|
|
695
|
+
});
|
|
696
|
+
await executeBeforeReadHooks(hooks, {
|
|
697
|
+
collection: _slug,
|
|
698
|
+
operation: "read",
|
|
699
|
+
query: options,
|
|
700
|
+
db
|
|
701
|
+
});
|
|
702
|
+
const result = await db.select().from(_table).where(whereClause).limit(1);
|
|
703
|
+
const returnValue = result.length > 0;
|
|
704
|
+
await executeAfterReadHooks(hooks, {
|
|
705
|
+
collection: _slug,
|
|
706
|
+
operation: "read",
|
|
707
|
+
query: options,
|
|
708
|
+
result,
|
|
709
|
+
db
|
|
710
|
+
});
|
|
711
|
+
await executeAfterOperationHooks(hooks, {
|
|
712
|
+
collection: _slug,
|
|
713
|
+
operation: "read",
|
|
714
|
+
where: options.where,
|
|
715
|
+
result: returnValue
|
|
716
|
+
});
|
|
717
|
+
return returnValue;
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
// src/adapter.ts
|
|
723
|
+
var pgAdapter = (config) => {
|
|
724
|
+
return {
|
|
725
|
+
type: "postgres",
|
|
726
|
+
config: {
|
|
727
|
+
url: config.url,
|
|
728
|
+
migrationsPath: config.migrationsPath ?? "./migrations"
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
// src/schema.ts
|
|
734
|
+
var import_pg_core = require("drizzle-orm/pg-core");
|
|
735
|
+
var buildTable = (collection2) => {
|
|
736
|
+
const columns = {
|
|
737
|
+
// Add default id column
|
|
738
|
+
id: (0, import_pg_core.serial)("id").primaryKey()
|
|
739
|
+
};
|
|
740
|
+
for (const [fieldName, fieldDef] of Object.entries(collection2.fields)) {
|
|
741
|
+
if (fieldName === "id") continue;
|
|
742
|
+
const fieldType2 = fieldDef.fieldType;
|
|
743
|
+
const fieldTypeName = fieldType2.name || fieldType2.type || "text";
|
|
744
|
+
switch (fieldTypeName) {
|
|
745
|
+
case "text":
|
|
746
|
+
columns[fieldName] = (0, import_pg_core.text)(fieldName);
|
|
747
|
+
break;
|
|
748
|
+
case "varchar":
|
|
749
|
+
columns[fieldName] = (0, import_pg_core.varchar)(fieldName, { length: 255 });
|
|
750
|
+
break;
|
|
751
|
+
case "number":
|
|
752
|
+
case "integer":
|
|
753
|
+
columns[fieldName] = (0, import_pg_core.integer)(fieldName);
|
|
754
|
+
break;
|
|
755
|
+
case "boolean":
|
|
756
|
+
columns[fieldName] = (0, import_pg_core.boolean)(fieldName);
|
|
757
|
+
break;
|
|
758
|
+
case "timestamp":
|
|
759
|
+
columns[fieldName] = (0, import_pg_core.timestamp)(fieldName);
|
|
760
|
+
break;
|
|
761
|
+
case "uuid":
|
|
762
|
+
columns[fieldName] = (0, import_pg_core.uuid)(fieldName);
|
|
763
|
+
break;
|
|
764
|
+
default:
|
|
765
|
+
columns[fieldName] = (0, import_pg_core.text)(fieldName);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
return (0, import_pg_core.pgTable)(collection2.slug, columns);
|
|
769
|
+
};
|
|
770
|
+
var buildSchema = (collections) => {
|
|
771
|
+
const tables = {};
|
|
772
|
+
for (const coll of collections) {
|
|
773
|
+
tables[coll.slug] = buildTable(coll);
|
|
774
|
+
}
|
|
775
|
+
return tables;
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
// src/migrations.ts
|
|
779
|
+
var push = async (_adapter, collections) => {
|
|
780
|
+
const schema = buildSchema(collections);
|
|
781
|
+
console.log("[TODO] Push schema with collections:", Object.keys(schema));
|
|
782
|
+
};
|
|
783
|
+
var generate = async (_adapter, collections) => {
|
|
784
|
+
const schema = buildSchema(collections);
|
|
785
|
+
console.log("[TODO] Generate migration with collections:", Object.keys(schema));
|
|
786
|
+
};
|
|
787
|
+
var migrate = async (adapter) => {
|
|
788
|
+
console.log("[TODO] Apply migrations from:", adapter.config.migrationsPath);
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
// src/config.ts
|
|
792
|
+
var import_pg = require("pg");
|
|
793
|
+
var import_node_postgres = require("drizzle-orm/node-postgres");
|
|
794
|
+
var defineConfig = (options) => {
|
|
795
|
+
let pool = null;
|
|
796
|
+
let dbInstance = null;
|
|
797
|
+
let schema = {};
|
|
798
|
+
if (options.database.type === "postgres") {
|
|
799
|
+
pool = new import_pg.Pool({
|
|
800
|
+
connectionString: options.database.config.url
|
|
801
|
+
});
|
|
802
|
+
schema = buildSchema(options.collections);
|
|
803
|
+
dbInstance = (0, import_node_postgres.drizzle)(pool, { schema });
|
|
804
|
+
}
|
|
805
|
+
const collectionsMap = {};
|
|
806
|
+
const collectionNames = [];
|
|
807
|
+
for (const coll of options.collections) {
|
|
808
|
+
collectionsMap[coll.slug] = {
|
|
809
|
+
slug: coll.slug,
|
|
810
|
+
name: coll.name,
|
|
811
|
+
fields: coll.fields,
|
|
812
|
+
hooks: coll.hooks,
|
|
813
|
+
dataType: coll.dataType
|
|
814
|
+
};
|
|
815
|
+
collectionNames.push(coll.slug);
|
|
816
|
+
}
|
|
817
|
+
const pluginNames = [];
|
|
818
|
+
if (options.plugins) {
|
|
819
|
+
for (const plugin of options.plugins) {
|
|
820
|
+
pluginNames.push(plugin.name);
|
|
821
|
+
if (plugin.collections) {
|
|
822
|
+
for (const [name, coll] of Object.entries(plugin.collections)) {
|
|
823
|
+
collectionsMap[name] = {
|
|
824
|
+
slug: coll.slug,
|
|
825
|
+
name: coll.name,
|
|
826
|
+
fields: coll.fields,
|
|
827
|
+
hooks: coll.hooks,
|
|
828
|
+
dataType: coll.dataType
|
|
829
|
+
};
|
|
830
|
+
collectionNames.push(name);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
return {
|
|
836
|
+
collections: collectionsMap,
|
|
837
|
+
db: dbInstance,
|
|
838
|
+
$meta: {
|
|
839
|
+
collections: collectionNames,
|
|
840
|
+
plugins: pluginNames
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
845
|
+
0 && (module.exports = {
|
|
846
|
+
array,
|
|
847
|
+
boolean,
|
|
848
|
+
buildSchema,
|
|
849
|
+
buildTable,
|
|
850
|
+
collection,
|
|
851
|
+
createCollectionOperations,
|
|
852
|
+
date,
|
|
853
|
+
defineConfig,
|
|
854
|
+
email,
|
|
855
|
+
f,
|
|
856
|
+
field,
|
|
857
|
+
fieldType,
|
|
858
|
+
generate,
|
|
859
|
+
json,
|
|
860
|
+
migrate,
|
|
861
|
+
number,
|
|
862
|
+
pgAdapter,
|
|
863
|
+
push,
|
|
864
|
+
relation,
|
|
865
|
+
select,
|
|
866
|
+
text,
|
|
867
|
+
timestamp,
|
|
868
|
+
url
|
|
869
|
+
});
|
|
870
|
+
//# sourceMappingURL=index.js.map
|