parse-server 2.8.4 → 8.6.2

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 (240) hide show
  1. package/LICENSE +167 -25
  2. package/NOTICE +10 -0
  3. package/README.md +929 -278
  4. package/lib/AccountLockout.js +47 -30
  5. package/lib/Adapters/AdapterLoader.js +21 -6
  6. package/lib/Adapters/Analytics/AnalyticsAdapter.js +15 -12
  7. package/lib/Adapters/Auth/AuthAdapter.js +116 -13
  8. package/lib/Adapters/Auth/BaseCodeAuthAdapter.js +99 -0
  9. package/lib/Adapters/Auth/OAuth1Client.js +27 -46
  10. package/lib/Adapters/Auth/apple.js +123 -0
  11. package/lib/Adapters/Auth/facebook.js +162 -35
  12. package/lib/Adapters/Auth/gcenter.js +217 -0
  13. package/lib/Adapters/Auth/github.js +118 -48
  14. package/lib/Adapters/Auth/google.js +160 -51
  15. package/lib/Adapters/Auth/gpgames.js +125 -0
  16. package/lib/Adapters/Auth/httpsRequest.js +6 -7
  17. package/lib/Adapters/Auth/index.js +170 -62
  18. package/lib/Adapters/Auth/instagram.js +114 -40
  19. package/lib/Adapters/Auth/janraincapture.js +52 -23
  20. package/lib/Adapters/Auth/janrainengage.js +19 -36
  21. package/lib/Adapters/Auth/keycloak.js +148 -0
  22. package/lib/Adapters/Auth/ldap.js +167 -0
  23. package/lib/Adapters/Auth/line.js +125 -0
  24. package/lib/Adapters/Auth/linkedin.js +111 -55
  25. package/lib/Adapters/Auth/meetup.js +24 -34
  26. package/lib/Adapters/Auth/mfa.js +324 -0
  27. package/lib/Adapters/Auth/microsoft.js +111 -0
  28. package/lib/Adapters/Auth/oauth2.js +97 -162
  29. package/lib/Adapters/Auth/phantauth.js +53 -0
  30. package/lib/Adapters/Auth/qq.js +108 -49
  31. package/lib/Adapters/Auth/spotify.js +107 -55
  32. package/lib/Adapters/Auth/twitter.js +188 -48
  33. package/lib/Adapters/Auth/utils.js +28 -0
  34. package/lib/Adapters/Auth/vkontakte.js +26 -39
  35. package/lib/Adapters/Auth/wechat.js +106 -44
  36. package/lib/Adapters/Auth/weibo.js +132 -58
  37. package/lib/Adapters/Cache/CacheAdapter.js +13 -8
  38. package/lib/Adapters/Cache/InMemoryCache.js +3 -13
  39. package/lib/Adapters/Cache/InMemoryCacheAdapter.js +5 -13
  40. package/lib/Adapters/Cache/LRUCache.js +13 -27
  41. package/lib/Adapters/Cache/NullCacheAdapter.js +3 -8
  42. package/lib/Adapters/Cache/RedisCacheAdapter.js +85 -76
  43. package/lib/Adapters/Cache/SchemaCache.js +25 -0
  44. package/lib/Adapters/Email/MailAdapter.js +10 -8
  45. package/lib/Adapters/Files/FilesAdapter.js +83 -25
  46. package/lib/Adapters/Files/GridFSBucketAdapter.js +231 -0
  47. package/lib/Adapters/Files/GridStoreAdapter.js +4 -91
  48. package/lib/Adapters/Logger/LoggerAdapter.js +18 -14
  49. package/lib/Adapters/Logger/WinstonLogger.js +69 -88
  50. package/lib/Adapters/Logger/WinstonLoggerAdapter.js +7 -16
  51. package/lib/Adapters/MessageQueue/EventEmitterMQ.js +8 -26
  52. package/lib/Adapters/PubSub/EventEmitterPubSub.js +12 -25
  53. package/lib/Adapters/PubSub/PubSubAdapter.js +34 -0
  54. package/lib/Adapters/PubSub/RedisPubSub.js +42 -19
  55. package/lib/Adapters/Push/PushAdapter.js +14 -7
  56. package/lib/Adapters/Storage/Mongo/MongoCollection.js +137 -45
  57. package/lib/Adapters/Storage/Mongo/MongoSchemaCollection.js +158 -63
  58. package/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js +320 -168
  59. package/lib/Adapters/Storage/Mongo/MongoTransform.js +279 -306
  60. package/lib/Adapters/Storage/Postgres/PostgresClient.js +14 -10
  61. package/lib/Adapters/Storage/Postgres/PostgresConfigParser.js +47 -21
  62. package/lib/Adapters/Storage/Postgres/PostgresStorageAdapter.js +854 -468
  63. package/lib/Adapters/Storage/Postgres/sql/index.js +4 -6
  64. package/lib/Adapters/Storage/StorageAdapter.js +1 -1
  65. package/lib/Adapters/WebSocketServer/WSAdapter.js +35 -0
  66. package/lib/Adapters/WebSocketServer/WSSAdapter.js +66 -0
  67. package/lib/Auth.js +488 -125
  68. package/lib/ClientSDK.js +2 -6
  69. package/lib/Config.js +525 -94
  70. package/lib/Controllers/AdaptableController.js +5 -25
  71. package/lib/Controllers/AnalyticsController.js +22 -23
  72. package/lib/Controllers/CacheController.js +10 -31
  73. package/lib/Controllers/DatabaseController.js +767 -313
  74. package/lib/Controllers/FilesController.js +49 -54
  75. package/lib/Controllers/HooksController.js +80 -84
  76. package/lib/Controllers/LiveQueryController.js +35 -22
  77. package/lib/Controllers/LoggerController.js +22 -58
  78. package/lib/Controllers/ParseGraphQLController.js +293 -0
  79. package/lib/Controllers/PushController.js +58 -49
  80. package/lib/Controllers/SchemaController.js +916 -422
  81. package/lib/Controllers/UserController.js +265 -180
  82. package/lib/Controllers/index.js +90 -125
  83. package/lib/Controllers/types.js +1 -1
  84. package/lib/Deprecator/Deprecations.js +30 -0
  85. package/lib/Deprecator/Deprecator.js +127 -0
  86. package/lib/Error.js +48 -0
  87. package/lib/GraphQL/ParseGraphQLSchema.js +375 -0
  88. package/lib/GraphQL/ParseGraphQLServer.js +214 -0
  89. package/lib/GraphQL/helpers/objectsMutations.js +30 -0
  90. package/lib/GraphQL/helpers/objectsQueries.js +246 -0
  91. package/lib/GraphQL/loaders/configMutations.js +87 -0
  92. package/lib/GraphQL/loaders/configQueries.js +79 -0
  93. package/lib/GraphQL/loaders/defaultGraphQLMutations.js +21 -0
  94. package/lib/GraphQL/loaders/defaultGraphQLQueries.js +23 -0
  95. package/lib/GraphQL/loaders/defaultGraphQLTypes.js +1098 -0
  96. package/lib/GraphQL/loaders/defaultRelaySchema.js +53 -0
  97. package/lib/GraphQL/loaders/filesMutations.js +107 -0
  98. package/lib/GraphQL/loaders/functionsMutations.js +78 -0
  99. package/lib/GraphQL/loaders/parseClassMutations.js +268 -0
  100. package/lib/GraphQL/loaders/parseClassQueries.js +127 -0
  101. package/lib/GraphQL/loaders/parseClassTypes.js +493 -0
  102. package/lib/GraphQL/loaders/schemaDirectives.js +62 -0
  103. package/lib/GraphQL/loaders/schemaMutations.js +162 -0
  104. package/lib/GraphQL/loaders/schemaQueries.js +81 -0
  105. package/lib/GraphQL/loaders/schemaTypes.js +341 -0
  106. package/lib/GraphQL/loaders/usersMutations.js +433 -0
  107. package/lib/GraphQL/loaders/usersQueries.js +90 -0
  108. package/lib/GraphQL/parseGraphQLUtils.js +63 -0
  109. package/lib/GraphQL/transformers/className.js +14 -0
  110. package/lib/GraphQL/transformers/constraintType.js +53 -0
  111. package/lib/GraphQL/transformers/inputType.js +51 -0
  112. package/lib/GraphQL/transformers/mutation.js +274 -0
  113. package/lib/GraphQL/transformers/outputType.js +51 -0
  114. package/lib/GraphQL/transformers/query.js +237 -0
  115. package/lib/GraphQL/transformers/schemaFields.js +99 -0
  116. package/lib/KeyPromiseQueue.js +48 -0
  117. package/lib/LiveQuery/Client.js +25 -33
  118. package/lib/LiveQuery/Id.js +2 -5
  119. package/lib/LiveQuery/ParseCloudCodePublisher.js +26 -23
  120. package/lib/LiveQuery/ParseLiveQueryServer.js +560 -285
  121. package/lib/LiveQuery/ParsePubSub.js +7 -16
  122. package/lib/LiveQuery/ParseWebSocketServer.js +42 -39
  123. package/lib/LiveQuery/QueryTools.js +76 -15
  124. package/lib/LiveQuery/RequestSchema.js +111 -97
  125. package/lib/LiveQuery/SessionTokenCache.js +23 -36
  126. package/lib/LiveQuery/Subscription.js +8 -17
  127. package/lib/LiveQuery/equalObjects.js +2 -3
  128. package/lib/Options/Definitions.js +1355 -382
  129. package/lib/Options/docs.js +301 -62
  130. package/lib/Options/index.js +11 -1
  131. package/lib/Options/parsers.js +14 -10
  132. package/lib/Page.js +44 -0
  133. package/lib/ParseMessageQueue.js +6 -13
  134. package/lib/ParseServer.js +474 -235
  135. package/lib/ParseServerRESTController.js +102 -40
  136. package/lib/PromiseRouter.js +39 -50
  137. package/lib/Push/PushQueue.js +24 -30
  138. package/lib/Push/PushWorker.js +32 -56
  139. package/lib/Push/utils.js +22 -35
  140. package/lib/RestQuery.js +361 -139
  141. package/lib/RestWrite.js +713 -344
  142. package/lib/Routers/AggregateRouter.js +97 -71
  143. package/lib/Routers/AnalyticsRouter.js +8 -14
  144. package/lib/Routers/AudiencesRouter.js +16 -35
  145. package/lib/Routers/ClassesRouter.js +86 -72
  146. package/lib/Routers/CloudCodeRouter.js +28 -37
  147. package/lib/Routers/FeaturesRouter.js +22 -25
  148. package/lib/Routers/FilesRouter.js +266 -171
  149. package/lib/Routers/FunctionsRouter.js +87 -103
  150. package/lib/Routers/GlobalConfigRouter.js +94 -33
  151. package/lib/Routers/GraphQLRouter.js +41 -0
  152. package/lib/Routers/HooksRouter.js +43 -47
  153. package/lib/Routers/IAPValidationRouter.js +57 -70
  154. package/lib/Routers/InstallationsRouter.js +17 -25
  155. package/lib/Routers/LogsRouter.js +10 -25
  156. package/lib/Routers/PagesRouter.js +647 -0
  157. package/lib/Routers/PublicAPIRouter.js +104 -112
  158. package/lib/Routers/PurgeRouter.js +19 -29
  159. package/lib/Routers/PushRouter.js +14 -28
  160. package/lib/Routers/RolesRouter.js +7 -14
  161. package/lib/Routers/SchemasRouter.js +63 -42
  162. package/lib/Routers/SecurityRouter.js +34 -0
  163. package/lib/Routers/SessionsRouter.js +25 -38
  164. package/lib/Routers/UsersRouter.js +463 -190
  165. package/lib/SchemaMigrations/DefinedSchemas.js +379 -0
  166. package/lib/SchemaMigrations/Migrations.js +30 -0
  167. package/lib/Security/Check.js +109 -0
  168. package/lib/Security/CheckGroup.js +44 -0
  169. package/lib/Security/CheckGroups/CheckGroupDatabase.js +44 -0
  170. package/lib/Security/CheckGroups/CheckGroupServerConfig.js +96 -0
  171. package/lib/Security/CheckGroups/CheckGroups.js +21 -0
  172. package/lib/Security/CheckRunner.js +213 -0
  173. package/lib/SharedRest.js +29 -0
  174. package/lib/StatusHandler.js +96 -93
  175. package/lib/TestUtils.js +70 -14
  176. package/lib/Utils.js +468 -0
  177. package/lib/batch.js +74 -40
  178. package/lib/cache.js +8 -8
  179. package/lib/cli/definitions/parse-live-query-server.js +4 -3
  180. package/lib/cli/definitions/parse-server.js +4 -3
  181. package/lib/cli/parse-live-query-server.js +9 -17
  182. package/lib/cli/parse-server.js +49 -47
  183. package/lib/cli/utils/commander.js +20 -29
  184. package/lib/cli/utils/runner.js +31 -32
  185. package/lib/cloud-code/Parse.Cloud.js +711 -36
  186. package/lib/cloud-code/Parse.Server.js +21 -0
  187. package/lib/cryptoUtils.js +6 -11
  188. package/lib/defaults.js +21 -15
  189. package/lib/deprecated.js +1 -1
  190. package/lib/index.js +78 -67
  191. package/lib/logger.js +12 -20
  192. package/lib/middlewares.js +484 -160
  193. package/lib/password.js +10 -6
  194. package/lib/request.js +175 -0
  195. package/lib/requiredParameter.js +4 -3
  196. package/lib/rest.js +157 -82
  197. package/lib/triggers.js +627 -185
  198. package/lib/vendor/README.md +3 -3
  199. package/lib/vendor/mongodbUrl.js +224 -137
  200. package/package.json +135 -57
  201. package/postinstall.js +38 -50
  202. package/public_html/invalid_verification_link.html +3 -3
  203. package/types/@types/@parse/fs-files-adapter/index.d.ts +5 -0
  204. package/types/@types/deepcopy/index.d.ts +5 -0
  205. package/types/LiveQuery/ParseLiveQueryServer.d.ts +40 -0
  206. package/types/Options/index.d.ts +301 -0
  207. package/types/ParseServer.d.ts +65 -0
  208. package/types/eslint.config.mjs +30 -0
  209. package/types/index.d.ts +21 -0
  210. package/types/logger.d.ts +2 -0
  211. package/types/tests.ts +44 -0
  212. package/types/tsconfig.json +24 -0
  213. package/CHANGELOG.md +0 -1246
  214. package/PATENTS +0 -37
  215. package/bin/dev +0 -37
  216. package/lib/.DS_Store +0 -0
  217. package/lib/Adapters/Auth/common.js +0 -2
  218. package/lib/Adapters/Auth/facebookaccountkit.js +0 -69
  219. package/lib/Controllers/SchemaCache.js +0 -97
  220. package/lib/LiveQuery/.DS_Store +0 -0
  221. package/lib/cli/utils/parsers.js +0 -77
  222. package/lib/cloud-code/.DS_Store +0 -0
  223. package/lib/cloud-code/HTTPResponse.js +0 -57
  224. package/lib/cloud-code/Untitled-1 +0 -123
  225. package/lib/cloud-code/httpRequest.js +0 -102
  226. package/lib/cloud-code/team.html +0 -123
  227. package/lib/graphql/ParseClass.js +0 -234
  228. package/lib/graphql/Schema.js +0 -197
  229. package/lib/graphql/index.js +0 -1
  230. package/lib/graphql/types/ACL.js +0 -35
  231. package/lib/graphql/types/Date.js +0 -25
  232. package/lib/graphql/types/File.js +0 -24
  233. package/lib/graphql/types/GeoPoint.js +0 -35
  234. package/lib/graphql/types/JSONObject.js +0 -30
  235. package/lib/graphql/types/NumberInput.js +0 -43
  236. package/lib/graphql/types/NumberQuery.js +0 -42
  237. package/lib/graphql/types/Pointer.js +0 -35
  238. package/lib/graphql/types/QueryConstraint.js +0 -61
  239. package/lib/graphql/types/StringQuery.js +0 -39
  240. package/lib/graphql/types/index.js +0 -110
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse-server",
3
- "version": "2.8.4",
3
+ "version": "8.6.2",
4
4
  "description": "An express module providing a Parse-compatible API server",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
@@ -13,84 +13,162 @@
13
13
  "public_html/",
14
14
  "views/",
15
15
  "LICENSE",
16
- "PATENTS",
16
+ "NOTICE",
17
17
  "postinstall.js",
18
- "README.md"
18
+ "README.md",
19
+ "types"
19
20
  ],
20
- "license": "BSD-3-Clause",
21
+ "license": "Apache-2.0",
21
22
  "dependencies": {
22
- "@parse/fs-files-adapter": "1.0.1",
23
- "@parse/push-adapter": "3.0.0-alpha2",
24
- "@parse/s3-files-adapter": "1.2.1",
25
- "@parse/simple-mailgun-adapter": "1.0.2",
26
- "bcryptjs": "2.4.3",
27
- "body-parser": "1.18.3",
28
- "commander": "2.16.0",
29
- "deepcopy": "1.0.0",
30
- "express": "4.16.2",
23
+ "@apollo/server": "4.12.1",
24
+ "@graphql-tools/merge": "9.0.24",
25
+ "@graphql-tools/schema": "10.0.23",
26
+ "@graphql-tools/utils": "10.8.6",
27
+ "@parse/fs-files-adapter": "3.0.0",
28
+ "@parse/push-adapter": "6.11.0",
29
+ "bcryptjs": "3.0.2",
30
+ "commander": "13.1.0",
31
+ "cors": "2.8.5",
32
+ "deepcopy": "2.1.0",
33
+ "express": "5.2.1",
34
+ "express-rate-limit": "7.5.1",
35
+ "follow-redirects": "1.15.9",
36
+ "graphql": "16.11.0",
37
+ "graphql-list-fields": "2.0.4",
38
+ "graphql-relay": "0.10.2",
39
+ "graphql-upload": "15.0.2",
31
40
  "intersect": "1.0.1",
32
- "lodash": "4.17.5",
33
- "lru-cache": "4.1.2",
34
- "mime": "2.3.1",
35
- "mongodb": "3.1.1",
36
- "parse": "1.11.1",
37
- "pg-promise": "8.4.5",
38
- "redis": "2.8.0",
39
- "request": "2.85.0",
40
- "semver": "5.5.0",
41
+ "jsonwebtoken": "9.0.2",
42
+ "jwks-rsa": "3.2.0",
43
+ "ldapjs": "3.0.7",
44
+ "lodash": "4.17.21",
45
+ "lru-cache": "10.4.0",
46
+ "mime": "4.0.7",
47
+ "mongodb": "6.20.0",
48
+ "mustache": "4.2.0",
49
+ "otpauth": "9.4.0",
50
+ "parse": "7.1.2",
51
+ "path-to-regexp": "6.3.0",
52
+ "pg-monitor": "3.0.0",
53
+ "pg-promise": "12.2.0",
54
+ "pluralize": "8.0.0",
55
+ "punycode": "2.3.1",
56
+ "rate-limit-redis": "4.2.0",
57
+ "redis": "4.7.0",
58
+ "semver": "7.7.2",
59
+ "subscriptions-transport-ws": "0.11.0",
41
60
  "tv4": "1.3.0",
42
- "uuid": "^3.1.0",
43
- "winston": "2.4.1",
44
- "winston-daily-rotate-file": "1.7.2",
45
- "ws": "6.0.0"
61
+ "uuid": "11.1.0",
62
+ "winston": "3.17.0",
63
+ "winston-daily-rotate-file": "5.0.0",
64
+ "ws": "8.18.2"
46
65
  },
47
66
  "devDependencies": {
48
- "babel-cli": "6.26.0",
49
- "babel-core": "6.26.0",
50
- "babel-eslint": "^8.2.2",
51
- "babel-plugin-transform-flow-strip-types": "6.22.0",
52
- "babel-plugin-transform-object-rest-spread": "^6.26.0",
53
- "babel-preset-env": "1.6.1",
54
- "bcrypt-nodejs": "0.0.3",
55
- "cross-env": "5.2.0",
56
- "deep-diff": "1.0.1",
57
- "eslint": "^5.0.0",
58
- "eslint-plugin-flowtype": "^2.39.1",
59
- "flow-bin": "^0.76.0",
60
- "gaze": "1.1.3",
61
- "jasmine": "3.1.0",
62
- "jasmine-spec-reporter": "^4.1.0",
63
- "mongodb-runner": "4.0.0",
64
- "nodemon": "1.18.1",
65
- "nyc": "^12.0.2",
66
- "request-promise": "4.2.2",
67
- "supports-color": "^5.4.0"
67
+ "@actions/core": "1.11.1",
68
+ "@apollo/client": "3.13.8",
69
+ "@babel/cli": "7.27.0",
70
+ "@babel/core": "7.27.4",
71
+ "@babel/eslint-parser": "7.28.0",
72
+ "@babel/plugin-proposal-object-rest-spread": "7.20.7",
73
+ "@babel/plugin-transform-flow-strip-types": "7.26.5",
74
+ "@babel/preset-env": "7.27.2",
75
+ "@babel/preset-typescript": "7.27.1",
76
+ "@saithodev/semantic-release-backmerge": "4.0.1",
77
+ "@semantic-release/changelog": "6.0.3",
78
+ "@semantic-release/commit-analyzer": "13.0.1",
79
+ "@semantic-release/git": "10.0.1",
80
+ "@semantic-release/github": "11.0.2",
81
+ "@semantic-release/npm": "12.0.1",
82
+ "@semantic-release/release-notes-generator": "14.0.3",
83
+ "all-node-versions": "13.0.1",
84
+ "apollo-upload-client": "18.0.1",
85
+ "clean-jsdoc-theme": "4.3.0",
86
+ "cross-env": "7.0.3",
87
+ "deep-diff": "1.0.2",
88
+ "eslint": "9.27.0",
89
+ "eslint-plugin-expect-type": "0.6.2",
90
+ "eslint-plugin-unused-imports": "4.3.0",
91
+ "form-data": "4.0.4",
92
+ "globals": "16.2.0",
93
+ "graphql-tag": "2.12.6",
94
+ "jasmine": "5.7.1",
95
+ "jasmine-spec-reporter": "7.0.0",
96
+ "jsdoc": "4.0.4",
97
+ "jsdoc-babel": "0.5.0",
98
+ "lint-staged": "16.1.0",
99
+ "m": "1.9.1",
100
+ "madge": "8.0.0",
101
+ "mock-files-adapter": "file:spec/dependencies/mock-files-adapter",
102
+ "mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter",
103
+ "mongodb-runner": "5.9.3",
104
+ "node-abort-controller": "3.1.1",
105
+ "node-fetch": "3.2.10",
106
+ "nyc": "17.1.0",
107
+ "prettier": "2.0.5",
108
+ "semantic-release": "24.2.5",
109
+ "typescript": "5.8.3",
110
+ "typescript-eslint": "8.33.1",
111
+ "yaml": "2.8.0"
68
112
  },
69
113
  "scripts": {
70
- "dev": "npm run build && node bin/dev",
71
- "lint": "flow && eslint --cache ./",
72
- "build": "babel src/ -d lib/ --copy-files",
114
+ "ci:check": "node ./ci/ciCheck.js",
115
+ "ci:checkNodeEngine": "node ./ci/nodeEngineCheck.js",
116
+ "ci:definitionsCheck": "node ./ci/definitionsCheck.js",
117
+ "definitions": "node ./resources/buildConfigDefinitions.js && prettier --write 'src/Options/*.js'",
118
+ "docs": "jsdoc -c ./jsdoc-conf.json",
119
+ "lint": "eslint --cache ./ --flag unstable_config_lookup_from_file",
120
+ "lint-fix": "eslint --fix --cache ./ --flag unstable_config_lookup_from_file",
121
+ "build": "babel src/ -d lib/ --copy-files --extensions '.ts,.js'",
122
+ "build:types": "tsc",
73
123
  "watch": "babel --watch src/ -d lib/ --copy-files",
74
- "pretest": "npm run lint",
75
- "test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 jasmine",
76
- "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 TESTING=1 nyc jasmine",
124
+ "watch:ts": "tsc --watch",
125
+ "test:mongodb:6.0.19": "MONGODB_VERSION=6.0.19 npm run test",
126
+ "test:mongodb:7.0.16": "MONGODB_VERSION=7.0.16 npm run test",
127
+ "test:mongodb:8.0.4": "MONGODB_VERSION=8.0.4 npm run test",
128
+ "test:postgres:testonly": "cross-env PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://postgres:password@localhost:5432/parse_server_postgres_adapter_test_database npm run testonly",
129
+ "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
130
+ "test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner exec -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017 -- npm run testonly",
131
+ "test:types": "eslint types/tests.ts -c ./types/eslint.config.mjs",
132
+ "coverage:mongodb": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner exec -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017 -- npm run coverage",
133
+ "coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine",
77
134
  "start": "node ./bin/parse-server",
135
+ "prettier": "prettier --write {src,spec}/{**/*,*}.js",
78
136
  "prepare": "npm run build",
79
- "postinstall": "node -p 'require(\"./postinstall.js\")()'"
137
+ "postinstall": "node -p 'require(\"./postinstall.js\")()'",
138
+ "madge:circular": "node_modules/.bin/madge ./src --circular",
139
+ "benchmark": "cross-env MONGODB_VERSION=8.0.4 MONGODB_TOPOLOGY=standalone mongodb-runner exec -t standalone --version 8.0.4 -- --port 27017 -- npm run benchmark:only",
140
+ "benchmark:only": "node benchmark/performance.js",
141
+ "benchmark:quick": "cross-env BENCHMARK_ITERATIONS=10 npm run benchmark:only"
80
142
  },
143
+ "types": "types/index.d.ts",
81
144
  "engines": {
82
- "node": ">= 8"
145
+ "node": ">=18.20.4 <19.0.0 || >=20.18.0 <21.0.0 || >=22.12.0 <23.0.0 || >=24.11.0 <25.0.0"
83
146
  },
84
147
  "bin": {
85
- "parse-server": "./bin/parse-server"
148
+ "parse-server": "bin/parse-server"
86
149
  },
87
150
  "optionalDependencies": {
88
- "bcrypt": "3.0.0",
89
- "uws": "10.148.1"
151
+ "@node-rs/bcrypt": "1.10.7"
90
152
  },
91
153
  "collective": {
92
154
  "type": "opencollective",
93
155
  "url": "https://opencollective.com/parse-server",
94
156
  "logo": "https://opencollective.com/parse-server/logo.txt?reverse=true&variant=binary"
157
+ },
158
+ "funding": {
159
+ "type": "opencollective",
160
+ "url": "https://opencollective.com/parse-server"
161
+ },
162
+ "husky": {
163
+ "hooks": {
164
+ "pre-commit": "lint-staged"
165
+ }
166
+ },
167
+ "lint-staged": {
168
+ "{src,spec}/{**/*,*}.js": [
169
+ "prettier --write",
170
+ "eslint --fix --cache",
171
+ "git add"
172
+ ]
95
173
  }
96
174
  }
package/postinstall.js CHANGED
@@ -1,50 +1,38 @@
1
- const pkg = require('./package.json');
2
-
3
- const version = parseFloat(process.version.substr(1));
4
- const minimum = parseFloat(pkg.engines.node.match(/\d+/g).join('.'));
5
-
6
- module.exports = function () {
7
- const openCollective = `
8
- 1111111111
9
- 1111111111111111
10
- 1111111111111111111111
11
- 11111111111111111111111111
12
- 111111111111111 11111111
13
- 1111111111111 111111
14
- 1111111111111 111111111 111111
15
- 111111111111 11111111111 111111
16
- 1111111111111 11111111111 111111
17
- 1111111111111 1111111111 111111
18
- 1111111111111111111111111 1111111
19
- 11111111 11111111
20
- 111111 1111111111111111111
21
- 11111 11111 111111111111111111
22
- 11111 11111111111111111
23
- 111111 111111111111111111
24
- 11111111111111111111111111
25
- 1111111111111111111111
26
- 111111111111111111
27
- 11111111111
28
-
29
-
30
- Thanks for installing parse 🙏
31
- Please consider donating to our open collective
32
- to help us maintain this package.
33
-
34
- 👉 https://opencollective.com/parse-server
35
-
36
- `;
37
- process.stdout.write(openCollective);
38
- if (version >= minimum) {
39
- process.exit(0);
40
- }
41
-
42
- const errorMessage = `
43
- ⚠️ parse-server requires at least node@${minimum}!
44
- You have node@${version}
45
-
46
- `;
47
-
48
- process.stdout.write(errorMessage);
49
- process.exit(1);
50
- };
1
+ const message = `
2
+ 1111111111
3
+ 1111111111111111
4
+ 1111111111111111111111
5
+ 11111111111111111111111111
6
+ 111111111111111 11111111
7
+ 1111111111111 111 111111
8
+ 1111111111111 111111111 111111
9
+ 111111111111 11111111111 111111
10
+ 1111111111111 11111111111 111111
11
+ 1111111111111 1111111111 111111
12
+ 1111111111111111111111111 1111111
13
+ 11111111 11111111
14
+ 111111 111 1111111111111111111
15
+ 11111 11111 111111111111111111
16
+ 11111 1 11111111111111111
17
+ 111111 111111111111111111
18
+ 11111111111111111111111111
19
+ 1111111111111111111111
20
+ 111111111111111111
21
+ 11111111111
22
+
23
+ Thank you for using Parse Platform!
24
+ https://parseplatform.org
25
+
26
+ Please consider donating to help us maintain
27
+ this package:
28
+
29
+ 👉 https://opencollective.com/parse-server 👈
30
+
31
+ `;
32
+
33
+ function main() {
34
+ process.stdout.write(message);
35
+ process.exit(0);
36
+ }
37
+
38
+ module.exports = main;
@@ -47,8 +47,8 @@
47
47
  window.onload = addDataToForm;
48
48
 
49
49
  function addDataToForm() {
50
- var username = getUrlParameter("username");
51
- document.getElementById("usernameField").value = username;
50
+ const token = getUrlParameter("token");
51
+ document.getElementById("token").value = token;
52
52
 
53
53
  var appId = getUrlParameter("appId");
54
54
  document.getElementById("resendForm").action = '/apps/' + appId + '/resend_verification_email'
@@ -60,7 +60,7 @@
60
60
  <div class="container">
61
61
  <h1>Invalid Verification Link</h1>
62
62
  <form id="resendForm" method="POST" action="/resend_verification_email">
63
- <input id="usernameField" class="form-control" name="username" type="hidden" value="">
63
+ <input id="token" class="form-control" name="token" type="hidden" value="">
64
64
  <button type="submit" class="btn btn-default">Resend Link</button>
65
65
  </form>
66
66
  </div>
@@ -0,0 +1,5 @@
1
+ // TODO: Remove when @parse/fs-files-adapter is typed
2
+ declare module '@parse/fs-files-adapter' {
3
+ const FileSystemAdapter: any;
4
+ export default FileSystemAdapter;
5
+ }
@@ -0,0 +1,5 @@
1
+ // TODO: Remove when https://github.com/sasaplus1/deepcopy.js/issues/278 is fixed
2
+ declare type Customizer = (value: any, valueType: string) => unknown;
3
+ declare type Options = Customizer | { customizer: Customizer };
4
+ declare function deepcopy<T>(value: T, options?: Options): T;
5
+ export default deepcopy;
@@ -0,0 +1,40 @@
1
+ import { Auth } from '../Auth';
2
+ declare class ParseLiveQueryServer {
3
+ server: any;
4
+ config: any;
5
+ clients: Map<string, any>;
6
+ subscriptions: Map<string, any>;
7
+ parseWebSocketServer: any;
8
+ keyPairs: any;
9
+ subscriber: any;
10
+ authCache: any;
11
+ cacheController: any;
12
+ constructor(server: any, config?: any, parseServerConfig?: any);
13
+ connect(): Promise<void>;
14
+ shutdown(): Promise<void>;
15
+ _createSubscribers(): void;
16
+ _inflateParseObject(message: any): void;
17
+ _onAfterDelete(message: any): Promise<void>;
18
+ _onAfterSave(message: any): Promise<void>;
19
+ _onConnect(parseWebsocket: any): void;
20
+ _matchesSubscription(parseObject: any, subscription: any): boolean;
21
+ _clearCachedRoles(userId: string): Promise<void>;
22
+ getAuthForSessionToken(sessionToken?: string): Promise<{
23
+ auth?: Auth;
24
+ userId?: string;
25
+ }>;
26
+ _matchesCLP(classLevelPermissions?: any, object?: any, client?: any, requestId?: number, op?: string): Promise<any>;
27
+ _filterSensitiveData(classLevelPermissions?: any, res?: any, client?: any, requestId?: number, op?: string, query?: any): Promise<void>;
28
+ _getCLPOperation(query: any): "get" | "find";
29
+ _verifyACL(acl: any, token: string): Promise<boolean>;
30
+ getAuthFromClient(client: any, requestId: number, sessionToken?: string): Promise<Auth>;
31
+ _checkWatchFields(client: any, requestId: any, message: any): any;
32
+ _matchesACL(acl: any, client: any, requestId: number): Promise<boolean>;
33
+ _handleConnect(parseWebsocket: any, request: any): Promise<any>;
34
+ _hasMasterKey(request: any, validKeyPairs: any): boolean;
35
+ _validateKeys(request: any, validKeyPairs: any): boolean;
36
+ _handleSubscribe(parseWebsocket: any, request: any): Promise<any>;
37
+ _handleUpdateSubscription(parseWebsocket: any, request: any): any;
38
+ _handleUnsubscribe(parseWebsocket: any, request: any, notifyClient?: boolean): any;
39
+ }
40
+ export { ParseLiveQueryServer };