@payloadcms/db-postgres 3.0.0-alpha.18 → 3.0.0-alpha.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/connect.js +17 -32
  2. package/dist/create.js +6 -21
  3. package/dist/createGlobal.js +6 -21
  4. package/dist/createGlobalVersion.js +10 -25
  5. package/dist/createMigration.js +11 -26
  6. package/dist/createVersion.js +10 -25
  7. package/dist/deleteMany.js +8 -23
  8. package/dist/deleteOne.js +10 -25
  9. package/dist/deleteVersions.js +10 -25
  10. package/dist/destroy.js +2 -12
  11. package/dist/find/buildFindManyArgs.js +6 -14
  12. package/dist/find/chainMethods.js +2 -11
  13. package/dist/find/findMany.js +14 -29
  14. package/dist/find/traverseFields.js +8 -23
  15. package/dist/find.js +6 -21
  16. package/dist/findGlobal.js +6 -21
  17. package/dist/findGlobalVersions.js +8 -23
  18. package/dist/findOne.js +6 -21
  19. package/dist/findVersions.js +8 -23
  20. package/dist/index.js +72 -87
  21. package/dist/init.js +17 -32
  22. package/dist/migrate.js +15 -30
  23. package/dist/migrateDown.js +12 -22
  24. package/dist/migrateFresh.js +15 -28
  25. package/dist/migrateRefresh.js +18 -26
  26. package/dist/migrateReset.js +13 -21
  27. package/dist/migrateStatus.js +9 -19
  28. package/dist/queries/buildAndOrConditions.js +4 -14
  29. package/dist/queries/buildQuery.js +10 -20
  30. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js +4 -14
  31. package/dist/queries/createJSONQuery/formatJSONPathSegment.js +2 -12
  32. package/dist/queries/createJSONQuery/index.js +6 -16
  33. package/dist/queries/getTableColumnFromPath.js +38 -49
  34. package/dist/queries/operatorMap.js +17 -27
  35. package/dist/queries/parseParams.js +32 -42
  36. package/dist/queries/sanitizeQueryValue.js +8 -18
  37. package/dist/queryDrafts.js +10 -25
  38. package/dist/schema/build.js +49 -64
  39. package/dist/schema/createIndex.js +5 -15
  40. package/dist/schema/idToUUID.js +2 -12
  41. package/dist/schema/parentIDColumnMap.js +7 -17
  42. package/dist/schema/setColumnID.js +10 -20
  43. package/dist/schema/traverseFields.js +62 -77
  44. package/dist/schema/validateExistingBlockIsIdentical.js +9 -19
  45. package/dist/transactions/beginTransaction.js +4 -14
  46. package/dist/transactions/commitTransaction.js +2 -12
  47. package/dist/transactions/rollbackTransaction.js +2 -12
  48. package/dist/transform/read/hasManyNumber.js +2 -12
  49. package/dist/transform/read/hasManyText.js +2 -12
  50. package/dist/transform/read/index.js +12 -20
  51. package/dist/transform/read/relationship.js +2 -12
  52. package/dist/transform/read/traverseFields.js +15 -23
  53. package/dist/transform/write/array.js +6 -16
  54. package/dist/transform/write/blocks.js +6 -21
  55. package/dist/transform/write/index.js +4 -14
  56. package/dist/transform/write/numbers.js +2 -12
  57. package/dist/transform/write/relationships.js +4 -14
  58. package/dist/transform/write/selects.js +4 -14
  59. package/dist/transform/write/texts.js +2 -12
  60. package/dist/transform/write/traverseFields.js +30 -45
  61. package/dist/transform/write/types.js +2 -5
  62. package/dist/types.js +2 -5
  63. package/dist/update.js +11 -26
  64. package/dist/updateGlobal.js +6 -21
  65. package/dist/updateGlobalVersion.js +10 -25
  66. package/dist/updateVersion.js +10 -25
  67. package/dist/upsertRow/deleteExistingArrayRows.js +5 -15
  68. package/dist/upsertRow/deleteExistingRowsByPath.js +9 -19
  69. package/dist/upsertRow/index.js +24 -34
  70. package/dist/upsertRow/insertArrays.js +2 -12
  71. package/dist/upsertRow/types.js +2 -5
  72. package/dist/utilities/appendPrefixToKeys.js +2 -12
  73. package/dist/utilities/createBlocksMap.js +2 -12
  74. package/dist/utilities/createMigrationTable.js +4 -14
  75. package/dist/utilities/createRelationshipMap.js +2 -12
  76. package/dist/utilities/hasLocalesTable.js +5 -15
  77. package/dist/utilities/isArrayOfRows.js +2 -12
  78. package/dist/utilities/migrationTableExists.js +4 -14
  79. package/dist/utilities/parseError.js +6 -14
  80. package/package.json +4 -4
@@ -1,23 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "updateVersion", {
6
- enumerable: true,
7
- get: function() {
8
- return updateVersion;
9
- }
10
- });
11
- const _versions = require("payload/versions");
12
- const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
13
- const _buildQuery = /*#__PURE__*/ _interop_require_default(require("./queries/buildQuery"));
14
- const _upsertRow = require("./upsertRow");
15
- function _interop_require_default(obj) {
16
- return obj && obj.__esModule ? obj : {
17
- default: obj
18
- };
19
- }
20
- async function updateVersion({ id, collection, locale, req = {}, versionData, where: whereArg }) {
1
+ import { buildVersionCollectionFields } from 'payload/versions';
2
+ import toSnakeCase from 'to-snake-case';
3
+ import buildQuery from './queries/buildQuery';
4
+ import { upsertRow } from './upsertRow';
5
+ export async function updateVersion({ id, collection, locale, req = {}, versionData, where: whereArg }) {
21
6
  const db = this.sessions[req.transactionID]?.db || this.drizzle;
22
7
  const collectionConfig = this.payload.collections[collection].config;
23
8
  const whereToUse = whereArg || {
@@ -25,16 +10,16 @@ async function updateVersion({ id, collection, locale, req = {}, versionData, wh
25
10
  equals: id
26
11
  }
27
12
  };
28
- const tableName = `_${(0, _tosnakecase.default)(collection)}_v`;
29
- const fields = (0, _versions.buildVersionCollectionFields)(collectionConfig);
30
- const { where } = await (0, _buildQuery.default)({
13
+ const tableName = `_${toSnakeCase(collection)}_v`;
14
+ const fields = buildVersionCollectionFields(collectionConfig);
15
+ const { where } = await buildQuery({
31
16
  adapter: this,
32
17
  fields,
33
18
  locale,
34
19
  tableName,
35
20
  where: whereToUse
36
21
  });
37
- const result = await (0, _upsertRow.upsertRow)({
22
+ const result = await upsertRow({
38
23
  id,
39
24
  adapter: this,
40
25
  data: versionData,
@@ -48,4 +33,4 @@ async function updateVersion({ id, collection, locale, req = {}, versionData, wh
48
33
  return result;
49
34
  }
50
35
 
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91cGRhdGVWZXJzaW9uLnRzIl0sInNvdXJj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BQTZCZ0I7SUFFNUMsTUFBTSxFQUFFTixLQUFLLEVBQUUsR0FBRyxNQUFNUixXQUFXO1FBQ2pDc0IsU0FBUyxJQUFJO1FBQ2JEO1FBQ0FoQjtRQUNBZTtRQUNBWixPQUFPVTtJQUNUO0lBRUEsTUFBTUssU0FBUyxNQUFNdEIsVUFBOEI7UUFDakRFO1FBQ0FtQixTQUFTLElBQUk7UUFDYkUsTUFBTWpCO1FBQ05HO1FBQ0FXO1FBQ0FJLFdBQVc7UUFDWEw7UUFDQVo7UUFDQUY7SUFDRjtJQUVBLE9BQU9pQjtBQUNUIn0=
@@ -1,20 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "deleteExistingArrayRows", {
6
- enumerable: true,
7
- get: function() {
8
- return deleteExistingArrayRows;
9
- }
10
- });
11
- const _drizzleorm = require("drizzle-orm");
12
- const deleteExistingArrayRows = async ({ adapter, db, parentID, tableName })=>{
1
+ import { and, eq } from 'drizzle-orm';
2
+ export const deleteExistingArrayRows = async ({ adapter, db, parentID, tableName })=>{
13
3
  const table = adapter.tables[tableName];
14
4
  const whereConstraints = [
15
- (0, _drizzleorm.eq)(table._parentID, parentID)
5
+ eq(table._parentID, parentID)
16
6
  ];
17
- await db.delete(table).where((0, _drizzleorm.and)(...whereConstraints));
7
+ await db.delete(table).where(and(...whereConstraints));
18
8
  };
19
9
 
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cHNlcnRSb3cvZGVsZXRlRXhpc3RpbmdBcnJheVJvd3MudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYW5kLCBlcSB9IGZyb20gJ2RyaXp6bGUtb3JtJ1xuXG5pbXBvcnQgdHlwZSB7IERyaXp6bGVEQiwgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi4vdHlwZXMnXG5cbnR5cGUg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OiJBQUFBLFNBQVNBLEdBQUcsRUFBRUMsRUFBRSxRQUFRLGNBQWE7QUFXckMsT0FBTyxNQUFNQywwQkFBMEIsT0FBTyxFQUM1Q0MsT0FBTyxFQUNQQyxFQUFFLEVBQ0ZDLFFBQVEsRUFDUkMsU0FBUyxFQUNKO0lBQ0wsTUFBTUMsUUFBUUosUUFBUUssTUFBTSxDQUFDRixVQUFVO0lBRXZDLE1BQU1HLG1CQUFtQjtRQUFDUixHQUFHTSxNQUFNRyxTQUFTLEVBQUVMO0tBQVU7SUFFeEQsTUFBTUQsR0FBR08sTUFBTSxDQUFDSixPQUFPSyxLQUFLLENBQUNaLE9BQU9TO0FBQ3RDLEVBQUMifQ==
@@ -1,15 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "deleteExistingRowsByPath", {
6
- enumerable: true,
7
- get: function() {
8
- return deleteExistingRowsByPath;
9
- }
10
- });
11
- const _drizzleorm = require("drizzle-orm");
12
- const deleteExistingRowsByPath = async ({ adapter, db, localeColumnName = '_locale', parentColumnName = '_parentID', parentID, pathColumnName = '_path', rows, tableName })=>{
1
+ import { and, eq, inArray } from 'drizzle-orm';
2
+ export const deleteExistingRowsByPath = async ({ adapter, db, localeColumnName = '_locale', parentColumnName = '_parentID', parentID, pathColumnName = '_path', rows, tableName })=>{
13
3
  const localizedPathsToDelete = new Set();
14
4
  const pathsToDelete = new Set();
15
5
  const table = adapter.tables[tableName];
@@ -26,18 +16,18 @@ const deleteExistingRowsByPath = async ({ adapter, db, localeColumnName = '_loca
26
16
  });
27
17
  if (localizedPathsToDelete.size > 0) {
28
18
  const whereConstraints = [
29
- (0, _drizzleorm.eq)(table[parentColumnName], parentID)
19
+ eq(table[parentColumnName], parentID)
30
20
  ];
31
- if (pathColumnName) whereConstraints.push((0, _drizzleorm.inArray)(table[pathColumnName], Array.from(localizedPathsToDelete)));
32
- await db.delete(table).where((0, _drizzleorm.and)(...whereConstraints));
21
+ if (pathColumnName) whereConstraints.push(inArray(table[pathColumnName], Array.from(localizedPathsToDelete)));
22
+ await db.delete(table).where(and(...whereConstraints));
33
23
  }
34
24
  if (pathsToDelete.size > 0) {
35
25
  const whereConstraints = [
36
- (0, _drizzleorm.eq)(table[parentColumnName], parentID)
26
+ eq(table[parentColumnName], parentID)
37
27
  ];
38
- if (pathColumnName) whereConstraints.push((0, _drizzleorm.inArray)(table[pathColumnName], Array.from(pathsToDelete)));
39
- await db.delete(table).where((0, _drizzleorm.and)(...whereConstraints));
28
+ if (pathColumnName) whereConstraints.push(inArray(table[pathColumnName], Array.from(pathsToDelete)));
29
+ await db.delete(table).where(and(...whereConstraints));
40
30
  }
41
31
  };
42
32
 
43
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cHNlcnRSb3cvZGVsZXRlRXhpc3RpbmdSb3dzQnlQYXRoLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGFuZCwgZXEsIGluQXJyYXkgfSBmcm9tICdkcml6emxlLW9ybSdcblxuaW1wb3J0IHR5cGUgeyBEcml6emxlREIsIFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uL3R5cGVzJ1xuXG50eXBlIEFyZ3MgPSB7XG4gIGFkYXB0ZXI6IFBvc3RncmVzQWRhcHRlclxuICBkYjogRHJpenpsZURCXG4gIGxvY2FsZUNvbHVtbk5hbWU/OiBzdHJpbmdcbiAgcGFyZW50Q29sdW1uTmFtZT86IHN0cmluZ1xuICBwYXJlbnRJRDogdW5rbm93blxuICBwYXRoQ29sdW1uTmFtZT86IHN0cmluZ1xuICByb3dzOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG4gIHRhYmxlTmFtZTogc3RyaW5nXG59XG5cbmV4cG9ydCBjb25zdCBkZWxldGVFeGlzdGluZ1Jvd3NCeVBhdGggPSBhc3luYyAoe1xuICBhZGFwdGVyLFxu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ssQ0FBQzVCLE9BQU91QjtJQUN0QztBQUNGLEVBQUMifQ==
@@ -1,25 +1,15 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "upsertRow", {
6
- enumerable: true,
7
- get: function() {
8
- return upsertRow;
9
- }
10
- });
11
- const _drizzleorm = require("drizzle-orm");
12
- const _errors = require("payload/errors");
13
- const _buildFindManyArgs = require("../find/buildFindManyArgs");
14
- const _read = require("../transform/read");
15
- const _write = require("../transform/write");
16
- const _deleteExistingArrayRows = require("./deleteExistingArrayRows");
17
- const _deleteExistingRowsByPath = require("./deleteExistingRowsByPath");
18
- const _insertArrays = require("./insertArrays");
19
- const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '', req, tableName, upsertTarget, where })=>{
1
+ /* eslint-disable no-param-reassign */ import { eq } from 'drizzle-orm';
2
+ import { ValidationError } from 'payload/errors';
3
+ import { buildFindManyArgs } from '../find/buildFindManyArgs';
4
+ import { transform } from '../transform/read';
5
+ import { transformForWrite } from '../transform/write';
6
+ import { deleteExistingArrayRows } from './deleteExistingArrayRows';
7
+ import { deleteExistingRowsByPath } from './deleteExistingRowsByPath';
8
+ import { insertArrays } from './insertArrays';
9
+ export const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '', req, tableName, upsertTarget, where })=>{
20
10
  // Split out the incoming data into the corresponding:
21
11
  // base row, locales, relationships, blocks, and arrays
22
- const rowToInsert = (0, _write.transformForWrite)({
12
+ const rowToInsert = transformForWrite({
23
13
  adapter,
24
14
  data,
25
15
  fields,
@@ -113,7 +103,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
113
103
  if (localesToInsert.length > 0) {
114
104
  const localeTable = adapter.tables[`${tableName}_locales`];
115
105
  if (operation === 'update') {
116
- await db.delete(localeTable).where((0, _drizzleorm.eq)(localeTable._parentID, insertedRow.id));
106
+ await db.delete(localeTable).where(eq(localeTable._parentID, insertedRow.id));
117
107
  }
118
108
  await db.insert(localeTable).values(localesToInsert);
119
109
  }
@@ -122,7 +112,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
122
112
  // //////////////////////////////////
123
113
  const relationshipsTableName = `${tableName}_rels`;
124
114
  if (operation === 'update') {
125
- await (0, _deleteExistingRowsByPath.deleteExistingRowsByPath)({
115
+ await deleteExistingRowsByPath({
126
116
  adapter,
127
117
  db,
128
118
  localeColumnName: 'locale',
@@ -144,7 +134,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
144
134
  // //////////////////////////////////
145
135
  const textsTableName = `${tableName}_texts`;
146
136
  if (operation === 'update') {
147
- await (0, _deleteExistingRowsByPath.deleteExistingRowsByPath)({
137
+ await deleteExistingRowsByPath({
148
138
  adapter,
149
139
  db,
150
140
  localeColumnName: 'locale',
@@ -163,7 +153,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
163
153
  // //////////////////////////////////
164
154
  const numbersTableName = `${tableName}_numbers`;
165
155
  if (operation === 'update') {
166
- await (0, _deleteExistingRowsByPath.deleteExistingRowsByPath)({
156
+ await deleteExistingRowsByPath({
167
157
  adapter,
168
158
  db,
169
159
  localeColumnName: 'locale',
@@ -185,7 +175,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
185
175
  for (const blockName of rowToInsert.blocksToDelete){
186
176
  const blockTableName = `${tableName}_blocks_${blockName}`;
187
177
  const blockTable = adapter.tables[blockTableName];
188
- await db.delete(blockTable).where((0, _drizzleorm.eq)(blockTable._parentID, insertedRow.id));
178
+ await db.delete(blockTable).where(eq(blockTable._parentID, insertedRow.id));
189
179
  }
190
180
  }
191
181
  for (const [blockName, blockRows] of Object.entries(blocksToInsert)){
@@ -210,7 +200,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
210
200
  if (blockLocaleRowsToInsert.length > 0) {
211
201
  await db.insert(adapter.tables[`${tableName}_blocks_${blockName}_locales`]).values(blockLocaleRowsToInsert).returning();
212
202
  }
213
- await (0, _insertArrays.insertArrays)({
203
+ await insertArrays({
214
204
  adapter,
215
205
  arrays: blockRows.map(({ arrays })=>arrays),
216
206
  db,
@@ -222,7 +212,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
222
212
  // //////////////////////////////////
223
213
  if (operation === 'update') {
224
214
  for (const arrayTableName of Object.keys(rowToInsert.arrays)){
225
- await (0, _deleteExistingArrayRows.deleteExistingArrayRows)({
215
+ await deleteExistingArrayRows({
226
216
  adapter,
227
217
  db,
228
218
  parentID: insertedRow.id,
@@ -230,7 +220,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
230
220
  });
231
221
  }
232
222
  }
233
- await (0, _insertArrays.insertArrays)({
223
+ await insertArrays({
234
224
  adapter,
235
225
  arrays: [
236
226
  rowToInsert.arrays
@@ -246,7 +236,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
246
236
  for (const [selectTableName, tableRows] of Object.entries(selectsToInsert)){
247
237
  const selectTable = adapter.tables[selectTableName];
248
238
  if (operation === 'update') {
249
- await db.delete(selectTable).where((0, _drizzleorm.eq)(selectTable.parent, insertedRow.id));
239
+ await db.delete(selectTable).where(eq(selectTable.parent, insertedRow.id));
250
240
  }
251
241
  await db.insert(selectTable).values(tableRows).returning();
252
242
  }
@@ -254,7 +244,7 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
254
244
  // Error Handling
255
245
  // //////////////////////////////////
256
246
  } catch (error) {
257
- throw error.code === '23505' ? new _errors.ValidationError([
247
+ throw error.code === '23505' ? new ValidationError([
258
248
  {
259
249
  field: adapter.fieldConstraints[tableName][error.constraint],
260
250
  message: req.t('error:valueMustBeUnique')
@@ -264,18 +254,18 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
264
254
  // //////////////////////////////////
265
255
  // RETRIEVE NEWLY UPDATED ROW
266
256
  // //////////////////////////////////
267
- const findManyArgs = (0, _buildFindManyArgs.buildFindManyArgs)({
257
+ const findManyArgs = buildFindManyArgs({
268
258
  adapter,
269
259
  depth: 0,
270
260
  fields,
271
261
  tableName
272
262
  });
273
- findManyArgs.where = (0, _drizzleorm.eq)(adapter.tables[tableName].id, insertedRow.id);
263
+ findManyArgs.where = eq(adapter.tables[tableName].id, insertedRow.id);
274
264
  const doc = await db.query[tableName].findFirst(findManyArgs);
275
265
  // //////////////////////////////////
276
266
  // TRANSFORM DATA
277
267
  // //////////////////////////////////
278
- const result = (0, _read.transform)({
268
+ const result = transform({
279
269
  config: adapter.payload.config,
280
270
  data: doc,
281
271
  fields
@@ -283,4 +273,4 @@ const upsertRow = async ({ id, adapter, data, db, fields, operation, path = '',
283
273
  return result;
284
274
  };
285
275
 
286
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cHNlcnRSb3cvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgVHlwZVdpdGhJRCB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5cbmltcG9ydCB7IGVxIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5pbXBvcnQgeyBWYWxpZGF0aW9uRXJyb3IgfSBmcm9tICdwYXlsb2FkL2Vycm9ycydcblxuaW1wb3J0IHR5cGUgeyBCbG9ja1Jvd1RvSW5zZXJ0IH0gZnJvbSAnLi4vdHJhbnNmb3JtL3dyaXRlL3R5cGVzJ1xuaW1wb3J0IHR5cGUgeyBBcmdzIH0gZnJvbSAnLi90eXBlcydcblxuaW1wb3J0IHsgYnVpbGRGaW5kTWFueUFyZ3MgfSBmcm9tICcuLi9maW5kL2J1aWxkRmluZE1hbnlBcmdzJ1xuaW1wb3J0IHsgdHJhbnNmb3JtIH0gZnJvbSAnLi4vdHJhbnNmb3JtL3JlYWQnXG5pbXBvcnQ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Q0FBQztZQUNqQjtTQUNELEVBQ0RoRixJQUFJZ0YsQ0FBQyxJQUVQTjtJQUNOO0lBRUEscUNBQXFDO0lBQ3JDLDZCQUE2QjtJQUM3QixxQ0FBcUM7SUFFckMsTUFBTU8sZUFBZS9GLGtCQUFrQjtRQUNyQ1E7UUFDQXdGLE9BQU87UUFDUHJGO1FBQ0FJO0lBQ0Y7SUFFQWdGLGFBQWE5RSxLQUFLLEdBQUduQixHQUFHVSxRQUFRYSxNQUFNLENBQUNOLFVBQVUsQ0FBQ1IsRUFBRSxFQUFFWSxZQUFZWixFQUFFO0lBRXBFLE1BQU0wRixNQUFNLE1BQU12RixHQUFHd0YsS0FBSyxDQUFDbkYsVUFBVSxDQUFDb0YsU0FBUyxDQUFDSjtJQUVoRCxxQ0FBcUM7SUFDckMsaUJBQWlCO0lBQ2pCLHFDQUFxQztJQUVyQyxNQUFNSyxTQUFTbkcsVUFBYTtRQUMxQm9HLFFBQVE3RixRQUFROEYsT0FBTyxDQUFDRCxNQUFNO1FBQzlCNUYsTUFBTXdGO1FBQ050RjtJQUNGO0lBRUEsT0FBT3lGO0FBQ1QsRUFBQyJ9
@@ -1,14 +1,4 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "insertArrays", {
6
- enumerable: true,
7
- get: function() {
8
- return insertArrays;
9
- }
10
- });
11
- const insertArrays = async ({ adapter, arrays, db, parentRows })=>{
1
+ /* eslint-disable no-param-reassign */ export const insertArrays = async ({ adapter, arrays, db, parentRows })=>{
12
2
  // Maintain a map of flattened rows by table
13
3
  const rowsByTable = {};
14
4
  arrays.forEach((arraysByTable, parentRowIndex)=>{
@@ -75,4 +65,4 @@ const insertArrays = async ({ adapter, arrays, db, parentRows })=>{
75
65
  }
76
66
  };
77
67
 
78
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3Ny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export { };
5
2
 
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91cHNlcnRSb3cvdHlwZXMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBTUUwgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHsgRmllbGQsIFBheWxvYWRSZXF1ZXN0IH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxuaW1wb3J0IHR5cGUgeyBEcml6emxlREIsIEdlbmVyaWNDb2x1bW4sIFBvc3RncmVzQWRhcHRlciB9IGZyb20gJy4uL3R5cGVzJ1xuXG50eXBlIEJhc2VBcmdzID0ge1xuICBhZGFwdGVyOiBQb3N0Z3Jlc0FkYXB0ZXJcbiAgZGF0YTogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgZGI6IERyaXp6bGVEQlxuICBmaWVsZHM6IEZpZWxkW11cbiAgcGF0aD86IHN0cmluZ1xuICB0YWJsZU5hbWU6IHN0cmluZ1xuICByZXE6IFBheWxvYWRSZXF1ZXN0XG59XG5cbnR5cGUgQ3JlYXRlQXJncyA9IEJhc2VBcmdzICYge1xuICBpZD86IG5ldmVyXG4gIG9wZXJhdGlvbjogJ2NyZWF0ZSdcbiAgdXBzZXJ0VGFyZ2V0PzogbmV2ZXJcbiAgd2hlcmU/OiBuZXZlclxufVxuXG50eXBlIFVwZGF0ZUFyZ3MgPSBCYXNlQXJncyAmIHtcbiAgaWQ/OiBudW1iZXIgfCBzdHJpbmdcbiAgb3BlcmF0aW9uOiAndXBkYXRlJ1xuICB1cHNlcnRUYXJnZXQ/OiBHZW5lcmljQ29sdW1uXG4gIHdoZXJlPzogU1FMPHVua25vd24+XG59XG5cbmV4cG9ydCB0eXBlIEFyZ3MgPSBDcmVhdGVBcmdzIHwgVXBkYXRlQXJnc1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTZCQSxXQUEwQyJ9
@@ -1,16 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "appendPrefixToObjectKeys", {
6
- enumerable: true,
7
- get: function() {
8
- return appendPrefixToObjectKeys;
9
- }
10
- });
11
- const appendPrefixToObjectKeys = (obj, prefix)=>Object.entries(obj).reduce((res, [key, val])=>{
1
+ export const appendPrefixToObjectKeys = (obj, prefix)=>Object.entries(obj).reduce((res, [key, val])=>{
12
2
  res[`${prefix}_${key}`] = val;
13
3
  return res;
14
4
  }, {});
15
5
 
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvYXBwZW5kUHJlZml4VG9LZXlzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjb25zdCBhcHBlbmRQcmVmaXhUb09iamVjdEtleXMgPSA8VD4ob2JqOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPiwgcHJlZml4OiBzdHJpbmcpOiBUID0+XG4gIE9iamVjdC5lbnRyaWVzKG9iaikucmVkdWNlKChyZXMsIFtrZXksIHZhbF0pID0+IHtcbiAgICByZXNbYCR7cHJlZml4fV8ke2tleX1gXSA9IHZhbFxuICAgIHJldHVybiByZXNcbiAgfSwge30gYXMgVClcbiJdLCJuYW1lcyI6WyJhcHBlbmRQcmVmaXhUb09iamVjdEtleXMiLCJvYmoiLCJwcmVmaXgiLCJPYmplY3QiLCJlbnRyaWVzIiwicmVkdWNlIiwicmVzIiwia2V5IiwidmFsIl0sIm1hcHBpbmdzIjoiOzs7OytCQUFhQTs7O2VBQUFBOzs7QUFBTixNQUFNQSwyQkFBMkIsQ0FBSUMsS0FBOEJDLFNBQ3hFQyxPQUFPQyxPQU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1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "createBlocksMap", {
6
- enumerable: true,
7
- get: function() {
8
- return createBlocksMap;
9
- }
10
- });
11
- const createBlocksMap = (data)=>{
1
+ /* eslint-disable no-param-reassign */ export const createBlocksMap = (data)=>{
12
2
  const blocksMap = {};
13
3
  Object.entries(data).forEach(([key, rows])=>{
14
4
  if (key.startsWith('_blocks_') && Array.isArray(rows)) {
@@ -36,4 +26,4 @@ const createBlocksMap = (data)=>{
36
26
  return blocksMap;
37
27
  };
38
28
 
39
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvY3JlYXRlQmxvY2tzTWFwLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5leHBvcnQgdHlwZSBCbG9ja3NNYXAgPSB7XG4gIFtwYXRoOiBzdHJpbmddOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG59XG5cbmV4cG9ydCBjb25zdCBjcmVhdGVCbG9ja3NNYXAgPSAoZGF0YTogUmVjb3JkPHN0cmluZywgdW5rbm93bj4pOiBCbG9ja3NNYXAgPT4ge1xuICBjb25zdCBibG9ja3NNYXA6IEJsb2Nrc01hcCA9IHt9XG5cbiAgT2JqZWN0LmVudHJpZXMoZGF0YSkuZm9yRWFjaCgoW2tleSwgcm93c10pID0+IHtcbiAgICBpZiAoa2V5LnN0YXJ0c1dpdGgoJ19ibG9ja3NfJykgJiYgQXJyYXkuaXNBcnJheShyb3dzKSkge1xuICAgICAgY29uc3QgYmxvY2tUeXBlID0ga2V5LnJlcGxhY2UoJ19ibG9ja3NfJywgJycpXG5cbiAgICAgIHJvd3MuZm9yRWFjaCgocm93KSA9PiB7XG4gICAgICAgIGlmICgnX3BhdGgnIGluIHJ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QzVCO1lBRUEsT0FBTztRQUNUO1FBRUEsT0FBT047SUFDVCxHQUFHLENBQUM7SUFFSixPQUFPZjtBQUNUIn0=
29
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvY3JlYXRlQmxvY2tzTWFwLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlIG5vLXBhcmFtLXJlYXNzaWduICovXG5leHBvcnQgdHlwZSBCbG9ja3NNYXAgPSB7XG4gIFtwYXRoOiBzdHJpbmddOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdXG59XG5cbmV4cG9ydCBjb25zdCBjcmVhdGVCbG9ja3NNYXAgPSAoZGF0YTogUmVjb3JkPHN0cmluZywgdW5rbm93bj4pOiBCbG9ja3NNYXAgPT4ge1xuICBjb25zdCBibG9ja3NNYXA6IEJsb2Nrc01hcCA9IHt9XG5cbiAgT2JqZWN0LmVudHJpZXMoZGF0YSkuZm9yRWFjaCgoW2tleSwgcm93c10pID0+IHtcbiAgICBpZiAoa2V5LnN0YXJ0c1dpdGgoJ19ibG9ja3NfJykgJiYgQXJyYXkuaXNBcnJheShyb3dzKSkge1xuICAgICAgY29uc3QgYmxvY2tUeXBlID0ga2V5LnJlcGxhY2UoJ19ibG9ja3NfJywgJycpXG5cbiAgICAgIHJvd3MuZm9yRWFjaCgocm93KSA9PiB7XG4gICAgICAgIGlmICgnX3BhdGgnIGluIHJvdykge1xuICAgICAgICAgIGlmICghKHJvdy5fcGF0aCBpbiBibG9ja3NNYXApKSBibG9ja3NNYXBbcm93Ll9wYXRoXSA9IFtdXG5cbiAgICAgICAgICByb3cuYmxvY2tUeXBlID0gYmxvY2tUeXBlXG4gICAgICAgICAgYmxvY2tzTWFwW3Jvdy5fcGF0aF0ucHVzaChyb3cpXG5cbiAgICAgICAgICBkZWxldGUgcm93Ll9wYXRoXG4gICAgICAgIH1cbiA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QUFPLENBQUNILE9BQU87WUFDckQsTUFBTUksWUFBWUwsSUFBSU0sT0FBTyxDQUFDLFlBQVk7WUFFMUNMLEtBQUtGLE9BQU8sQ0FBQyxDQUFDUTtnQkFDWixJQUFJLFdBQVdBLEtBQUs7b0JBQ2xCLElBQUksQ0FBRUEsQ0FBQUEsSUFBSUMsS0FBSyxJQUFJWixTQUFRLEdBQUlBLFNBQVMsQ0FBQ1csSUFBSUMsS0FBSyxDQUFDLEdBQUcsRUFBRTtvQkFFeERELElBQUlGLFNBQVMsR0FBR0E7b0JBQ2hCVCxTQUFTLENBQUNXLElBQUlDLEtBQUssQ0FBQyxDQUFDQyxJQUFJLENBQUNGO29CQUUxQixPQUFPQSxJQUFJQyxLQUFLO2dCQUNsQjtZQUNGO1lBRUEsT0FBT2IsSUFBSSxDQUFDSyxJQUFJO1FBQ2xCO0lBQ0Y7SUFFQUgsT0FBT0MsT0FBTyxDQUFDRixXQUFXYyxNQUFNLENBQUMsQ0FBQ0MsaUJBQWlCLENBQUNDLE1BQU1DLE9BQU87UUFDL0RGLGVBQWUsQ0FBQ0MsS0FBSyxHQUFHQyxPQUFPQyxJQUFJLENBQUMsQ0FBQ0MsR0FBR0M7WUFDdEMsSUFBSSxPQUFPRCxFQUFFRSxNQUFNLEtBQUssWUFBWSxPQUFPRCxFQUFFQyxNQUFNLEtBQUssVUFBVTtnQkFDaEUsT0FBT0YsRUFBRUUsTUFBTSxHQUFHRCxFQUFFQyxNQUFNO1lBQzVCO1lBRUEsT0FBTztRQUNUO1FBRUEsT0FBT047SUFDVCxHQUFHLENBQUM7SUFFSixPQUFPZjtBQUNULEVBQUMifQ==
@@ -1,17 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "createMigrationTable", {
6
- enumerable: true,
7
- get: function() {
8
- return createMigrationTable;
9
- }
10
- });
11
- const _drizzleorm = require("drizzle-orm");
12
- const createMigrationTable = async (adapter)=>{
1
+ import { sql } from 'drizzle-orm';
2
+ export const createMigrationTable = async (adapter)=>{
13
3
  const prependSchema = adapter.schemaName ? `"${adapter.schemaName}".` : '';
14
- await adapter.drizzle.execute(_drizzleorm.sql.raw(`CREATE TABLE IF NOT EXISTS ${prependSchema}"payload_migrations" (
4
+ await adapter.drizzle.execute(sql.raw(`CREATE TABLE IF NOT EXISTS ${prependSchema}"payload_migrations" (
15
5
  "id" serial PRIMARY KEY NOT NULL,
16
6
  "name" varchar,
17
7
  "batch" numeric,
@@ -20,4 +10,4 @@ const createMigrationTable = async (adapter)=>{
20
10
  );`));
21
11
  };
22
12
 
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvY3JlYXRlTWlncmF0aW9uVGFibGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc3FsIH0gZnJvbSAnZHJpenpsZS1vcm0nXG5cbmltcG9ydCB0eXBlIHsgUG9zdGdyZXNBZGFwdGVyIH0gZnJvbSAnLi4vdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBjcmVhdGVNaWdyYXRpb25UYWJsZSA9IGFzeW5jIChhZGFwdGVyOiBQb3N0Z3Jlc0FkYXB0ZXIpOiBQcm9taXNlPHZvaWQ+ID0+IHtcbiAgY29uc3QgcHJlcGVuZFNjaGVtYSA9IGFkYXB0ZXIuc2NoZW1hTmFtZSA/IGBcIiR7YWRhcHRlci5zY2hlbWFOYW1lfVwiLmAgOiAnJ1xuXG4gIGF3YWl0IGFkYXB0ZXIuZHJpenpsZS5leGVjdXRlKFxuICAgIHNxbC5yYXcoYENSRUFURSBUQUJMRSBJRiBOT1QgRVhJU1RTICR7cHJlcGVuZFNjaGVtYX1cInBheWxvYWRfbWlncmF0aW9uc1wiIChcbiAgXCJpZFwiIHNlcmlhbCBQUklNQVJZIEtFWSBOT1QgTlVMTCxcbiAgXCJuYW1lXCIgdmFyY2hhc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yQkFBMkIsRUFBRUosY0FBYzs7Ozs7O0VBTXRELENBQUM7QUFFSCxFQUFDIn0=
@@ -1,16 +1,6 @@
1
1
  // Flatten rows to object with path keys
2
2
  // for easier retrieval
3
- "use strict";
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "createPathMap", {
8
- enumerable: true,
9
- get: function() {
10
- return createPathMap;
11
- }
12
- });
13
- const createPathMap = (rows)=>{
3
+ export const createPathMap = (rows)=>{
14
4
  let rowsByPath = {};
15
5
  if (Array.isArray(rows)) {
16
6
  rowsByPath = rows.reduce((res, row)=>{
@@ -26,4 +16,4 @@ const createPathMap = (rows)=>{
26
16
  return rowsByPath;
27
17
  };
28
18
 
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvY3JlYXRlUmVsYXRpb25zaGlwTWFwLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIEZsYXR0ZW4gcm93cyB0byBvYmplY3Qgd2l0aCBwYXRoIGtleXNcbi8vIGZvciBlYXNpZXIgcmV0cmlldmFsXG5leHBvcnQgY29uc3QgY3JlYXRlUGF0aE1hcCA9IChyb3dzOiB1bmtub3duKTogUmVjb3JkPHN0cmluZywgUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXT4gPT4ge1xuICBsZXQgcm93c0J5UGF0aCA9IHt9XG5cbiAgaWYgKEFycmF5LmlzQXJyYXkocm93cykpIHtcbiAgICByb3dzQnlQYXRoID0gcm93cy5yZWR1Y2UoKHJlcywgcm93KSA9PiB7XG4gICAgICBjb25zdCBmb3JtYXR0ZWRSb3cgPSB7XG4gICAgICAgIC4uLnJvdyxcbiAgICAgIH1cblxuICAgICAgZGVsZXRlIGZvcm1hdHRlZFJvdy5wYXRoXG5cbiAgICAgIGlmICghcmVzW3Jvdy5wYXRoXSkgcmVzW3Jvdy5wYXRoXSA9IFtdXG4gICAgICByZX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