@payloadcms/db-mongodb 3.0.0-canary.5390729 → 3.0.0-canary.5624723

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. package/dist/connect.d.ts.map +1 -1
  2. package/dist/connect.js +18 -4
  3. package/dist/connect.js.map +1 -1
  4. package/dist/count.d.ts.map +1 -1
  5. package/dist/count.js +9 -2
  6. package/dist/count.js.map +1 -1
  7. package/dist/countGlobalVersions.d.ts +3 -0
  8. package/dist/countGlobalVersions.d.ts.map +1 -0
  9. package/dist/countGlobalVersions.js +40 -0
  10. package/dist/countGlobalVersions.js.map +1 -0
  11. package/dist/countVersions.d.ts +3 -0
  12. package/dist/countVersions.d.ts.map +1 -0
  13. package/dist/countVersions.js +40 -0
  14. package/dist/countVersions.js.map +1 -0
  15. package/dist/create.d.ts.map +1 -1
  16. package/dist/create.js +17 -4
  17. package/dist/create.js.map +1 -1
  18. package/dist/createGlobal.d.ts.map +1 -1
  19. package/dist/createGlobal.js +11 -6
  20. package/dist/createGlobal.js.map +1 -1
  21. package/dist/createGlobalVersion.d.ts +1 -1
  22. package/dist/createGlobalVersion.d.ts.map +1 -1
  23. package/dist/createGlobalVersion.js +14 -5
  24. package/dist/createGlobalVersion.js.map +1 -1
  25. package/dist/createMigration.d.ts.map +1 -1
  26. package/dist/createMigration.js +9 -7
  27. package/dist/createMigration.js.map +1 -1
  28. package/dist/createVersion.d.ts +1 -1
  29. package/dist/createVersion.d.ts.map +1 -1
  30. package/dist/createVersion.js +32 -10
  31. package/dist/createVersion.js.map +1 -1
  32. package/dist/deleteMany.d.ts.map +1 -1
  33. package/dist/deleteMany.js +1 -1
  34. package/dist/deleteMany.js.map +1 -1
  35. package/dist/deleteOne.d.ts.map +1 -1
  36. package/dist/deleteOne.js +12 -4
  37. package/dist/deleteOne.js.map +1 -1
  38. package/dist/deleteVersions.d.ts.map +1 -1
  39. package/dist/deleteVersions.js +1 -1
  40. package/dist/deleteVersions.js.map +1 -1
  41. package/dist/exports/migration-utils.d.ts +3 -0
  42. package/dist/exports/migration-utils.d.ts.map +1 -0
  43. package/dist/exports/migration-utils.js +4 -0
  44. package/dist/exports/migration-utils.js.map +1 -0
  45. package/dist/find.d.ts.map +1 -1
  46. package/dist/find.js +35 -6
  47. package/dist/find.js.map +1 -1
  48. package/dist/findGlobal.d.ts.map +1 -1
  49. package/dist/findGlobal.js +10 -4
  50. package/dist/findGlobal.js.map +1 -1
  51. package/dist/findGlobalVersions.d.ts.map +1 -1
  52. package/dist/findGlobalVersions.js +18 -7
  53. package/dist/findGlobalVersions.js.map +1 -1
  54. package/dist/findOne.d.ts.map +1 -1
  55. package/dist/findOne.js +28 -4
  56. package/dist/findOne.js.map +1 -1
  57. package/dist/findVersions.d.ts.map +1 -1
  58. package/dist/findVersions.js +17 -6
  59. package/dist/findVersions.js.map +1 -1
  60. package/dist/index.d.ts +68 -10
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +18 -7
  63. package/dist/index.js.map +1 -1
  64. package/dist/init.d.ts.map +1 -1
  65. package/dist/init.js +21 -19
  66. package/dist/init.js.map +1 -1
  67. package/dist/migrateFresh.js.map +1 -1
  68. package/dist/models/buildCollectionSchema.d.ts +2 -3
  69. package/dist/models/buildCollectionSchema.d.ts.map +1 -1
  70. package/dist/models/buildCollectionSchema.js +19 -7
  71. package/dist/models/buildCollectionSchema.js.map +1 -1
  72. package/dist/models/buildGlobalModel.d.ts +2 -2
  73. package/dist/models/buildGlobalModel.d.ts.map +1 -1
  74. package/dist/models/buildGlobalModel.js +6 -6
  75. package/dist/models/buildGlobalModel.js.map +1 -1
  76. package/dist/models/buildSchema.d.ts +2 -3
  77. package/dist/models/buildSchema.d.ts.map +1 -1
  78. package/dist/models/buildSchema.js +191 -77
  79. package/dist/models/buildSchema.js.map +1 -1
  80. package/dist/predefinedMigrations/migrateRelationshipsV2_V3.d.ts +6 -0
  81. package/dist/predefinedMigrations/migrateRelationshipsV2_V3.d.ts.map +1 -0
  82. package/dist/predefinedMigrations/migrateRelationshipsV2_V3.js +141 -0
  83. package/dist/predefinedMigrations/migrateRelationshipsV2_V3.js.map +1 -0
  84. package/dist/predefinedMigrations/migrateVersionsV1_V2.d.ts +5 -0
  85. package/dist/predefinedMigrations/migrateVersionsV1_V2.d.ts.map +1 -0
  86. package/dist/predefinedMigrations/migrateVersionsV1_V2.js +107 -0
  87. package/dist/predefinedMigrations/migrateVersionsV1_V2.js.map +1 -0
  88. package/dist/predefinedMigrations/relationships-v2-v3.d.ts +4 -0
  89. package/dist/predefinedMigrations/relationships-v2-v3.d.ts.map +1 -0
  90. package/dist/predefinedMigrations/relationships-v2-v3.js +9 -0
  91. package/dist/predefinedMigrations/relationships-v2-v3.js.map +1 -0
  92. package/dist/predefinedMigrations/versions-v1-v2.d.ts +4 -0
  93. package/dist/predefinedMigrations/versions-v1-v2.d.ts.map +1 -0
  94. package/dist/predefinedMigrations/versions-v1-v2.js +5 -95
  95. package/dist/predefinedMigrations/versions-v1-v2.js.map +1 -1
  96. package/dist/queries/buildAndOrConditions.d.ts.map +1 -1
  97. package/dist/queries/buildAndOrConditions.js +0 -2
  98. package/dist/queries/buildAndOrConditions.js.map +1 -1
  99. package/dist/queries/buildQuery.d.ts +2 -2
  100. package/dist/queries/buildQuery.d.ts.map +1 -1
  101. package/dist/queries/buildQuery.js +1 -2
  102. package/dist/queries/buildQuery.js.map +1 -1
  103. package/dist/queries/buildSearchParams.d.ts.map +1 -1
  104. package/dist/queries/buildSearchParams.js +29 -18
  105. package/dist/queries/buildSearchParams.js.map +1 -1
  106. package/dist/queries/buildSortParam.d.ts +2 -2
  107. package/dist/queries/buildSortParam.d.ts.map +1 -1
  108. package/dist/queries/buildSortParam.js +26 -17
  109. package/dist/queries/buildSortParam.js.map +1 -1
  110. package/dist/queries/getLocalizedSortProperty.spec.js +43 -43
  111. package/dist/queries/getLocalizedSortProperty.spec.js.map +1 -1
  112. package/dist/queries/parseParams.d.ts.map +1 -1
  113. package/dist/queries/parseParams.js +7 -5
  114. package/dist/queries/parseParams.js.map +1 -1
  115. package/dist/queries/sanitizeQueryValue.d.ts +3 -2
  116. package/dist/queries/sanitizeQueryValue.d.ts.map +1 -1
  117. package/dist/queries/sanitizeQueryValue.js +263 -37
  118. package/dist/queries/sanitizeQueryValue.js.map +1 -1
  119. package/dist/queryDrafts.d.ts.map +1 -1
  120. package/dist/queryDrafts.js +37 -10
  121. package/dist/queryDrafts.js.map +1 -1
  122. package/dist/transactions/beginTransaction.d.ts.map +1 -1
  123. package/dist/transactions/beginTransaction.js +2 -0
  124. package/dist/transactions/beginTransaction.js.map +1 -1
  125. package/dist/transactions/commitTransaction.d.ts.map +1 -1
  126. package/dist/transactions/commitTransaction.js +3 -0
  127. package/dist/transactions/commitTransaction.js.map +1 -1
  128. package/dist/transactions/rollbackTransaction.d.ts.map +1 -1
  129. package/dist/transactions/rollbackTransaction.js +13 -7
  130. package/dist/transactions/rollbackTransaction.js.map +1 -1
  131. package/dist/types.d.ts +7 -4
  132. package/dist/types.d.ts.map +1 -1
  133. package/dist/types.js.map +1 -1
  134. package/dist/updateGlobal.d.ts.map +1 -1
  135. package/dist/updateGlobal.js +19 -5
  136. package/dist/updateGlobal.js.map +1 -1
  137. package/dist/updateGlobalVersion.d.ts +2 -2
  138. package/dist/updateGlobalVersion.d.ts.map +1 -1
  139. package/dist/updateGlobalVersion.js +20 -5
  140. package/dist/updateGlobalVersion.js.map +1 -1
  141. package/dist/updateOne.d.ts.map +1 -1
  142. package/dist/updateOne.js +25 -7
  143. package/dist/updateOne.js.map +1 -1
  144. package/dist/updateVersion.d.ts +1 -1
  145. package/dist/updateVersion.d.ts.map +1 -1
  146. package/dist/updateVersion.js +19 -4
  147. package/dist/updateVersion.js.map +1 -1
  148. package/dist/upsert.d.ts +3 -0
  149. package/dist/upsert.d.ts.map +1 -0
  150. package/dist/upsert.js +15 -0
  151. package/dist/upsert.js.map +1 -0
  152. package/dist/utilities/buildJoinAggregation.d.ts +18 -0
  153. package/dist/utilities/buildJoinAggregation.d.ts.map +1 -0
  154. package/dist/utilities/buildJoinAggregation.js +159 -0
  155. package/dist/utilities/buildJoinAggregation.js.map +1 -0
  156. package/dist/utilities/buildProjectionFromSelect.d.ts +8 -0
  157. package/dist/utilities/buildProjectionFromSelect.d.ts.map +1 -0
  158. package/dist/utilities/buildProjectionFromSelect.js +171 -0
  159. package/dist/utilities/buildProjectionFromSelect.js.map +1 -0
  160. package/dist/utilities/getDBName.d.ts.map +1 -1
  161. package/dist/utilities/getDBName.js +3 -1
  162. package/dist/utilities/getDBName.js.map +1 -1
  163. package/dist/utilities/handleError.d.ts +6 -2
  164. package/dist/utilities/handleError.d.ts.map +1 -1
  165. package/dist/utilities/handleError.js +11 -8
  166. package/dist/utilities/handleError.js.map +1 -1
  167. package/dist/utilities/sanitizeInternalFields.d.ts +1 -2
  168. package/dist/utilities/sanitizeInternalFields.d.ts.map +1 -1
  169. package/dist/utilities/sanitizeInternalFields.js +1 -2
  170. package/dist/utilities/sanitizeInternalFields.js.map +1 -1
  171. package/dist/utilities/sanitizeRelationshipIDs.d.ts +9 -0
  172. package/dist/utilities/sanitizeRelationshipIDs.d.ts.map +1 -0
  173. package/dist/utilities/sanitizeRelationshipIDs.js +125 -0
  174. package/dist/utilities/sanitizeRelationshipIDs.js.map +1 -0
  175. package/dist/utilities/sanitizeRelationshipIDs.spec.js +408 -0
  176. package/dist/utilities/sanitizeRelationshipIDs.spec.js.map +1 -0
  177. package/dist/withSession.d.ts +3 -2
  178. package/dist/withSession.d.ts.map +1 -1
  179. package/dist/withSession.js +10 -4
  180. package/dist/withSession.js.map +1 -1
  181. package/license.md +22 -0
  182. package/package.json +24 -12
  183. package/dist/queries/mock.js +0 -2
  184. package/dist/queries/mock.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-mongodb",
3
- "version": "3.0.0-canary.5390729",
3
+ "version": "3.0.0-canary.5624723",
4
4
  "description": "The officially supported MongoDB database adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -10,44 +10,56 @@
10
10
  },
11
11
  "license": "MIT",
12
12
  "author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
13
+ "maintainers": [
14
+ {
15
+ "name": "Payload",
16
+ "email": "info@payloadcms.com",
17
+ "url": "https://payloadcms.com"
18
+ }
19
+ ],
13
20
  "type": "module",
14
21
  "exports": {
15
22
  ".": {
16
23
  "import": "./dist/index.js",
17
24
  "types": "./dist/index.d.ts",
18
25
  "default": "./dist/index.js"
26
+ },
27
+ "./migration-utils": {
28
+ "import": "./dist/exports/migration-utils.js",
29
+ "types": "./dist/exports/migration-utils.d.ts",
30
+ "default": "./dist/exports/migration-utils.js"
19
31
  }
20
32
  },
21
33
  "main": "./dist/index.js",
22
34
  "types": "./dist/index.d.ts",
23
35
  "files": [
24
36
  "dist",
25
- "mock.js",
26
37
  "predefinedMigrations"
27
38
  ],
28
39
  "dependencies": {
29
- "bson-objectid": "2.0.4",
30
- "deepmerge": "4.3.1",
31
40
  "http-status": "1.6.2",
32
- "mongoose": "6.12.3",
33
- "mongoose-paginate-v2": "1.7.22",
41
+ "mongoose": "8.8.1",
42
+ "mongoose-aggregate-paginate-v2": "1.1.2",
43
+ "mongoose-paginate-v2": "1.8.5",
34
44
  "prompts": "2.4.2",
35
45
  "uuid": "10.0.0"
36
46
  },
37
47
  "devDependencies": {
38
- "@types/mongoose-aggregate-paginate-v2": "1.0.9",
39
- "mongodb": "4.17.1",
48
+ "@types/mongoose-aggregate-paginate-v2": "1.0.12",
49
+ "mongodb": "6.10.0",
40
50
  "mongodb-memory-server": "^9",
41
- "@payloadcms/eslint-config": "1.1.1",
42
- "payload": "3.0.0-canary.5390729"
51
+ "@payloadcms/eslint-config": "3.0.0-beta.112",
52
+ "payload": "3.0.0-canary.5624723"
43
53
  },
44
54
  "peerDependencies": {
45
- "payload": "3.0.0-canary.5390729"
55
+ "payload": "3.0.0-canary.5624723"
46
56
  },
47
57
  "scripts": {
48
58
  "build": "pnpm build:types && pnpm build:swc",
49
59
  "build:swc": "swc ./src -d ./dist --config-file .swcrc-build --strip-leading-paths",
50
60
  "build:types": "tsc --emitDeclarationOnly --outDir dist",
51
- "clean": "rimraf {dist,*.tsbuildinfo}"
61
+ "clean": "rimraf {dist,*.tsbuildinfo}",
62
+ "lint": "eslint .",
63
+ "lint:fix": "eslint . --fix"
52
64
  }
53
65
  }
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=mock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/queries/mock.js"],"names":[],"mappings":""}