diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c56b7cc384..fe335082635 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: check-ci: name: Node Engine Check timeout-minutes: 15 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.NODE_VERSION }} @@ -33,7 +33,7 @@ jobs: check-lint: name: Lint timeout-minutes: 15 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.NODE_VERSION }} @@ -53,7 +53,7 @@ jobs: check-circular: name: Circular Dependencies timeout-minutes: 5 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.NODE_VERSION }} @@ -73,7 +73,7 @@ jobs: check-docker: name: Docker Build timeout-minutes: 15 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Checkout repository uses: actions/checkout@v2 @@ -90,7 +90,7 @@ jobs: check-lock-file-version: name: NPM Lock File Version timeout-minutes: 5 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Check NPM lock file version @@ -152,10 +152,20 @@ jobs: MONGODB_TOPOLOGY: standalone MONGODB_STORAGE_ENGINE: wiredTiger NODE_VERSION: 14.19.1 + - name: Node 17 + MONGODB_VERSION: 4.4.13 + MONGODB_TOPOLOGY: standalone + MONGODB_STORAGE_ENGINE: wiredTiger + NODE_VERSION: 17.9.0 + - name: Node 18 + MONGODB_VERSION: 4.4.13 + MONGODB_TOPOLOGY: standalone + MONGODB_STORAGE_ENGINE: wiredTiger + NODE_VERSION: 18.1.0 fail-fast: false name: ${{ matrix.name }} timeout-minutes: 15 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 services: redis: image: redis @@ -212,7 +222,7 @@ jobs: fail-fast: false name: ${{ matrix.name }} timeout-minutes: 15 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 services: redis: image: redis diff --git a/DEPRECATIONS.md b/DEPRECATIONS.md index dc913dd0e79..986522477b0 100644 --- a/DEPRECATIONS.md +++ b/DEPRECATIONS.md @@ -8,6 +8,7 @@ The following is a list of deprecations, according to the [Deprecation Policy](h | DEPPS2 | Config option `directAccess` defaults to `true` | [#6636](https://github.com/parse-community/parse-server/pull/6636) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - | | DEPPS3 | Config option `enforcePrivateUsers` defaults to `true` | [#7319](https://github.com/parse-community/parse-server/pull/7319) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - | | DEPPS4 | Remove convenience method for http request `Parse.Cloud.httpRequest` | [#7589](https://github.com/parse-community/parse-server/pull/7589) | 5.0.0 (2022) | 6.0.0 (2023) | deprecated | - | +| DEPPS5 | Config option `allowClientClassCreation` defaults to `false` | [#7925](https://github.com/parse-community/parse-server/pull/7925) | 5.3.0 (2022) | 7.0.0 (2024) | deprecated | - | [i_deprecation]: ## "The version and date of the deprecation." [i_removal]: ## "The version and date of the planned removal." diff --git a/README.md b/README.md index b321392fa5a..34b323a656e 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ [![Coverage](https://img.shields.io/codecov/c/github/parse-community/parse-server/alpha.svg)](https://codecov.io/github/parse-community/parse-server?branch=alpha) [![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases) -[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16-green.svg?logo=node.js&style=flat)](https://nodejs.org) -[![MongoDB Version](https://img.shields.io/badge/mongodb-4.0,_4.2,_4.4,_5.0-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com) +[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16,_17,_18-green.svg?logo=node.js&style=flat)](https://nodejs.org) +[![MongoDB Version](https://img.shields.io/badge/mongodb-4.0,_4.2,_4.4,_5.0,_5.1,_5.2-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com) [![Postgres Version](https://img.shields.io/badge/postgresql-11,_12,_13,_14-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org) [![npm latest version](https://img.shields.io/npm/v/parse-server/latest.svg)](https://www.npmjs.com/package/parse-server) @@ -112,12 +112,13 @@ Before you start make sure you have installed: #### Node.js Parse Server is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [Node.js Long Term Support plan](https://github.com/nodejs/Release) and only test against versions that are officially supported and have not reached their end-of-life date. -| Version | Latest Version | End-of-Life | Compatible | -|------------|----------------|-------------|--------------| -| Node.js 12 | 12.22.11 | April 2022 | ✅ Yes | -| Node.js 14 | 14.19.1 | April 2023 | ✅ Yes | -| Node.js 16 | 16.14.2 | April 2024 | ✅ Yes | -| Node.js 17 | 17.x | June 2022 | ❌ Not tested | +| Version | Latest Version | End-of-Life | Compatible | +|------------|----------------|-------------|------------| +| Node.js 12 | 12.22.11 | April 2022 | ✅ Yes | +| Node.js 14 | 14.19.1 | April 2023 | ✅ Yes | +| Node.js 16 | 16.14.2 | April 2024 | ✅ Yes | +| Node.js 17 | 17.9.0 | June 2022 | ✅ Yes | +| Node.js 18 | 18.1.0 | April 2025 | ✅ Yes | #### MongoDB Parse Server is continuously tested with the most recent releases of MongoDB to ensure compatibility. We follow the [MongoDB support schedule](https://www.mongodb.com/support-policy) and only test against versions that are officially supported and have not reached their end-of-life date. diff --git a/changelogs/CHANGELOG_alpha.md b/changelogs/CHANGELOG_alpha.md index d5004cc0125..d51453974dc 100644 --- a/changelogs/CHANGELOG_alpha.md +++ b/changelogs/CHANGELOG_alpha.md @@ -1,3 +1,24 @@ +# [5.3.0-alpha.10](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.9...5.3.0-alpha.10) (2022-05-09) + + +### Features + +* upgrade mongodb from 4.4.1 to 4.5.0 ([#7991](https://github.com/parse-community/parse-server/issues/7991)) ([e692b5d](https://github.com/parse-community/parse-server/commit/e692b5dd8214cdb0ce79bedd30d9aa3cf4de76a5)) + +# [5.3.0-alpha.9](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.8...5.3.0-alpha.9) (2022-05-07) + + +### Bug Fixes + +* depreciate allowClientClassCreation defaulting to true ([#7925](https://github.com/parse-community/parse-server/issues/7925)) ([38ed96a](https://github.com/parse-community/parse-server/commit/38ed96ace534d639db007aa7dd5387b2da8f03ae)) + +# [5.3.0-alpha.8](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.7...5.3.0-alpha.8) (2022-05-06) + + +### Features + +* add support for Node 17 and 18 ([#7896](https://github.com/parse-community/parse-server/issues/7896)) ([3e9f292](https://github.com/parse-community/parse-server/commit/3e9f292d840334244934cee9a34545ac86313549)) + # [5.3.0-alpha.7](https://github.com/parse-community/parse-server/compare/5.3.0-alpha.6...5.3.0-alpha.7) (2022-04-25) diff --git a/changelogs/CHANGELOG_release.md b/changelogs/CHANGELOG_release.md index 7c83679f94c..7e4c801fb71 100644 --- a/changelogs/CHANGELOG_release.md +++ b/changelogs/CHANGELOG_release.md @@ -1,3 +1,10 @@ +## [5.2.1](https://github.com/parse-community/parse-server/compare/5.2.0...5.2.1) (2022-05-01) + + +### Bug Fixes + +* authentication bypass and denial of service (DoS) vulnerabilities in Apple Game Center auth adapter (GHSA-qf8x-vqjv-92gr) ([#7962](https://github.com/parse-community/parse-server/issues/7962)) ([af4a041](https://github.com/parse-community/parse-server/commit/af4a0417a9f3c1e99b3793806b4b18e04d9fa999)) + # [5.2.0](https://github.com/parse-community/parse-server/compare/5.1.1...5.2.0) (2022-03-24) diff --git a/ci/ciCheck.js b/ci/ciCheck.js index 2ad5c3e8f3a..52518c42ccd 100644 --- a/ci/ciCheck.js +++ b/ci/ciCheck.js @@ -61,7 +61,7 @@ async function checkNodeVersions() { '<12.0.0', // These versions have reached their end-of-life support date '>=13.0.0 <14.0.0', // These versions have reached their end-of-life support date '>=15.0.0 <16.0.0', // These versions have reached their end-of-life support date - '>=17.0.0', // These versions are not officially supported yet + '>=19.0.0', // These versions are not officially supported yet ], }).check(); } diff --git a/package-lock.json b/package-lock.json index f7b48c41fe6..69e125978c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "parse-server", - "version": "5.3.0-alpha.7", + "version": "5.3.0-alpha.10", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -11,9 +11,9 @@ "dev": true }, "@apollo/client": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.5.9.tgz", - "integrity": "sha512-Qq3OE3GpyPG2fYXBzi1n4QXcKZ11c6jHdrXK2Kkn9SD+vUymSrllXsldqnKUK9tslxKqkKzNrkCXkLv7PxwfSQ==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.5.10.tgz", + "integrity": "sha512-tL3iSpFe9Oldq7gYikZK1dcYxp1c01nlSwtsMz75382HcI6fvQXyFXUCJTTK3wgO2/ckaBvRGw7VqjFREdVoRw==", "requires": { "@graphql-typed-document-node/core": "^3.0.0", "@wry/context": "^0.6.0", @@ -46,9 +46,9 @@ } }, "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, "zen-observable-ts": { "version": "1.2.3", @@ -1198,24 +1198,29 @@ } }, "@graphql-tools/batch-execute": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.4.1.tgz", - "integrity": "sha512-63+lNWrwXmofjZVa7ML+n9CBviClF3K+RP3Xx3hxGQ8BrhvB1pWS1yzaUZqrkiiKdTu1v3mJGVfmooHwzlyPwQ==", + "version": "8.4.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.4.4.tgz", + "integrity": "sha512-5B3srfrNh7qqaH4FWysiZXPDVD7snwM+qsW3Bkq8M0iRAZVUb3P9o23xJbBwS32g678TuCjKy113K0PSqHyeCw==", "requires": { - "@graphql-tools/utils": "8.6.5", - "dataloader": "2.0.0", + "@graphql-tools/utils": "8.6.7", + "dataloader": "2.1.0", "tslib": "~2.3.0", "value-or-promise": "1.0.11" }, "dependencies": { "@graphql-tools/utils": { - "version": "8.6.5", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.5.tgz", - "integrity": "sha512-mjOtaWiS2WIqRz/cq5gaeM3sVrllcu2xbtHROw1su1v3xWa3D3dKgn8Lrl7+tvWs5WUVySsBss/VZ3WdoPkCrA==", + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.7.tgz", + "integrity": "sha512-Qi3EN95Rt3hb8CyDKpPKFWOPrnc00P18cpVTXEgtKxetSP39beJBeEEtLB0R53eP/6IolsyTZOTgkET1EaERaw==", "requires": { "tslib": "~2.3.0" } }, + "dataloader": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", + "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -1242,12 +1247,12 @@ } }, "@graphql-tools/links": { - "version": "8.2.8", - "resolved": "https://registry.npmjs.org/@graphql-tools/links/-/links-8.2.8.tgz", - "integrity": "sha512-++4XkURFEG3VDKZK6yYeRV/+g8lQZ0kvjYQUBEmn6Zxrf0/haF4cOZhwMdc1MIaihfo615cT9BHjs9Rtd8hbmA==", + "version": "8.2.11", + "resolved": "https://registry.npmjs.org/@graphql-tools/links/-/links-8.2.11.tgz", + "integrity": "sha512-04Pb335A41WXZiC+IEhcal78ElDua2W5fZb4ggaSuIctNDVnmoLkdpcCz6Gp9pHy57+m7/Cp97Pr2syCdojB6g==", "requires": { - "@graphql-tools/delegate": "8.7.1", - "@graphql-tools/utils": "8.6.5", + "@graphql-tools/delegate": "8.7.4", + "@graphql-tools/utils": "8.6.7", "apollo-upload-client": "17.0.0", "form-data": "^4.0.0", "node-fetch": "^2.6.5", @@ -1255,43 +1260,43 @@ }, "dependencies": { "@graphql-tools/delegate": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.7.1.tgz", - "integrity": "sha512-e98/NRaOH5wQy624bRd5i5qUKz5tCs8u4xBmxW89d7t6V6CveXj7pvAgmnR9DbwOkO6IA3P799p/aa/YG/pWTA==", - "requires": { - "@graphql-tools/batch-execute": "8.4.1", - "@graphql-tools/schema": "8.3.6", - "@graphql-tools/utils": "8.6.5", - "dataloader": "2.0.0", - "graphql-executor": "0.0.22", + "version": "8.7.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.7.4.tgz", + "integrity": "sha512-OXdIHRqqUDFvBebSZ/MQAvQOJ1Kvl7gjD78ClG4bPts6qDfFHwzlX0V8QESFCo8H67VDRzB4nnqlDyOIzjVNlQ==", + "requires": { + "@graphql-tools/batch-execute": "8.4.4", + "@graphql-tools/schema": "8.3.8", + "@graphql-tools/utils": "8.6.7", + "dataloader": "2.1.0", + "graphql-executor": "0.0.23", "tslib": "~2.3.0", "value-or-promise": "1.0.11" } }, "@graphql-tools/merge": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.6.tgz", - "integrity": "sha512-dkwTm4czMISi/Io47IVvq2Fl9q4TIGKpJ0VZjuXYdEFkECyH6A5uwxZfPVandZG+gQs8ocFFoa6RisiUJLZrJw==", + "version": "8.2.8", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.8.tgz", + "integrity": "sha512-e4kpzgEIlA0sC0NjJlMwUL73Iz/HoP2OgAUReDDsupvWCqW3PMxjNoviS8xmcklVnv1w8Vmr8U2tao+x40ypLA==", "requires": { - "@graphql-tools/utils": "8.6.5", + "@graphql-tools/utils": "8.6.7", "tslib": "~2.3.0" } }, "@graphql-tools/schema": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.6.tgz", - "integrity": "sha512-7tWYRQ8hB/rv2zAtv2LtnQl4UybyJPtRz/VLKRmgi7+F5t8iYBahmmsxMDAYMWMmWMqEDiKk54TvAes+J069rQ==", + "version": "8.3.8", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.8.tgz", + "integrity": "sha512-Bba60ali4fLOKJz/Kk39RcBrDUBtu0Wy7pjpIOmFIKQKwUBNNB0eAmfpvrjnFhRAVdO2kOkPpc8DQY+SCG+lWw==", "requires": { - "@graphql-tools/merge": "8.2.6", - "@graphql-tools/utils": "8.6.5", + "@graphql-tools/merge": "8.2.8", + "@graphql-tools/utils": "8.6.7", "tslib": "~2.3.0", "value-or-promise": "1.0.11" } }, "@graphql-tools/utils": { - "version": "8.6.5", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.5.tgz", - "integrity": "sha512-mjOtaWiS2WIqRz/cq5gaeM3sVrllcu2xbtHROw1su1v3xWa3D3dKgn8Lrl7+tvWs5WUVySsBss/VZ3WdoPkCrA==", + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.7.tgz", + "integrity": "sha512-Qi3EN95Rt3hb8CyDKpPKFWOPrnc00P18cpVTXEgtKxetSP39beJBeEEtLB0R53eP/6IolsyTZOTgkET1EaERaw==", "requires": { "tslib": "~2.3.0" } @@ -1304,6 +1309,11 @@ "extract-files": "^11.0.0" } }, + "dataloader": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", + "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + }, "form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -2847,9 +2857,9 @@ }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" } } }, @@ -2877,9 +2887,9 @@ }, "dependencies": { "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" } } }, @@ -3741,20 +3751,22 @@ "dev": true }, "body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", + "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", "requires": { "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.8.1", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.9.7", - "raw-body": "2.4.3", - "type-is": "~1.6.18" + "on-finished": "2.4.1", + "qs": "6.10.3", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "dependencies": { "debug": { @@ -3765,22 +3777,48 @@ "ms": "2.0.0" } }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, "http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "requires": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" } }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, "qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==" + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" }, "toidentifier": { "version": "1.0.1", @@ -4596,9 +4634,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.0.tgz", - "integrity": "sha512-9Mrz2AQLefkH1UvASKj6v6hj/7eWgjnT/cVsR8CumieLoT+g900exWeNogqtweI8dxloXN9BDQTYro1oWu/5CQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -4836,9 +4874,9 @@ } }, "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==" }, "cookie-signature": { "version": "1.0.6", @@ -6454,16 +6492,16 @@ } }, "express": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz", - "integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==", + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz", + "integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==", "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.1", + "body-parser": "1.19.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.1", + "cookie": "0.4.2", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", @@ -6478,7 +6516,7 @@ "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.7", - "qs": "6.9.6", + "qs": "6.9.7", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.17.2", @@ -6490,28 +6528,32 @@ "vary": "~1.1.2" }, "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, "body-parser": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", - "integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==", + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==", "requires": { - "bytes": "3.1.1", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", "http-errors": "1.8.1", "iconv-lite": "0.4.24", "on-finished": "~2.3.0", - "qs": "6.9.6", - "raw-body": "2.4.2", + "qs": "6.9.7", + "raw-body": "2.4.3", "type-is": "~1.6.18" } }, - "bytes": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", - "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==" - }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -6540,17 +6582,35 @@ "toidentifier": "1.0.1" } }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, "qs": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", - "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==" + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==" }, "raw-body": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz", - "integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz", + "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==", "requires": { - "bytes": "3.1.1", + "bytes": "3.1.2", "http-errors": "1.8.1", "iconv-lite": "0.4.24", "unpipe": "1.0.0" @@ -7141,9 +7201,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "follow-redirects": { - "version": "1.14.8", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", - "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" }, "for-each": { "version": "0.3.3", @@ -7562,9 +7622,9 @@ "integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==" }, "graphql-executor": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.22.tgz", - "integrity": "sha512-WbKSnSHFn6REKKH4T6UAwDM3mLUnYMQlQLNG0Fw+Lkb3ilCnL3m5lkJ7411LAI9sF7BvPbthovVZhsEUh9Xfag==" + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.23.tgz", + "integrity": "sha512-3Ivlyfjaw3BWmGtUSnMpP/a4dcXCp0mJtj0PiPG14OKUizaMKlSEX+LX2Qed0LrxwniIwvU6B4w/koVjEPyWJg==" }, "graphql-extensions": { "version": "0.15.0", @@ -9274,9 +9334,9 @@ } }, "ldapjs": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/ldapjs/-/ldapjs-2.3.1.tgz", - "integrity": "sha512-kf0tHHLrpwKaBAQOhYHXgdeh2PkFuCCxWgLb1MRn67ZQVo787D2pij3mmHVZx193GIdM8xcfi8HF6AIYYnj0fQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/ldapjs/-/ldapjs-2.3.2.tgz", + "integrity": "sha512-FU+GR/qbQ96WUZ2DUb7FzaEybYvv3240wTVPcbsdELB3o4cK92zGVjntsh68siVkLeCmlCcsd/cIQzyGXSS7LA==", "requires": { "abstract-logging": "^2.0.0", "asn1": "^0.2.4", @@ -10492,16 +10552,16 @@ } }, "moment": { - "version": "2.29.2", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.2.tgz", - "integrity": "sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==" + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz", + "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==" }, "mongodb": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.4.1.tgz", - "integrity": "sha512-IAD3nFtCR4s22vi5qjqkCBnuyDDrOW8WVSSmgHquOvGaP1iTD+XpC5tr8wAUbZ2EeZkaswwBKQFHDvl4qYcKqQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.5.0.tgz", + "integrity": "sha512-A2l8MjEpKojnhbCM0MK3+UOGUSGvTNNSv7AkP1fsT7tkambrkkqN/5F2y+PhzsV0Nbv58u04TETpkaSEdI2zKA==", "requires": { - "bson": "^4.6.1", + "bson": "^4.6.2", "denque": "^2.0.1", "mongodb-connection-string-url": "^2.5.2", "saslprep": "^1.0.3", @@ -10509,9 +10569,9 @@ }, "dependencies": { "bson": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.2.tgz", - "integrity": "sha512-VeJKHShcu1b/ugl0QiujlVuBepab714X9nNyBdA1kfekuDGecxgpTA2Z6nYbagrWFeiIyzSWIOzju3lhj+RNyQ==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.3.tgz", + "integrity": "sha512-rAqP5hcUVJhXP2MCSNVsf0oM2OGU1So6A9pVRDYayvJ5+hygXHQApf87wd5NlhPM1J9RJnbqxIG/f8QTzRoQ4A==", "requires": { "buffer": "^5.6.0" } @@ -14309,28 +14369,38 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz", - "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "requires": { "bytes": "3.1.2", - "http-errors": "1.8.1", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" }, "dependencies": { + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, "http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "requires": { - "depd": "~1.1.2", + "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", + "statuses": "2.0.1", "toidentifier": "1.0.1" } }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, "toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -15196,21 +15266,11 @@ } }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "requires": { "lru-cache": "^6.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - } } }, "semver-compare": { @@ -16796,9 +16856,9 @@ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "vasync": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vasync/-/vasync-2.2.0.tgz", - "integrity": "sha1-z951GGChWCLbOxMrxZsRakra8Bs=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vasync/-/vasync-2.2.1.tgz", + "integrity": "sha512-Hq72JaTpcTFdWiNA4Y22Amej2GH3BFmBaKPPlDZ4/oC8HNn2ISHLkFrJU4Ds8R3jcUi7oo5Y9jcMHKjES+N9wQ==", "requires": { "verror": "1.10.0" } @@ -16890,20 +16950,20 @@ } }, "winston": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.5.1.tgz", - "integrity": "sha512-tbRtVy+vsSSCLcZq/8nXZaOie/S2tPXPFt4be/Q3vI/WtYwm7rrwidxVw2GRa38FIXcJ1kUM6MOZ9Jmnk3F3UA==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.7.2.tgz", + "integrity": "sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==", "requires": { "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", - "logform": "^2.3.2", + "logform": "^2.4.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.4.2" + "winston-transport": "^4.5.0" }, "dependencies": { "async": { @@ -16924,9 +16984,9 @@ } }, "winston-daily-rotate-file": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-4.6.0.tgz", - "integrity": "sha512-mvpFb1LYmTvh/vz0dIS/aDCwEm0cvDa8D/tE4xWwdUYolD250wf+n0y1PZ2xr7fbvTLF/PQYqXtFIFrmog03Ow==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-4.6.1.tgz", + "integrity": "sha512-Ycch4LZmTycbhgiI2eQXBKI1pKcEQgAqmBjyq7/dC6Dk77nasdxvhLKraqTdCw7wNDSs8/M0jXaLATHquG7xYg==", "requires": { "file-stream-rotator": "^0.6.1", "object-hash": "^2.0.1", @@ -17064,9 +17124,9 @@ } }, "ws": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", - "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==" + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==" }, "xmlcreate": { "version": "2.0.3", diff --git a/package.json b/package.json index 3eb8c67e17b..841fa57e350 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "parse-server", - "version": "5.3.0-alpha.7", + "version": "5.3.0-alpha.10", "description": "An express module providing a Parse-compatible API server", "main": "lib/index.js", "repository": { @@ -19,21 +19,21 @@ ], "license": "BSD-3-Clause", "dependencies": { - "@apollo/client": "3.5.9", + "@apollo/client": "3.5.10", "@apollographql/graphql-playground-html": "1.6.29", - "@graphql-tools/links": "8.2.8", + "@graphql-tools/links": "8.2.11", "@graphql-tools/stitch": "6.2.4", "@graphql-tools/utils": "6.2.4", "@parse/fs-files-adapter": "1.2.2", "@parse/push-adapter": "4.1.2", "apollo-server-express": "2.25.2", "bcryptjs": "2.4.3", - "body-parser": "1.19.2", + "body-parser": "1.20.0", "commander": "5.1.0", "cors": "2.8.5", "deepcopy": "2.1.0", - "express": "4.17.2", - "follow-redirects": "1.14.8", + "express": "4.17.3", + "follow-redirects": "1.14.9", "graphql": "15.8.0", "graphql-list-fields": "2.0.2", "graphql-relay": "0.7.0", @@ -42,24 +42,24 @@ "intersect": "1.0.1", "jsonwebtoken": "8.5.1", "jwks-rsa": "2.0.5", - "ldapjs": "2.3.1", + "ldapjs": "2.3.2", "lodash": "4.17.21", "lru-cache": "6.0.0", "mime": "3.0.0", - "mongodb": "4.4.1", + "mongodb": "4.5.0", "mustache": "4.2.0", "parse": "3.4.1", "pg-monitor": "1.4.1", "pg-promise": "10.11.1", "pluralize": "8.0.0", "redis": "3.1.2", - "semver": "7.3.5", + "semver": "7.3.7", "subscriptions-transport-ws": "0.11.0", "tv4": "1.3.0", "uuid": "8.3.2", - "winston": "3.5.1", - "winston-daily-rotate-file": "4.6.0", - "ws": "8.2.3" + "winston": "3.7.2", + "winston-daily-rotate-file": "4.6.1", + "ws": "8.5.0" }, "devDependencies": { "@actions/core": "1.2.6", @@ -135,7 +135,7 @@ "madge:circular": "node_modules/.bin/madge ./src --circular" }, "engines": { - "node": ">=12.22.10 <17" + "node": ">=12.22.10 <19" }, "bin": { "parse-server": "bin/parse-server" diff --git a/spec/.eslintrc.json b/spec/.eslintrc.json index 519da964845..aa4a8fcdcb1 100644 --- a/spec/.eslintrc.json +++ b/spec/.eslintrc.json @@ -18,10 +18,13 @@ "it_only_db": true, "it_only_mongodb_version": true, "it_only_postgres_version": true, + "it_only_node_version": true, "fit_only_mongodb_version": true, + "fit_only_node_version": true, "it_exclude_mongodb_version": true, "it_exclude_postgres_version": true, "fit_exclude_mongodb_version": true, + "fit_exclude_node_version": true, "it_exclude_dbs": true, "describe_only_db": true, "describe_only": true, @@ -31,7 +34,6 @@ "jequal": true, "create": true, "arrayContains": true, - "expectAsync": true, "databaseAdapter": true }, "rules": { diff --git a/spec/AuthenticationAdapters.spec.js b/spec/AuthenticationAdapters.spec.js index 181ffa04a6b..bfb64502cd0 100644 --- a/spec/AuthenticationAdapters.spec.js +++ b/spec/AuthenticationAdapters.spec.js @@ -1652,7 +1652,8 @@ describe('apple signin auth adapter', () => { describe('Apple Game Center Auth adapter', () => { const gcenter = require('../lib/Adapters/Auth/gcenter'); - + const fs = require('fs'); + const testCert = fs.readFileSync(__dirname + '/support/cert/game_center.pem'); it('validateAuthData should validate', async () => { // real token is used const authData = { @@ -1664,68 +1665,51 @@ describe('Apple Game Center Auth adapter', () => { salt: 'DzqqrQ==', bundleId: 'cloud.xtralife.gamecenterauth', }; - - try { - await gcenter.validateAuthData(authData); - } catch (e) { - fail(); - } + gcenter.cache['https://static.gc.apple.com/public-key/gc-prod-4.cer'] = testCert; + await gcenter.validateAuthData(authData); }); it('validateAuthData invalid signature id', async () => { const authData = { id: 'G:1965586982', - publicKeyUrl: 'https://static.gc.apple.com/public-key/gc-prod-4.cer', - timestamp: 1565257031287, - signature: '1234', - salt: 'DzqqrQ==', - bundleId: 'cloud.xtralife.gamecenterauth', - }; - - try { - await gcenter.validateAuthData(authData); - fail(); - } catch (e) { - expect(e.message).toBe('Apple Game Center - invalid signature'); - } - }); - - it('validateAuthData invalid public key url', async () => { - const authData = { - id: 'G:1965586982', - publicKeyUrl: 'invalid.com', + publicKeyUrl: 'https://static.gc.apple.com/public-key/gc-prod-6.cer', timestamp: 1565257031287, signature: '1234', salt: 'DzqqrQ==', - bundleId: 'cloud.xtralife.gamecenterauth', + bundleId: 'com.example.com', }; - - try { - await gcenter.validateAuthData(authData); - fail(); - } catch (e) { - expect(e.message).toBe('Apple Game Center - invalid publicKeyUrl: invalid.com'); - } + await expectAsync(gcenter.validateAuthData(authData)).toBeRejectedWith( + new Parse.Error(Parse.Error.SCRIPT_FAILED, 'Apple Game Center - invalid signature') + ); }); it('validateAuthData invalid public key http url', async () => { - const authData = { - id: 'G:1965586982', - publicKeyUrl: 'http://static.gc.apple.com/public-key/gc-prod-4.cer', - timestamp: 1565257031287, - signature: '1234', - salt: 'DzqqrQ==', - bundleId: 'cloud.xtralife.gamecenterauth', - }; - - try { - await gcenter.validateAuthData(authData); - fail(); - } catch (e) { - expect(e.message).toBe( - 'Apple Game Center - invalid publicKeyUrl: http://static.gc.apple.com/public-key/gc-prod-4.cer' - ); - } + const publicKeyUrls = [ + 'example.com', + 'http://static.gc.apple.com/public-key/gc-prod-4.cer', + 'https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg', + 'https://example.com/ \\.apple.com/public_key.cer', + 'https://example.com/ &.apple.com/public_key.cer', + ]; + await Promise.all( + publicKeyUrls.map(publicKeyUrl => + expectAsync( + gcenter.validateAuthData({ + id: 'G:1965586982', + timestamp: 1565257031287, + publicKeyUrl, + signature: '1234', + salt: 'DzqqrQ==', + bundleId: 'com.example.com', + }) + ).toBeRejectedWith( + new Parse.Error( + Parse.Error.SCRIPT_FAILED, + `Apple Game Center - invalid publicKeyUrl: ${publicKeyUrl}` + ) + ) + ) + ); }); }); diff --git a/spec/ParseGraphQLSchema.spec.js b/spec/ParseGraphQLSchema.spec.js index a06a230f6ac..0d4cd7d7219 100644 --- a/spec/ParseGraphQLSchema.spec.js +++ b/spec/ParseGraphQLSchema.spec.js @@ -57,7 +57,6 @@ describe('ParseGraphQLSchema', () => { it('should load a brand new GraphQL Schema if Parse Schema changes', async () => { await parseGraphQLSchema.load(); const parseClasses = parseGraphQLSchema.parseClasses; - const parseCachedClasses = parseGraphQLSchema.parseCachedClasses; const parseClassTypes = parseGraphQLSchema.parseClassTypes; const graphQLSchema = parseGraphQLSchema.graphQLSchema; const graphQLTypes = parseGraphQLSchema.graphQLTypes; @@ -70,7 +69,6 @@ describe('ParseGraphQLSchema', () => { await new Promise(resolve => setTimeout(resolve, 200)); await parseGraphQLSchema.load(); expect(parseClasses).not.toBe(parseGraphQLSchema.parseClasses); - expect(parseCachedClasses).not.toBe(parseGraphQLSchema.parseCachedClasses); expect(parseClassTypes).not.toBe(parseGraphQLSchema.parseClassTypes); expect(graphQLSchema).not.toBe(parseGraphQLSchema.graphQLSchema); expect(graphQLTypes).not.toBe(parseGraphQLSchema.graphQLTypes); @@ -94,7 +92,6 @@ describe('ParseGraphQLSchema', () => { }); await parseGraphQLSchema.load(); const parseClasses = parseGraphQLSchema.parseClasses; - const parseCachedClasses = parseGraphQLSchema.parseCachedClasses; const parseClassTypes = parseGraphQLSchema.parseClassTypes; const graphQLSchema = parseGraphQLSchema.graphQLSchema; const graphQLTypes = parseGraphQLSchema.graphQLTypes; @@ -109,7 +106,6 @@ describe('ParseGraphQLSchema', () => { await new Promise(resolve => setTimeout(resolve, 200)); await parseGraphQLSchema.load(); expect(parseClasses).not.toBe(parseGraphQLSchema.parseClasses); - expect(parseCachedClasses).not.toBe(parseGraphQLSchema.parseCachedClasses); expect(parseClassTypes).not.toBe(parseGraphQLSchema.parseClassTypes); expect(graphQLSchema).not.toBe(parseGraphQLSchema.graphQLSchema); expect(graphQLTypes).not.toBe(parseGraphQLSchema.graphQLTypes); diff --git a/spec/ParseGraphQLServer.spec.js b/spec/ParseGraphQLServer.spec.js index 32a526132a4..0abe07e6376 100644 --- a/spec/ParseGraphQLServer.spec.js +++ b/spec/ParseGraphQLServer.spec.js @@ -6793,7 +6793,7 @@ describe('ParseGraphQLServer', () => { describe('Files Mutations', () => { describe('Create', () => { - it('should return File object', async () => { + it_only_node_version('<17')('should return File object', async () => { const clientMutationId = uuidv4(); parseServer = await global.reconfigureServer({ @@ -9096,7 +9096,7 @@ describe('ParseGraphQLServer', () => { expect(result6[0].node.name).toEqual('imACountry3'); }); - it('should support files', async () => { + it_only_node_version('<17')('should support files', async () => { try { parseServer = await global.reconfigureServer({ publicServerURL: 'http://localhost:13377/parse', diff --git a/spec/ParseUser.spec.js b/spec/ParseUser.spec.js index 08cc1242811..94625005386 100644 --- a/spec/ParseUser.spec.js +++ b/spec/ParseUser.spec.js @@ -2941,7 +2941,7 @@ describe('Parse.User testing', () => { sendPasswordResetEmail: () => Promise.resolve(), sendMail: () => Promise.resolve(), }; - reconfigureServer({ + await reconfigureServer({ appName: 'unused', verifyUserEmails: true, emailAdapter: emailAdapter, diff --git a/spec/helper.js b/spec/helper.js index 612c7162028..f769c0f521c 100644 --- a/spec/helper.js +++ b/spec/helper.js @@ -1,9 +1,15 @@ 'use strict'; +const dns = require('dns'); const semver = require('semver'); const CurrentSpecReporter = require('./support/CurrentSpecReporter.js'); const { SpecReporter } = require('jasmine-spec-reporter'); const SchemaCache = require('../lib/Adapters/Cache/SchemaCache').default; +// Ensure localhost resolves to ipv4 address first on node v17+ +if (dns.setDefaultResultOrder) { + dns.setDefaultResultOrder('ipv4first'); +} + // Sets up a Parse API server for testing. jasmine.DEFAULT_TIMEOUT_INTERVAL = process.env.PARSE_SERVER_TEST_TIMEOUT || 10000; jasmine.getEnv().addReporter(new CurrentSpecReporter()); @@ -455,6 +461,15 @@ global.it_only_postgres_version = version => { } }; +global.it_only_node_version = version => { + const envVersion = process.version; + if (!envVersion || semver.satisfies(envVersion, version)) { + return it; + } else { + return xit; + } +}; + global.fit_only_mongodb_version = version => { const envVersion = process.env.MONGODB_VERSION; if (!envVersion || semver.satisfies(envVersion, version)) { @@ -464,6 +479,15 @@ global.fit_only_mongodb_version = version => { } }; +global.fit_only_node_version = version => { + const envVersion = process.version; + if (!envVersion || semver.satisfies(envVersion, version)) { + return fit; + } else { + return xit; + } +}; + global.it_exclude_mongodb_version = version => { const envVersion = process.env.MONGODB_VERSION; if (!envVersion || !semver.satisfies(envVersion, version)) { @@ -482,6 +506,15 @@ global.it_exclude_postgres_version = version => { } }; +global.it_exclude_node_version = version => { + const envVersion = process.env.NODE_VERSION; + if (!envVersion || !semver.satisfies(envVersion, version)) { + return it; + } else { + return xit; + } +}; + global.fit_exclude_mongodb_version = version => { const envVersion = process.env.MONGODB_VERSION; if (!envVersion || !semver.satisfies(envVersion, version)) { @@ -491,6 +524,15 @@ global.fit_exclude_mongodb_version = version => { } }; +global.fit_exclude_node_version = version => { + const envVersion = process.env.NODE_VERSION; + if (!envVersion || !semver.satisfies(envVersion, version)) { + return fit; + } else { + return xit; + } +}; + global.fit_exclude_dbs = excluded => { if (excluded.indexOf(process.env.PARSE_SERVER_TEST_DB) >= 0) { return xit; diff --git a/spec/support/cert/game_center.pem b/spec/support/cert/game_center.pem new file mode 100644 index 00000000000..b5dffcd8322 --- /dev/null +++ b/spec/support/cert/game_center.pem @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIEvDCCA6SgAwIBAgIQXRHxNXkw1L9z5/3EZ/T/hDANBgkqhkiG9w0BAQsFADB/ +MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd +BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxMDAuBgNVBAMTJ1N5bWFudGVj +IENsYXNzIDMgU0hBMjU2IENvZGUgU2lnbmluZyBDQTAeFw0xODA5MTcwMDAwMDBa +Fw0xOTA5MTcyMzU5NTlaMHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9y +bmlhMRIwEAYDVQQHDAlDdXBlcnRpbm8xFDASBgNVBAoMC0FwcGxlLCBJbmMuMQ8w +DQYDVQQLDAZHQyBTUkUxFDASBgNVBAMMC0FwcGxlLCBJbmMuMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA06fwIi8fgKrTQu7cBcFkJVF6+Tqvkg7MKJTM +IOYPPQtPF3AZYPsbUoRKAD7/JXrxxOSVJ7vU1mP77tYG8TcUteZ3sAwvt2dkRbm7 +ZO6DcmSggv1Dg4k3goNw4GYyCY4Z2/8JSmsQ80Iv/UOOwynpBziEeZmJ4uck6zlA +17cDkH48LBpKylaqthym5bFs9gj11pto7mvyb5BTcVuohwi6qosvbs/4VGbC2Nsz +ie416nUZfv+xxoXH995gxR2mw5cDdeCew7pSKxEhvYjT2nVdQF0q/hnPMFnOaEyT +q79n3gwFXyt0dy8eP6KBF7EW9J6b7ubu/j7h+tQfxPM+gTXOBQIDAQABo4IBPjCC +ATowCQYDVR0TBAIwADAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUH +AwMwYQYDVR0gBFowWDBWBgZngQwBBAEwTDAjBggrBgEFBQcCARYXaHR0cHM6Ly9k +LnN5bWNiLmNvbS9jcHMwJQYIKwYBBQUHAgIwGQwXaHR0cHM6Ly9kLnN5bWNiLmNv +bS9ycGEwHwYDVR0jBBgwFoAUljtT8Hkzl699g+8uK8zKt4YecmYwKwYDVR0fBCQw +IjAgoB6gHIYaaHR0cDovL3N2LnN5bWNiLmNvbS9zdi5jcmwwVwYIKwYBBQUHAQEE +SzBJMB8GCCsGAQUFBzABhhNodHRwOi8vc3Yuc3ltY2QuY29tMCYGCCsGAQUFBzAC +hhpodHRwOi8vc3Yuc3ltY2IuY29tL3N2LmNydDANBgkqhkiG9w0BAQsFAAOCAQEA +I/j/PcCNPebSAGrcqSFBSa2mmbusOX01eVBg8X0G/z8Z+ZWUfGFzDG0GQf89MPxV +woec+nZuqui7o9Bg8s8JbHV0TC52X14CbTj9w/qBF748WbH9gAaTkrJYPm+MlNhu +tjEuQdNl/YXVMvQW4O8UMHTi09GyJQ0NC4q92Wxvx1m/qzjvTLvrXHGQ9pEHhPyz +vfBLxQkWpNoCNKU7UeESyH06XOrGc9MsII9deeKsDJp9a0jtx+pP4MFVtFME9SSQ +tMBs0It7WwEf7qcRLpialxKwY2EzQ9g4WnANHqo18PrDBE10TFpZPzUh7JhMViVr +EEbl0YdElmF8Hlamah/yNw== +-----END CERTIFICATE----- diff --git a/src/Adapters/Auth/gcenter.js b/src/Adapters/Auth/gcenter.js index 26ae6da1ade..19ff5d18329 100644 --- a/src/Adapters/Auth/gcenter.js +++ b/src/Adapters/Auth/gcenter.js @@ -19,15 +19,8 @@ const cache = {}; // (publicKey -> cert) cache function verifyPublicKeyUrl(publicKeyUrl) { try { - const parsedUrl = new URL(publicKeyUrl); - if (parsedUrl.protocol !== 'https:') { - return false; - } - const hostnameParts = parsedUrl.hostname.split('.'); - const length = hostnameParts.length; - const domainParts = hostnameParts.slice(length - 2, length); - const domain = domainParts.join('.'); - return domain === 'apple.com'; + const regex = /^https:\/\/(?:[-_A-Za-z0-9]+\.){0,}apple\.com\/.*\.cer$/; + return regex.test(publicKeyUrl); } catch (error) { return false; } @@ -43,7 +36,7 @@ function convertX509CertToPEM(X509Cert) { return pemPreFix + certBody + pemPostFix; } -function getAppleCertificate(publicKeyUrl) { +async function getAppleCertificate(publicKeyUrl) { if (!verifyPublicKeyUrl(publicKeyUrl)) { throw new Parse.Error( Parse.Error.OBJECT_NOT_FOUND, @@ -53,6 +46,25 @@ function getAppleCertificate(publicKeyUrl) { if (cache[publicKeyUrl]) { return cache[publicKeyUrl]; } + const url = new URL(publicKeyUrl); + const headOptions = { + hostname: url.hostname, + path: url.pathname, + method: 'HEAD', + }; + const headers = await new Promise((resolve, reject) => + https.get(headOptions, res => resolve(res.headers)).on('error', reject) + ); + if ( + headers['content-type'] !== 'application/pkix-cert' || + headers['content-length'] == null || + headers['content-length'] > 10000 + ) { + throw new Parse.Error( + Parse.Error.OBJECT_NOT_FOUND, + `Apple Game Center - invalid publicKeyUrl: ${publicKeyUrl}` + ); + } return new Promise((resolve, reject) => { https .get(publicKeyUrl, res => { @@ -121,4 +133,5 @@ function validateAppId() { module.exports = { validateAppId, validateAuthData, + cache, }; diff --git a/src/Deprecator/Deprecations.js b/src/Deprecator/Deprecations.js index eb2212bf92d..1c3d336be99 100644 --- a/src/Deprecator/Deprecations.js +++ b/src/Deprecator/Deprecations.js @@ -23,4 +23,5 @@ module.exports = [ "Additionally, the environment variable 'PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS' will be deprecated and renamed to 'PARSE_SERVER_DIRECT_ACCESS' in a future version; it is currently possible to use either one.", }, { optionKey: 'enforcePrivateUsers', changeNewDefault: 'true' }, + { optionKey: 'allowClientClassCreation', changeNewDefault: 'false' }, ]; diff --git a/src/GraphQL/ParseGraphQLSchema.js b/src/GraphQL/ParseGraphQLSchema.js index 011905ca2d4..7b942463f8e 100644 --- a/src/GraphQL/ParseGraphQLSchema.js +++ b/src/GraphQL/ParseGraphQLSchema.js @@ -93,10 +93,14 @@ class ParseGraphQLSchema { async load() { const { parseGraphQLConfig } = await this._initializeSchemaAndConfig(); - const parseClasses = await this._getClassesForSchema(parseGraphQLConfig); + const parseClassesArray = await this._getClassesForSchema(parseGraphQLConfig); const functionNames = await this._getFunctionNames(); const functionNamesString = JSON.stringify(functionNames); + const parseClasses = parseClassesArray.reduce((acc, clazz) => { + acc[clazz.className] = clazz; + return acc; + }, {}); if ( !this._hasSchemaInputChanged({ parseClasses, @@ -127,7 +131,7 @@ class ParseGraphQLSchema { defaultRelaySchema.load(this); schemaTypes.load(this); - this._getParseClassesWithConfig(parseClasses, parseGraphQLConfig).forEach( + this._getParseClassesWithConfig(parseClassesArray, parseGraphQLConfig).forEach( ([parseClass, parseClassConfig]) => { // Some times schema return the _auth_data_ field // it will lead to unstable graphql generation order @@ -155,7 +159,7 @@ class ParseGraphQLSchema { } ); - defaultGraphQLTypes.loadArrayResult(this, parseClasses); + defaultGraphQLTypes.loadArrayResult(this, parseClassesArray); defaultGraphQLQueries.load(this); defaultGraphQLMutations.load(this); @@ -500,29 +504,17 @@ class ParseGraphQLSchema { const { parseClasses, parseGraphQLConfig, functionNamesString } = params; // First init - if (!this.parseCachedClasses || !this.graphQLSchema) { - const thisParseClassesObj = parseClasses.reduce((acc, clzz) => { - acc[clzz.className] = clzz; - return acc; - }, {}); - this.parseCachedClasses = thisParseClassesObj; + if (!this.graphQLSchema) { return true; } - const newParseCachedClasses = parseClasses.reduce((acc, clzz) => { - acc[clzz.className] = clzz; - return acc; - }, {}); - if ( isDeepStrictEqual(this.parseGraphQLConfig, parseGraphQLConfig) && this.functionNamesString === functionNamesString && - isDeepStrictEqual(this.parseCachedClasses, newParseCachedClasses) + isDeepStrictEqual(this.parseClasses, parseClasses) ) { return false; } - - this.parseCachedClasses = newParseCachedClasses; return true; } } diff --git a/src/GraphQL/helpers/objectsQueries.js b/src/GraphQL/helpers/objectsQueries.js index 7b973312ce2..ce0b05a2c70 100644 --- a/src/GraphQL/helpers/objectsQueries.js +++ b/src/GraphQL/helpers/objectsQueries.js @@ -12,9 +12,7 @@ const needToGetAllKeys = (fields, keys, parseClasses) => if (fields[key[0]]) { if (fields[key[0]].type === 'Relation') return false; if (fields[key[0]].type === 'Pointer') { - const subClass = parseClasses.find( - ({ className: parseClassName }) => fields[key[0]].targetClass === parseClassName - ); + const subClass = parseClasses[fields[key[0]].targetClass]; if (subClass && subClass.fields[key[1]]) { // Current sub key is not custom return false; @@ -48,13 +46,7 @@ const getObject = async ( ) => { const options = {}; try { - if ( - !needToGetAllKeys( - parseClasses.find(({ className: parseClassName }) => className === parseClassName).fields, - keys, - parseClasses - ) - ) { + if (!needToGetAllKeys(parseClasses[className].fields, keys, parseClasses)) { options.keys = keys; } } catch (e) { @@ -165,13 +157,7 @@ const findObjects = async ( // Silently replace the limit on the query with the max configured options.limit = config.maxLimit; } - if ( - !needToGetAllKeys( - parseClasses.find(({ className: parseClassName }) => className === parseClassName).fields, - keys, - parseClasses - ) - ) { + if (!needToGetAllKeys(parseClasses[className].fields, keys, parseClasses)) { options.keys = keys; } if (includeAll === true) { diff --git a/src/GraphQL/loaders/defaultGraphQLTypes.js b/src/GraphQL/loaders/defaultGraphQLTypes.js index f340cfb35f6..1520f0c53b5 100644 --- a/src/GraphQL/loaders/defaultGraphQLTypes.js +++ b/src/GraphQL/loaders/defaultGraphQLTypes.js @@ -1190,8 +1190,8 @@ const ELEMENT = new GraphQLObjectType({ // Default static union type, we update types and resolveType function later let ARRAY_RESULT; -const loadArrayResult = (parseGraphQLSchema, parseClasses) => { - const classTypes = parseClasses +const loadArrayResult = (parseGraphQLSchema, parseClassesArray) => { + const classTypes = parseClassesArray .filter(parseClass => parseGraphQLSchema.parseClassTypes[parseClass.className].classGraphQLOutputType ? true : false ) diff --git a/src/GraphQL/transformers/mutation.js b/src/GraphQL/transformers/mutation.js index 2a21816fe93..5b72d6f05d1 100644 --- a/src/GraphQL/transformers/mutation.js +++ b/src/GraphQL/transformers/mutation.js @@ -14,7 +14,7 @@ const transformTypes = async ( classGraphQLUpdateType, config: { isCreateEnabled, isUpdateEnabled }, } = parseGraphQLSchema.parseClassTypes[className]; - const parseClass = parseGraphQLSchema.parseClasses.find(clazz => clazz.className === className); + const parseClass = parseGraphQLSchema.parseClasses[className]; if (fields) { const classGraphQLCreateTypeFields = isCreateEnabled && classGraphQLCreateType ? classGraphQLCreateType.getFields() : null; diff --git a/src/GraphQL/transformers/query.js b/src/GraphQL/transformers/query.js index 92ea7be5fec..a91ee208ad9 100644 --- a/src/GraphQL/transformers/query.js +++ b/src/GraphQL/transformers/query.js @@ -51,7 +51,7 @@ const transformQueryConstraintInputToParse = ( parentConstraints, parseClasses ) => { - const fields = parseClasses.find(parseClass => parseClass.className === className).fields; + const fields = parseClasses[className].fields; if (parentFieldName === 'id' && className) { Object.keys(constraints).forEach(constraintName => { const constraintValue = constraints[constraintName];