@payloadcms/db-postgres 3.0.0-canary.ee6d727 → 3.0.0-canary.ef0a8d0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (397) hide show
  1. package/README.md +1 -1
  2. package/dist/connect.d.ts +1 -1
  3. package/dist/connect.d.ts.map +1 -1
  4. package/dist/connect.js +4 -6
  5. package/dist/connect.js.map +1 -1
  6. package/dist/countDistinct.d.ts +3 -0
  7. package/dist/countDistinct.d.ts.map +1 -0
  8. package/dist/countDistinct.js +26 -0
  9. package/dist/countDistinct.js.map +1 -0
  10. package/dist/createJSONQuery/convertPathToJSONTraversal.d.ts.map +1 -0
  11. package/dist/createJSONQuery/convertPathToJSONTraversal.js.map +1 -0
  12. package/dist/createJSONQuery/formatJSONPathSegment.d.ts.map +1 -0
  13. package/dist/createJSONQuery/formatJSONPathSegment.js.map +1 -0
  14. package/dist/createJSONQuery/index.d.ts.map +1 -0
  15. package/dist/createJSONQuery/index.js.map +1 -0
  16. package/dist/createMigration.d.ts +1 -1
  17. package/dist/createMigration.d.ts.map +1 -1
  18. package/dist/createMigration.js +6 -28
  19. package/dist/createMigration.js.map +1 -1
  20. package/dist/defaultSnapshot.d.ts +3 -0
  21. package/dist/defaultSnapshot.d.ts.map +1 -0
  22. package/dist/defaultSnapshot.js +16 -0
  23. package/dist/defaultSnapshot.js.map +1 -0
  24. package/dist/deleteWhere.d.ts +3 -0
  25. package/dist/deleteWhere.d.ts.map +1 -0
  26. package/dist/deleteWhere.js +7 -0
  27. package/dist/deleteWhere.js.map +1 -0
  28. package/dist/dropDatabase.d.ts +3 -0
  29. package/dist/dropDatabase.d.ts.map +1 -0
  30. package/dist/dropDatabase.js +9 -0
  31. package/dist/dropDatabase.js.map +1 -0
  32. package/dist/execute.d.ts +3 -0
  33. package/dist/execute.d.ts.map +1 -0
  34. package/dist/execute.js +13 -0
  35. package/dist/execute.js.map +1 -0
  36. package/dist/exports/migration-utils.js.map +1 -1
  37. package/dist/generateDrizzleJSON.d.ts +3 -0
  38. package/dist/generateDrizzleJSON.d.ts.map +1 -0
  39. package/dist/generateDrizzleJSON.js +8 -0
  40. package/dist/generateDrizzleJSON.js.map +1 -0
  41. package/dist/generateMigration.d.ts +3 -0
  42. package/dist/generateMigration.d.ts.map +1 -0
  43. package/dist/generateMigration.js +8 -0
  44. package/dist/generateMigration.js.map +1 -0
  45. package/dist/getMigrationTemplate.d.ts +3 -0
  46. package/dist/getMigrationTemplate.d.ts.map +1 -0
  47. package/dist/getMigrationTemplate.js +12 -0
  48. package/dist/getMigrationTemplate.js.map +1 -0
  49. package/dist/index.d.ts +1 -1
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +28 -63
  52. package/dist/index.js.map +1 -1
  53. package/dist/init.d.ts +1 -1
  54. package/dist/init.d.ts.map +1 -1
  55. package/dist/init.js +2 -2
  56. package/dist/init.js.map +1 -1
  57. package/dist/insert.d.ts +3 -0
  58. package/dist/insert.d.ts.map +1 -0
  59. package/dist/insert.js +13 -0
  60. package/dist/insert.js.map +1 -0
  61. package/dist/predefinedMigrations/relationships-v2-v3.js.map +1 -1
  62. package/dist/predefinedMigrations/v2-v3/fetchAndResave/index.d.ts +5 -5
  63. package/dist/predefinedMigrations/v2-v3/fetchAndResave/index.d.ts.map +1 -1
  64. package/dist/predefinedMigrations/v2-v3/fetchAndResave/index.js +5 -2
  65. package/dist/predefinedMigrations/v2-v3/fetchAndResave/index.js.map +1 -1
  66. package/dist/predefinedMigrations/v2-v3/fetchAndResave/traverseFields.d.ts +1 -1
  67. package/dist/predefinedMigrations/v2-v3/fetchAndResave/traverseFields.d.ts.map +1 -1
  68. package/dist/predefinedMigrations/v2-v3/fetchAndResave/traverseFields.js +1 -1
  69. package/dist/predefinedMigrations/v2-v3/fetchAndResave/traverseFields.js.map +1 -1
  70. package/dist/predefinedMigrations/v2-v3/groupUpSQLStatements.d.ts.map +1 -1
  71. package/dist/predefinedMigrations/v2-v3/groupUpSQLStatements.js.map +1 -1
  72. package/dist/predefinedMigrations/v2-v3/index.d.ts +2 -3
  73. package/dist/predefinedMigrations/v2-v3/index.d.ts.map +1 -1
  74. package/dist/predefinedMigrations/v2-v3/index.js +12 -6
  75. package/dist/predefinedMigrations/v2-v3/index.js.map +1 -1
  76. package/dist/predefinedMigrations/v2-v3/migrateRelationships.d.ts +5 -4
  77. package/dist/predefinedMigrations/v2-v3/migrateRelationships.d.ts.map +1 -1
  78. package/dist/predefinedMigrations/v2-v3/migrateRelationships.js +1 -0
  79. package/dist/predefinedMigrations/v2-v3/migrateRelationships.js.map +1 -1
  80. package/dist/predefinedMigrations/v2-v3/traverseFields.d.ts +4 -4
  81. package/dist/predefinedMigrations/v2-v3/traverseFields.d.ts.map +1 -1
  82. package/dist/predefinedMigrations/v2-v3/traverseFields.js +1 -1
  83. package/dist/predefinedMigrations/v2-v3/traverseFields.js.map +1 -1
  84. package/dist/predefinedMigrations/v2-v3/types.js.map +1 -1
  85. package/dist/requireDrizzleKit.d.ts +3 -0
  86. package/dist/requireDrizzleKit.d.ts.map +1 -0
  87. package/dist/requireDrizzleKit.js +5 -0
  88. package/dist/requireDrizzleKit.js.map +1 -0
  89. package/dist/schema/build.d.ts +1 -1
  90. package/dist/schema/build.d.ts.map +1 -1
  91. package/dist/schema/build.js +2 -2
  92. package/dist/schema/build.js.map +1 -1
  93. package/dist/schema/createIndex.js.map +1 -1
  94. package/dist/schema/idToUUID.d.ts +1 -1
  95. package/dist/schema/idToUUID.d.ts.map +1 -1
  96. package/dist/schema/idToUUID.js.map +1 -1
  97. package/dist/schema/parentIDColumnMap.js.map +1 -1
  98. package/dist/schema/setColumnID.d.ts +1 -1
  99. package/dist/schema/setColumnID.d.ts.map +1 -1
  100. package/dist/schema/setColumnID.js +2 -2
  101. package/dist/schema/setColumnID.js.map +1 -1
  102. package/dist/schema/traverseFields.d.ts +1 -1
  103. package/dist/schema/traverseFields.d.ts.map +1 -1
  104. package/dist/schema/traverseFields.js +4 -6
  105. package/dist/schema/traverseFields.js.map +1 -1
  106. package/dist/types.d.ts +72 -31
  107. package/dist/types.d.ts.map +1 -1
  108. package/dist/types.js.map +1 -1
  109. package/package.json +19 -16
  110. package/dist/count.d.ts +0 -3
  111. package/dist/count.d.ts.map +0 -1
  112. package/dist/count.js +0 -41
  113. package/dist/count.js.map +0 -1
  114. package/dist/create.d.ts +0 -3
  115. package/dist/create.d.ts.map +0 -1
  116. package/dist/create.js +0 -19
  117. package/dist/create.js.map +0 -1
  118. package/dist/createGlobal.d.ts +0 -5
  119. package/dist/createGlobal.d.ts.map +0 -1
  120. package/dist/createGlobal.js +0 -19
  121. package/dist/createGlobal.js.map +0 -1
  122. package/dist/createGlobalVersion.d.ts +0 -6
  123. package/dist/createGlobalVersion.d.ts.map +0 -1
  124. package/dist/createGlobalVersion.js +0 -33
  125. package/dist/createGlobalVersion.js.map +0 -1
  126. package/dist/createVersion.d.ts +0 -5
  127. package/dist/createVersion.d.ts.map +0 -1
  128. package/dist/createVersion.js +0 -40
  129. package/dist/createVersion.js.map +0 -1
  130. package/dist/deleteMany.d.ts +0 -3
  131. package/dist/deleteMany.d.ts.map +0 -1
  132. package/dist/deleteMany.js +0 -28
  133. package/dist/deleteMany.js.map +0 -1
  134. package/dist/deleteOne.d.ts +0 -3
  135. package/dist/deleteOne.d.ts.map +0 -1
  136. package/dist/deleteOne.js +0 -59
  137. package/dist/deleteOne.js.map +0 -1
  138. package/dist/deleteVersions.d.ts +0 -3
  139. package/dist/deleteVersions.d.ts.map +0 -1
  140. package/dist/deleteVersions.js +0 -31
  141. package/dist/deleteVersions.js.map +0 -1
  142. package/dist/destroy.d.ts +0 -3
  143. package/dist/destroy.d.ts.map +0 -1
  144. package/dist/destroy.js +0 -15
  145. package/dist/destroy.js.map +0 -1
  146. package/dist/find/buildFindManyArgs.d.ts +0 -17
  147. package/dist/find/buildFindManyArgs.d.ts.map +0 -1
  148. package/dist/find/buildFindManyArgs.js +0 -65
  149. package/dist/find/buildFindManyArgs.js.map +0 -1
  150. package/dist/find/chainMethods.d.ts +0 -16
  151. package/dist/find/chainMethods.d.ts.map +0 -1
  152. package/dist/find/chainMethods.js +0 -12
  153. package/dist/find/chainMethods.js.map +0 -1
  154. package/dist/find/findMany.d.ts +0 -22
  155. package/dist/find/findMany.d.ts.map +0 -1
  156. package/dist/find/findMany.js +0 -152
  157. package/dist/find/findMany.js.map +0 -1
  158. package/dist/find/traverseFields.d.ts +0 -17
  159. package/dist/find/traverseFields.d.ts.map +0 -1
  160. package/dist/find/traverseFields.js +0 -156
  161. package/dist/find/traverseFields.js.map +0 -1
  162. package/dist/find.d.ts +0 -3
  163. package/dist/find.d.ts.map +0 -1
  164. package/dist/find.js +0 -21
  165. package/dist/find.js.map +0 -1
  166. package/dist/findGlobal.d.ts +0 -3
  167. package/dist/findGlobal.d.ts.map +0 -1
  168. package/dist/findGlobal.js +0 -23
  169. package/dist/findGlobal.js.map +0 -1
  170. package/dist/findGlobalVersions.d.ts +0 -3
  171. package/dist/findGlobalVersions.d.ts.map +0 -1
  172. package/dist/findGlobalVersions.js +0 -24
  173. package/dist/findGlobalVersions.js.map +0 -1
  174. package/dist/findOne.d.ts +0 -5
  175. package/dist/findOne.d.ts.map +0 -1
  176. package/dist/findOne.js +0 -21
  177. package/dist/findOne.js.map +0 -1
  178. package/dist/findVersions.d.ts +0 -3
  179. package/dist/findVersions.d.ts.map +0 -1
  180. package/dist/findVersions.js +0 -24
  181. package/dist/findVersions.js.map +0 -1
  182. package/dist/migrate.d.ts +0 -3
  183. package/dist/migrate.d.ts.map +0 -1
  184. package/dist/migrate.js +0 -99
  185. package/dist/migrate.js.map +0 -1
  186. package/dist/migrateDown.d.ts +0 -3
  187. package/dist/migrateDown.d.ts.map +0 -1
  188. package/dist/migrateDown.js +0 -63
  189. package/dist/migrateDown.js.map +0 -1
  190. package/dist/migrateFresh.d.ts +0 -8
  191. package/dist/migrateFresh.d.ts.map +0 -1
  192. package/dist/migrateFresh.js +0 -72
  193. package/dist/migrateFresh.js.map +0 -1
  194. package/dist/migrateRefresh.d.ts +0 -6
  195. package/dist/migrateRefresh.d.ts.map +0 -1
  196. package/dist/migrateRefresh.js +0 -102
  197. package/dist/migrateRefresh.js.map +0 -1
  198. package/dist/migrateReset.d.ts +0 -6
  199. package/dist/migrateReset.d.ts.map +0 -1
  200. package/dist/migrateReset.js +0 -82
  201. package/dist/migrateReset.js.map +0 -1
  202. package/dist/migrateStatus.d.ts +0 -3
  203. package/dist/migrateStatus.d.ts.map +0 -1
  204. package/dist/migrateStatus.js +0 -44
  205. package/dist/migrateStatus.js.map +0 -1
  206. package/dist/queries/buildAndOrConditions.d.ts +0 -16
  207. package/dist/queries/buildAndOrConditions.d.ts.map +0 -1
  208. package/dist/queries/buildAndOrConditions.js +0 -28
  209. package/dist/queries/buildAndOrConditions.js.map +0 -1
  210. package/dist/queries/buildQuery.d.ts +0 -30
  211. package/dist/queries/buildQuery.d.ts.map +0 -1
  212. package/dist/queries/buildQuery.js +0 -72
  213. package/dist/queries/buildQuery.js.map +0 -1
  214. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.d.ts.map +0 -1
  215. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js.map +0 -1
  216. package/dist/queries/createJSONQuery/formatJSONPathSegment.d.ts.map +0 -1
  217. package/dist/queries/createJSONQuery/formatJSONPathSegment.js.map +0 -1
  218. package/dist/queries/createJSONQuery/index.d.ts.map +0 -1
  219. package/dist/queries/createJSONQuery/index.js.map +0 -1
  220. package/dist/queries/getTableColumnFromPath.d.ts +0 -50
  221. package/dist/queries/getTableColumnFromPath.d.ts.map +0 -1
  222. package/dist/queries/getTableColumnFromPath.js +0 -517
  223. package/dist/queries/getTableColumnFromPath.js.map +0 -1
  224. package/dist/queries/operatorMap.d.ts +0 -18
  225. package/dist/queries/operatorMap.d.ts.map +0 -1
  226. package/dist/queries/operatorMap.js +0 -24
  227. package/dist/queries/operatorMap.js.map +0 -1
  228. package/dist/queries/parseParams.d.ts +0 -16
  229. package/dist/queries/parseParams.d.ts.map +0 -1
  230. package/dist/queries/parseParams.js +0 -183
  231. package/dist/queries/parseParams.js.map +0 -1
  232. package/dist/queries/sanitizeQueryValue.d.ts +0 -15
  233. package/dist/queries/sanitizeQueryValue.d.ts.map +0 -1
  234. package/dist/queries/sanitizeQueryValue.js +0 -90
  235. package/dist/queries/sanitizeQueryValue.js.map +0 -1
  236. package/dist/queries/selectDistinct.d.ts +0 -22
  237. package/dist/queries/selectDistinct.d.ts.map +0 -1
  238. package/dist/queries/selectDistinct.js +0 -30
  239. package/dist/queries/selectDistinct.js.map +0 -1
  240. package/dist/queryDrafts.d.ts +0 -3
  241. package/dist/queryDrafts.d.ts.map +0 -1
  242. package/dist/queryDrafts.js +0 -41
  243. package/dist/queryDrafts.js.map +0 -1
  244. package/dist/schema/createTableName.d.ts +0 -30
  245. package/dist/schema/createTableName.d.ts.map +0 -1
  246. package/dist/schema/createTableName.js +0 -31
  247. package/dist/schema/createTableName.js.map +0 -1
  248. package/dist/schema/validateExistingBlockIsIdentical.d.ts +0 -12
  249. package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +0 -1
  250. package/dist/schema/validateExistingBlockIsIdentical.js +0 -76
  251. package/dist/schema/validateExistingBlockIsIdentical.js.map +0 -1
  252. package/dist/transactions/beginTransaction.d.ts +0 -3
  253. package/dist/transactions/beginTransaction.d.ts.map +0 -1
  254. package/dist/transactions/beginTransaction.js +0 -51
  255. package/dist/transactions/beginTransaction.js.map +0 -1
  256. package/dist/transactions/commitTransaction.d.ts +0 -3
  257. package/dist/transactions/commitTransaction.d.ts.map +0 -1
  258. package/dist/transactions/commitTransaction.js +0 -14
  259. package/dist/transactions/commitTransaction.js.map +0 -1
  260. package/dist/transactions/rollbackTransaction.d.ts +0 -3
  261. package/dist/transactions/rollbackTransaction.d.ts.map +0 -1
  262. package/dist/transactions/rollbackTransaction.js +0 -13
  263. package/dist/transactions/rollbackTransaction.js.map +0 -1
  264. package/dist/transform/read/hasManyNumber.d.ts +0 -10
  265. package/dist/transform/read/hasManyNumber.d.ts.map +0 -1
  266. package/dist/transform/read/hasManyNumber.js +0 -10
  267. package/dist/transform/read/hasManyNumber.js.map +0 -1
  268. package/dist/transform/read/hasManyText.d.ts +0 -10
  269. package/dist/transform/read/hasManyText.d.ts.map +0 -1
  270. package/dist/transform/read/hasManyText.js +0 -10
  271. package/dist/transform/read/hasManyText.js.map +0 -1
  272. package/dist/transform/read/index.d.ts +0 -14
  273. package/dist/transform/read/index.d.ts.map +0 -1
  274. package/dist/transform/read/index.js +0 -44
  275. package/dist/transform/read/index.js.map +0 -1
  276. package/dist/transform/read/relationship.d.ts +0 -10
  277. package/dist/transform/read/relationship.d.ts.map +0 -1
  278. package/dist/transform/read/relationship.js +0 -60
  279. package/dist/transform/read/relationship.js.map +0 -1
  280. package/dist/transform/read/traverseFields.d.ts +0 -57
  281. package/dist/transform/read/traverseFields.d.ts.map +0 -1
  282. package/dist/transform/read/traverseFields.js +0 -435
  283. package/dist/transform/read/traverseFields.js.map +0 -1
  284. package/dist/transform/write/array.d.ts +0 -26
  285. package/dist/transform/write/array.d.ts.map +0 -1
  286. package/dist/transform/write/array.js +0 -58
  287. package/dist/transform/write/array.js.map +0 -1
  288. package/dist/transform/write/blocks.d.ts +0 -25
  289. package/dist/transform/write/blocks.d.ts.map +0 -1
  290. package/dist/transform/write/blocks.js +0 -54
  291. package/dist/transform/write/blocks.js.map +0 -1
  292. package/dist/transform/write/index.d.ts +0 -13
  293. package/dist/transform/write/index.d.ts.map +0 -1
  294. package/dist/transform/write/index.js +0 -41
  295. package/dist/transform/write/index.js.map +0 -1
  296. package/dist/transform/write/numbers.d.ts +0 -8
  297. package/dist/transform/write/numbers.d.ts.map +0 -1
  298. package/dist/transform/write/numbers.js +0 -11
  299. package/dist/transform/write/numbers.js.map +0 -1
  300. package/dist/transform/write/relationships.d.ts +0 -10
  301. package/dist/transform/write/relationships.d.ts.map +0 -1
  302. package/dist/transform/write/relationships.js +0 -23
  303. package/dist/transform/write/relationships.js.map +0 -1
  304. package/dist/transform/write/selects.d.ts +0 -8
  305. package/dist/transform/write/selects.d.ts.map +0 -1
  306. package/dist/transform/write/selects.js +0 -20
  307. package/dist/transform/write/selects.js.map +0 -1
  308. package/dist/transform/write/texts.d.ts +0 -8
  309. package/dist/transform/write/texts.d.ts.map +0 -1
  310. package/dist/transform/write/texts.js +0 -11
  311. package/dist/transform/write/texts.js.map +0 -1
  312. package/dist/transform/write/traverseFields.d.ts +0 -50
  313. package/dist/transform/write/traverseFields.d.ts.map +0 -1
  314. package/dist/transform/write/traverseFields.js +0 -445
  315. package/dist/transform/write/traverseFields.js.map +0 -1
  316. package/dist/transform/write/types.d.ts +0 -43
  317. package/dist/transform/write/types.d.ts.map +0 -1
  318. package/dist/transform/write/types.js +0 -3
  319. package/dist/transform/write/types.js.map +0 -1
  320. package/dist/update.d.ts +0 -3
  321. package/dist/update.d.ts.map +0 -1
  322. package/dist/update.js +0 -54
  323. package/dist/update.js.map +0 -1
  324. package/dist/updateGlobal.d.ts +0 -5
  325. package/dist/updateGlobal.d.ts.map +0 -1
  326. package/dist/updateGlobal.js +0 -25
  327. package/dist/updateGlobal.js.map +0 -1
  328. package/dist/updateGlobalVersion.d.ts +0 -5
  329. package/dist/updateGlobalVersion.d.ts.map +0 -1
  330. package/dist/updateGlobalVersion.js +0 -36
  331. package/dist/updateGlobalVersion.js.map +0 -1
  332. package/dist/updateVersion.d.ts +0 -5
  333. package/dist/updateVersion.d.ts.map +0 -1
  334. package/dist/updateVersion.js +0 -36
  335. package/dist/updateVersion.js.map +0 -1
  336. package/dist/upsertRow/deleteExistingArrayRows.d.ts +0 -10
  337. package/dist/upsertRow/deleteExistingArrayRows.d.ts.map +0 -1
  338. package/dist/upsertRow/deleteExistingArrayRows.js +0 -10
  339. package/dist/upsertRow/deleteExistingArrayRows.js.map +0 -1
  340. package/dist/upsertRow/deleteExistingRowsByPath.d.ts +0 -14
  341. package/dist/upsertRow/deleteExistingRowsByPath.d.ts.map +0 -1
  342. package/dist/upsertRow/deleteExistingRowsByPath.js +0 -33
  343. package/dist/upsertRow/deleteExistingRowsByPath.js.map +0 -1
  344. package/dist/upsertRow/index.d.ts +0 -4
  345. package/dist/upsertRow/index.d.ts.map +0 -1
  346. package/dist/upsertRow/index.js +0 -279
  347. package/dist/upsertRow/index.js.map +0 -1
  348. package/dist/upsertRow/insertArrays.d.ts +0 -13
  349. package/dist/upsertRow/insertArrays.d.ts.map +0 -1
  350. package/dist/upsertRow/insertArrays.js +0 -68
  351. package/dist/upsertRow/insertArrays.js.map +0 -1
  352. package/dist/upsertRow/types.d.ts +0 -32
  353. package/dist/upsertRow/types.d.ts.map +0 -1
  354. package/dist/upsertRow/types.js +0 -3
  355. package/dist/upsertRow/types.js.map +0 -1
  356. package/dist/utilities/appendPrefixToKeys.d.ts +0 -2
  357. package/dist/utilities/appendPrefixToKeys.d.ts.map +0 -1
  358. package/dist/utilities/appendPrefixToKeys.js +0 -6
  359. package/dist/utilities/appendPrefixToKeys.js.map +0 -1
  360. package/dist/utilities/createBlocksMap.d.ts +0 -5
  361. package/dist/utilities/createBlocksMap.d.ts.map +0 -1
  362. package/dist/utilities/createBlocksMap.js +0 -29
  363. package/dist/utilities/createBlocksMap.js.map +0 -1
  364. package/dist/utilities/createMigrationTable.d.ts +0 -3
  365. package/dist/utilities/createMigrationTable.d.ts.map +0 -1
  366. package/dist/utilities/createMigrationTable.js +0 -13
  367. package/dist/utilities/createMigrationTable.js.map +0 -1
  368. package/dist/utilities/createRelationshipMap.d.ts +0 -2
  369. package/dist/utilities/createRelationshipMap.d.ts.map +0 -1
  370. package/dist/utilities/createRelationshipMap.js +0 -19
  371. package/dist/utilities/createRelationshipMap.js.map +0 -1
  372. package/dist/utilities/hasLocalesTable.d.ts +0 -3
  373. package/dist/utilities/hasLocalesTable.d.ts.map +0 -1
  374. package/dist/utilities/hasLocalesTable.js +0 -11
  375. package/dist/utilities/hasLocalesTable.js.map +0 -1
  376. package/dist/utilities/isArrayOfRows.d.ts +0 -2
  377. package/dist/utilities/isArrayOfRows.d.ts.map +0 -1
  378. package/dist/utilities/isArrayOfRows.js +0 -5
  379. package/dist/utilities/isArrayOfRows.js.map +0 -1
  380. package/dist/utilities/migrationTableExists.d.ts +0 -3
  381. package/dist/utilities/migrationTableExists.d.ts.map +0 -1
  382. package/dist/utilities/migrationTableExists.js +0 -9
  383. package/dist/utilities/migrationTableExists.js.map +0 -1
  384. package/dist/utilities/parseError.d.ts +0 -5
  385. package/dist/utilities/parseError.d.ts.map +0 -1
  386. package/dist/utilities/parseError.js +0 -17
  387. package/dist/utilities/parseError.js.map +0 -1
  388. package/dist/utilities/pushDevSchema.d.ts +0 -9
  389. package/dist/utilities/pushDevSchema.d.ts.map +0 -1
  390. package/dist/utilities/pushDevSchema.js +0 -58
  391. package/dist/utilities/pushDevSchema.js.map +0 -1
  392. /package/dist/{queries/createJSONQuery → createJSONQuery}/convertPathToJSONTraversal.d.ts +0 -0
  393. /package/dist/{queries/createJSONQuery → createJSONQuery}/convertPathToJSONTraversal.js +0 -0
  394. /package/dist/{queries/createJSONQuery → createJSONQuery}/formatJSONPathSegment.d.ts +0 -0
  395. /package/dist/{queries/createJSONQuery → createJSONQuery}/formatJSONPathSegment.js +0 -0
  396. /package/dist/{queries/createJSONQuery → createJSONQuery}/index.d.ts +0 -0
  397. /package/dist/{queries/createJSONQuery → createJSONQuery}/index.js +0 -0
@@ -1,54 +0,0 @@
1
- /* eslint-disable no-param-reassign */ import toSnakeCase from 'to-snake-case';
2
- import { traverseFields } from './traverseFields.js';
3
- export const transformBlocks = ({ adapter, baseTableName, blocks, blocksToDelete, data, field, locale, numbers, path, relationships, relationshipsToDelete, selects, texts })=>{
4
- data.forEach((blockRow, i)=>{
5
- if (typeof blockRow.blockType !== 'string') return;
6
- const matchedBlock = field.blocks.find(({ slug })=>slug === blockRow.blockType);
7
- if (!matchedBlock) return;
8
- const blockType = toSnakeCase(blockRow.blockType);
9
- if (!blocks[blockType]) blocks[blockType] = [];
10
- const newRow = {
11
- arrays: {},
12
- locales: {},
13
- row: {
14
- _order: i + 1,
15
- _path: `${path}${field.name}`
16
- }
17
- };
18
- if (field.localized && locale) newRow.row._locale = locale;
19
- const blockTableName = adapter.tableNameMap.get(`${baseTableName}_blocks_${blockType}`);
20
- const hasUUID = adapter.tables[blockTableName]._uuid;
21
- // If we have declared a _uuid field on arrays,
22
- // that means the ID has to be unique,
23
- // and our ids within arrays are not unique.
24
- // So move the ID to a uuid field for storage
25
- // and allow the database to generate a serial id automatically
26
- if (hasUUID) {
27
- newRow.row._uuid = blockRow.id;
28
- delete blockRow.id;
29
- }
30
- traverseFields({
31
- adapter,
32
- arrays: newRow.arrays,
33
- baseTableName,
34
- blocks,
35
- blocksToDelete,
36
- columnPrefix: '',
37
- data: blockRow,
38
- fieldPrefix: '',
39
- fields: matchedBlock.fields,
40
- locales: newRow.locales,
41
- numbers,
42
- parentTableName: blockTableName,
43
- path: `${path || ''}${field.name}.${i}.`,
44
- relationships,
45
- relationshipsToDelete,
46
- row: newRow.row,
47
- selects,
48
- texts
49
- });
50
- blocks[blockType].push(newRow);
51
- });
52
- };
53
-
54
- //# sourceMappingURL=blocks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/transform/write/blocks.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport type { BlockField } from 'payload/types'\n\nimport toSnakeCase from 'to-snake-case'\n\nimport type { PostgresAdapter } from '../../types.js'\nimport type { BlockRowToInsert, RelationshipToDelete } from './types.js'\n\nimport { traverseFields } from './traverseFields.js'\n\ntype Args = {\n adapter: PostgresAdapter\n baseTableName: string\n blocks: {\n [blockType: string]: BlockRowToInsert[]\n }\n blocksToDelete: Set<string>\n data: Record<string, unknown>[]\n field: BlockField\n locale?: string\n numbers: Record<string, unknown>[]\n path: string\n relationships: Record<string, unknown>[]\n relationshipsToDelete: RelationshipToDelete[]\n selects: {\n [tableName: string]: Record<string, unknown>[]\n }\n texts: Record<string, unknown>[]\n}\nexport const transformBlocks = ({\n adapter,\n baseTableName,\n blocks,\n blocksToDelete,\n data,\n field,\n locale,\n numbers,\n path,\n relationships,\n relationshipsToDelete,\n selects,\n texts,\n}: Args) => {\n data.forEach((blockRow, i) => {\n if (typeof blockRow.blockType !== 'string') return\n const matchedBlock = field.blocks.find(({ slug }) => slug === blockRow.blockType)\n if (!matchedBlock) return\n const blockType = toSnakeCase(blockRow.blockType)\n\n if (!blocks[blockType]) blocks[blockType] = []\n\n const newRow: BlockRowToInsert = {\n arrays: {},\n locales: {},\n row: {\n _order: i + 1,\n _path: `${path}${field.name}`,\n },\n }\n\n if (field.localized && locale) newRow.row._locale = locale\n\n const blockTableName = adapter.tableNameMap.get(`${baseTableName}_blocks_${blockType}`)\n\n const hasUUID = adapter.tables[blockTableName]._uuid\n\n // If we have declared a _uuid field on arrays,\n // that means the ID has to be unique,\n // and our ids within arrays are not unique.\n // So move the ID to a uuid field for storage\n // and allow the database to generate a serial id automatically\n if (hasUUID) {\n newRow.row._uuid = blockRow.id\n delete blockRow.id\n }\n\n traverseFields({\n adapter,\n arrays: newRow.arrays,\n baseTableName,\n blocks,\n blocksToDelete,\n columnPrefix: '',\n data: blockRow,\n fieldPrefix: '',\n fields: matchedBlock.fields,\n locales: newRow.locales,\n numbers,\n parentTableName: blockTableName,\n path: `${path || ''}${field.name}.${i}.`,\n relationships,\n relationshipsToDelete,\n row: newRow.row,\n selects,\n texts,\n })\n\n blocks[blockType].push(newRow)\n })\n}\n"],"names":["toSnakeCase","traverseFields","transformBlocks","adapter","baseTableName","blocks","blocksToDelete","data","field","locale","numbers","path","relationships","relationshipsToDelete","selects","texts","forEach","blockRow","i","blockType","matchedBlock","find","slug","newRow","arrays","locales","row","_order","_path","name","localized","_locale","blockTableName","tableNameMap","get","hasUUID","tables","_uuid","id","columnPrefix","fieldPrefix","fields","parentTableName","push"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,oCAAoC,GAGpC,OAAOA,iBAAiB,gBAAe;AAKvC,SAASC,cAAc,QAAQ,sBAAqB;AAqBpD,OAAO,MAAMC,kBAAkB,CAAC,EAC9BC,OAAO,EACPC,aAAa,EACbC,MAAM,EACNC,cAAc,EACdC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,OAAO,EACPC,IAAI,EACJC,aAAa,EACbC,qBAAqB,EACrBC,OAAO,EACPC,KAAK,EACA;IACLR,KAAKS,OAAO,CAAC,CAACC,UAAUC;QACtB,IAAI,OAAOD,SAASE,SAAS,KAAK,UAAU;QAC5C,MAAMC,eAAeZ,MAAMH,MAAM,CAACgB,IAAI,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA,SAASL,SAASE,SAAS;QAChF,IAAI,CAACC,cAAc;QACnB,MAAMD,YAAYnB,YAAYiB,SAASE,SAAS;QAEhD,IAAI,CAACd,MAAM,CAACc,UAAU,EAAEd,MAAM,CAACc,UAAU,GAAG,EAAE;QAE9C,MAAMI,SAA2B;YAC/BC,QAAQ,CAAC;YACTC,SAAS,CAAC;YACVC,KAAK;gBACHC,QAAQT,IAAI;gBACZU,OAAO,CAAC,EAAEjB,KAAK,EAAEH,MAAMqB,IAAI,CAAC,CAAC;YAC/B;QACF;QAEA,IAAIrB,MAAMsB,SAAS,IAAIrB,QAAQc,OAAOG,GAAG,CAACK,OAAO,GAAGtB;QAEpD,MAAMuB,iBAAiB7B,QAAQ8B,YAAY,CAACC,GAAG,CAAC,CAAC,EAAE9B,cAAc,QAAQ,EAAEe,UAAU,CAAC;QAEtF,MAAMgB,UAAUhC,QAAQiC,MAAM,CAACJ,eAAe,CAACK,KAAK;QAEpD,+CAA+C;QAC/C,sCAAsC;QACtC,4CAA4C;QAC5C,6CAA6C;QAC7C,+DAA+D;QAC/D,IAAIF,SAAS;YACXZ,OAAOG,GAAG,CAACW,KAAK,GAAGpB,SAASqB,EAAE;YAC9B,OAAOrB,SAASqB,EAAE;QACpB;QAEArC,eAAe;YACbE;YACAqB,QAAQD,OAAOC,MAAM;YACrBpB;YACAC;YACAC;YACAiC,cAAc;YACdhC,MAAMU;YACNuB,aAAa;YACbC,QAAQrB,aAAaqB,MAAM;YAC3BhB,SAASF,OAAOE,OAAO;YACvBf;YACAgC,iBAAiBV;YACjBrB,MAAM,CAAC,EAAEA,QAAQ,GAAG,EAAEH,MAAMqB,IAAI,CAAC,CAAC,EAAEX,EAAE,CAAC,CAAC;YACxCN;YACAC;YACAa,KAAKH,OAAOG,GAAG;YACfZ;YACAC;QACF;QAEAV,MAAM,CAACc,UAAU,CAACwB,IAAI,CAACpB;IACzB;AACF,EAAC"}
@@ -1,13 +0,0 @@
1
- import type { Field } from 'payload/types';
2
- import type { PostgresAdapter } from '../../types.js';
3
- import type { RowToInsert } from './types.js';
4
- type Args = {
5
- adapter: PostgresAdapter;
6
- data: Record<string, unknown>;
7
- fields: Field[];
8
- path?: string;
9
- tableName: string;
10
- };
11
- export declare const transformForWrite: ({ adapter, data, fields, path, tableName, }: Args) => RowToInsert;
12
- export {};
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transform/write/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAI7C,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iBAAiB,gDAM3B,IAAI,KAAG,WAuCT,CAAA"}
@@ -1,41 +0,0 @@
1
- /* eslint-disable no-param-reassign */ import { traverseFields } from './traverseFields.js';
2
- export const transformForWrite = ({ adapter, data, fields, path = '', tableName })=>{
3
- // Split out the incoming data into rows to insert / delete
4
- const rowToInsert = {
5
- arrays: {},
6
- blocks: {},
7
- blocksToDelete: new Set(),
8
- locales: {},
9
- numbers: [],
10
- relationships: [],
11
- relationshipsToDelete: [],
12
- row: {},
13
- selects: {},
14
- texts: []
15
- };
16
- // This function is responsible for building up the
17
- // above rowToInsert
18
- traverseFields({
19
- adapter,
20
- arrays: rowToInsert.arrays,
21
- baseTableName: tableName,
22
- blocks: rowToInsert.blocks,
23
- blocksToDelete: rowToInsert.blocksToDelete,
24
- columnPrefix: '',
25
- data,
26
- fieldPrefix: '',
27
- fields,
28
- locales: rowToInsert.locales,
29
- numbers: rowToInsert.numbers,
30
- parentTableName: tableName,
31
- path,
32
- relationships: rowToInsert.relationships,
33
- relationshipsToDelete: rowToInsert.relationshipsToDelete,
34
- row: rowToInsert.row,
35
- selects: rowToInsert.selects,
36
- texts: rowToInsert.texts
37
- });
38
- return rowToInsert;
39
- };
40
-
41
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/transform/write/index.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport type { Field } from 'payload/types'\n\nimport type { PostgresAdapter } from '../../types.js'\nimport type { RowToInsert } from './types.js'\n\nimport { traverseFields } from './traverseFields.js'\n\ntype Args = {\n adapter: PostgresAdapter\n data: Record<string, unknown>\n fields: Field[]\n path?: string\n tableName: string\n}\n\nexport const transformForWrite = ({\n adapter,\n data,\n fields,\n path = '',\n tableName,\n}: Args): RowToInsert => {\n // Split out the incoming data into rows to insert / delete\n const rowToInsert: RowToInsert = {\n arrays: {},\n blocks: {},\n blocksToDelete: new Set(),\n locales: {},\n numbers: [],\n relationships: [],\n relationshipsToDelete: [],\n row: {},\n selects: {},\n texts: [],\n }\n\n // This function is responsible for building up the\n // above rowToInsert\n traverseFields({\n adapter,\n arrays: rowToInsert.arrays,\n baseTableName: tableName,\n blocks: rowToInsert.blocks,\n blocksToDelete: rowToInsert.blocksToDelete,\n columnPrefix: '',\n data,\n fieldPrefix: '',\n fields,\n locales: rowToInsert.locales,\n numbers: rowToInsert.numbers,\n parentTableName: tableName,\n path,\n relationships: rowToInsert.relationships,\n relationshipsToDelete: rowToInsert.relationshipsToDelete,\n row: rowToInsert.row,\n selects: rowToInsert.selects,\n texts: rowToInsert.texts,\n })\n\n return rowToInsert\n}\n"],"names":["traverseFields","transformForWrite","adapter","data","fields","path","tableName","rowToInsert","arrays","blocks","blocksToDelete","Set","locales","numbers","relationships","relationshipsToDelete","row","selects","texts","baseTableName","columnPrefix","fieldPrefix","parentTableName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,oCAAoC,GAMpC,SAASA,cAAc,QAAQ,sBAAqB;AAUpD,OAAO,MAAMC,oBAAoB,CAAC,EAChCC,OAAO,EACPC,IAAI,EACJC,MAAM,EACNC,OAAO,EAAE,EACTC,SAAS,EACJ;IACL,2DAA2D;IAC3D,MAAMC,cAA2B;QAC/BC,QAAQ,CAAC;QACTC,QAAQ,CAAC;QACTC,gBAAgB,IAAIC;QACpBC,SAAS,CAAC;QACVC,SAAS,EAAE;QACXC,eAAe,EAAE;QACjBC,uBAAuB,EAAE;QACzBC,KAAK,CAAC;QACNC,SAAS,CAAC;QACVC,OAAO,EAAE;IACX;IAEA,mDAAmD;IACnD,oBAAoB;IACpBlB,eAAe;QACbE;QACAM,QAAQD,YAAYC,MAAM;QAC1BW,eAAeb;QACfG,QAAQF,YAAYE,MAAM;QAC1BC,gBAAgBH,YAAYG,cAAc;QAC1CU,cAAc;QACdjB;QACAkB,aAAa;QACbjB;QACAQ,SAASL,YAAYK,OAAO;QAC5BC,SAASN,YAAYM,OAAO;QAC5BS,iBAAiBhB;QACjBD;QACAS,eAAeP,YAAYO,aAAa;QACxCC,uBAAuBR,YAAYQ,qBAAqB;QACxDC,KAAKT,YAAYS,GAAG;QACpBC,SAASV,YAAYU,OAAO;QAC5BC,OAAOX,YAAYW,KAAK;IAC1B;IAEA,OAAOX;AACT,EAAC"}
@@ -1,8 +0,0 @@
1
- type Args = {
2
- baseRow: Record<string, unknown>;
3
- data: unknown[];
4
- numbers: Record<string, unknown>[];
5
- };
6
- export declare const transformNumbers: ({ baseRow, data, numbers }: Args) => void;
7
- export {};
8
- //# sourceMappingURL=numbers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../../src/transform/write/numbers.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,gBAAgB,+BAAgC,IAAI,SAQhE,CAAA"}
@@ -1,11 +0,0 @@
1
- export const transformNumbers = ({ baseRow, data, numbers })=>{
2
- data.forEach((val, i)=>{
3
- numbers.push({
4
- ...baseRow,
5
- number: val,
6
- order: i + 1
7
- });
8
- });
9
- };
10
-
11
- //# sourceMappingURL=numbers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/transform/write/numbers.ts"],"sourcesContent":["type Args = {\n baseRow: Record<string, unknown>\n data: unknown[]\n numbers: Record<string, unknown>[]\n}\n\nexport const transformNumbers = ({ baseRow, data, numbers }: Args) => {\n data.forEach((val, i) => {\n numbers.push({\n ...baseRow,\n number: val,\n order: i + 1,\n })\n })\n}\n"],"names":["transformNumbers","baseRow","data","numbers","forEach","val","i","push","number","order"],"rangeMappings":";;;;;;;;","mappings":"AAMA,OAAO,MAAMA,mBAAmB,CAAC,EAAEC,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAQ;IAC/DD,KAAKE,OAAO,CAAC,CAACC,KAAKC;QACjBH,QAAQI,IAAI,CAAC;YACX,GAAGN,OAAO;YACVO,QAAQH;YACRI,OAAOH,IAAI;QACb;IACF;AACF,EAAC"}
@@ -1,10 +0,0 @@
1
- import type { RelationshipField, UploadField } from 'payload/types';
2
- type Args = {
3
- baseRow: Record<string, unknown>;
4
- data: unknown;
5
- field: RelationshipField | UploadField;
6
- relationships: Record<string, unknown>[];
7
- };
8
- export declare const transformRelationship: ({ baseRow, data, field, relationships }: Args) => void;
9
- export {};
10
- //# sourceMappingURL=relationships.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../src/transform/write/relationships.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAInE,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,iBAAiB,GAAG,WAAW,CAAA;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,qBAAqB,4CAA6C,IAAI,SAiBlF,CAAA"}
@@ -1,23 +0,0 @@
1
- import { valueIsValueWithRelation } from 'payload/types';
2
- export const transformRelationship = ({ baseRow, data, field, relationships })=>{
3
- const relations = Array.isArray(data) ? data : [
4
- data
5
- ];
6
- relations.forEach((relation, i)=>{
7
- if (relation) {
8
- const relationRow = {
9
- ...baseRow
10
- };
11
- if ('hasMany' in field && field.hasMany) relationRow.order = i + 1;
12
- if (Array.isArray(field.relationTo) && valueIsValueWithRelation(relation)) {
13
- relationRow[`${relation.relationTo}ID`] = relation.value;
14
- relationships.push(relationRow);
15
- } else {
16
- relationRow[`${field.relationTo}ID`] = relation;
17
- if (relation) relationships.push(relationRow);
18
- }
19
- }
20
- });
21
- };
22
-
23
- //# sourceMappingURL=relationships.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/transform/write/relationships.ts"],"sourcesContent":["import type { RelationshipField, UploadField } from 'payload/types'\n\nimport { valueIsValueWithRelation } from 'payload/types'\n\ntype Args = {\n baseRow: Record<string, unknown>\n data: unknown\n field: RelationshipField | UploadField\n relationships: Record<string, unknown>[]\n}\n\nexport const transformRelationship = ({ baseRow, data, field, relationships }: Args) => {\n const relations = Array.isArray(data) ? data : [data]\n\n relations.forEach((relation, i) => {\n if (relation) {\n const relationRow = { ...baseRow }\n if ('hasMany' in field && field.hasMany) relationRow.order = i + 1\n\n if (Array.isArray(field.relationTo) && valueIsValueWithRelation(relation)) {\n relationRow[`${relation.relationTo}ID`] = relation.value\n relationships.push(relationRow)\n } else {\n relationRow[`${field.relationTo}ID`] = relation\n if (relation) relationships.push(relationRow)\n }\n }\n })\n}\n"],"names":["valueIsValueWithRelation","transformRelationship","baseRow","data","field","relationships","relations","Array","isArray","forEach","relation","i","relationRow","hasMany","order","relationTo","value","push"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,wBAAwB,QAAQ,gBAAe;AASxD,OAAO,MAAMC,wBAAwB,CAAC,EAAEC,OAAO,EAAEC,IAAI,EAAEC,KAAK,EAAEC,aAAa,EAAQ;IACjF,MAAMC,YAAYC,MAAMC,OAAO,CAACL,QAAQA,OAAO;QAACA;KAAK;IAErDG,UAAUG,OAAO,CAAC,CAACC,UAAUC;QAC3B,IAAID,UAAU;YACZ,MAAME,cAAc;gBAAE,GAAGV,OAAO;YAAC;YACjC,IAAI,aAAaE,SAASA,MAAMS,OAAO,EAAED,YAAYE,KAAK,GAAGH,IAAI;YAEjE,IAAIJ,MAAMC,OAAO,CAACJ,MAAMW,UAAU,KAAKf,yBAAyBU,WAAW;gBACzEE,WAAW,CAAC,CAAC,EAAEF,SAASK,UAAU,CAAC,EAAE,CAAC,CAAC,GAAGL,SAASM,KAAK;gBACxDX,cAAcY,IAAI,CAACL;YACrB,OAAO;gBACLA,WAAW,CAAC,CAAC,EAAER,MAAMW,UAAU,CAAC,EAAE,CAAC,CAAC,GAAGL;gBACvC,IAAIA,UAAUL,cAAcY,IAAI,CAACL;YACnC;QACF;IACF;AACF,EAAC"}
@@ -1,8 +0,0 @@
1
- type Args = {
2
- data: unknown;
3
- id?: unknown;
4
- locale?: string;
5
- };
6
- export declare const transformSelects: ({ id, data, locale }: Args) => Record<string, unknown>[];
7
- export {};
8
- //# sourceMappingURL=selects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selects.d.ts","sourceRoot":"","sources":["../../../src/transform/write/selects.ts"],"names":[],"mappings":"AAGA,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,gBAAgB,yBAA0B,IAAI,8BAoB1D,CAAA"}
@@ -1,20 +0,0 @@
1
- /* eslint-disable no-param-reassign */ import { isArrayOfRows } from '../../utilities/isArrayOfRows.js';
2
- export const transformSelects = ({ id, data, locale })=>{
3
- const newRows = [];
4
- if (isArrayOfRows(data)) {
5
- data.forEach((value, i)=>{
6
- const newRow = {
7
- order: i + 1,
8
- parent: id,
9
- value
10
- };
11
- if (locale) {
12
- newRow.locale = locale;
13
- }
14
- newRows.push(newRow);
15
- });
16
- }
17
- return newRows;
18
- };
19
-
20
- //# sourceMappingURL=selects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/transform/write/selects.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport { isArrayOfRows } from '../../utilities/isArrayOfRows.js'\n\ntype Args = {\n data: unknown\n id?: unknown\n locale?: string\n}\n\nexport const transformSelects = ({ id, data, locale }: Args) => {\n const newRows: Record<string, unknown>[] = []\n\n if (isArrayOfRows(data)) {\n data.forEach((value, i) => {\n const newRow: Record<string, unknown> = {\n order: i + 1,\n parent: id,\n value,\n }\n\n if (locale) {\n newRow.locale = locale\n }\n\n newRows.push(newRow)\n })\n }\n\n return newRows\n}\n"],"names":["isArrayOfRows","transformSelects","id","data","locale","newRows","forEach","value","i","newRow","order","parent","push"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA,oCAAoC,GACpC,SAASA,aAAa,QAAQ,mCAAkC;AAQhE,OAAO,MAAMC,mBAAmB,CAAC,EAAEC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAQ;IACzD,MAAMC,UAAqC,EAAE;IAE7C,IAAIL,cAAcG,OAAO;QACvBA,KAAKG,OAAO,CAAC,CAACC,OAAOC;YACnB,MAAMC,SAAkC;gBACtCC,OAAOF,IAAI;gBACXG,QAAQT;gBACRK;YACF;YAEA,IAAIH,QAAQ;gBACVK,OAAOL,MAAM,GAAGA;YAClB;YAEAC,QAAQO,IAAI,CAACH;QACf;IACF;IAEA,OAAOJ;AACT,EAAC"}
@@ -1,8 +0,0 @@
1
- type Args = {
2
- baseRow: Record<string, unknown>;
3
- data: unknown[];
4
- texts: Record<string, unknown>[];
5
- };
6
- export declare const transformTexts: ({ baseRow, data, texts }: Args) => void;
7
- export {};
8
- //# sourceMappingURL=texts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"texts.d.ts","sourceRoot":"","sources":["../../../src/transform/write/texts.ts"],"names":[],"mappings":"AAAA,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,cAAc,6BAA8B,IAAI,SAQ5D,CAAA"}
@@ -1,11 +0,0 @@
1
- export const transformTexts = ({ baseRow, data, texts })=>{
2
- data.forEach((val, i)=>{
3
- texts.push({
4
- ...baseRow,
5
- order: i + 1,
6
- text: val
7
- });
8
- });
9
- };
10
-
11
- //# sourceMappingURL=texts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/transform/write/texts.ts"],"sourcesContent":["type Args = {\n baseRow: Record<string, unknown>\n data: unknown[]\n texts: Record<string, unknown>[]\n}\n\nexport const transformTexts = ({ baseRow, data, texts }: Args) => {\n data.forEach((val, i) => {\n texts.push({\n ...baseRow,\n order: i + 1,\n text: val,\n })\n })\n}\n"],"names":["transformTexts","baseRow","data","texts","forEach","val","i","push","order","text"],"rangeMappings":";;;;;;;;","mappings":"AAMA,OAAO,MAAMA,iBAAiB,CAAC,EAAEC,OAAO,EAAEC,IAAI,EAAEC,KAAK,EAAQ;IAC3DD,KAAKE,OAAO,CAAC,CAACC,KAAKC;QACjBH,MAAMI,IAAI,CAAC;YACT,GAAGN,OAAO;YACVO,OAAOF,IAAI;YACXG,MAAMJ;QACR;IACF;AACF,EAAC"}
@@ -1,50 +0,0 @@
1
- import type { Field } from 'payload/types';
2
- import type { PostgresAdapter } from '../../types.js';
3
- import type { ArrayRowToInsert, BlockRowToInsert, RelationshipToDelete } from './types.js';
4
- type Args = {
5
- adapter: PostgresAdapter;
6
- arrays: {
7
- [tableName: string]: ArrayRowToInsert[];
8
- };
9
- /**
10
- * This is the name of the base table
11
- */
12
- baseTableName: string;
13
- blocks: {
14
- [blockType: string]: BlockRowToInsert[];
15
- };
16
- blocksToDelete: Set<string>;
17
- /**
18
- * A snake-case field prefix, representing prior fields
19
- * Ex: my_group_my_named_tab_
20
- */
21
- columnPrefix: string;
22
- data: Record<string, unknown>;
23
- existingLocales?: Record<string, unknown>[];
24
- /**
25
- * A prefix that will retain camel-case formatting, representing prior fields
26
- * Ex: myGroup_myNamedTab_
27
- */
28
- fieldPrefix: string;
29
- fields: Field[];
30
- forcedLocale?: string;
31
- locales: {
32
- [locale: string]: Record<string, unknown>;
33
- };
34
- numbers: Record<string, unknown>[];
35
- /**
36
- * This is the name of the parent table
37
- */
38
- parentTableName: string;
39
- path: string;
40
- relationships: Record<string, unknown>[];
41
- relationshipsToDelete: RelationshipToDelete[];
42
- row: Record<string, unknown>;
43
- selects: {
44
- [tableName: string]: Record<string, unknown>[];
45
- };
46
- texts: Record<string, unknown>[];
47
- };
48
- export declare const traverseFields: ({ adapter, arrays, baseTableName, blocks, blocksToDelete, columnPrefix, data, existingLocales, fieldPrefix, fields, forcedLocale, locales, numbers, parentTableName, path, relationships, relationshipsToDelete, row, selects, texts, }: Args) => void;
49
- export {};
50
- //# sourceMappingURL=traverseFields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../../src/transform/write/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAK1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAU1F,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAA;KACxC,CAAA;IACD,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAC3C;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE;QACP,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAC1C,CAAA;IACD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IAClC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACxC,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,OAAO,EAAE;QACP,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;KAC/C,CAAA;IACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,cAAc,4OAqBxB,IAAI,SA0dN,CAAA"}