mirror of
https://github.com/parse-community/parse-server
synced 2026-08-09 13:03:18 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b50f704e0a | ||
|
|
9fc0bfbe3e | ||
|
|
b2df7417cf | ||
|
|
1364988f45 | ||
|
|
0769215d4c | ||
|
|
79204f73f4 | ||
|
|
20f2071591 | ||
|
|
6114cd9792 | ||
|
|
6cf28762ae | ||
|
|
74dfc4e9bf | ||
|
|
ae16aba2cd | ||
|
|
0fb0c07fa3 | ||
|
|
5447c222c8 | ||
|
|
4ac8aef940 | ||
|
|
82ab3f9a38 |
+22
-17
@@ -8,7 +8,7 @@ on:
|
||||
paths-ignore:
|
||||
- '**/**.md'
|
||||
env:
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
PARSE_SERVER_TEST_TIMEOUT: 20000
|
||||
permissions:
|
||||
actions: write
|
||||
@@ -145,32 +145,32 @@ jobs:
|
||||
- name: MongoDB 4.2, ReplicaSet
|
||||
MONGODB_VERSION: 4.2.25
|
||||
MONGODB_TOPOLOGY: replset
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: MongoDB 4.4, ReplicaSet
|
||||
MONGODB_VERSION: 4.4.29
|
||||
MONGODB_TOPOLOGY: replset
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: MongoDB 5, ReplicaSet
|
||||
MONGODB_VERSION: 5.0.26
|
||||
MONGODB_TOPOLOGY: replset
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: MongoDB 6, ReplicaSet
|
||||
MONGODB_VERSION: 6.0.14
|
||||
MONGODB_TOPOLOGY: replset
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: MongoDB 7, ReplicaSet
|
||||
MONGODB_VERSION: 7.0.8
|
||||
MONGODB_TOPOLOGY: replset
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: MongoDB 8, ReplicaSet
|
||||
MONGODB_VERSION: 8.0.0
|
||||
MONGODB_TOPOLOGY: replset
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: Redis Cache
|
||||
PARSE_SERVER_TEST_CACHE: redis
|
||||
MONGODB_VERSION: 8.0.0
|
||||
MONGODB_TOPOLOGY: standalone
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: Node 20
|
||||
MONGODB_VERSION: 8.0.0
|
||||
MONGODB_TOPOLOGY: standalone
|
||||
@@ -211,6 +211,11 @@ jobs:
|
||||
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- run: |
|
||||
if [[ "$MONGODB_VERSION" == "4."* || "$MONGODB_VERSION" == "5."* ]]; then
|
||||
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
|
||||
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
|
||||
fi
|
||||
- run: npm run pretest
|
||||
- run: npm run coverage
|
||||
env:
|
||||
@@ -227,31 +232,31 @@ jobs:
|
||||
include:
|
||||
- name: PostgreSQL 13, PostGIS 3.1
|
||||
POSTGRES_IMAGE: postgis/postgis:13-3.1
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 13, PostGIS 3.2
|
||||
POSTGRES_IMAGE: postgis/postgis:13-3.2
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 13, PostGIS 3.3
|
||||
POSTGRES_IMAGE: postgis/postgis:13-3.3
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 13, PostGIS 3.4
|
||||
POSTGRES_IMAGE: postgis/postgis:13-3.4
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 13, PostGIS 3.5
|
||||
POSTGRES_IMAGE: postgis/postgis:13-3.5
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 14, PostGIS 3.5
|
||||
POSTGRES_IMAGE: postgis/postgis:14-3.5
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 15, PostGIS 3.5
|
||||
POSTGRES_IMAGE: postgis/postgis:15-3.5
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 16, PostGIS 3.5
|
||||
POSTGRES_IMAGE: postgis/postgis:16-3.5
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
- name: PostgreSQL 17, PostGIS 3.5
|
||||
POSTGRES_IMAGE: postgis/postgis:17-3.5
|
||||
NODE_VERSION: 22.4.1
|
||||
NODE_VERSION: 22.12.0
|
||||
fail-fast: false
|
||||
name: ${{ matrix.name }}
|
||||
timeout-minutes: 20
|
||||
|
||||
+3
-4
@@ -33,7 +33,7 @@ async function config() {
|
||||
console.log(`Running on branch: ${branch}`);
|
||||
|
||||
// Set changelog file
|
||||
const changelogFile = `./changelogs/CHANGELOG_${branch}.md`;
|
||||
const changelogFile = `./changelogs/CHANGELOG_release.md`;
|
||||
console.log(`Changelog file output to: ${changelogFile}`);
|
||||
|
||||
// Load template file contents
|
||||
@@ -44,9 +44,8 @@ async function config() {
|
||||
'release',
|
||||
{ name: 'alpha', prerelease: true },
|
||||
{ name: 'beta', prerelease: true },
|
||||
'next-major',
|
||||
// Long-Term-Support branch of previous major version
|
||||
'release-6.x.x',
|
||||
// Long-Term-Support branch
|
||||
{ name: 'release-7.x.x', range: '7.x.x', channel: '7.x.x' },
|
||||
],
|
||||
dryRun: false,
|
||||
debug: true,
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
# Build stage
|
||||
############################################################
|
||||
FROM node:20.17.0-alpine3.20 AS build
|
||||
FROM node:20.19.0-alpine3.20 AS build
|
||||
|
||||
RUN apk --no-cache add \
|
||||
build-base \
|
||||
@@ -28,7 +28,7 @@ RUN npm ci --omit=dev --ignore-scripts \
|
||||
############################################################
|
||||
# Release stage
|
||||
############################################################
|
||||
FROM node:20.17.0-alpine3.20 AS release
|
||||
FROM node:20.19.0-alpine3.20 AS release
|
||||
|
||||
VOLUME /parse-server/cloud /parse-server/config
|
||||
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
## [7.5.1](https://github.com/parse-community/parse-server/compare/7.5.0...7.5.1) (2025-03-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Security upgrade node from 20.18.2-alpine3.20 to 20.19.0-alpine3.20 ([#9646](https://github.com/parse-community/parse-server/issues/9646)) ([9fc0bfb](https://github.com/parse-community/parse-server/commit/9fc0bfbe3e176bfec521c2bf195dbc185218ad60))
|
||||
|
||||
# [7.5.0](https://github.com/parse-community/parse-server/compare/7.4.0...7.5.0) (2025-03-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* LiveQueryServer crashes using cacheAdapter on disconnect from Redis 4 server ([#9615](https://github.com/parse-community/parse-server/issues/9615)) ([0769215](https://github.com/parse-community/parse-server/commit/0769215d4c1dba347fda1f6b2268c3c92019dcec))
|
||||
* Push adapter not loading on some versions of Node 22 ([#9525](https://github.com/parse-community/parse-server/issues/9525)) ([5447c22](https://github.com/parse-community/parse-server/commit/5447c222c8e2460c1edd47cc8e3bea4d4b43abed))
|
||||
* Security upgrade node from 20.17.0-alpine3.20 to 20.18.2-alpine3.20 ([#9597](https://github.com/parse-community/parse-server/issues/9597)) ([6114cd9](https://github.com/parse-community/parse-server/commit/6114cd9792e2cb16a56fb36ff61b99356b35f091))
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for MongoDB `databaseOptions` keys `minPoolSize`, `connectTimeoutMS`, `socketTimeoutMS`, `autoSelectFamily`, `autoSelectFamilyAttemptTimeout` ([#9577](https://github.com/parse-community/parse-server/issues/9577)) ([20f2071](https://github.com/parse-community/parse-server/commit/20f2071591a2828860998b3e3ad587a0eba33e9b))
|
||||
|
||||
# [7.4.0](https://github.com/parse-community/parse-server/compare/7.3.0...7.4.0) (2024-12-23)
|
||||
|
||||
|
||||
|
||||
Generated
+45
-40
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"name": "parse-server",
|
||||
"version": "7.4.0",
|
||||
"version": "7.5.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "parse-server",
|
||||
"version": "7.4.0",
|
||||
"version": "7.5.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@apollo/server": "4.11.2",
|
||||
"@babel/eslint-parser": "7.25.9",
|
||||
"@graphql-tools/merge": "9.0.14",
|
||||
"@babel/eslint-parser": "7.26.5",
|
||||
"@graphql-tools/merge": "9.0.17",
|
||||
"@graphql-tools/schema": "10.0.13",
|
||||
"@graphql-tools/utils": "10.6.3",
|
||||
"@parse/fs-files-adapter": "3.0.0",
|
||||
@@ -36,7 +36,7 @@
|
||||
"ldapjs": "3.0.7",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "10.4.0",
|
||||
"mime": "4.0.4",
|
||||
"mime": "4.0.6",
|
||||
"mongodb": "6.12.0",
|
||||
"mustache": "4.2.0",
|
||||
"otpauth": "9.3.5",
|
||||
@@ -48,7 +48,7 @@
|
||||
"punycode": "2.3.1",
|
||||
"rate-limit-redis": "4.2.0",
|
||||
"redis": "4.7.0",
|
||||
"semver": "7.6.3",
|
||||
"semver": "^7.7.1",
|
||||
"subscriptions-transport-ws": "0.11.0",
|
||||
"tv4": "1.3.0",
|
||||
"uuid": "11.0.3",
|
||||
@@ -638,9 +638,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/eslint-parser": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz",
|
||||
"integrity": "sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ==",
|
||||
"version": "7.26.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.26.5.tgz",
|
||||
"integrity": "sha512-Kkm8C8uxI842AwQADxl0GbcG1rupELYLShazYEZO/2DYjhyWXJIOUVOE3tBYm6JXzUCNJOZEzqc4rCW/jsEQYQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1",
|
||||
"eslint-visitor-keys": "^2.1.0",
|
||||
@@ -2546,11 +2547,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@graphql-tools/merge": {
|
||||
"version": "9.0.14",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.14.tgz",
|
||||
"integrity": "sha512-MO7VXnm3ShpdG51hs4hYsLyu+8o/tSLjNYQmLmR4rkHoFi3kQCDu2r8B4IVwd+Ve39cechj0NyCmMsg+mRvwDQ==",
|
||||
"version": "9.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.17.tgz",
|
||||
"integrity": "sha512-3K4g8KKbIqfdmK0L5+VtZsqwAeElPkvT5ejiH+KEhn2wyKNCi4HYHxpQk8xbu+dSwLlm9Lhet1hylpo/mWCkuQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@graphql-tools/utils": "^10.6.4",
|
||||
"@graphql-tools/utils": "^10.7.2",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2561,13 +2563,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils": {
|
||||
"version": "10.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.6.4.tgz",
|
||||
"integrity": "sha512-itCgjwVxbO+3uI/K73G9heedG8KelNFzgn368rUhPjTrkJX6NyLQwT5EMq/A8tvazMXyJYdtnN5nD+tT4DUpbQ==",
|
||||
"version": "10.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.7.2.tgz",
|
||||
"integrity": "sha512-Wn85S+hfkzfVFpXVrQ0hjnePa3p28aB6IdAGCiD1SqBCSMDRzL+OFEtyAyb30nV9Mqflqs9lCqjqlR2puG857Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@graphql-typed-document-node/core": "^3.1.1",
|
||||
"cross-inspect": "1.0.1",
|
||||
"dset": "^3.1.2",
|
||||
"dset": "^3.1.4",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -13188,12 +13191,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/mime": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz",
|
||||
"integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==",
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.6.tgz",
|
||||
"integrity": "sha512-4rGt7rvQHBbaSOF9POGkk1ocRP16Md1x36Xma8sz8h8/vfCUI2OtEIeCqe4Ofes853x4xDoPiFLIT47J5fI/7A==",
|
||||
"funding": [
|
||||
"https://github.com/sponsors/broofa"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"mime": "bin/cli.js"
|
||||
},
|
||||
@@ -18964,9 +18968,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
@@ -21565,9 +21570,9 @@
|
||||
}
|
||||
},
|
||||
"@babel/eslint-parser": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz",
|
||||
"integrity": "sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ==",
|
||||
"version": "7.26.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.26.5.tgz",
|
||||
"integrity": "sha512-Kkm8C8uxI842AwQADxl0GbcG1rupELYLShazYEZO/2DYjhyWXJIOUVOE3tBYm6JXzUCNJOZEzqc4rCW/jsEQYQ==",
|
||||
"requires": {
|
||||
"@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1",
|
||||
"eslint-visitor-keys": "^2.1.0",
|
||||
@@ -22892,22 +22897,22 @@
|
||||
}
|
||||
},
|
||||
"@graphql-tools/merge": {
|
||||
"version": "9.0.14",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.14.tgz",
|
||||
"integrity": "sha512-MO7VXnm3ShpdG51hs4hYsLyu+8o/tSLjNYQmLmR4rkHoFi3kQCDu2r8B4IVwd+Ve39cechj0NyCmMsg+mRvwDQ==",
|
||||
"version": "9.0.17",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-9.0.17.tgz",
|
||||
"integrity": "sha512-3K4g8KKbIqfdmK0L5+VtZsqwAeElPkvT5ejiH+KEhn2wyKNCi4HYHxpQk8xbu+dSwLlm9Lhet1hylpo/mWCkuQ==",
|
||||
"requires": {
|
||||
"@graphql-tools/utils": "^10.6.4",
|
||||
"@graphql-tools/utils": "^10.7.2",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@graphql-tools/utils": {
|
||||
"version": "10.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.6.4.tgz",
|
||||
"integrity": "sha512-itCgjwVxbO+3uI/K73G9heedG8KelNFzgn368rUhPjTrkJX6NyLQwT5EMq/A8tvazMXyJYdtnN5nD+tT4DUpbQ==",
|
||||
"version": "10.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.7.2.tgz",
|
||||
"integrity": "sha512-Wn85S+hfkzfVFpXVrQ0hjnePa3p28aB6IdAGCiD1SqBCSMDRzL+OFEtyAyb30nV9Mqflqs9lCqjqlR2puG857Q==",
|
||||
"requires": {
|
||||
"@graphql-typed-document-node/core": "^3.1.1",
|
||||
"cross-inspect": "1.0.1",
|
||||
"dset": "^3.1.2",
|
||||
"dset": "^3.1.4",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
}
|
||||
@@ -30639,9 +30644,9 @@
|
||||
}
|
||||
},
|
||||
"mime": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz",
|
||||
"integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ=="
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-4.0.6.tgz",
|
||||
"integrity": "sha512-4rGt7rvQHBbaSOF9POGkk1ocRP16Md1x36Xma8sz8h8/vfCUI2OtEIeCqe4Ofes853x4xDoPiFLIT47J5fI/7A=="
|
||||
},
|
||||
"mime-db": {
|
||||
"version": "1.52.0",
|
||||
@@ -34612,9 +34617,9 @@
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="
|
||||
},
|
||||
"semver-diff": {
|
||||
"version": "4.0.0",
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "parse-server",
|
||||
"version": "7.4.0",
|
||||
"version": "7.5.1",
|
||||
"description": "An express module providing a Parse-compatible API server",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
@@ -20,8 +20,8 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@apollo/server": "4.11.2",
|
||||
"@babel/eslint-parser": "7.25.9",
|
||||
"@graphql-tools/merge": "9.0.14",
|
||||
"@babel/eslint-parser": "7.26.5",
|
||||
"@graphql-tools/merge": "9.0.17",
|
||||
"@graphql-tools/schema": "10.0.13",
|
||||
"@graphql-tools/utils": "10.6.3",
|
||||
"@parse/fs-files-adapter": "3.0.0",
|
||||
@@ -45,7 +45,7 @@
|
||||
"ldapjs": "3.0.7",
|
||||
"lodash": "4.17.21",
|
||||
"lru-cache": "10.4.0",
|
||||
"mime": "4.0.4",
|
||||
"mime": "4.0.6",
|
||||
"mongodb": "6.12.0",
|
||||
"mustache": "4.2.0",
|
||||
"otpauth": "9.3.5",
|
||||
@@ -57,7 +57,7 @@
|
||||
"punycode": "2.3.1",
|
||||
"rate-limit-redis": "4.2.0",
|
||||
"redis": "4.7.0",
|
||||
"semver": "7.6.3",
|
||||
"semver": "7.7.1",
|
||||
"subscriptions-transport-ws": "0.11.0",
|
||||
"tv4": "1.3.0",
|
||||
"uuid": "11.0.3",
|
||||
|
||||
@@ -81,6 +81,11 @@ describe('Config Keys', () => {
|
||||
maxTimeMS: 1000,
|
||||
maxStalenessSeconds: 10,
|
||||
maxPoolSize: 10,
|
||||
minPoolSize: 5,
|
||||
connectTimeoutMS: 5000,
|
||||
socketTimeoutMS: 5000,
|
||||
autoSelectFamily: true,
|
||||
autoSelectFamilyAttemptTimeout: 3000
|
||||
},
|
||||
})).toBeResolved();
|
||||
expect(loggerErrorSpy.calls.all().reduce((s, call) => s += call.args[0], '')).not.toMatch(invalidKeyErrorMessage);
|
||||
|
||||
@@ -3,7 +3,10 @@ const RedisPubSub = require('../lib/Adapters/PubSub/RedisPubSub').RedisPubSub;
|
||||
describe('RedisPubSub', function () {
|
||||
beforeEach(function (done) {
|
||||
// Mock redis
|
||||
const createClient = jasmine.createSpy('createClient');
|
||||
const createClient = jasmine.createSpy('createClient').and.returnValue({
|
||||
connect: jasmine.createSpy('connect').and.resolveTo(),
|
||||
on: jasmine.createSpy('on'),
|
||||
});
|
||||
jasmine.mockLibrary('redis', 'createClient', createClient);
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -47,20 +47,8 @@ export function loadAdapter<T>(adapter, defaultAdapter, options): T {
|
||||
}
|
||||
|
||||
export async function loadModule(modulePath) {
|
||||
let module;
|
||||
try {
|
||||
module = require(modulePath);
|
||||
} catch (err) {
|
||||
if (err.code === 'ERR_REQUIRE_ESM') {
|
||||
module = await import(modulePath);
|
||||
if (module.default) {
|
||||
module = module.default;
|
||||
}
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
return module;
|
||||
const module = await import(modulePath);
|
||||
return module?.default || module;
|
||||
}
|
||||
|
||||
export default loadAdapter;
|
||||
|
||||
@@ -27,7 +27,7 @@ export class RedisCacheAdapter {
|
||||
if (this.client.isOpen) {
|
||||
return;
|
||||
}
|
||||
return this.client.connect();
|
||||
return await this.client.connect();
|
||||
}
|
||||
|
||||
async handleShutdown() {
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
import { createClient } from 'redis';
|
||||
import { logger } from '../../logger';
|
||||
|
||||
function createPublisher({ redisURL, redisOptions = {} }): any {
|
||||
redisOptions.no_ready_check = true;
|
||||
return createClient({ url: redisURL, ...redisOptions });
|
||||
const client = createClient({ url: redisURL, ...redisOptions });
|
||||
client.on('error', err => { logger.error('RedisPubSub Publisher client error', { error: err }) });
|
||||
client.on('connect', () => {});
|
||||
client.on('reconnecting', () => {});
|
||||
client.on('ready', () => {});
|
||||
return client;
|
||||
}
|
||||
|
||||
function createSubscriber({ redisURL, redisOptions = {} }): any {
|
||||
redisOptions.no_ready_check = true;
|
||||
return createClient({ url: redisURL, ...redisOptions });
|
||||
const client = createClient({ url: redisURL, ...redisOptions });
|
||||
client.on('error', err => { logger.error('RedisPubSub Subscriber client error', { error: err }) });
|
||||
client.on('connect', () => {});
|
||||
client.on('reconnecting', () => {});
|
||||
client.on('ready', () => {});
|
||||
return client;
|
||||
}
|
||||
|
||||
const RedisPubSub = {
|
||||
|
||||
@@ -1044,6 +1044,24 @@ module.exports.FileUploadOptions = {
|
||||
},
|
||||
};
|
||||
module.exports.DatabaseOptions = {
|
||||
autoSelectFamily: {
|
||||
env: 'PARSE_SERVER_DATABASE_AUTO_SELECT_FAMILY',
|
||||
help:
|
||||
'The MongoDB driver option to set whether the socket attempts to connect to IPv6 and IPv4 addresses until a connection is established. If available, the driver will select the first IPv6 address.',
|
||||
action: parsers.booleanParser,
|
||||
},
|
||||
autoSelectFamilyAttemptTimeout: {
|
||||
env: 'PARSE_SERVER_DATABASE_AUTO_SELECT_FAMILY_ATTEMPT_TIMEOUT',
|
||||
help:
|
||||
'The MongoDB driver option to specify the amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the autoSelectFamily option. If set to a positive integer less than 10, the value 10 is used instead.',
|
||||
action: parsers.numberParser('autoSelectFamilyAttemptTimeout'),
|
||||
},
|
||||
connectTimeoutMS: {
|
||||
env: 'PARSE_SERVER_DATABASE_CONNECT_TIMEOUT_MS',
|
||||
help:
|
||||
'The MongoDB driver option to specify the amount of time, in milliseconds, to wait to establish a single TCP socket connection to the server before raising an error. Specifying 0 disables the connection timeout.',
|
||||
action: parsers.numberParser('connectTimeoutMS'),
|
||||
},
|
||||
enableSchemaHooks: {
|
||||
env: 'PARSE_SERVER_DATABASE_ENABLE_SCHEMA_HOOKS',
|
||||
help:
|
||||
@@ -1069,6 +1087,12 @@ module.exports.DatabaseOptions = {
|
||||
'The MongoDB driver option to set a cumulative time limit in milliseconds for processing operations on a cursor.',
|
||||
action: parsers.numberParser('maxTimeMS'),
|
||||
},
|
||||
minPoolSize: {
|
||||
env: 'PARSE_SERVER_DATABASE_MIN_POOL_SIZE',
|
||||
help:
|
||||
'The MongoDB driver option to set the minimum number of opened, cached, ready-to-use database connections maintained by the driver.',
|
||||
action: parsers.numberParser('minPoolSize'),
|
||||
},
|
||||
retryWrites: {
|
||||
env: 'PARSE_SERVER_DATABASE_RETRY_WRITES',
|
||||
help: 'The MongoDB driver option to set whether to retry failed writes.',
|
||||
@@ -1080,6 +1104,12 @@ module.exports.DatabaseOptions = {
|
||||
'The duration in seconds after which the schema cache expires and will be refetched from the database. Use this option if using multiple Parse Servers instances connected to the same database. A low duration will cause the schema cache to be updated too often, causing unnecessary database reads. A high duration will cause the schema to be updated too rarely, increasing the time required until schema changes propagate to all server instances. This feature can be used as an alternative or in conjunction with the option `enableSchemaHooks`. Default is infinite which means the schema cache never expires.',
|
||||
action: parsers.numberParser('schemaCacheTtl'),
|
||||
},
|
||||
socketTimeoutMS: {
|
||||
env: 'PARSE_SERVER_DATABASE_SOCKET_TIMEOUT_MS',
|
||||
help:
|
||||
'The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout.',
|
||||
action: parsers.numberParser('socketTimeoutMS'),
|
||||
},
|
||||
};
|
||||
module.exports.AuthAdapter = {
|
||||
enabled: {
|
||||
|
||||
@@ -234,12 +234,17 @@
|
||||
|
||||
/**
|
||||
* @interface DatabaseOptions
|
||||
* @property {Boolean} autoSelectFamily The MongoDB driver option to set whether the socket attempts to connect to IPv6 and IPv4 addresses until a connection is established. If available, the driver will select the first IPv6 address.
|
||||
* @property {Number} autoSelectFamilyAttemptTimeout The MongoDB driver option to specify the amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the autoSelectFamily option. If set to a positive integer less than 10, the value 10 is used instead.
|
||||
* @property {Number} connectTimeoutMS The MongoDB driver option to specify the amount of time, in milliseconds, to wait to establish a single TCP socket connection to the server before raising an error. Specifying 0 disables the connection timeout.
|
||||
* @property {Boolean} enableSchemaHooks Enables database real-time hooks to update single schema cache. Set to `true` if using multiple Parse Servers instances connected to the same database. Failing to do so will cause a schema change to not propagate to all instances and re-syncing will only happen when the instances restart. To use this feature with MongoDB, a replica set cluster with [change stream](https://docs.mongodb.com/manual/changeStreams/#availability) support is required.
|
||||
* @property {Number} maxPoolSize The MongoDB driver option to set the maximum number of opened, cached, ready-to-use database connections maintained by the driver.
|
||||
* @property {Number} maxStalenessSeconds The MongoDB driver option to set the maximum replication lag for reads from secondary nodes.
|
||||
* @property {Number} maxTimeMS The MongoDB driver option to set a cumulative time limit in milliseconds for processing operations on a cursor.
|
||||
* @property {Number} minPoolSize The MongoDB driver option to set the minimum number of opened, cached, ready-to-use database connections maintained by the driver.
|
||||
* @property {Boolean} retryWrites The MongoDB driver option to set whether to retry failed writes.
|
||||
* @property {Number} schemaCacheTtl The duration in seconds after which the schema cache expires and will be refetched from the database. Use this option if using multiple Parse Servers instances connected to the same database. A low duration will cause the schema cache to be updated too often, causing unnecessary database reads. A high duration will cause the schema to be updated too rarely, increasing the time required until schema changes propagate to all server instances. This feature can be used as an alternative or in conjunction with the option `enableSchemaHooks`. Default is infinite which means the schema cache never expires.
|
||||
* @property {Number} socketTimeoutMS The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@@ -602,8 +602,18 @@ export interface DatabaseOptions {
|
||||
maxTimeMS: ?number;
|
||||
/* The MongoDB driver option to set the maximum replication lag for reads from secondary nodes.*/
|
||||
maxStalenessSeconds: ?number;
|
||||
/* The MongoDB driver option to set the minimum number of opened, cached, ready-to-use database connections maintained by the driver. */
|
||||
minPoolSize: ?number;
|
||||
/* The MongoDB driver option to set the maximum number of opened, cached, ready-to-use database connections maintained by the driver. */
|
||||
maxPoolSize: ?number;
|
||||
/* The MongoDB driver option to specify the amount of time, in milliseconds, to wait to establish a single TCP socket connection to the server before raising an error. Specifying 0 disables the connection timeout. */
|
||||
connectTimeoutMS: ?number;
|
||||
/* The MongoDB driver option to specify the amount of time, in milliseconds, spent attempting to send or receive on a socket before timing out. Specifying 0 means no timeout. */
|
||||
socketTimeoutMS: ?number;
|
||||
/* The MongoDB driver option to set whether the socket attempts to connect to IPv6 and IPv4 addresses until a connection is established. If available, the driver will select the first IPv6 address. */
|
||||
autoSelectFamily: ?boolean;
|
||||
/* The MongoDB driver option to specify the amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the autoSelectFamily option. If set to a positive integer less than 10, the value 10 is used instead. */
|
||||
autoSelectFamilyAttemptTimeout: ?number;
|
||||
}
|
||||
|
||||
export interface AuthAdapter {
|
||||
|
||||
+5
-1
@@ -533,9 +533,14 @@ export const addRateLimit = (route, config, cloud) => {
|
||||
store: null,
|
||||
};
|
||||
if (route.redisUrl) {
|
||||
const log = config?.loggerController || defaultLogger;
|
||||
const client = createClient({
|
||||
url: route.redisUrl,
|
||||
});
|
||||
client.on('error', err => { log.error('Middlewares addRateLimit Redis client error', { error: err }) });
|
||||
client.on('connect', () => {});
|
||||
client.on('reconnecting', () => {});
|
||||
client.on('ready', () => {});
|
||||
redisStore.connectionPromise = async () => {
|
||||
if (client.isOpen) {
|
||||
return;
|
||||
@@ -543,7 +548,6 @@ export const addRateLimit = (route, config, cloud) => {
|
||||
try {
|
||||
await client.connect();
|
||||
} catch (e) {
|
||||
const log = config?.loggerController || defaultLogger;
|
||||
log.error(`Could not connect to redisURL in rate limit: ${e}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user