opacacms 0.1.11 → 0.1.13

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 (246) hide show
  1. package/dist/admin/index.js +9464 -21
  2. package/dist/admin/webcomponent.d.ts +1 -1
  3. package/dist/admin/webcomponent.js +9620 -6
  4. package/dist/admin.css +1 -0
  5. package/dist/{chunk-6dhs73zq.js → chunk-0am1m47g.js} +1 -1
  6. package/dist/{chunk-0nf7fe26.js → chunk-0d9aqz6z.js} +1 -1
  7. package/dist/{chunk-cvdd4eqh.js → chunk-2kyhqvhc.js} +5 -1
  8. package/dist/{chunk-gjjcc4hm.js → chunk-2z8wxx9g.js} +21 -6
  9. package/dist/{chunk-xg35h5a3.js → chunk-7fyepksb.js} +1 -1
  10. package/dist/{chunk-njytmdb4.js → chunk-pxh5encs.js} +34 -24
  11. package/dist/{chunk-n8aekdnr.js → chunk-qkn1ykrj.js} +33 -23
  12. package/dist/{chunk-kwp83w8b.js → chunk-wmvjvn7b.js} +4 -4
  13. package/dist/{chunk-qrt22f6e.js → chunk-wq314kkx.js} +35 -25
  14. package/dist/{chunk-eqtsfyjf.js → chunk-x2ejaftz.js} +52 -28
  15. package/dist/{chunk-6ew02s0c.js → chunk-xtwc125q.js} +18 -18
  16. package/dist/cli/index.js +5 -5
  17. package/dist/db/better-sqlite.d.ts +1 -0
  18. package/dist/db/better-sqlite.js +3 -3
  19. package/dist/db/bun-sqlite.d.ts +1 -0
  20. package/dist/db/bun-sqlite.js +3 -3
  21. package/dist/db/d1.js +3 -3
  22. package/dist/db/index.d.ts +3 -0
  23. package/dist/db/index.js +17 -13
  24. package/dist/db/postgres.js +3 -3
  25. package/dist/db/sqlite.js +3 -3
  26. package/dist/runtimes/bun.js +2 -2
  27. package/dist/runtimes/cloudflare-workers.js +2 -2
  28. package/dist/runtimes/next.js +2 -2
  29. package/dist/runtimes/node.js +2 -2
  30. package/dist/server.js +2 -2
  31. package/package.json +8 -2
  32. package/bun.lock +0 -34
  33. package/dist/admin/index.css +0 -47
  34. package/dist/api.d.ts +0 -6
  35. package/dist/api.js +0 -27
  36. package/dist/chunk-2zm8cy1w.js +0 -9482
  37. package/global.d.ts +0 -11
  38. package/src/admin/api-client.ts +0 -63
  39. package/src/admin/auth-client.ts +0 -40
  40. package/src/admin/custom-field.ts +0 -179
  41. package/src/admin/index.ts +0 -15
  42. package/src/admin/react.tsx +0 -72
  43. package/src/admin/router.ts +0 -9
  44. package/src/admin/stores/admin-queries.ts +0 -121
  45. package/src/admin/stores/auth.ts +0 -61
  46. package/src/admin/stores/column-visibility.ts +0 -67
  47. package/src/admin/stores/config.ts +0 -15
  48. package/src/admin/stores/media.ts +0 -95
  49. package/src/admin/stores/query.ts +0 -13
  50. package/src/admin/stores/ui.ts +0 -29
  51. package/src/admin/ui/admin-client.tsx +0 -283
  52. package/src/admin/ui/admin-layout.tsx +0 -276
  53. package/src/admin/ui/components/ColumnVisibilityToggle.tsx +0 -141
  54. package/src/admin/ui/components/DataDetailSheet.tsx +0 -141
  55. package/src/admin/ui/components/DataDetailView.tsx +0 -175
  56. package/src/admin/ui/components/Table.tsx +0 -67
  57. package/src/admin/ui/components/fields/ArrayField.tsx +0 -166
  58. package/src/admin/ui/components/fields/BlocksField.tsx +0 -202
  59. package/src/admin/ui/components/fields/BooleanField.tsx +0 -50
  60. package/src/admin/ui/components/fields/CollapsibleField.tsx +0 -75
  61. package/src/admin/ui/components/fields/DateField.tsx +0 -45
  62. package/src/admin/ui/components/fields/FileField.tsx +0 -322
  63. package/src/admin/ui/components/fields/GroupField.tsx +0 -50
  64. package/src/admin/ui/components/fields/JoinField.tsx +0 -23
  65. package/src/admin/ui/components/fields/NumberField.tsx +0 -46
  66. package/src/admin/ui/components/fields/RadioField.tsx +0 -62
  67. package/src/admin/ui/components/fields/RelationshipField.tsx +0 -278
  68. package/src/admin/ui/components/fields/RowField.tsx +0 -40
  69. package/src/admin/ui/components/fields/SelectField.tsx +0 -59
  70. package/src/admin/ui/components/fields/TabsField.tsx +0 -101
  71. package/src/admin/ui/components/fields/TextAreaField.tsx +0 -54
  72. package/src/admin/ui/components/fields/TextField.tsx +0 -49
  73. package/src/admin/ui/components/fields/VirtualField.tsx +0 -53
  74. package/src/admin/ui/components/fields/index.tsx +0 -371
  75. package/src/admin/ui/components/fields/richtext-editor/index.tsx +0 -211
  76. package/src/admin/ui/components/fields/richtext-editor/nodes/ImageComponent.tsx +0 -142
  77. package/src/admin/ui/components/fields/richtext-editor/nodes/ImageNode.tsx +0 -95
  78. package/src/admin/ui/components/fields/richtext-editor/plugins/ComponentPickerPlugin.tsx +0 -226
  79. package/src/admin/ui/components/fields/richtext-editor/plugins/EditableSyncPlugin.tsx +0 -16
  80. package/src/admin/ui/components/fields/richtext-editor/plugins/NotionToolbarPlugin.tsx +0 -184
  81. package/src/admin/ui/components/fields/richtext-editor/plugins/SimpleToolbarPlugin.tsx +0 -240
  82. package/src/admin/ui/components/fields/richtext-editor/plugins/ValueSyncPlugin.tsx +0 -40
  83. package/src/admin/ui/components/fields/utils.ts +0 -1
  84. package/src/admin/ui/components/link.tsx +0 -41
  85. package/src/admin/ui/components/media/AssetManagerModal.tsx +0 -334
  86. package/src/admin/ui/components/toast.tsx +0 -72
  87. package/src/admin/ui/components/ui/accordion.tsx +0 -51
  88. package/src/admin/ui/components/ui/alert-dialog.tsx +0 -98
  89. package/src/admin/ui/components/ui/blocks.tsx +0 -32
  90. package/src/admin/ui/components/ui/breadcrumbs.tsx +0 -59
  91. package/src/admin/ui/components/ui/button.tsx +0 -26
  92. package/src/admin/ui/components/ui/collapsible.tsx +0 -124
  93. package/src/admin/ui/components/ui/dialog.tsx +0 -79
  94. package/src/admin/ui/components/ui/group.tsx +0 -20
  95. package/src/admin/ui/components/ui/index.ts +0 -17
  96. package/src/admin/ui/components/ui/input.tsx +0 -12
  97. package/src/admin/ui/components/ui/join.tsx +0 -53
  98. package/src/admin/ui/components/ui/label.tsx +0 -11
  99. package/src/admin/ui/components/ui/radio-group.tsx +0 -75
  100. package/src/admin/ui/components/ui/relationship-detail-sheet.tsx +0 -122
  101. package/src/admin/ui/components/ui/relationship.tsx +0 -58
  102. package/src/admin/ui/components/ui/scroll-area.tsx +0 -19
  103. package/src/admin/ui/components/ui/select.tsx +0 -187
  104. package/src/admin/ui/components/ui/separator.tsx +0 -21
  105. package/src/admin/ui/components/ui/sheet.tsx +0 -106
  106. package/src/admin/ui/components/ui/tabs.tsx +0 -116
  107. package/src/admin/ui/components/ui/utils.ts +0 -3
  108. package/src/admin/ui/hooks/use-debounce.ts +0 -15
  109. package/src/admin/ui/styles/_locale-switcher.scss +0 -33
  110. package/src/admin/ui/styles/accordion.scss +0 -60
  111. package/src/admin/ui/styles/animations.scss +0 -41
  112. package/src/admin/ui/styles/asset-manager.scss +0 -547
  113. package/src/admin/ui/styles/badge.scss +0 -13
  114. package/src/admin/ui/styles/base.scss +0 -22
  115. package/src/admin/ui/styles/button.scss +0 -161
  116. package/src/admin/ui/styles/card.scss +0 -13
  117. package/src/admin/ui/styles/collapsible.scss +0 -75
  118. package/src/admin/ui/styles/data-detail.scss +0 -92
  119. package/src/admin/ui/styles/dialog.scss +0 -102
  120. package/src/admin/ui/styles/empty-state.scss +0 -22
  121. package/src/admin/ui/styles/group.scss +0 -19
  122. package/src/admin/ui/styles/index.scss +0 -33
  123. package/src/admin/ui/styles/input.scss +0 -80
  124. package/src/admin/ui/styles/label.scss +0 -12
  125. package/src/admin/ui/styles/layout.scss +0 -56
  126. package/src/admin/ui/styles/lexical.scss +0 -469
  127. package/src/admin/ui/styles/loading.scss +0 -102
  128. package/src/admin/ui/styles/media-registry.scss +0 -597
  129. package/src/admin/ui/styles/pagination.scss +0 -20
  130. package/src/admin/ui/styles/radio-group.scss +0 -66
  131. package/src/admin/ui/styles/row.scss +0 -17
  132. package/src/admin/ui/styles/scrollbar.scss +0 -36
  133. package/src/admin/ui/styles/select.scss +0 -121
  134. package/src/admin/ui/styles/separator.scss +0 -14
  135. package/src/admin/ui/styles/sheet.scss +0 -152
  136. package/src/admin/ui/styles/sidebar.scss +0 -148
  137. package/src/admin/ui/styles/switch.scss +0 -59
  138. package/src/admin/ui/styles/table.scss +0 -207
  139. package/src/admin/ui/styles/tabs.scss +0 -62
  140. package/src/admin/ui/styles/toast.scss +0 -45
  141. package/src/admin/ui/styles/variables.scss +0 -24
  142. package/src/admin/ui/views/collection-list-view.tsx +0 -720
  143. package/src/admin/ui/views/dashboard-view.tsx +0 -263
  144. package/src/admin/ui/views/document-edit-view.tsx +0 -384
  145. package/src/admin/ui/views/global-edit-view.tsx +0 -226
  146. package/src/admin/ui/views/init-view.tsx +0 -182
  147. package/src/admin/ui/views/login-view.tsx +0 -123
  148. package/src/admin/ui/views/media-registry-view.tsx +0 -1104
  149. package/src/admin/ui/views/settings-view.tsx +0 -729
  150. package/src/admin/webcomponent.tsx +0 -15
  151. package/src/api.ts +0 -9
  152. package/src/auth/index.ts +0 -194
  153. package/src/auth/migrations.ts +0 -87
  154. package/src/auth/premissions.ts +0 -46
  155. package/src/cli/commands/generate-types.ts +0 -116
  156. package/src/cli/commands/init.ts +0 -95
  157. package/src/cli/commands/migrate-commands.ts +0 -160
  158. package/src/cli/commands/seed-command.ts +0 -11
  159. package/src/cli/d1-mock.ts +0 -101
  160. package/src/cli/index.test.ts +0 -84
  161. package/src/cli/index.ts +0 -183
  162. package/src/cli/r2-mock.ts +0 -217
  163. package/src/cli/seeding.ts +0 -409
  164. package/src/client.ts +0 -181
  165. package/src/config-utils.ts +0 -102
  166. package/src/config.ts +0 -49
  167. package/src/db/adapter.ts +0 -53
  168. package/src/db/better-sqlite.ts +0 -632
  169. package/src/db/bun-sqlite.ts +0 -646
  170. package/src/db/d1.ts +0 -711
  171. package/src/db/index.ts +0 -6
  172. package/src/db/kysely/data-mapper.ts +0 -142
  173. package/src/db/kysely/field-mapper.ts +0 -148
  174. package/src/db/kysely/migration-generator.ts +0 -223
  175. package/src/db/kysely/query-builder.ts +0 -92
  176. package/src/db/kysely/schema-builder.ts +0 -439
  177. package/src/db/kysely/sql-utils.ts +0 -13
  178. package/src/db/postgres.ts +0 -621
  179. package/src/db/sqlite.ts +0 -660
  180. package/src/db/system-schema.ts +0 -121
  181. package/src/index.ts +0 -13
  182. package/src/runtimes/README.md +0 -59
  183. package/src/runtimes/bun.ts +0 -49
  184. package/src/runtimes/cloudflare-workers.ts +0 -38
  185. package/src/runtimes/next.ts +0 -26
  186. package/src/runtimes/node.ts +0 -52
  187. package/src/schema/collection.ts +0 -184
  188. package/src/schema/fields/base.ts +0 -164
  189. package/src/schema/fields/index.ts +0 -427
  190. package/src/schema/global.ts +0 -145
  191. package/src/schema/index.ts +0 -4
  192. package/src/schema/infer.ts +0 -72
  193. package/src/server/admin-router.ts +0 -20
  194. package/src/server/admin.ts +0 -142
  195. package/src/server/assets.ts +0 -306
  196. package/src/server/collection-router.ts +0 -55
  197. package/src/server/handlers.ts +0 -722
  198. package/src/server/middlewares/admin.ts +0 -27
  199. package/src/server/middlewares/auth.ts +0 -89
  200. package/src/server/middlewares/context.ts +0 -17
  201. package/src/server/middlewares/cors.ts +0 -24
  202. package/src/server/middlewares/database-init.ts +0 -74
  203. package/src/server/middlewares/rate-limit.ts +0 -77
  204. package/src/server/router.ts +0 -47
  205. package/src/server/setup-middlewares.ts +0 -58
  206. package/src/server/system-router.ts +0 -35
  207. package/src/server.ts +0 -9
  208. package/src/storage/adapters/cloudflare-r2.ts +0 -136
  209. package/src/storage/adapters/local.ts +0 -146
  210. package/src/storage/adapters/s3.ts +0 -186
  211. package/src/storage/errors.ts +0 -46
  212. package/src/storage/index.ts +0 -5
  213. package/src/storage/types.ts +0 -39
  214. package/src/types.ts +0 -577
  215. package/src/utils/lexical.ts +0 -37
  216. package/src/utils/logger.ts +0 -73
  217. package/src/validation.ts +0 -429
  218. package/src/validator.ts +0 -179
  219. package/test/admin-custom-field.test.ts +0 -162
  220. package/test/admin-react-field.test.tsx +0 -134
  221. package/test/api-features.test.ts +0 -78
  222. package/test/api.test.ts +0 -178
  223. package/test/auth.test.ts +0 -62
  224. package/test/cli-integration.test.ts +0 -148
  225. package/test/cli.test.ts +0 -25
  226. package/test/db/postgres.test.ts +0 -95
  227. package/test/db/sqlite-filter.test.ts +0 -53
  228. package/test/db/sqlite.test.ts +0 -82
  229. package/test/engine-features.test.ts +0 -79
  230. package/test/globals.test.ts +0 -74
  231. package/test/integration-tmp/db-app/opacacms.config.ts +0 -15
  232. package/test/integration-tmp/my-sqlite-app/opacacms.config.ts +0 -25
  233. package/test/integration-tmp/my-test-app/index.ts +0 -8
  234. package/test/integration-tmp/my-test-app/opacacms.config.ts +0 -16
  235. package/test/integration-tmp/my-test-app/package.json +0 -12
  236. package/test/populate.test.ts +0 -79
  237. package/test/runtimes.test.ts +0 -43
  238. package/test/schema-builder.test.ts +0 -107
  239. package/test/schema-features.test.ts +0 -63
  240. package/test/seeding.test.ts +0 -68
  241. package/test/storage/local.test.ts +0 -72
  242. package/test/storage/s3.test.ts +0 -60
  243. package/test/structural-data.test.ts +0 -100
  244. package/test/test-setup.ts +0 -11
  245. package/test/validation.test.ts +0 -162
  246. package/tsconfig.json +0 -42
@@ -3,7 +3,7 @@ import {
3
3
  flattenPayload,
4
4
  pushSchema,
5
5
  unflattenRow
6
- } from "./chunk-6ew02s0c.js";
6
+ } from "./chunk-xtwc125q.js";
7
7
  import {
8
8
  BaseDatabaseAdapter
9
9
  } from "./chunk-s8mqwnm1.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  flattenFields,
15
15
  toSnakeCase
16
- } from "./chunk-cvdd4eqh.js";
16
+ } from "./chunk-2kyhqvhc.js";
17
17
  import {
18
18
  __require
19
19
  } from "./chunk-8sqjbsgt.js";
@@ -31,6 +31,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
31
31
  _rawDb;
32
32
  _db;
33
33
  _collections = [];
34
+ _globals = [];
34
35
  push;
35
36
  migrationDir;
36
37
  pushDestructive;
@@ -66,7 +67,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
66
67
  if (!colDef)
67
68
  return data;
68
69
  const result = { ...data };
69
- const { flattenFields: flattenFields2 } = await import("./chunk-xg35h5a3.js");
70
+ const { flattenFields: flattenFields2 } = await import("./chunk-7fyepksb.js");
70
71
  const allFields = flattenFields2(colDef.fields);
71
72
  for (const field of allFields) {
72
73
  const colName = toSnakeCase(field.name);
@@ -101,7 +102,8 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
101
102
  return result;
102
103
  }
103
104
  async count(collection, query) {
104
- let qb = this._db.selectFrom(collection).select((eb) => eb.fn.count("id").as("count"));
105
+ const tableName = toSnakeCase(collection);
106
+ let qb = this._db.selectFrom(tableName).select((eb) => eb.fn.count("id").as("count"));
105
107
  if (query && Object.keys(query).length > 0) {
106
108
  qb = qb.where((eb) => buildKyselyWhere(eb, query) || eb.val(true));
107
109
  }
@@ -109,6 +111,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
109
111
  return Number(result?.count || 0);
110
112
  }
111
113
  async create(collection, data) {
114
+ const tableName = toSnakeCase(collection);
112
115
  return this._db.transaction().execute(async (tx) => {
113
116
  const colDef = this._collections.find((c) => c.slug === collection);
114
117
  const jsonFields = colDef?.fields.filter((f) => ["richtext", "json", "file"].includes(f.type)).map((f) => f.name) || [];
@@ -149,9 +152,9 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
149
152
  }
150
153
  }
151
154
  const coercedData = await this.coerceData(collection, filteredData);
152
- await tx.insertInto(collection).values(coercedData).execute();
155
+ await tx.insertInto(tableName).values(coercedData).execute();
153
156
  for (const [key, values] of Object.entries(hasManyData)) {
154
- const joinTableName = `${collection}_${toSnakeCase(key)}_relations`.toLowerCase();
157
+ const joinTableName = `${tableName}_${toSnakeCase(key)}_relations`.toLowerCase();
155
158
  if (values.length > 0) {
156
159
  const joinData = values.map((val, idx) => {
157
160
  const tId = typeof val === "object" ? val.id : val;
@@ -165,7 +168,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
165
168
  const block = blocks[i];
166
169
  if (!block.blockType)
167
170
  continue;
168
- const blockTableName = `${collection}_${toSnakeCase(key)}_${block.blockType}`.toLowerCase();
171
+ const blockTableName = `${tableName}_${toSnakeCase(key)}_${block.blockType}`.toLowerCase();
169
172
  const bId = block.id || crypto.randomUUID();
170
173
  const blockDef = colDef?.fields.find((f) => f.name === key && f.type === "blocks");
171
174
  const blockConfig = blockDef?.blocks?.find((b) => b.slug === block.blockType);
@@ -190,8 +193,9 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
190
193
  });
191
194
  }
192
195
  async findOne(collection, query, tx) {
196
+ const tableName = toSnakeCase(collection);
193
197
  const executor = tx || this._db;
194
- let qb = executor.selectFrom(collection).selectAll();
198
+ let qb = executor.selectFrom(tableName).selectAll();
195
199
  if (query && Object.keys(query).length > 0) {
196
200
  qb = qb.where((eb) => buildKyselyWhere(eb, query) || eb.val(true));
197
201
  }
@@ -201,14 +205,14 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
201
205
  const unflattened = unflattenRow(row);
202
206
  const colDef = this._collections.find((c) => c.slug === collection);
203
207
  if (colDef) {
204
- const { getRelationalFields, toSnakeCase: toSnakeCase2 } = await import("./chunk-xg35h5a3.js");
208
+ const { getRelationalFields, toSnakeCase: toSnakeCase2 } = await import("./chunk-7fyepksb.js");
205
209
  const relationalFields = getRelationalFields(colDef.fields);
206
210
  for (const field of relationalFields) {
207
211
  if (!field.name)
208
212
  continue;
209
213
  const snakeName = toSnakeCase2(field.name);
210
214
  if (field.type === "relationship" && "hasMany" in field && field.hasMany) {
211
- const joinTableName = `${collection}_${snakeName}_relations`.toLowerCase();
215
+ const joinTableName = `${tableName}_${snakeName}_relations`.toLowerCase();
212
216
  try {
213
217
  const relations = await executor.selectFrom(joinTableName).selectAll().where("source_id", "=", row.id).orderBy("order", "asc").execute();
214
218
  unflattened[field.name] = relations.map((r) => r.target_id);
@@ -216,7 +220,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
216
220
  } else if (field.type === "blocks" && field.blocks) {
217
221
  const blockData = [];
218
222
  for (const b of field.blocks) {
219
- const blockTableName = `${collection}_${snakeName}_${b.slug}`.toLowerCase();
223
+ const blockTableName = `${tableName}_${snakeName}_${b.slug}`.toLowerCase();
220
224
  try {
221
225
  const blocks = await executor.selectFrom(blockTableName).selectAll().where("_parent_id", "=", row.id).execute();
222
226
  for (const blk of blocks) {
@@ -242,7 +246,8 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
242
246
  const limit = options?.limit || 10;
243
247
  const offset = (page - 1) * limit;
244
248
  const total = await this.count(collection, query);
245
- let qb = this._db.selectFrom(collection).selectAll().limit(limit).offset(offset);
249
+ const tableName = toSnakeCase(collection);
250
+ let qb = this._db.selectFrom(tableName).selectAll().limit(limit).offset(offset);
246
251
  if (query && Object.keys(query).length > 0) {
247
252
  qb = qb.where((eb) => buildKyselyWhere(eb, query) || eb.val(true));
248
253
  }
@@ -270,6 +275,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
270
275
  };
271
276
  }
272
277
  async update(collection, query, data) {
278
+ const tableName = toSnakeCase(collection);
273
279
  return this._db.transaction().execute(async (tx) => {
274
280
  let normalizedQuery = query;
275
281
  if (typeof query !== "object" || query === null) {
@@ -302,10 +308,10 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
302
308
  flatData.updated_at = new Date().toISOString();
303
309
  if (Object.keys(flatData).length > 0) {
304
310
  const coercedData = await this.coerceData(collection, flatData);
305
- await tx.updateTable(collection).set(coercedData).where("id", "=", current.id).execute();
311
+ await tx.updateTable(tableName).set(coercedData).where("id", "=", current.id).execute();
306
312
  }
307
313
  for (const [key, values] of Object.entries(hasManyData)) {
308
- const joinTableName = `${collection}_${toSnakeCase(key)}_relations`.toLowerCase();
314
+ const joinTableName = `${tableName}_${toSnakeCase(key)}_relations`.toLowerCase();
309
315
  await tx.deleteFrom(joinTableName).where("source_id", "=", current.id).execute();
310
316
  if (values.length > 0) {
311
317
  const joinData = values.map((val, idx) => {
@@ -319,7 +325,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
319
325
  const fieldDef = colDef?.fields.find((f) => f.name === key);
320
326
  if (fieldDef?.type === "blocks" && fieldDef.blocks) {
321
327
  for (const b of fieldDef.blocks) {
322
- const blockTableName = `${collection}_${toSnakeCase(key)}_${b.slug}`.toLowerCase();
328
+ const blockTableName = `${tableName}_${toSnakeCase(key)}_${b.slug}`.toLowerCase();
323
329
  try {
324
330
  await tx.deleteFrom(blockTableName).where("_parent_id", "=", current.id).execute();
325
331
  } catch (e) {}
@@ -329,7 +335,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
329
335
  const block = blocks[i];
330
336
  if (!block.blockType)
331
337
  continue;
332
- const blockTableName = `${collection}_${toSnakeCase(key)}_${block.blockType}`.toLowerCase();
338
+ const blockTableName = `${tableName}_${toSnakeCase(key)}_${block.blockType}`.toLowerCase();
333
339
  const bId = block.id || crypto.randomUUID();
334
340
  const blockConfig = fieldDef?.blocks?.find((b) => b.slug === block.blockType);
335
341
  const blockJsonFields = blockConfig?.fields.filter((f) => ["richtext", "json", "file"].includes(f.type)).map((f) => f.name) || [];
@@ -353,6 +359,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
353
359
  });
354
360
  }
355
361
  async delete(collection, query) {
362
+ const tableName = toSnakeCase(collection);
356
363
  let normalizedQuery = query;
357
364
  if (typeof query !== "object" || query === null) {
358
365
  normalizedQuery = { id: query };
@@ -366,13 +373,13 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
366
373
  for (const field of colDef.fields) {
367
374
  const snakeName = toSnakeCase(field.name);
368
375
  if (field.type === "relationship" && "hasMany" in field && field.hasMany) {
369
- const joinTableName = `${collection}_${snakeName}_relations`.toLowerCase();
376
+ const joinTableName = `${tableName}_${snakeName}_relations`.toLowerCase();
370
377
  try {
371
378
  await tx.deleteFrom(joinTableName).where("source_id", "=", current.id).execute();
372
379
  } catch (e) {}
373
380
  } else if (field.type === "blocks" && field.blocks) {
374
381
  for (const b of field.blocks) {
375
- const blockTableName = `${collection}_${snakeName}_${b.slug}`.toLowerCase();
382
+ const blockTableName = `${tableName}_${snakeName}_${b.slug}`.toLowerCase();
376
383
  try {
377
384
  await tx.deleteFrom(blockTableName).where("_parent_id", "=", current.id).execute();
378
385
  } catch (e) {}
@@ -380,13 +387,14 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
380
387
  }
381
388
  }
382
389
  }
383
- await tx.deleteFrom(collection).where("id", "=", current.id).execute();
390
+ await tx.deleteFrom(tableName).where("id", "=", current.id).execute();
384
391
  });
385
392
  return true;
386
393
  }
387
394
  async updateMany(collection, query, data) {
395
+ const tableName = toSnakeCase(collection);
388
396
  return this._db.transaction().execute(async (tx) => {
389
- let qb = tx.updateTable(collection);
397
+ let qb = tx.updateTable(tableName);
390
398
  if (query && Object.keys(query).length > 0) {
391
399
  qb = qb.where((eb) => buildKyselyWhere(eb, query) || eb.val(true));
392
400
  }
@@ -413,8 +421,9 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
413
421
  });
414
422
  }
415
423
  async deleteMany(collection, query) {
424
+ const tableName = toSnakeCase(collection);
416
425
  return this._db.transaction().execute(async (tx) => {
417
- let selectQb = tx.selectFrom(collection).select("id");
426
+ let selectQb = tx.selectFrom(tableName).select("id");
418
427
  if (query && Object.keys(query).length > 0) {
419
428
  selectQb = selectQb.where((eb) => buildKyselyWhere(eb, query) || eb.val(true));
420
429
  }
@@ -427,13 +436,13 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
427
436
  for (const field of colDef.fields) {
428
437
  const snakeName = toSnakeCase(field.name);
429
438
  if (field.type === "relationship" && "hasMany" in field && field.hasMany) {
430
- const joinTableName = `${collection}_${snakeName}_relations`.toLowerCase();
439
+ const joinTableName = `${tableName}_${snakeName}_relations`.toLowerCase();
431
440
  try {
432
441
  await tx.deleteFrom(joinTableName).where("source_id", "in", ids).execute();
433
442
  } catch (e) {}
434
443
  } else if (field.type === "blocks" && field.blocks) {
435
444
  for (const b of field.blocks) {
436
- const blockTableName = `${collection}_${snakeName}_${b.slug}`.toLowerCase();
445
+ const blockTableName = `${tableName}_${snakeName}_${b.slug}`.toLowerCase();
437
446
  try {
438
447
  await tx.deleteFrom(blockTableName).where("_parent_id", "in", ids).execute();
439
448
  } catch (e) {}
@@ -441,24 +450,38 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
441
450
  }
442
451
  }
443
452
  }
444
- const result = await tx.deleteFrom(collection).where("id", "in", ids).executeTakeFirst();
453
+ const result = await tx.deleteFrom(tableName).where("id", "in", ids).executeTakeFirst();
445
454
  return Number(result.numDeletedRows || 0);
446
455
  });
447
456
  }
448
457
  async findGlobal(slug) {
449
- const row = await this._db.selectFrom(slug).selectAll().limit(1).executeTakeFirst();
458
+ const tableName = toSnakeCase(slug);
459
+ const row = await this._db.selectFrom(tableName).selectAll().limit(1).executeTakeFirst();
450
460
  return row ? unflattenRow(row) : null;
451
461
  }
452
462
  async updateGlobal(slug, data) {
463
+ const tableName = toSnakeCase(slug);
453
464
  const existing = await this.findGlobal(slug);
454
465
  const flatData = flattenPayload(data);
455
- flatData.updated_at = new Date().toISOString();
466
+ const globalDef = this._globals.find((g) => g.slug === slug);
467
+ const ts = globalDef?.timestamps !== false;
468
+ if (ts) {
469
+ const config = typeof globalDef?.timestamps === "object" ? globalDef.timestamps : {};
470
+ const updatedField = toSnakeCase(config.updatedAt || "updatedAt");
471
+ flatData[updatedField] = new Date().toISOString();
472
+ }
456
473
  if (!existing) {
457
474
  if (!flatData.id)
458
475
  flatData.id = "global";
459
- await this._db.insertInto(slug).values(flatData).execute();
476
+ if (ts) {
477
+ const config = typeof globalDef?.timestamps === "object" ? globalDef.timestamps : {};
478
+ const createdField = toSnakeCase(config.createdAt || "createdAt");
479
+ if (!flatData[createdField])
480
+ flatData[createdField] = flatData[toSnakeCase(config.updatedAt || "updatedAt")];
481
+ }
482
+ await this._db.insertInto(tableName).values(flatData).execute();
460
483
  } else {
461
- await this._db.updateTable(slug).set(flatData).where("id", "=", existing.id).execute();
484
+ await this._db.updateTable(tableName).set(flatData).where("id", "=", existing.id).execute();
462
485
  }
463
486
  return this.findGlobal(slug);
464
487
  }
@@ -485,6 +508,7 @@ class BetterSQLiteAdapter extends BaseDatabaseAdapter {
485
508
  }
486
509
  async migrate(collections, globals = []) {
487
510
  this._collections = collections;
511
+ this._globals = globals;
488
512
  if (this.push) {
489
513
  await pushSchema(this._db, "sqlite", collections, globals, {
490
514
  pushDestructive: this.pushDestructive
@@ -7,7 +7,7 @@ import {
7
7
  mapFieldToPostgresType,
8
8
  mapFieldToSQLiteType,
9
9
  toSnakeCase
10
- } from "./chunk-cvdd4eqh.js";
10
+ } from "./chunk-2kyhqvhc.js";
11
11
  import {
12
12
  getSystemCollections,
13
13
  init_system_schema
@@ -279,7 +279,7 @@ async function pushSchema(db, dialect, collections, globals = [], options = {})
279
279
  }
280
280
  await builder.execute();
281
281
  if (versions) {
282
- const versionsTable = `${slug}_versions`.toLowerCase();
282
+ const versionsTable = `${tableName}_versions`.toLowerCase();
283
283
  assertSafeIdentifier(versionsTable);
284
284
  expectedTableNames.add(versionsTable);
285
285
  if (!existingTableSet.has(versionsTable)) {
@@ -291,10 +291,10 @@ async function pushSchema(db, dialect, collections, globals = [], options = {})
291
291
  let existingColumns = [];
292
292
  try {
293
293
  if (dialect === "postgres") {
294
- const res = await sql`SELECT column_name FROM information_schema.columns WHERE table_schema = 'public' AND table_name = ${slug}`.execute(db);
294
+ const res = await sql`SELECT column_name FROM information_schema.columns WHERE table_schema = 'public' AND table_name = ${tableName}`.execute(db);
295
295
  existingColumns = res.rows.map((r) => r.column_name);
296
296
  } else {
297
- const res = await sql`PRAGMA table_info(${sql.id(slug)})`.execute(db);
297
+ const res = await sql`PRAGMA table_info(${sql.id(tableName)})`.execute(db);
298
298
  existingColumns = res.rows.map((r) => r.name);
299
299
  }
300
300
  } catch (e) {
@@ -309,14 +309,14 @@ async function pushSchema(db, dialect, collections, globals = [], options = {})
309
309
  continue;
310
310
  assertSafeIdentifier(colName);
311
311
  if (!existingColSet.has(colName)) {
312
- logger.info(` -> Adding missing column: ${logger.format("green", `${slug}.${colName}`)}`);
312
+ logger.info(` -> Adding missing column: ${logger.format("green", `${tableName}.${colName}`)}`);
313
313
  const colType = mapType(field);
314
- await db.schema.alterTable(slug).addColumn(colName, colType).execute();
314
+ await db.schema.alterTable(tableName).addColumn(colName, colType).execute();
315
315
  }
316
316
  }
317
317
  if (versions?.drafts && !existingColSet.has("_status")) {
318
- logger.info(` -> Adding missing status column to: ${slug}`);
319
- await db.schema.alterTable(slug).addColumn("_status", "text", (col) => col.defaultTo("draft")).execute();
318
+ logger.info(` -> Adding missing status column to: ${tableName}`);
319
+ await db.schema.alterTable(tableName).addColumn("_status", "text", (col) => col.defaultTo("draft")).execute();
320
320
  }
321
321
  if (hasTimestamps) {
322
322
  const ts = collection.timestamps ?? {};
@@ -325,19 +325,19 @@ async function pushSchema(db, dialect, collections, globals = [], options = {})
325
325
  const updatedField = toSnakeCase(config.updatedAt ?? "updatedAt");
326
326
  const tsType = dialect === "postgres" ? "timestamp with time zone" : "text";
327
327
  if (!existingColSet.has(createdField)) {
328
- logger.info(` -> Adding missing timestamp column: ${slug}.${createdField}`);
329
- await db.schema.alterTable(slug).addColumn(createdField, tsType, (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
328
+ logger.info(` -> Adding missing timestamp column: ${tableName}.${createdField}`);
329
+ await db.schema.alterTable(tableName).addColumn(createdField, tsType, (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
330
330
  }
331
331
  if (!existingColSet.has(updatedField)) {
332
- logger.info(` -> Adding missing timestamp column: ${slug}.${updatedField}`);
333
- await db.schema.alterTable(slug).addColumn(updatedField, tsType, (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
332
+ logger.info(` -> Adding missing timestamp column: ${tableName}.${updatedField}`);
333
+ await db.schema.alterTable(tableName).addColumn(updatedField, tsType, (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
334
334
  }
335
335
  }
336
336
  if (versions) {
337
- const versionsTable = `${slug}_versions`.toLowerCase();
337
+ const versionsTable = `${tableName}_versions`.toLowerCase();
338
338
  expectedTableNames.add(versionsTable);
339
339
  if (!existingTableSet.has(versionsTable)) {
340
- logger.info(` -> Creating missing versions table for: ${slug}`);
340
+ logger.info(` -> Creating missing versions table for: ${tableName}`);
341
341
  await db.schema.createTable(versionsTable).addColumn("id", "text", (col) => col.primaryKey()).addColumn("_parent_id", "text", (col) => col.notNull()).addColumn("_version_data", dialect === "postgres" ? "jsonb" : "text", (col) => col.notNull()).addColumn("_status", "text").addColumn("created_at", dialect === "postgres" ? "timestamp with time zone" : "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
342
342
  }
343
343
  }
@@ -354,9 +354,9 @@ async function pushSchema(db, dialect, collections, globals = [], options = {})
354
354
  expectedCols.add("id");
355
355
  for (const existingCol of existingColumns) {
356
356
  if (!expectedCols.has(existingCol)) {
357
- logger.info(` -> Dropping stale column: ${logger.format("red", `${slug}.${existingCol}`)}`);
357
+ logger.info(` -> Dropping stale column: ${logger.format("red", `${tableName}.${existingCol}`)}`);
358
358
  try {
359
- await db.schema.alterTable(slug).dropColumn(existingCol).execute();
359
+ await db.schema.alterTable(tableName).dropColumn(existingCol).execute();
360
360
  } catch (_) {
361
361
  logger.warn(`Failed to drop column ${existingCol}.`);
362
362
  }
@@ -369,7 +369,7 @@ async function pushSchema(db, dialect, collections, globals = [], options = {})
369
369
  if (field.type === "relationship" && "hasMany" in field && field.hasMany) {
370
370
  const sourceIdType = "text";
371
371
  const colName = toSnakeCase(field.name);
372
- const joinTableName = `${slug}_${colName}_relations`.toLowerCase();
372
+ const joinTableName = `${tableName}_${colName}_relations`.toLowerCase();
373
373
  assertSafeIdentifier(joinTableName);
374
374
  expectedTableNames.add(joinTableName);
375
375
  if (!existingTableSet.has(joinTableName)) {
@@ -386,7 +386,7 @@ async function pushSchema(db, dialect, collections, globals = [], options = {})
386
386
  const blockSlug = toSnakeCase(block.slug);
387
387
  assertSafeIdentifier(blockName);
388
388
  assertSafeIdentifier(blockSlug);
389
- const blockTableName = `${slug}_${blockName}_${blockSlug}`.toLowerCase();
389
+ const blockTableName = `${tableName}_${blockName}_${blockSlug}`.toLowerCase();
390
390
  assertSafeIdentifier(blockTableName);
391
391
  expectedTableNames.add(blockTableName);
392
392
  if (!existingTableSet.has(blockTableName)) {
package/dist/cli/index.js CHANGED
@@ -101,7 +101,7 @@ Commands:`);
101
101
  }
102
102
  let configPath = values.config ? resolve(process.cwd(), values.config) : "";
103
103
  if (!configPath) {
104
- const defaults = ["opacacms.config.ts", "opacacms.config.js", "src/opacacms.config.ts", "src/opacacms.config.js", "index.ts", "index.js"];
104
+ const defaults = ["opacacms.config.ts", "opacacms.config.js", "src/opacacms.config.ts", "src/opacacms.config.js", "opaca.config.ts", "opaca.config.js"];
105
105
  for (const d of defaults) {
106
106
  if (fs.existsSync(resolve(process.cwd(), d))) {
107
107
  configPath = resolve(process.cwd(), d);
@@ -116,22 +116,22 @@ Commands:`);
116
116
  const opaca = await loadConfig(configPath);
117
117
  switch (command) {
118
118
  case "migrate:create": {
119
- const { migrateCreateCommand } = await import("../chunk-6dhs73zq.js");
119
+ const { migrateCreateCommand } = await import("../chunk-0am1m47g.js");
120
120
  await migrateCreateCommand(opaca, positionals[1], values.out);
121
121
  break;
122
122
  }
123
123
  case "migrate": {
124
- const { migrateRunCommand } = await import("../chunk-6dhs73zq.js");
124
+ const { migrateRunCommand } = await import("../chunk-0am1m47g.js");
125
125
  await migrateRunCommand(opaca.db);
126
126
  break;
127
127
  }
128
128
  case "migrate:status": {
129
- const { migrateStatusCommand } = await import("../chunk-6dhs73zq.js");
129
+ const { migrateStatusCommand } = await import("../chunk-0am1m47g.js");
130
130
  await migrateStatusCommand(opaca);
131
131
  break;
132
132
  }
133
133
  case "migrate:d1": {
134
- const { migrateD1Command } = await import("../chunk-6dhs73zq.js");
134
+ const { migrateD1Command } = await import("../chunk-0am1m47g.js");
135
135
  await migrateD1Command(values.out || "./migrations", !!values.remote, values.binding || "DB");
136
136
  break;
137
137
  }
@@ -6,6 +6,7 @@ export declare class BetterSQLiteAdapter extends BaseDatabaseAdapter {
6
6
  private _rawDb;
7
7
  private _db;
8
8
  private _collections;
9
+ private _globals;
9
10
  push: boolean;
10
11
  migrationDir: string;
11
12
  pushDestructive: boolean;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  BetterSQLiteAdapter,
3
3
  createBetterSQLiteAdapter
4
- } from "../chunk-eqtsfyjf.js";
5
- import"../chunk-6ew02s0c.js";
4
+ } from "../chunk-x2ejaftz.js";
5
+ import"../chunk-xtwc125q.js";
6
6
  import"../chunk-s8mqwnm1.js";
7
7
  import"../chunk-62ev8gnc.js";
8
- import"../chunk-cvdd4eqh.js";
8
+ import"../chunk-2kyhqvhc.js";
9
9
  import"../chunk-ybbbqj63.js";
10
10
  import"../chunk-8sqjbsgt.js";
11
11
  export {
@@ -6,6 +6,7 @@ export declare class BunSQLiteAdapter extends BaseDatabaseAdapter {
6
6
  private _rawDb;
7
7
  private _db;
8
8
  private _collections;
9
+ private _globals;
9
10
  push: boolean;
10
11
  migrationDir: string;
11
12
  pushDestructive: boolean;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  BunSQLiteAdapter,
3
3
  createBunSQLiteAdapter
4
- } from "../chunk-gjjcc4hm.js";
5
- import"../chunk-6ew02s0c.js";
4
+ } from "../chunk-2z8wxx9g.js";
5
+ import"../chunk-xtwc125q.js";
6
6
  import"../chunk-s8mqwnm1.js";
7
7
  import"../chunk-62ev8gnc.js";
8
- import"../chunk-cvdd4eqh.js";
8
+ import"../chunk-2kyhqvhc.js";
9
9
  import"../chunk-ybbbqj63.js";
10
10
  import"../chunk-8sqjbsgt.js";
11
11
  export {
package/dist/db/d1.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  D1Adapter,
3
3
  createD1Adapter
4
- } from "../chunk-qrt22f6e.js";
5
- import"../chunk-6ew02s0c.js";
4
+ } from "../chunk-wq314kkx.js";
5
+ import"../chunk-xtwc125q.js";
6
6
  import"../chunk-s8mqwnm1.js";
7
7
  import"../chunk-62ev8gnc.js";
8
- import"../chunk-cvdd4eqh.js";
8
+ import"../chunk-2kyhqvhc.js";
9
9
  import"../chunk-ybbbqj63.js";
10
10
  import"../chunk-8sqjbsgt.js";
11
11
  export {
@@ -1,3 +1,6 @@
1
+ import type { Kysely } from "kysely";
2
+ export { sql } from "kysely";
3
+ export type OpacaMigrationDb = Kysely<any>;
1
4
  export * from "./adapter";
2
5
  export * from "./postgres";
3
6
  export * from "./sqlite";
package/dist/db/index.js CHANGED
@@ -1,32 +1,36 @@
1
- import {
2
- BunSQLiteAdapter,
3
- createBunSQLiteAdapter
4
- } from "../chunk-gjjcc4hm.js";
5
- import {
6
- BetterSQLiteAdapter,
7
- createBetterSQLiteAdapter
8
- } from "../chunk-eqtsfyjf.js";
9
1
  import {
10
2
  D1Adapter,
11
3
  createD1Adapter
12
- } from "../chunk-qrt22f6e.js";
4
+ } from "../chunk-wq314kkx.js";
13
5
  import {
14
6
  PostgresAdapter,
15
7
  createPostgresAdapter
16
- } from "../chunk-njytmdb4.js";
8
+ } from "../chunk-pxh5encs.js";
17
9
  import {
18
10
  SQLiteAdapter,
19
11
  createSQLiteAdapter
20
- } from "../chunk-n8aekdnr.js";
21
- import"../chunk-6ew02s0c.js";
12
+ } from "../chunk-qkn1ykrj.js";
13
+ import {
14
+ BunSQLiteAdapter,
15
+ createBunSQLiteAdapter
16
+ } from "../chunk-2z8wxx9g.js";
17
+ import {
18
+ BetterSQLiteAdapter,
19
+ createBetterSQLiteAdapter
20
+ } from "../chunk-x2ejaftz.js";
21
+ import"../chunk-xtwc125q.js";
22
22
  import {
23
23
  BaseDatabaseAdapter
24
24
  } from "../chunk-s8mqwnm1.js";
25
25
  import"../chunk-62ev8gnc.js";
26
- import"../chunk-cvdd4eqh.js";
26
+ import"../chunk-2kyhqvhc.js";
27
27
  import"../chunk-ybbbqj63.js";
28
28
  import"../chunk-8sqjbsgt.js";
29
+
30
+ // src/db/index.ts
31
+ import { sql } from "kysely";
29
32
  export {
33
+ sql,
30
34
  createSQLiteAdapter,
31
35
  createPostgresAdapter,
32
36
  createD1Adapter,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  PostgresAdapter,
3
3
  createPostgresAdapter
4
- } from "../chunk-njytmdb4.js";
5
- import"../chunk-6ew02s0c.js";
4
+ } from "../chunk-pxh5encs.js";
5
+ import"../chunk-xtwc125q.js";
6
6
  import"../chunk-s8mqwnm1.js";
7
7
  import"../chunk-62ev8gnc.js";
8
- import"../chunk-cvdd4eqh.js";
8
+ import"../chunk-2kyhqvhc.js";
9
9
  import"../chunk-ybbbqj63.js";
10
10
  import"../chunk-8sqjbsgt.js";
11
11
  export {
package/dist/db/sqlite.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  SQLiteAdapter,
3
3
  createSQLiteAdapter
4
- } from "../chunk-n8aekdnr.js";
5
- import"../chunk-6ew02s0c.js";
4
+ } from "../chunk-qkn1ykrj.js";
5
+ import"../chunk-xtwc125q.js";
6
6
  import"../chunk-s8mqwnm1.js";
7
7
  import"../chunk-62ev8gnc.js";
8
- import"../chunk-cvdd4eqh.js";
8
+ import"../chunk-2kyhqvhc.js";
9
9
  import"../chunk-ybbbqj63.js";
10
10
  import"../chunk-8sqjbsgt.js";
11
11
  export {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAPIRouter
3
- } from "../chunk-0nf7fe26.js";
3
+ } from "../chunk-0d9aqz6z.js";
4
4
  import"../chunk-dy5t83hr.js";
5
5
  import"../chunk-62ev8gnc.js";
6
- import"../chunk-cvdd4eqh.js";
6
+ import"../chunk-2kyhqvhc.js";
7
7
  import"../chunk-ybbbqj63.js";
8
8
  import"../chunk-8sqjbsgt.js";
9
9
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAPIRouter
3
- } from "../chunk-0nf7fe26.js";
3
+ } from "../chunk-0d9aqz6z.js";
4
4
  import"../chunk-dy5t83hr.js";
5
5
  import"../chunk-62ev8gnc.js";
6
- import"../chunk-cvdd4eqh.js";
6
+ import"../chunk-2kyhqvhc.js";
7
7
  import"../chunk-ybbbqj63.js";
8
8
  import"../chunk-8sqjbsgt.js";
9
9
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAPIRouter
3
- } from "../chunk-0nf7fe26.js";
3
+ } from "../chunk-0d9aqz6z.js";
4
4
  import"../chunk-dy5t83hr.js";
5
5
  import"../chunk-62ev8gnc.js";
6
- import"../chunk-cvdd4eqh.js";
6
+ import"../chunk-2kyhqvhc.js";
7
7
  import"../chunk-ybbbqj63.js";
8
8
  import"../chunk-8sqjbsgt.js";
9
9
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createAPIRouter
3
- } from "../chunk-0nf7fe26.js";
3
+ } from "../chunk-0d9aqz6z.js";
4
4
  import"../chunk-dy5t83hr.js";
5
5
  import"../chunk-62ev8gnc.js";
6
- import"../chunk-cvdd4eqh.js";
6
+ import"../chunk-2kyhqvhc.js";
7
7
  import"../chunk-ybbbqj63.js";
8
8
  import"../chunk-8sqjbsgt.js";
9
9
 
package/dist/server.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  createGlobalHandlers,
5
5
  createHandlers,
6
6
  hydrateDoc
7
- } from "./chunk-0nf7fe26.js";
7
+ } from "./chunk-0d9aqz6z.js";
8
8
  import {
9
9
  defineConfig
10
10
  } from "./chunk-zvwb67nd.js";
@@ -13,7 +13,7 @@ import {
13
13
  BaseDatabaseAdapter
14
14
  } from "./chunk-s8mqwnm1.js";
15
15
  import"./chunk-62ev8gnc.js";
16
- import"./chunk-cvdd4eqh.js";
16
+ import"./chunk-2kyhqvhc.js";
17
17
  import"./chunk-ybbbqj63.js";
18
18
  import"./chunk-8sqjbsgt.js";
19
19
  export {