Compare commits

..
256 Commits
Author SHA1 Message Date
Antoine Cormouls c098889eeb Merge branch 'add-transform-on-signup' into package-beta-2
# Conflicts:
#	package.json
2020-10-09 12:06:38 +02:00
Antoine Cormouls e458be2d8b transform input types also on user mutations 2020-10-09 11:58:32 +02:00
Snyk bot af8c9ff9f1 fix: upgrade parse from 2.15.0 to 2.16.0 (#6933)
Snyk has created this PR to upgrade parse from 2.15.0 to 2.16.0.

See this package in npm:
https://www.npmjs.com/package/parse

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-10-08 20:38:39 -07:00
Antonio Davi Macedo Coelho de Castro 06cb79e6a5 Upgrade @parse/s3-files-adapter (#6929) 2020-10-07 10:41:35 -07:00
Snyk botandAntonio Davi Macedo Coelho de Castro 2b26cc043e fix: upgrade @graphql-tools/stitch from 6.2.0 to 6.2.2 (#6927)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.2.0 to 6.2.2.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-10-04 20:20:10 -07:00
Snyk bot e0750ab813 fix: upgrade @graphql-tools/utils from 6.2.1 to 6.2.2 (#6928)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.2.1 to 6.2.2.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-10-04 18:37:16 -07:00
Snyk bot 6b2ca6938b fix: upgrade mongodb from 3.6.1 to 3.6.2 (#6925)
Snyk has created this PR to upgrade mongodb from 3.6.1 to 3.6.2.

See this package in npm:
https://www.npmjs.com/package/mongodb

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-10-02 12:01:18 -07:00
Antoine CormoulsandAntonio Davi Macedo Coelho de Castro 62048260c9 GraphQL: Optimize queries, fixes some null returns (on object), fix stitched GraphQLUpload (#6709)
* Optimize query, fixes some null returns, fix stitched GraphQLUpload

* Fix authData key selection

* Prefer Iso string since other GraphQL solutions use this format

* fix tests

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-10-01 15:19:26 -07:00
Antoine Cormouls 929c4e1b0d Do not throw error if user provide a pointer like index onMongo (#6923)
* Do not throw error if user provide a pointer like index on mongo

* Add test
2020-10-01 14:58:23 -07:00
timinationandTim Talbot 66f7af90c3 Hotfix instagram api (#6922)
* updated defaultURL to allow new insta API access

* updated defaultURL to allow new insta API access

* updates tests for new instagram API url

Co-authored-by: Tim Talbot <tim@dyingmethod.com>
2020-10-01 18:45:01 +02:00
Antoine Cormouls 57c029af5d version 2020-10-01 17:31:04 +02:00
Antoine Cormouls 56b123b624 Merge branch 'add-req-to-auth-handler' into package-beta-2
# Conflicts:
#	spec/ReadPreferenceOption.spec.js
#	src/Adapters/Storage/Mongo/MongoStorageAdapter.js
2020-10-01 17:28:23 +02:00
Antoine Cormouls eb253b3277 Merge branch 'handle-simple-pointer-index' into package-beta-2
# Conflicts:
#	package-lock.json
#	package.json
#	spec/AuthenticationAdapters.spec.js
#	spec/ParseGraphQLServer.spec.js
#	src/Adapters/Auth/google.js
#	src/Adapters/Auth/index.js
#	src/Adapters/Storage/Mongo/MongoStorageAdapter.js
2020-10-01 16:09:24 +02:00
Antoine Cormouls b3792121c2 Add test 2020-10-01 15:40:51 +02:00
Antoine Cormouls 12d854f7d9 master + add test
# Conflicts:
#	src/Adapters/Auth/index.js
2020-10-01 15:21:47 +02:00
Antoine Cormouls 7b8abf5bf3 Do not throw error if user provide a pointer like index on mongo 2020-10-01 14:48:06 +02:00
Snyk bot 922dc7636f fix: upgrade @graphql-tools/utils from 6.2.0 to 6.2.1 (#6918)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.2.0 to 6.2.1.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-26 03:24:29 +00:00
Snyk bot d57908e229 fix: package.json & package-lock.json to reduce vulnerabilities (#6917)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-PARSE-590110
2020-09-26 03:24:10 +00:00
Snyk botandAntonio Davi Macedo Coelho de Castro 916f92b443 fix: upgrade @graphql-tools/stitch from 6.1.0 to 6.2.0 (#6914)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.1.0 to 6.2.0.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-09-23 03:42:52 +00:00
Snyk bot d73b1cf5f2 fix: upgrade @graphql-tools/utils from 6.1.0 to 6.2.0 (#6915)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.1.0 to 6.2.0.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-23 03:28:32 +00:00
Snyk bot d66c0b64a2 fix: upgrade apollo-server-express from 2.16.1 to 2.17.0 (#6911)
Snyk has created this PR to upgrade apollo-server-express from 2.16.1 to 2.17.0.

See this package in npm:
https://www.npmjs.com/package/apollo-server-express

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-18 16:56:23 -07:00
Snyk bot b1d1b737a8 fix: upgrade pg-promise from 10.6.0 to 10.6.1 (#6912)
Snyk has created this PR to upgrade pg-promise from 10.6.0 to 10.6.1.

See this package in npm:
https://www.npmjs.com/package/pg-promise

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-18 14:37:45 -05:00
Diamond Lewis 1246c90e91 fix(directAccess/cloud-code): Pass installationId with LogIn (#6903)
InstallationId didn't get passed correctly. Resulting in _Session without installationId

https://github.com/parse-community/parse-server/blob/master/src/Routers/UsersRouter.js#L263

* Fixed error with POST /login and req.query is undefined
2020-09-17 11:53:02 -05:00
Snyk botandAntonio Davi Macedo Coelho de Castro 90f396b09c fix: upgrade @graphql-tools/stitch from 6.0.18 to 6.1.0 (#6909)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.18 to 6.1.0.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-09-17 15:48:51 +00:00
dependabot[bot] 6aba824ec1 chore(deps-dev): bump node-fetch from 2.6.0 to 2.6.1 (#6902)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-17 02:05:23 -07:00
Snyk bot 9f694dceb6 fix: upgrade @graphql-tools/utils from 6.0.18 to 6.1.0 (#6908)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.18 to 6.1.0.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-17 03:35:19 +00:00
Tom Fox b45d0c443a Replace greenskeeper badge (#6907) 2020-09-16 13:37:53 -05:00
Snyk bot ce9506161d fix: upgrade pg-promise from 10.5.8 to 10.6.0 (#6904)
Snyk has created this PR to upgrade pg-promise from 10.5.8 to 10.6.0.

See this package in npm:
https://www.npmjs.com/package/pg-promise

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-13 03:35:58 +00:00
Snyk bot b53853cff2 fix: upgrade jwks-rsa from 1.8.1 to 1.9.0 (#6898)
Snyk has created this PR to upgrade jwks-rsa from 1.8.1 to 1.9.0.

See this package in npm:
https://www.npmjs.com/package/jwks-rsa

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-09 17:01:24 -07:00
Antonio Davi Macedo Coelho de Castro d9c6fb1c6f Upgrade MongoDB to the version 3.6.1 (#6896) 2020-09-09 08:02:23 -07:00
Manuel 5fd73a72fd fix potential issue with setting geoNear.query to undefined (#6696)
* add test cases for geoNear aggregation

Test cases do not have the `query` parameter set in $geoNear aggregation stage. this is to test for a reported potential issue when the parameter is not set.

* fixed potential issue when setting the geoNear.query parameter to undefined

see dicussion in https://github.com/parse-community/parse-server/pull/6540

* fixed duplicate index name in test
2020-09-08 22:16:03 +02:00
Snyk bot 2e8e193f76 fix: upgrade subscriptions-transport-ws from 0.9.17 to 0.9.18 (#6895)
Snyk has created this PR to upgrade subscriptions-transport-ws from 0.9.17 to 0.9.18.

See this package in npm:
https://www.npmjs.com/package/subscriptions-transport-ws

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-08 03:34:58 +00:00
Snyk botandAntonio Davi Macedo Coelho de Castro f8501fffb6 fix: upgrade @graphql-tools/stitch from 6.0.17 to 6.0.18 (#6893)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.17 to 6.0.18.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-09-02 21:38:21 +00:00
Snyk bot 06a0b56720 fix: upgrade @graphql-tools/utils from 6.0.17 to 6.0.18 (#6892)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.17 to 6.0.18.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-02 03:35:09 +00:00
Snyk botandAntonio Davi Macedo Coelho de Castro 2e604d0b8f fix: upgrade @graphql-tools/stitch from 6.0.16 to 6.0.17 (#6889)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.16 to 6.0.17.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-09-02 02:07:54 +00:00
Snyk bot afc18b4775 fix: upgrade deepcopy from 2.0.0 to 2.1.0 (#6886)
Snyk has created this PR to upgrade deepcopy from 2.0.0 to 2.1.0.

See this package in npm:
https://www.npmjs.com/package/deepcopy

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-01 21:01:17 +00:00
Manuel d5005570ec upgraded bcrypt package (#6891) 2020-09-01 15:40:17 -05:00
Snyk bot 0a92cb7d37 fix: upgrade follow-redirects from 1.12.1 to 1.13.0 (#6890)
Snyk has created this PR to upgrade follow-redirects from 1.12.1 to 1.13.0.

See this package in npm:
https://www.npmjs.com/package/follow-redirects

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-01 03:54:49 +00:00
Snyk bot 7e7cc9a5fe fix: upgrade @graphql-tools/utils from 6.0.16 to 6.0.17 (#6888)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.16 to 6.0.17.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-09-01 03:34:56 +00:00
6e36411ce7 Keycloak auth adapter (#6376)
* Copy auth adapter to create keycloak adapter

* Add keycloak authentication adapter

* Add keycloak to auth adapter tests

* Improve tests

Co-authored-by: Rhuan <rhuan@MacBook-Pro-de-Rhuan.local>
Co-authored-by: Diamond Lewis <findlewis@gmail.com>
Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-08-30 23:11:07 -07:00
Snyk botandDiamond Lewis 4245a8f314 fix: upgrade @graphql-tools/stitch from 6.0.15 to 6.0.16 (#6885)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.15 to 6.0.16.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-27 16:00:25 +00:00
Snyk bot 72c405d98e fix: upgrade @graphql-tools/utils from 6.0.15 to 6.0.16 (#6884)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.15 to 6.0.16.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-08-27 03:35:51 +00:00
Manuel 983121581d changed incorrect key name in apple auth adapter tests (#6861)
* replaced client_id with clientId

* retroactively added breaking change to change log
2020-08-25 17:24:53 +02:00
dblythy 5743d752f7 Fix mutating beforeSubscribe Query (#6868)
* Fix beforeSubscribe

* Remove return value
2020-08-25 09:35:48 -05:00
dfa22391ad Fix beforeLogin for users logging in with AuthData (#6872)
* fix beforeLogin

* Remove Facebook AccountKit auth (#6870)

* Remove Facebook AccountKit auth

Account Kit services are no longer available.

https://developers.facebook.com/blog/post/2019/09/09/account-kit-services-no-longer-available-starting-march/

https://www.sinch.com/blog/facebook-account-kit-is-closing-down-are-your-apps-covered/

* remove flaky test

* fix: upgrade uuid from 8.2.0 to 8.3.0 (#6865)

Snyk has created this PR to upgrade uuid from 8.2.0 to 8.3.0.

See this package in npm:
https://www.npmjs.com/package/uuid

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>

* fix: package.json & package-lock.json to reduce vulnerabilities (#6864)

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-LODASH-590103

Co-authored-by: Diamond Lewis <findlewis@gmail.com>

* fix: upgrade ldapjs from 2.0.0 to 2.1.0 (#6857)

Snyk has created this PR to upgrade ldapjs from 2.0.0 to 2.1.0.

See this package in npm:
https://www.npmjs.com/package/ldapjs

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>

* fix: upgrade apollo-server-express from 2.15.1 to 2.16.0 (#6851)

Snyk has created this PR to upgrade apollo-server-express from 2.15.1 to 2.16.0.

See this package in npm:
https://www.npmjs.com/package/apollo-server-express

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>

* fix: upgrade @graphql-tools/stitch from 6.0.12 to 6.0.13 (#6845)

Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.12 to 6.0.13.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>

* fix: upgrade @graphql-tools/utils from 6.0.12 to 6.0.13 (#6846)

Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.12 to 6.0.13.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>

* [Snyk] Upgrade winston from 3.2.1 to 3.3.2 (#6799)

* fix: upgrade winston from 3.2.1 to 3.3.2

Snyk has created this PR to upgrade winston from 3.2.1 to 3.3.2.

See this package in NPM:
https://www.npmjs.com/package/winston

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

* fix tests

Co-authored-by: Diamond Lewis <findlewis@gmail.com>

* fix beforeLogin

* add test case

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
Co-authored-by: Snyk bot <snyk-bot@snyk.io>
2020-08-25 09:34:26 -05:00
Snyk botandAntonio Davi Macedo Coelho de Castro 7b13661d08 fix: upgrade @graphql-tools/stitch from 6.0.13 to 6.0.15 (#6876)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.13 to 6.0.15.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-08-23 21:40:56 -07:00
Snyk bot cc9a217efb fix: upgrade apollo-server-express from 2.16.0 to 2.16.1 (#6880)
Snyk has created this PR to upgrade apollo-server-express from 2.16.0 to 2.16.1.

See this package in npm:
https://www.npmjs.com/package/apollo-server-express

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-08-24 04:22:28 +00:00
Snyk bot 441a0dad79 fix: upgrade @graphql-tools/utils from 6.0.13 to 6.0.15 (#6875)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.13 to 6.0.15.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-08-21 19:18:13 +00:00
Snyk bot 9a5b3a5832 fix: upgrade winston from 3.3.2 to 3.3.3 (#6879)
Snyk has created this PR to upgrade winston from 3.3.2 to 3.3.3.

See this package in npm:
https://www.npmjs.com/package/winston

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-08-21 04:18:05 +00:00
Snyk bot 1daf36da99 fix: upgrade ldapjs from 2.1.0 to 2.1.1 (#6878)
Snyk has created this PR to upgrade ldapjs from 2.1.0 to 2.1.1.

See this package in npm:
https://www.npmjs.com/package/ldapjs

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-08-21 04:07:25 +00:00
Snyk bot 2d766a9186 fix: upgrade mongodb from 3.5.9 to 3.6.0 (#6877)
Snyk has created this PR to upgrade mongodb from 3.5.9 to 3.6.0.

See this package in npm:
https://www.npmjs.com/package/mongodb

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-08-21 03:55:45 +00:00
Snyk botandDiamond Lewis bff0ea96b8 [Snyk] Upgrade winston from 3.2.1 to 3.3.2 (#6799)
* fix: upgrade winston from 3.2.1 to 3.3.2

Snyk has created this PR to upgrade winston from 3.2.1 to 3.3.2.

See this package in NPM:
https://www.npmjs.com/package/winston

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

* fix tests

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-20 23:06:36 +00:00
Snyk botandDiamond Lewis d87dac1d09 fix: upgrade @graphql-tools/utils from 6.0.12 to 6.0.13 (#6846)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.12 to 6.0.13.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-20 20:49:47 +00:00
Snyk botandDiamond Lewis e6d69f98cc fix: upgrade @graphql-tools/stitch from 6.0.12 to 6.0.13 (#6845)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.12 to 6.0.13.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-20 20:18:15 +00:00
Snyk botandDiamond Lewis 1b8b1e9e58 fix: upgrade apollo-server-express from 2.15.1 to 2.16.0 (#6851)
Snyk has created this PR to upgrade apollo-server-express from 2.15.1 to 2.16.0.

See this package in npm:
https://www.npmjs.com/package/apollo-server-express

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-20 19:51:38 +00:00
Snyk botandDiamond Lewis cdd1afd923 fix: upgrade ldapjs from 2.0.0 to 2.1.0 (#6857)
Snyk has created this PR to upgrade ldapjs from 2.0.0 to 2.1.0.

See this package in npm:
https://www.npmjs.com/package/ldapjs

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-20 19:15:59 +00:00
Snyk botandDiamond Lewis 603cbe563a fix: package.json & package-lock.json to reduce vulnerabilities (#6864)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-LODASH-590103

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-20 18:16:38 +00:00
Snyk botandDiamond Lewis dd419e8e50 fix: upgrade uuid from 8.2.0 to 8.3.0 (#6865)
Snyk has created this PR to upgrade uuid from 8.2.0 to 8.3.0.

See this package in npm:
https://www.npmjs.com/package/uuid

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-08-20 17:29:32 +00:00
Diamond Lewis a0ac8e0686 Remove Facebook AccountKit auth (#6870)
* Remove Facebook AccountKit auth

Account Kit services are no longer available.

https://developers.facebook.com/blog/post/2019/09/09/account-kit-services-no-longer-available-starting-march/

https://www.sinch.com/blog/facebook-account-kit-is-closing-down-are-your-apps-covered/

* remove flaky test
2020-08-20 10:09:54 -07:00
Snyk bot 4cec333cf9 fix: upgrade subscriptions-transport-ws from 0.9.16 to 0.9.17 (#6841)
Snyk has created this PR to upgrade subscriptions-transport-ws from 0.9.16 to 0.9.17.

See this package in npm:
https://www.npmjs.com/package/subscriptions-transport-ws

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-08-02 03:34:58 +00:00
Tom Fox b4c8542a7e Small issue template change (#6839) 2020-07-29 22:06:13 +01:00
Tom Fox 19264ba9ff Further improve issue template (#6816)
* Update ---report-an-issue.md

* mtrezza's suggestions

* remove support from readme

* Rename ---report-an-issue.md to ---1-report-an-issue.md

* Update ---feature-request.md

* Rename ---feature-request.md to ---2-feature-request.md

* Delete ---getting-help.md

* Delete ---push-notifications.md

* Delete ---parse-server-3-0-0.md

* Create config.yml

* change support link to org wide doc
2020-07-29 21:26:09 +01:00
Snyk bot d4beda14af fix: upgrade pg-promise from 10.5.7 to 10.5.8 (#6838)
Snyk has created this PR to upgrade pg-promise from 10.5.7 to 10.5.8.

See this package in npm:
https://www.npmjs.com/package/pg-promise

See this project in Snyk:
https://app.snyk.io/org/dplewis/project/704d127e-7a24-4789-a0cd-807b7b972c86?utm_source=github&utm_medium=upgrade-pr
2020-07-29 15:13:53 +00:00
Arjun Vedak 42f75d6d94 fix(auth): Properly handle google token issuer (#6836)
* Updated TOKEN_ISSUER to 'accounts.google.com'

Hi, I was getting this issue from today morning parse-server/Adapters/Auth/google.js was expecting the TOKEN_ISSUER to be prefixed with https:// but on debugging the original value was not having the prefix, removing https:// from TOKEN_ISSUER solved this bug. This issue is introduced in 4.3.0 as in 4.2.0 it is working fine currently I have downgraded the version to 4.2.0 for it to work properly and suggesting the changes please merge this PR.

* Update google.js

* Update AuthenticationAdapters.spec.js

* Update google.js

* Update google.js
2020-07-29 09:55:59 -05:00
Snyk bot 92afcca4ee fix: upgrade graphql from 15.2.0 to 15.3.0 (#6832)
Snyk has created this PR to upgrade graphql from 15.2.0 to 15.3.0.

See this package in npm:
https://www.npmjs.com/package/graphql

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-27 03:37:30 +00:00
Manuel 5b71993175 improve field deletion in collection (#6823)
* added filter to updateMany when deleting field

* added test cases

* added changelog entry
2020-07-27 02:22:04 +02:00
Snyk bot 9ba9620bdf fix: upgrade ws from 7.3.0 to 7.3.1 (#6831)
Snyk has created this PR to upgrade ws from 7.3.0 to 7.3.1.

See this package in npm:
https://www.npmjs.com/package/ws

See this project in Snyk:
https://app.snyk.io/org/dplewis/project/704d127e-7a24-4789-a0cd-807b7b972c86?utm_source=github&utm_medium=upgrade-pr
2020-07-26 15:22:06 -07:00
Manuel 114d78e80a enabled MongoDB transaction test for MongoDB >= 4.0.4 (#6827) 2020-07-25 10:11:10 -07:00
Snyk botandAntonio Davi Macedo Coelho de Castro 6f1210c325 fix: upgrade @graphql-tools/stitch from 6.0.11 to 6.0.12 (#6824)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.11 to 6.0.12.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-07-24 18:05:27 +00:00
Snyk bot dd41bf1739 fix: upgrade @graphql-tools/utils from 6.0.11 to 6.0.12 (#6825)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.11 to 6.0.12.

See this package in npm:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-24 14:42:13 +00:00
Tom Fox 97f2456a28 add details of security fix (#6822) 2020-07-23 08:58:56 -07:00
Antonio Davi Macedo Coelho de Castro a6597ac669 Fix NPM publish process (#6821) 2020-07-22 23:46:17 +02:00
Snyk bot 0236efd113 fix: upgrade apollo-server-express from 2.15.0 to 2.15.1 (#6819)
Snyk has created this PR to upgrade apollo-server-express from 2.15.0 to 2.15.1.

See this package in npm:
https://www.npmjs.com/package/apollo-server-express

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-22 03:36:14 +00:00
Snyk bot d652517bbe fix: upgrade graphql from 15.1.0 to 15.2.0 (#6818)
Snyk has created this PR to upgrade graphql from 15.1.0 to 15.2.0.

See this package in npm:
https://www.npmjs.com/package/graphql

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-21 03:34:31 +00:00
Antonio Davi Macedo Coelho de Castro 3654f0280b Fix message on 4.3.0 release (#6813) 2020-07-19 23:23:15 +01:00
Antonio Davi Macedo Coelho de CastroandTom Fox 6f060e0909 Release 4.3.0 (#6811)
* Release version 4.3.0

* Update CHANGELOG.md

Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>

Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
2020-07-19 10:37:36 -07:00
d69833332c Optimizing pointer CLP query decoration done by DatabaseController#addPointerPermissions (#6747)
* Optimize CLP pointer query

* remove console log

* Update changelog

* Fix flow type checker issues

* Remove unused properties

* Fix typo, add one more test case for coverage

* Add support for CLP entry of type Object

Co-authored-by: Musa Yassin-Fort <musa.yassin@bureapr.com>
Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-07-17 13:14:43 -05:00
Antoine Cormouls 78239ac907 Merge pull request from GHSA-236h-rqv8-8q73
* Fix graphql viewer breach

* fix

* remove comment
2020-07-17 09:50:41 -07:00
Diamond Lewis f6ed5067b0 Remove wontfix label from stalebot (#6810)
Replacing the `wontfix` label with `stale` label. `wontfix` looks like we would never fix them.
2020-07-17 10:15:29 -05:00
Tom Fox ea1ec9b325 Update bug report template (#6805)
* Update bug report template

* fixes

* nit

* address Manuel's review

* Delete old issue template

* Delete old unused migration image

* Improve SO prompt
2020-07-17 10:47:07 +01:00
Snyk botandDiamond Lewis 5e67e7da43 fix: upgrade @graphql-tools/stitch from 6.0.10 to 6.0.11 (#6808)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.10 to 6.0.11.

See this package in NPM:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-07-17 05:02:34 +00:00
Omair Vaiyanianddplewis 85ec22ce3b fix(direct-access): save context not present if direct access enabled (#6764)
* fix(direct-access): save context not present if direct access enabled

[Open discussion](https://github.com/parse-community/parse-server/issues/6459) for feature with other issues

* only send context when present

* use object spread

* revert and add test

* rename test

Co-authored-by: dplewis <findlewis@gmail.com>
2020-07-16 22:56:47 -05:00
Snyk bot 2e708cc77c fix: upgrade @graphql-tools/utils from 6.0.10 to 6.0.11 (#6809)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.10 to 6.0.11.

See this package in NPM:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-17 03:46:27 +00:00
dependabot[bot] 4f7fd1732b chore(deps): bump lodash from 4.17.16 to 4.17.19 (#6807)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.16 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.16...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-16 22:10:35 -05:00
dblythyandDiamond Lewis 44015c3e35 Before Connect + Before Subscribe help required (#6793)
* Before Connect + Before Subscribe #1

* Cleanup and Documentation

* Add E2E tests

* Bump parse to 2.15.0

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-07-16 20:36:38 -05:00
Antoine Cormouls 93a88c5cde Add version to fix CDN (#6804) 2020-07-16 13:13:29 -07:00
Antoine Cormouls a11632eeff update 2020-07-16 18:17:57 +02:00
Antoine Cormouls b088c76105 version 2020-07-16 17:21:57 +02:00
Antoine Cormouls 190ca5a1c6 Merge branch 'gql-viewer-breach' into package-beta-2
# Conflicts:
#	package-lock.json
#	package.json
#	src/GraphQL/ParseGraphQLSchema.js
2020-07-16 17:21:18 +02:00
Antoine Cormouls ecd709e050 Fix graphql viewer breach 2020-07-16 14:38:35 +02:00
Manuel 3bd5684f67 Add idempotency (#6748)
* added idempotency router and middleware

* added idempotency rules for routes classes, functions, jobs, installaions, users

* fixed typo

* ignore requests without header

* removed unused var

* enabled feature only for MongoDB

* changed code comment

* fixed inconsistend storage adapter specification

* Trigger notification

* Travis CI trigger

* Travis CI trigger

* Travis CI trigger

* rebuilt option definitions

* fixed incorrect import path

* added new request ID header to allowed headers

* fixed typescript typos

* add new system class to spec helper

* fixed typescript typos

* re-added postgres conn parameter

* removed postgres conn parameter

* fixed incorrect schema for index creation

* temporarily disabling index creation to fix postgres issue

* temporarily disabling index creation to fix postgres issue

* temporarily disabling index creation to fix postgres issue

* temporarily disabling index creation to fix postgres issue

* temporarily disabling index creation to fix postgres issue

* temporarily disabling index creation to fix postgres issue

* temporarily disabling index creation to fix postgres issue

* trying to fix postgres issue

* fixed incorrect auth when writing to _Idempotency

* trying to fix postgres issue

* Travis CI trigger

* added test cases

* removed number grouping

* fixed test description

* trying to fix postgres issue

* added Github readme docs

* added change log

* refactored tests; fixed some typos

* fixed test case

* fixed default TTL value

* Travis CI Trigger

* Travis CI Trigger

* Travis CI Trigger

* added test case to increase coverage

* Trigger Travis CI

* changed configuration syntax to use regex; added test cases

* removed unused vars

* removed IdempotencyRouter

* Trigger Travis CI

* updated docs

* updated docs

* updated docs

* updated docs

* update docs

* Trigger Travis CI

* fixed coverage

* removed code comments
2020-07-15 13:10:33 -05:00
SebC cbf9da517b Add production Google Auth Adapter instead of using the development url (#6734)
* Add the production Google Auth Adapter instead of using the development url

* Update tests to the new google auth

* lint
2020-07-15 09:56:08 -07:00
Snyk bot 36bee12c24 fix: upgrade uuid from 8.1.0 to 8.2.0 (#6800)
Snyk has created this PR to upgrade uuid from 8.1.0 to 8.2.0.

See this package in NPM:
https://www.npmjs.com/package/uuid

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-15 08:13:14 -07:00
Snyk botandAntonio Davi Macedo Coelho de Castro 1cc3211256 fix: upgrade @graphql-tools/stitch from 6.0.1 to 6.0.10 (#6798)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.1 to 6.0.10.

See this package in NPM:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-07-13 23:12:07 -07:00
Snyk bot fc8a6687d7 fix: upgrade @graphql-tools/utils from 6.0.1 to 6.0.10 (#6797)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.1 to 6.0.10.

See this package in NPM:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-13 22:25:54 -07:00
Diamond Lewis 142eaa71bd Run Prettier JS #2 (#6796) 2020-07-13 15:13:08 -07:00
Diamond Lewis e6a6354b29 Run Prettier JS (#6795) 2020-07-13 13:06:52 -05:00
LongYinan ebb0727793 chore: replace bcrypt with @node-rs/bcrypt (#6794) 2020-07-13 10:08:01 -05:00
Jerome De Leonanddplewis 0abe9bb42d Make clear description of anonymous user (#6655)
* Make clear description of anonymous user

* Properly generate definitions

Co-authored-by: dplewis <findlewis@gmail.com>
2020-07-13 10:00:55 -05:00
Snyk bot 01b49b61ea fix: upgrade follow-redirects from 1.11.0 to 1.12.1 (#6788)
Snyk has created this PR to upgrade follow-redirects from 1.11.0 to 1.12.1.

See this package in NPM:
https://www.npmjs.com/package/follow-redirects

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-13 09:20:58 -05:00
Snyk bot d5fbd50fa8 fix: upgrade pg-promise from 10.5.6 to 10.5.7 (#6792)
Snyk has created this PR to upgrade pg-promise from 10.5.6 to 10.5.7.

See this package in NPM:
https://www.npmjs.com/package/pg-promise

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-13 09:20:30 -05:00
Snyk bot 33c1cdcd4e fix: upgrade apollo-server-express from 2.14.1 to 2.15.0 (#6787)
Snyk has created this PR to upgrade apollo-server-express from 2.14.1 to 2.15.0.

See this package in NPM:
https://www.npmjs.com/package/apollo-server-express

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-13 07:00:22 -05:00
Snyk bot f8df89a499 fix: upgrade winston-daily-rotate-file from 4.4.2 to 4.5.0 (#6789)
Snyk has created this PR to upgrade winston-daily-rotate-file from 4.4.2 to 4.5.0.

See this package in NPM:
https://www.npmjs.com/package/winston-daily-rotate-file

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-13 07:00:04 -05:00
Snyk bot 80d518f91d fix: upgrade jwks-rsa from 1.8.0 to 1.8.1 (#6790)
Snyk has created this PR to upgrade jwks-rsa from 1.8.0 to 1.8.1.

See this package in NPM:
https://www.npmjs.com/package/jwks-rsa

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-13 06:59:45 -05:00
Antoine Cormouls c85501718e Change merge system to avoid ref bugs (#6791) 2020-07-13 10:13:47 +02:00
yog27ray 34614e0f78 Pass context in beforeDelete, afterDelete, beforeFind and Parse.Cloud.run. (#6666)
* add context for following hooks.
1. beforeDelete
2. afterDelete
3. beforeFind
4. Cloud Function

* revert un-necessary code change.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* fix: failing test cases.

* review changes

* revert changes

* revert changes

* review changes

* lint changes

* review changes
2020-07-10 22:47:27 +02:00
Luca 4437ea73ba Allow passing custom gql schema function to ParseServer#start options (#6762) 2020-07-10 14:52:39 -05:00
Snyk bot e848b541bd fix: upgrade mongodb from 3.5.8 to 3.5.9 (#6775)
Snyk has created this PR to upgrade mongodb from 3.5.8 to 3.5.9.

See this package in NPM:
https://www.npmjs.com/package/mongodb

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-10 14:11:01 -05:00
Snyk bot 06bdec8219 fix: package.json & package-lock.json to reduce vulnerabilities (#6784)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-LODASH-567746
2020-07-10 14:04:57 -05:00
Kevin Yao d03ec18bcc feat: allow custom cors origin header (#6772) 2020-07-10 13:48:57 -05:00
Snyk bot 6fc42a526f fix: upgrade @apollographql/graphql-playground-html from 1.6.25 to 1.6.26 (#6774)
Snyk has created this PR to upgrade @apollographql/graphql-playground-html from 1.6.25 to 1.6.26.

See this package in NPM:
https://www.npmjs.com/package/@apollographql/graphql-playground-html

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-10 13:44:28 -05:00
Manuel f095dffcc3 fix context for cascade-saving and saving existing object (#6735)
* added test cases

* fixed unparsed context when updating object

* fixed context inheritance for cascade-saved objects

* upgraded parse dependecy to 2.14.0

* rebuild

* removed superfluous comments

* undo lint changes
2020-07-02 14:37:41 -05:00
Snyk bot 41fc7c1f21 fix: upgrade @apollographql/graphql-playground-html from 1.6.24 to 1.6.25 (#6767)
Snyk has created this PR to upgrade @apollographql/graphql-playground-html from 1.6.24 to 1.6.25.

See this package in NPM:
https://www.npmjs.com/package/@apollographql/graphql-playground-html

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-02 11:40:26 -05:00
Snyk bot d8d2a8da51 fix: upgrade graphql from 15.0.0 to 15.1.0 (#6761)
Snyk has created this PR to upgrade graphql from 15.0.0 to 15.1.0.

See this package in NPM:
https://www.npmjs.com/package/graphql

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-07-02 11:38:28 -05:00
Corey 5426f5a4f7 Add file bucket encryption using fileKey (#6765)
* add fileKey encryption to GridFSBucketStorageAdapter

* remove fileAdapter options from test spec

* ensure promise doesn't fall through in getFileData

* switch secretKey to fileKey
2020-07-01 18:43:26 -05:00
Vincent Semrau d5ac0f7748 removed gaze from dev dependencies and removed not working dev script (#6745)
* removed gaze from dev dependencies and removed not working dev script

* updated package-lock.json
2020-06-25 09:59:01 -05:00
Antoine Cormouls 9d38212ee3 try fix 2020-06-25 02:40:37 +02:00
Snyk botandDiamond Lewis b308a54f59 fix: upgrade @graphql-tools/stitch from 6.0.0 to 6.0.1 (#6737)
Snyk has created this PR to upgrade @graphql-tools/stitch from 6.0.0 to 6.0.1.

See this package in NPM:
https://www.npmjs.com/package/@graphql-tools/stitch

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-06-24 12:58:52 -05:00
Snyk bot 76203f41db fix: upgrade @graphql-tools/utils from 6.0.0 to 6.0.1 (#6738)
Snyk has created this PR to upgrade @graphql-tools/utils from 6.0.0 to 6.0.1.

See this package in NPM:
https://www.npmjs.com/package/@graphql-tools/utils

See this project in Snyk:
https://app.snyk.io/org/acinader/project/8c1a9edb-c8f5-4dc1-b221-4d6030a323eb?utm_source=github&utm_medium=upgrade-pr
2020-06-24 12:54:23 -05:00
greenkeeper[bot] e60217382f Update apollo-client to the latest version 🚀 (#6685)
* chore(package): update apollo-client to version 2.6.10

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-06-24 12:52:28 -05:00
greenkeeper[bot] a5ebbf36f0 Update apollo-server to the latest version 🚀 (#6720)
* fix(package): update apollo-server-express to version 2.14.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-06-24 17:27:51 +00:00
greenkeeper[bot] 2a937d3abe Update nyc to the latest version 🚀 (#6725)
* chore(package): update nyc to version 15.1.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-06-24 16:07:11 +00:00
greenkeeper[bot] f0edcb6669 Update ldapjs to the latest version 🚀 (#6724)
* fix(package): update ldapjs to version 2.0.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-06-24 16:07:03 +00:00
greenkeeper[bot] 30a4b53334 Update pg-promise to the latest version 🚀 (#6691)
* fix(package): update pg-promise to version 10.5.6

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-06-24 15:50:08 +00:00
greenkeeper[bot] 63b506c61e Update eslint-plugin-flowtype to the latest version 🚀 (#6715)
* chore(package): update eslint-plugin-flowtype to version 5.1.3

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-06-24 15:35:17 +00:00
Olle Jonsson d70d0d8734 REAMDE: Fix Sponsors badge (#6711) 2020-06-23 23:15:01 +01:00
greenkeeper[bot] d0a9c709fe Update mongodb to the latest version 🚀 (#6719)
* fix(package): update mongodb to version 3.5.8

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-28 13:26:21 +00:00
greenkeeper[bot] 6a743ca630 Update apollo-server to the latest version 🚀 (#6712)
* fix(package): update apollo-server-express to version 2.14.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-27 17:42:41 +00:00
greenkeeper[bot] e98445ec10 Update babel7 to the latest version 🚀 (#6710)
* chore(package): update @babel/cli to version 7.10.0

* chore(package): update @babel/core to version 7.10.0

* chore(package): update @babel/plugin-proposal-object-rest-spread to version 7.10.0

* chore(package): update @babel/preset-env to version 7.10.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-27 17:09:10 +00:00
greenkeeper[bot] ff12b31f0a Update eslint-plugin-flowtype to the latest version 🚀 (#6689)
* chore(package): update eslint-plugin-flowtype to version 5.0.3

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-27 17:08:34 +00:00
greenkeeper[bot] 1a0554fc28 Update mime to the latest version 🚀 (#6713)
* fix(package): update mime to version 2.4.6

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-27 16:44:50 +00:00
Antoine Cormouls b2db04cb77 update graphql 2020-05-27 16:26:38 +02:00
Antoine Cormouls f32f7fa829 version 2020-05-27 16:12:43 +02:00
Antoine Cormouls 5abc3ad467 update 2020-05-27 16:12:06 +02:00
Antoine Cormouls 9cec4ad3b8 Merge branch 'fix-gql-null-object-opti-issues' into package-beta 2020-05-27 16:11:09 +02:00
Antoine Cormouls cd6602f746 Prefer Iso string since other GraphQL solutions use this format 2020-05-27 16:10:28 +02:00
Antoine Cormouls 42064370b5 build 2020-05-27 15:48:24 +02:00
Antoine Cormouls 4e502113c2 Merge branch 'fix-gql-null-object-opti-issues' into package-beta 2020-05-27 15:48:00 +02:00
Antoine Cormouls fb6c343843 Fix authData key selection 2020-05-27 15:47:37 +02:00
Antoine Cormouls 78050bb703 version 2020-05-27 11:34:22 +02:00
Antoine Cormouls 9d3f8a2cbf build 2020-05-27 11:33:27 +02:00
Antoine Cormouls 48f34b3b85 Merge branch 'fix-gql-null-object-opti-issues' into package-beta
# Conflicts:
#	src/GraphQL/ParseGraphQLSchema.js
2020-05-27 11:25:15 +02:00
Antoine Cormouls 8c50b8921a Optimize query, fixes some null returns, fix stitched GraphQLUpload 2020-05-26 21:06:16 +02:00
Yaacov RydzinskiandAntonio Davi Macedo Coelho de Castro f56049b34b upgrade graphql-tools to v6 (#6701)
* upgrade to v6

* remove old graphql-tools package

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-05-24 23:35:45 -07:00
greenkeeper[bot] ddf99a1a43 Update lint-staged to the latest version 🚀 (#6692)
* chore(package): update lint-staged to version 10.2.3

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-25 06:31:38 +00:00
greenkeeper[bot] 0f36b96fda Update graphql-upload to the latest version 🚀 (#6704)
* fix(package): update graphql-upload to version 11.0.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-25 05:43:30 +00:00
greenkeeper[bot] ee3c86a243 Update uuid to the latest version 🚀 (#6697)
* fix(package): update uuid to version 8.1.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-20 19:27:16 +00:00
greenkeeper[bot] ce06f60f79 Update eslint-plugin-flowtype to the latest version 🚀 (#6688)
* chore(package): update eslint-plugin-flowtype to version 5.0.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-16 00:17:59 +00:00
greenkeeper[bot] e4da42d360 Update apollo-server to the latest version 🚀 (#6682)
* fix(package): update apollo-server-express to version 2.13.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-12 00:05:37 +00:00
greenkeeper[bot] 7f401ca850 Update ws to the latest version 🚀 (#6680)
* fix(package): update ws to version 7.3.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-11 05:42:07 +00:00
greenkeeper[bot] 9a340b81d8 Update pg-promise to the latest version 🚀 (#6676)
* fix(package): update pg-promise to version 10.5.4

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-09 15:39:17 +00:00
greenkeeper[bot] 45d5dfbb03 Update apollo-client to the latest version 🚀 (#6675)
* chore(package): update apollo-cache-inmemory to version 1.6.6

* chore(package): update apollo-client to version 2.6.9

* chore(package): update apollo-utilities to version 1.3.4

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-09 11:25:32 +00:00
Diamond Lewis 370215a39b Support Metadata in GridFSAdapter (#6660)
* Support Metadata in GridFSAdapter

* Useful for testing in the JS SDK
* Adds new endpoint to be used with `Parse.File.getData`
* Allows file adapters to return tags as well as future data.

* fix tests

* Make getMetadata optional

* Revert "fix tests"

This reverts commit 7706da13c6.

* improve coverage
2020-05-08 15:32:20 -05:00
greenkeeper[bot] c32ff20f4f Update pg-promise to the latest version 🚀 (#6670)
* fix(package): update pg-promise to version 10.5.3

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-06 18:50:11 +00:00
greenkeeper[bot] 2a75062583 Update apollo-server to the latest version 🚀 (#6668)
* fix(package): update apollo-server-express to version 2.13.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-04 17:38:39 +00:00
greenkeeper[bot] 8b29169644 Update lint-staged to the latest version 🚀 (#6661)
* chore(package): update lint-staged to version 10.2.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-02 04:55:36 +00:00
greenkeeper[bot] cdf5a238f3 Update mime to the latest version 🚀 (#6665)
* fix(package): update mime to version 2.4.5

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-05-02 03:33:20 +00:00
greenkeeper[bot] 4cd7d8fac3 Update commander to the latest version 🚀 (#6643)
* fix(package): update commander to version 5.1.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-30 05:58:53 +00:00
greenkeeper[bot]andDiamond Lewis b1506995ad Update uuid to the latest version 🚀 (#6659)
* fix(package): update uuid to version 8.0.0

* chore(package): update lockfile package-lock.json

* remove deprecated uuid/v4

* use uuidv4 as default

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-04-30 05:21:51 +00:00
Antoine Cormouls 4d1bd9346f Allow to unset file from graphql (#6651) 2020-04-29 22:18:25 -07:00
greenkeeper[bot] d279198db7 Update mongodb to the latest version 🚀 (#6656)
* fix(package): update mongodb to version 3.5.7

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-30 04:37:26 +00:00
greenkeeper[bot] c361cfd7ad Update lint-staged to the latest version 🚀 (#6654)
* chore(package): update lint-staged to version 10.2.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-30 04:37:22 +00:00
promisenxuandPromise Xu 67bf868208 Handle shutdown for RedisCacheAdapter (#6658)
* Handle shutdown for RedisCacheAdapter

* connected value need to be tested in setTimeout

Co-authored-by: Promise Xu <promise@klido.me>
2020-04-29 19:51:58 -07:00
greenkeeper[bot] 800b0392a3 Update babel7 to the latest version 🚀 (#6657)
* chore(package): update @babel/core to version 7.9.6

* chore(package): update @babel/plugin-proposal-object-rest-spread to version 7.9.6

* chore(package): update @babel/preset-env to version 7.9.6

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-29 21:00:35 +00:00
Manuel 2b7223355e fix explain on user class (#6650)
* added test case and fixed bug

* enabled test case only for mongodb
2020-04-28 11:45:01 -07:00
Manuel e78c07e169 Fix read preference for aggregate (#6585)
* added failing test cases

* fixed test cases for aggregate query

* added read preference option to aggregate router
2020-04-28 11:41:33 -07:00
Manuel 288e746888 add context to Parse.Object.save (#6626)
* added failing test

* added parsing of context in REST save request

* undo lint changes
2020-04-28 11:36:46 -07:00
greenkeeper[bot] 61546aad9a Update parse to the latest version 🚀 (#6653)
* fix(package): update parse to version 2.13.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-27 23:13:14 +00:00
Antoine Cormouls a72eecae4e graphql unset file 2020-04-27 18:31:23 +02:00
Antoine Cormouls 966f6bc697 Merge branch 'allow-to-set-file-to-null' into package 2020-04-27 18:29:23 +02:00
Antoine Cormouls 86cd24f428 Allow to unset file from graphql 2020-04-27 18:27:18 +02:00
Antoine Cormouls 5b3e799eb9 release 2020-04-25 19:14:08 +02:00
greenkeeper[bot] 71147eb066 Update ws to the latest version 🚀 (#6646)
* fix(package): update ws to version 7.2.5

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-25 11:20:25 +00:00
Antoine Cormouls f66795c971 Add req on auth handler 2020-04-23 19:45:20 +02:00
Corey f43afc5d40 Adding ssl config params to Postgres URI (#6580)
* use pg-promise native pg-connection-string to parse uri instead of ParseConfigParser.js. The allows for a more felxible uri for ssl and other params

* added ssl config params and others to PostgresConfigParser

* forgot to add back the original client file

* need to read in file at path for pfx, ca, key, and key

* convert file buffer to string to be consistant with node-postgres examples
2020-04-23 11:25:16 -05:00
Corey e6e5a8c578 Travis postgres update: removing unnecessary start of mongo-runner (#6594)
* use pg-promise native pg-connection-string to parse uri instead of ParseConfigParser.js. The allows for a more felxible uri for ssl and other params

* Revert "use pg-promise native pg-connection-string to parse uri instead of ParseConfigParser.js. The allows for a more felxible uri for ssl and other params"

This reverts commit a5926d3ff7.

* Updating travis postgres and removing unnecessary start of mongo-runner. Ensuring before_script and before_install matches the rest of travis
2020-04-23 10:28:40 -05:00
Antoine Cormouls 7a54e7d8d8 Build 2020-04-23 15:23:57 +02:00
Antoine Cormouls 16e7e82f95 Merge branch 'add-req-to-auth-adapter' into package 2020-04-23 15:21:26 +02:00
Antoine Cormouls 7ee0149b16 Add request option 2020-04-23 15:20:43 +02:00
Antoine Cormouls b3bb262d87 Merge branch 'upstream/master' 2020-04-23 15:00:09 +02:00
greenkeeper[bot] 0075c660ee Update pg-promise to the latest version 🚀 (#6635)
* fix(package): update pg-promise to version 10.5.2

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-23 03:26:46 +00:00
Antonio Davi Macedo Coelho de Castro 0dec1c80e2 Fix #6586 (#6605) 2020-04-22 11:04:07 -05:00
Corey 489aeae784 Fix: objectId size for Pointer in Postgres (#6619)
* Fixing objectId for Pointer in Postgres

* add test case for longer objectId pointer. Note that this test fails on Postgres before the addition of previous commit

* removed comment that wasn't needed
2020-04-22 11:01:11 -05:00
greenkeeper[bot] 37ec22b270 Update prettier to the latest version 🚀 (#6633)
* chore(package): update prettier to version 2.0.5

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-21 19:20:46 +00:00
Gordon SunandGordon Sun 9d8955cf90 improve a test case (#6629)
1. do not need to create a new server, use the reconfigureServer tool
3. use async await

Co-authored-by: Gordon Sun <gordon.sun@pipe17.com>
2020-04-21 10:37:43 -07:00
Antoine Cormouls f2f772084f Allow to resolve automatically Parse Type fields from Custom Schema (#6562)
* add package

* Allow real GraphQL Schema via ParseServer.start

* Allow resolve fields from auto graphQL Schema

* Simple merge

* fix + improve

* Add tests
2020-04-21 10:15:00 -07:00
greenkeeper[bot] ad027c2822 Update lint-staged to the latest version 🚀 (#6632)
* chore(package): update lint-staged to version 10.1.7

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-21 15:07:36 +00:00
Antoine Cormouls 10ff06d3b9 Merge branch 'upstream/master' 2020-04-21 13:39:07 +02:00
greenkeeper[bot] 185aaff074 Update pg-promise to the latest version 🚀 (#6623)
* fix(package): update pg-promise to version 10.5.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-21 05:36:35 +00:00
Gordon SunandGordon Sun c11e891298 remove wrong console log in test (#6627)
Co-authored-by: Gordon Sun <gordon.sun@pipe17.com>
2020-04-20 22:34:59 -07:00
Yaacov RydzinskiandAntonio Davi Macedo Coelho de Castro a6300a2201 Graphql tools v5 (#6611)
* Add test case for order option when extending the schema

* Remove fit

* upgrade to graphql-tools v5

revert #6515

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2020-04-20 22:16:48 -07:00
greenkeeper[bot] 84b2d072a6 Update lint-staged to the latest version 🚀 (#6625)
* chore(package): update lint-staged to version 10.1.5

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-20 22:15:04 +00:00
greenkeeper[bot] 7ccd6ce0d4 Update lint-staged to the latest version 🚀 (#6621)
* chore(package): update lint-staged to version 10.1.4

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-17 14:46:51 +00:00
Gordon SunandGordon Sun a5ef0be7f4 catch JSON.parse and return 403 properly (#6614)
Co-authored-by: Gordon Sun <gordon.sun@pipe17.com>
2020-04-15 12:59:49 -07:00
greenkeeper[bot] b08b930043 Update semver to the latest version 🚀 (#6610)
* fix(package): update semver to version 7.3.2

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-14 18:37:47 +00:00
greenkeeper[bot] ff011dc54d Update mongodb to the latest version 🚀 (#6606)
* fix(package): update mongodb to version 3.5.6

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-14 18:37:26 +00:00
greenkeeper[bot] 6980bcc3dd Update semver to the latest version 🚀 (#6609)
* fix(package): update semver to version 7.3.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-14 17:20:27 +00:00
greenkeeper[bot] a80cc733c2 Update graphql-tools to the latest version 🚀 (#6608)
* fix(package): update graphql-tools to version 5.0.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-14 15:15:34 +00:00
greenkeeper[bot] d1b544712f Update husky to the latest version 🚀 (#6592)
* chore(package): update husky to version 4.2.5

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-14 07:02:20 +00:00
greenkeeper[bot] 7c4c6a6838 Update jwks-rsa to the latest version 🚀 (#6599)
* fix(package): update jwks-rsa to version 1.8.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-14 04:44:50 +00:00
greenkeeper[bot] b966b91f37 Update semver to the latest version 🚀 (#6603)
* fix(package): update semver to version 7.3.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-14 01:35:26 +00:00
greenkeeper[bot] c5a1bc886b Update semver to the latest version 🚀 (#6598)
* fix(package): update semver to version 7.2.3

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-13 19:01:26 +00:00
greenkeeper[bot] 1053363940 Update semver to the latest version 🚀 (#6593)
* fix(package): update semver to version 7.2.2

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-10 16:39:19 +00:00
Antoine Cormouls 370f5f0eaa build 2020-04-10 13:57:54 +02:00
Antoine Cormouls 94bbc8e7d0 Merge branch 'resolve-type-from-auto-schema' into package 2020-04-10 13:57:16 +02:00
Antoine Cormouls 1469aaad17 fix + improve 2020-04-10 13:57:00 +02:00
Antoine Cormouls 40af386021 fix merge 2020-04-10 12:49:23 +02:00
Antoine Cormouls 9a3774dc1c Merge branch 'upstream/master' into package 2020-04-10 12:44:08 +02:00
Antoine Cormouls ec5337b07a Merge branch 'resolve-type-from-auto-schema' into package 2020-04-10 12:43:53 +02:00
Antoine Cormouls 75d97522cd Simple merge 2020-04-10 12:43:37 +02:00
greenkeeper[bot] 0698c20997 Update apollo-link to the latest version 🚀 (#6591)
* chore(package): update apollo-link-http to version 1.5.17

* chore(package): update apollo-link-ws to version 1.0.20

* chore(package): update apollo-link to version 1.2.14

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-09 22:00:24 +00:00
greenkeeper[bot] 3c13d8015c Update husky to the latest version 🚀 (#6587)
* chore(package): update husky to version 4.2.4

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-09 18:54:55 +00:00
greenkeeper[bot] f2fb6bd610 Update lint-staged to the latest version 🚀 (#6584)
* chore(package): update lint-staged to version 10.1.3

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-09 16:52:42 +00:00
Noah Silas 19086a8112 perf: Allow covering relation queries with minimal index (#6581)
* Apply linter changes on files I'm about to update

My actual changes were quite difficult to find when buried in this sea
of style changes, which were getting automatically applied during a
pre-commit hook. Here I just run the hooks against the files I'm going
to be touching in the following commit, so that a reviewer can ignore
these automatically generated diffs and just view the meaningful commit.

* perf: Allow covering relation queries with minimal index

When finding objects through a relation, we're sending Mongo queries
that look like this:
```
db.getCollection('_Join:foo:bar').find({ relatedId: { $in: [...] } });
```

From the result of that query, we're only reading the `owningId` field,
so we can start by adding it as a projection:
```
db.getCollection('_Join:foo:bar')
  .find({ relatedId: { $in: [...] } })
  .project({ owningId: 1 });
```

This seems like the perfect example of a query that could be satisfied
with an index scan: we are querying on one field, and only need one
field from the matching document.

For example, this can allow users to speed up the fetching of user roles
in authentication, because they query a `roles` relation on the `_Role`
collection. To add a covering index on that, you could now add an index
like the following:
```
db.getCollection('_Join:roles:_Role').createIndex(
  { relatedId: 1, owningId: 1 },
  { background: true }
);
```

One caveat there is that the index I propose above doesn't include the
`_id` column. For the query in question, we don't actually care about
the ID of the row in the join table, just the `owningId` field, so we
can avoid some overhead of putting the `_id` column into the index if we
can also drop it from the projection. This requires adding a small
special case to the MongoStorageAdapter, because the `_id` field is
special: you have to opt-out of using it by projecting `{ _id: 0 }`.
2020-04-08 11:43:45 -07:00
greenkeeper[bot] fc805fc5da Update semver to the latest version 🚀 (#6576)
* fix(package): update semver to version 7.2.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-08 04:12:17 +00:00
greenkeeper[bot] b791e13dfd Update babel7 to the latest version 🚀 (#6579)
* chore(package): update @babel/plugin-proposal-object-rest-spread to version 7.9.5

* chore(package): update @babel/preset-env to version 7.9.5

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-07 22:35:27 +00:00
greenkeeper[bot] c2fa25d846 Update apollo-server to the latest version 🚀 (#6578)
* fix(package): update apollo-server-express to version 2.12.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-07 19:16:24 +00:00
Antoine Cormouls 12432f6455 Fix 2020-04-07 12:26:43 +02:00
Antoine Cormouls 1760dedf99 Merge branch 'downgrade-graphql' into package 2020-04-07 12:25:24 +02:00
Antoine Cormouls 51e21d36a2 Downgrade graphql 2020-04-07 12:11:00 +02:00
Siddharth RameshandDiamond Lewis cc5f14e11a fix: Postrgres group aggregation (#6522)
* Postrgres group aggregation

* convert tabs to spaces

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-04-06 12:20:33 -05:00
greenkeeper[bot] bfdcba8d5c Update lint-staged to the latest version 🚀 (#6566)
* chore(package): update lint-staged to version 10.1.2

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-06 17:05:08 +00:00
greenkeeper[bot] bcd5f1717e Update prettier to the latest version 🚀 (#6568)
* chore(package): update prettier to version 2.0.3

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-06 16:45:39 +00:00
Antoine Cormouls 48beb2e4b5 Remove beta (#6565) 2020-04-05 20:21:56 +01:00
Gordon SunandGordon Sun b08571774f Allow set user mapped from JWT directly on request (#6411)
* Use user mapped from JWT for Auth

* Add a test for userFromJWT bypass

Co-authored-by: Gordon Sun <gordon.sun@pipe17.com>
2020-04-03 17:09:37 -05:00
greenkeeper[bot] 81b22b21b5 Update nyc to the latest version 🚀 (#6563)
* chore(package): update nyc to version 15.0.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-03 17:46:11 +00:00
Arthur CinaderandTom Fox 1045eeb700 Prep release 4.2 (#6560)
* Prep release 4.2

* fix links, consistent formatting

* remove unnecessary credit

* add one more commit

* Fix link, remove double spaces

* add a few more commits
run npm audit fix

* little fixes

Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
2020-04-03 09:53:08 -07:00
Antoine Cormouls d56cd797fd Merge branch 'resolve-type-from-auto-schema' into package
# Conflicts:
#	package-lock.json
2020-04-03 16:41:56 +02:00
Antoine Cormouls 5ffba089cb Merge branch 'upstream/master' into resolve-type-from-auto-schema 2020-04-03 16:39:20 +02:00
CoreyandArthur Cinader dcba8e0b7c Case insensitive username and email indexing and query planning for Postgres (#6506)
* Update .travis.yml

testing error to see what happens...

* Update .travis.yml

Attempting to resolve postgres in CL by installing postgis via sudo instead of through apt/packages

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

Removed extra lines of postgres that were under "services" and "addons". I believe the "postgresql" line under "services" was installing the default of 9.6 and "addons" was installing postgres 11. My guess is the fail was occurring due to 9.6 being called sometimes and it never had postgis installed. If this is true, the solution is to only install one version of postgres, which is version 11 with postgis 2.5.

* Adding test case for caseInsensitive 

Adding test case for verifying indexing for caseInsensitive

* Implementing ensureIndex

* Updated PostgresStorageAdapter calls to ST_DistanceSphere. Note this has a minimum requirement of postgis 2.2. Documented the change in the readme. This is address #6441

* updated postgres sections of contributions with newer postgres info. Also switched postgis image it points to as the other one hasn't been updated in over a year.

* more info about postgres

* added necessary password for postgres docker

* updated wording in contributions

* removed reference to MacJr environment var when starting postgres in contributions. The official image automatically creates a user named 'postgres', but it does require a password, which the command sets to 'postgres'

* added more time to docker sleep/wait to enter postgis commands. This will always take a few seconds because the db is installing from scratch everytime. If postgres/postgis images aren't already downloaded locally, it will take even longer. Worst case, if the command times out on first run. Stop and remove the parse-postgres container and run the command again, 20 seconds should be enough wait time then

* latest changes

* initial fix, need to test

* fixed lint

* Adding test case for caseInsensitive 

Adding test case for verifying indexing for caseInsensitive

* Implementing ensureIndex

* Updated PostgresStorageAdapter calls to ST_DistanceSphere. Note this has a minimum requirement of postgis 2.2. Documented the change in the readme. This is address #6441

* updated postgres sections of contributions with newer postgres info. Also switched postgis image it points to as the other one hasn't been updated in over a year.

* more info about postgres

* added necessary password for postgres docker

* updated wording in contributions

* removed reference to MacJr environment var when starting postgres in contributions. The official image automatically creates a user named 'postgres', but it does require a password, which the command sets to 'postgres'

* added more time to docker sleep/wait to enter postgis commands. This will always take a few seconds because the db is installing from scratch everytime. If postgres/postgis images aren't already downloaded locally, it will take even longer. Worst case, if the command times out on first run. Stop and remove the parse-postgres container and run the command again, 20 seconds should be enough wait time then

* latest changes

* initial fix, need to test

* fixed lint

* Adds caseInsensitive constraints to database, but doesn't pass regular tests. I believe this is because ensureIndex in the Postgres adapter is returning wrong. Also, some issues with the caseInsensitive test case

* this version addes the indexes, but something still wrong with the ensureIndex method in adapter

* removed code from suggestions

* fixed lint

* fixed PostgresAdapter test case

* small bug in test case

* reverted back to main branch package.json and lock file

* fixed docker command in Contribute file

* added ability to explain the find method

* triggering another build

* added ability to choose to 'analyze' a query which actually executes (this can be bad when looking at a query plan for Insert, Delete, etc.) the query or to just setup the query plan (default, previous versions defaulted to 'analyze'). Alse added some comparsons on sequential vs index searches for postgres

* made sure to check that search actually returns 1 result. Removed prep time comparison between searches as this seemed to be variable

* added test cases using find and case insensitivity on fields other than username and password. Also added explain to aggregate method

* fixing issue where query in aggregate replaced the map method incorrectly

* reverted back to mapping for aggregate method to make sure it's the issue

* switched back to caseInsensitive check for email and username as it was causing issues

* fixed aggregate method using explain

* made query plain results more flexible/reusable. Got rid of droptables as 'beforeEach' already handles this

* updated CONTRIBUTING doc to use netrecon as default username for postgres (similar to old style). Note that the official postgres docker image for postgres requires POSTGRES_PASSWORD to be set in order to use the image

* left postgis at 2.5 in the contributing document as this is the last version to be backwards compatibile with older versions of parse server

* updating docker command for postgres

Co-authored-by: Arthur Cinader <700572+acinader@users.noreply.github.com>
2020-04-03 09:24:56 -05:00
Antoine Cormouls 437e188da9 Allow resolve fields from auto graphQL Schema 2020-04-03 16:17:09 +02:00
greenkeeper[bot] a8a367ed84 Update pg-promise to the latest version 🚀 (#6555)
* fix(package): update pg-promise to version 10.5.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-03 14:11:14 +00:00
greenkeeper[bot] 3625b371cf Update eslint-plugin-flowtype to the latest version 🚀 (#6536)
* chore(package): update eslint-plugin-flowtype to version 4.7.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-03 14:07:42 +00:00
Corey 7121ea0a16 Fixed issue that prevented Postgres Tests from passing locally and on any port other than 5432 in travis (#6531)
* Attempting to fix Postgres issue

* Attempting to fix Postgres issue

trying to stop loop

* Attempting to fix Postgres

isolating postgres calls

* Attempting to fix Postgres issue

Separating jobs

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Separating builds again

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Just added back version 10, just in case it gets called

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Update .travis.yml

* Attempting to fix postgres

Removed postgres installs from unneeded test cases. Added the ability to test Postgres 10 and 11

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Added test for postgres 12 that's allowed to fail

* Attempting to fix postgres

* Attempting to fix postgres 

Second round to see if it fails eventually

* Attempting to fix postgres

Round 3

* Attempting to fix postgres

Allowing all postgres to fail since it seems to occur randomly

* Temporary fix: separated mongo and postgres in travis

Now the mongo and postgres scripts are independent of each other to prevent the `ERROR:  could not access file "$libdir/postgis-2.4": No such file or directory` of showing up in the rest of the builds.

In addition, a test for postgres-12 has been added for future compatibility. Both the postgres-11 and postgres-12 have been added to `allow_failures` because the aforementioned error still creeps up. Important note is that the error has nothing to do with compatibility with postgres, but rather seems to be an error of how postgres (or really postgis) is being referenced in the respective travis distribution. Lastly, this error, if truly random should appear less than before as the postgres scripts aren't being run for every build as it previously was running.

* Allowing all postgres to fail

* Allowing multiple names to fail

* Removing preinstalled versions of postgres from list

Seeing if this gets rid of the random error

* Use postgres made for dist

* Second round

* Round 3

* Round 4

* Round 5

* Fixed issue with random postgres fail

Removing the native postgres builds at the right time seems to have fixed the random error from before.

The postgres tests are now not allowed to fail.

* Added back postgres 11 and 12 to allow_failures

The actual problem is fixed, but it seems there are some instability with some of the test cases for postgres that need to be addressed at another time.

The issues that pop up are: 
- Postgres-11
```Failures:
1) Cloud Code cloud jobs should set the message / success on the job
  Message:
    Expected undefined to equal 'hello'.
  Stack:
    Error: Expected undefined to equal 'hello'.
        at <Jasmine>
        at req.message.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1571:46)
        at process._tickCallback (internal/process/next_tick.js:68:7)
```

- Postgres-12
``` 
Failures:
1) Cloud Code cloud jobs should set the message / success on the job
  Message:
    Expected undefined to equal 'hello'.
  Stack:
    Error: Expected undefined to equal 'hello'.
        at <Jasmine>
        at req.message.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1571:46)
        at process._tickCallback (internal/process/next_tick.js:68:7)
  Message:
    Expected 'running' to equal 'succeeded'.
  Stack:
    Error: Expected 'running' to equal 'succeeded'.
        at <Jasmine>
        at promise.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1580:45)
        at process._tickCallback (internal/process/next_tick.js:68:7)
```

* added travis scripts for postgres

* Setting up before_install and before_script

This should shrink the footprint of the file and and reduce the redundancy of calls for postgres.

Added support for testing of Postgres 9 and 10 in the scripts, not adding the tests though

* make scripts executable

* Update .travis.yml

* add sourcing in script

* trying to fix source

* fixing env var in script

* fixed ; near then

* Cleaning up travis file

removed old lines

* Finishing clean up

* Fixing allow_failures since "name" was removed

* Update .travis.yml

* Removed Postgres 11 from allow_failures

* I think using travis default postgres port of 5433 will allow us to not have to remove anything from the image

* Switching travis to postgres port 5433

* modifying script for test

* modifying script for test

* modifying script for test

* reverting back to working way with removing postgres from image

* Reverted back to removing postgres from image

* removing postgres 12

* removed postgres-12 from allow_failures

* updated postgres method from deprecated. Also updating postgis to 3.0

* updated postgis to 3.0

* Update .travis.yml

* fix Postgres test issues that causes some tests to fail locally when using PARSE_SERVER_TEST_DATABASE_URI

* removed dependence on creating adapter locally in testcase and use config instead.

* fixed one more potential issue with postgres adapter

* modified travis and script to leverage PARSE_SERVER_TEST_DATABASE_URI

* changes to before install to reduce time

* add updated port to script for psql connection

* fixed arg for psql

* added back conf file as it probably contains the default permissions

* seeing if stopping/starting postgres back-to-back was the issue

* checking fix

* revert to working version of install script

* leave default port

* removing uninstall of postgres from script

* looks like postgres won't start until the others are removed

* forgoing using posgres service and starting directly, hoping it allows to skip remove

* removed sudo for starting postgres

* adding back sude, but using default user for postgres

* fix

* don't start service

* init db cluster before starting

* remove folder befor init

* remove folder befor init

* still have to stop service

* switch ports after new configs are made

* switch ports after new configs are made

* went back to removing to get it to start properly

* seeing if you can use postgres installaition out of the box

* seeing if you can use postgres installaition out of the box

* copy hba file, then stop,start

* testing using port as argument

* working version

* round 2

* updated documentation to reflect changes

* use restart instead of stop/start for postgres

* removed extra lines to ensure consistency with future builds

* reload instead of restart postgres

* restart postgres since we can't currently connect

* Switch to testonly for postgres

* run testonly

* Declare as mongo test since it's handed coded to a mongo uri
2020-04-03 08:53:57 -05:00
stevestencilandDiamond Lewis a9dba442b1 Add file triggers and file meta data (#6344)
* added hint to aggregate

* added support for hint in query

* added else clause to aggregate

* fixed tests

* updated tests

* Add tests and clean up

* added beforeSaveFile and afterSaveFile triggers

* Add support for explain

* added some validation

* added support for metadata and tags

* tests?

* trying tests

* added tests

* fixed failing tests

* added some docs for fileObject

* updated hooks to use Parse.File

* added test for already saved file being returned in hook

* added beforeDeleteFile and afterDeleteFile hooks

* removed contentLength because it's already in the header

* added fileSize param to FileTriggerRequest

* added support for client side metadata and tags

* removed fit test

* removed unused import

* added loging to file triggers

* updated error message

* updated error message

* fixed tests

* fixed typos

* Update package.json

* fixed failing test

* fixed error message

* fixed failing tests (hopefully)

* TESTS!!!

* Update FilesAdapter.js

fixed comment

* added test for changing file name

* updated comments

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-04-02 16:00:15 -05:00
greenkeeper[bot] d48de7d97a Update graphql to the latest version 🚀 (#6558)
* fix(package): update graphql to version 15.0.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-04-02 15:53:24 +00:00
greenkeeper[bot] d52d35bc2c Update lint-staged to the latest version 🚀 (#6550)
* chore(package): update lint-staged to version 10.1.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-31 15:21:47 +00:00
greenkeeper[bot] 384c2a9ade Update parse to the latest version 🚀 (#6548)
* fix(package): update parse to version 2.12.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-30 22:33:09 +00:00
greenkeeper[bot] 63a3fea218 Update lint-staged to the latest version 🚀 (#6547)
* chore(package): update lint-staged to version 10.1.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-30 16:29:45 +00:00
greenkeeper[bot] 958c706ac6 Update apollo-upload-client to the latest version 🚀 (#6546)
* chore(package): update apollo-upload-client to version 13.0.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-30 09:58:55 +00:00
greenkeeper[bot] 5d653d9bcb Update lint-staged to the latest version 🚀 (#6533)
* chore(package): update lint-staged to version 10.0.9

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-30 04:16:23 +00:00
greenkeeper[bot] 4d44edbd5d Update follow-redirects to the latest version 🚀 (#6545)
* fix(package): update follow-redirects to version 1.11.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-29 20:32:33 +00:00
Manuel Trezza 19dea5bbd3 Fix aggregate geoNear with date query (#6540)
* added failing test case

* add date conversion for geoNear query

- geoNear stages were not parsed for date fields, but mongodb nodejs adapter requires date object

* reverted unnecessary code auto-formatting

* limited parsing to query property of geoNear stage

- the geoNear object contains parameter keys which could be identical to field names in the collection, which should not be parsed and changed, therefore restricting parsing only to query parameter key

* reverted unnecessary code auto-formatting

* added index type parameter to ensureIndex

- required to create geo index for geoNear test

* added geo index creation to test case

* fixed dates in test case

- test case likey failed due to date rounding

* added error output to console

- temporary, to find out why test fails on mongodb 3.6.9

* create seperate class to avoid multiple geo indices on TestObject class

- mongodb <4.0 does not allow nultiple geo indices on a class when using geoNear
- see https://docs.mongodb.com/v3.6/reference/operator/aggregation/geoNear/#behavior

* fixed incorrect result validation

- results were not ordered properly, so test validation failed sometimes

* removed error output to console

This reverts commit da81c515cb.
2020-03-29 15:15:40 -05:00
greenkeeper[bot] 13bda61fc9 Update prettier to the latest version 🚀 (#6532)
* chore(package): update prettier to version 2.0.2

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-24 01:51:25 +00:00
Antoine Cormouls b6506de90b Fix (#6507) 2020-03-23 01:58:23 -07:00
Antoine Cormouls 255cb15c19 GraphQL: Handle properly keys for pointer fields (#6499)
* Fix Unknow type bug on overloaded types

* check args too

* Additional fix to detect custom fields on pointer
2020-03-23 01:40:04 -07:00
Antoine Cormouls 312a4bc812 Switch ACL to Relay Global Id (#6495) 2020-03-23 01:35:42 -07:00
Antoine Cormouls 1b8f057904 GraphQL: Change Order Enum Strategy (#6515)
* fix merged enum

* fix
2020-03-23 01:02:52 -07:00
c178acd347 fixing enableExpressErrorHandler logic (#6423)
* fixing enableExpressErrorHandler logic

* Fix tests

Co-authored-by: n.andryukhin <n.andryukhin@mediasoft.team>
Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-03-22 22:49:12 -07:00
Corey 927676b34e Updating Postgres/Postgis Call and Postgis to 3.0 (#6528)
* Attempting to fix Postgres issue

* Attempting to fix Postgres issue

trying to stop loop

* Attempting to fix Postgres

isolating postgres calls

* Attempting to fix Postgres issue

Separating jobs

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Separating builds again

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Just added back version 10, just in case it gets called

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Update .travis.yml

* Attempting to fix postgres

Removed postgres installs from unneeded test cases. Added the ability to test Postgres 10 and 11

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Added test for postgres 12 that's allowed to fail

* Attempting to fix postgres

* Attempting to fix postgres 

Second round to see if it fails eventually

* Attempting to fix postgres

Round 3

* Attempting to fix postgres

Allowing all postgres to fail since it seems to occur randomly

* Temporary fix: separated mongo and postgres in travis

Now the mongo and postgres scripts are independent of each other to prevent the `ERROR:  could not access file "$libdir/postgis-2.4": No such file or directory` of showing up in the rest of the builds.

In addition, a test for postgres-12 has been added for future compatibility. Both the postgres-11 and postgres-12 have been added to `allow_failures` because the aforementioned error still creeps up. Important note is that the error has nothing to do with compatibility with postgres, but rather seems to be an error of how postgres (or really postgis) is being referenced in the respective travis distribution. Lastly, this error, if truly random should appear less than before as the postgres scripts aren't being run for every build as it previously was running.

* Allowing all postgres to fail

* Allowing multiple names to fail

* Removing preinstalled versions of postgres from list

Seeing if this gets rid of the random error

* Use postgres made for dist

* Second round

* Round 3

* Round 4

* Round 5

* Fixed issue with random postgres fail

Removing the native postgres builds at the right time seems to have fixed the random error from before.

The postgres tests are now not allowed to fail.

* Added back postgres 11 and 12 to allow_failures

The actual problem is fixed, but it seems there are some instability with some of the test cases for postgres that need to be addressed at another time.

The issues that pop up are: 
- Postgres-11
```Failures:
1) Cloud Code cloud jobs should set the message / success on the job
  Message:
    Expected undefined to equal 'hello'.
  Stack:
    Error: Expected undefined to equal 'hello'.
        at <Jasmine>
        at req.message.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1571:46)
        at process._tickCallback (internal/process/next_tick.js:68:7)
```

- Postgres-12
``` 
Failures:
1) Cloud Code cloud jobs should set the message / success on the job
  Message:
    Expected undefined to equal 'hello'.
  Stack:
    Error: Expected undefined to equal 'hello'.
        at <Jasmine>
        at req.message.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1571:46)
        at process._tickCallback (internal/process/next_tick.js:68:7)
  Message:
    Expected 'running' to equal 'succeeded'.
  Stack:
    Error: Expected 'running' to equal 'succeeded'.
        at <Jasmine>
        at promise.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1580:45)
        at process._tickCallback (internal/process/next_tick.js:68:7)
```

* added travis scripts for postgres

* Setting up before_install and before_script

This should shrink the footprint of the file and and reduce the redundancy of calls for postgres.

Added support for testing of Postgres 9 and 10 in the scripts, not adding the tests though

* make scripts executable

* Update .travis.yml

* add sourcing in script

* trying to fix source

* fixing env var in script

* fixed ; near then

* Cleaning up travis file

removed old lines

* Finishing clean up

* Fixing allow_failures since "name" was removed

* Update .travis.yml

* Removed Postgres 11 from allow_failures

* I think using travis default postgres port of 5433 will allow us to not have to remove anything from the image

* Switching travis to postgres port 5433

* modifying script for test

* modifying script for test

* modifying script for test

* reverting back to working way with removing postgres from image

* Reverted back to removing postgres from image

* removing postgres 12

* removed postgres-12 from allow_failures

* updated postgres method from deprecated. Also updating postgis to 3.0

* updated postgis to 3.0

* Update .travis.yml
2020-03-22 21:30:42 -05:00
Maravilho SingaandDiamond Lewis b60502d8a0 Instagram: Support passing in API url (#6398)
* Update instagram.js

Instagram API was updated.

* Update instagram.js

Instagram API was updated and is not allowing anymore to setup new projects to use the old style but it is still working for the ones that have it already setup.

New docs are listed here: https://developers.facebook.com/docs/instagram-basic-display-api/

I've added support for both old and new API
To use new API just add new field "api_type" = "new_api" in client side.

For old API just no changes needed.

* support api url

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-03-22 11:24:22 -05:00
greenkeeper[bot] beecedbdf1 Update prettier to the latest version 🚀 (#6525)
* chore(package): update prettier to version 2.0.1

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-21 21:48:33 -05:00
UnderratedDev dd2b64ef65 updated 2 files for allowing multiple client ids (#6523)
* updated 2 files for allowing multiple client ids

* updated tests that fail due to user inputting data in code, added todo comment to them stating what we need to do to fix them
2020-03-21 19:04:10 -05:00
greenkeeper[bot] 76f0edc922 Update prettier to the latest version 🚀 (#6524)
* chore(package): update prettier to version 2.0.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-21 23:06:51 +00:00
greenkeeper[bot] a5977f3816 Update babel7 to the latest version 🚀 (#6520)
* chore(package): update @babel/core to version 7.9.0

* chore(package): update @babel/plugin-proposal-object-rest-spread to version 7.9.0

* chore(package): update @babel/plugin-transform-flow-strip-types to version 7.9.0

* chore(package): update @babel/preset-env to version 7.9.0

* chore(package): update lockfile package-lock.json

Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
2020-03-20 17:06:22 +00:00
Corey 352eeb217e Travis: Separating Postgres & Mongo scripts (#6505)
* Attempting to fix Postgres issue

* Attempting to fix Postgres issue

trying to stop loop

* Attempting to fix Postgres

isolating postgres calls

* Attempting to fix Postgres issue

Separating jobs

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Separating builds again

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Just added back version 10, just in case it gets called

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Update .travis.yml

* Attempting to fix postgres

Removed postgres installs from unneeded test cases. Added the ability to test Postgres 10 and 11

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

* Attempting to fix postgres

Added test for postgres 12 that's allowed to fail

* Attempting to fix postgres

* Attempting to fix postgres 

Second round to see if it fails eventually

* Attempting to fix postgres

Round 3

* Attempting to fix postgres

Allowing all postgres to fail since it seems to occur randomly

* Temporary fix: separated mongo and postgres in travis

Now the mongo and postgres scripts are independent of each other to prevent the `ERROR:  could not access file "$libdir/postgis-2.4": No such file or directory` of showing up in the rest of the builds.

In addition, a test for postgres-12 has been added for future compatibility. Both the postgres-11 and postgres-12 have been added to `allow_failures` because the aforementioned error still creeps up. Important note is that the error has nothing to do with compatibility with postgres, but rather seems to be an error of how postgres (or really postgis) is being referenced in the respective travis distribution. Lastly, this error, if truly random should appear less than before as the postgres scripts aren't being run for every build as it previously was running.

* Allowing all postgres to fail

* Allowing multiple names to fail

* Removing preinstalled versions of postgres from list

Seeing if this gets rid of the random error

* Use postgres made for dist

* Second round

* Round 3

* Round 4

* Round 5

* Fixed issue with random postgres fail

Removing the native postgres builds at the right time seems to have fixed the random error from before.

The postgres tests are now not allowed to fail.

* Added back postgres 11 and 12 to allow_failures

The actual problem is fixed, but it seems there are some instability with some of the test cases for postgres that need to be addressed at another time.

The issues that pop up are: 
- Postgres-11
```Failures:
1) Cloud Code cloud jobs should set the message / success on the job
  Message:
    Expected undefined to equal 'hello'.
  Stack:
    Error: Expected undefined to equal 'hello'.
        at <Jasmine>
        at req.message.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1571:46)
        at process._tickCallback (internal/process/next_tick.js:68:7)
```

- Postgres-12
``` 
Failures:
1) Cloud Code cloud jobs should set the message / success on the job
  Message:
    Expected undefined to equal 'hello'.
  Stack:
    Error: Expected undefined to equal 'hello'.
        at <Jasmine>
        at req.message.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1571:46)
        at process._tickCallback (internal/process/next_tick.js:68:7)
  Message:
    Expected 'running' to equal 'succeeded'.
  Stack:
    Error: Expected 'running' to equal 'succeeded'.
        at <Jasmine>
        at promise.then.then.jobStatus (/home/travis/build/parse-community/parse-server/spec/CloudCode.spec.js:1580:45)
        at process._tickCallback (internal/process/next_tick.js:68:7)
```

* added travis scripts for postgres

* Setting up before_install and before_script

This should shrink the footprint of the file and and reduce the redundancy of calls for postgres.

Added support for testing of Postgres 9 and 10 in the scripts, not adding the tests though

* make scripts executable

* Update .travis.yml

* add sourcing in script

* trying to fix source

* fixing env var in script

* fixed ; near then

* Cleaning up travis file

removed old lines

* Finishing clean up

* Fixing allow_failures since "name" was removed

* Update .travis.yml

* Removed Postgres 11 from allow_failures

* I think using travis default postgres port of 5433 will allow us to not have to remove anything from the image

* Switching travis to postgres port 5433

* modifying script for test

* modifying script for test

* modifying script for test

* reverting back to working way with removing postgres from image

* Reverted back to removing postgres from image

* removing postgres 12

* removed postgres-12 from allow_failures
2020-03-19 17:29:50 -05:00
191 changed files with 11402 additions and 6168 deletions
-45
View File
@@ -1,45 +0,0 @@
<!--
**Please use this template. If you don't use this template, your issue may be closed without comment.**
We use GitHub Issues for bugs.
If you have a non-bug question, ask on [Parse Community's Discourse forum](https://community.parseplatform.org/c/parse-server)
If you have a vulnerability disclosure, please follow our policy available here https://github.com/parse-community/parse-server/blob/master/SECURITY.md
You may also search through existing issues before opening a new one: https://github.com/parse-community/parse-server/issues?utf8=%E2%9C%93&q=is%3Aissue
-->
### Issue Description
<!-- Describe your issue in as much detail as possible. -->
### Steps to reproduce
<!-- Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable. -->
#### Expected Results
<!-- What you expected to happen. -->
#### Actual Outcome
<!-- What is happening instead. -->
### Environment Setup
- **Server**
- parse-server version (Be specific! Don't say 'latest'.) : [FILL THIS OUT]
- Operating System: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [FILL THIS OUT]
- **Database**
- MongoDB version: [FILL THIS OUT]
- Storage engine: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]
### Logs/Trace
Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.
@@ -0,0 +1,48 @@
---
name: "\U0001F41B Report an issue"
about: A feature of Parse Server is not working as expected.
title: ''
labels: ''
assignees: ''
---
### New Issue Checklist
<!-- Please check the following boxes [ ] -> [x] before submitting your issue. Click the "Preview" tab for better readability. Thanks for reporting issues back to Parse Server! -->
- [ ] I am not disclosing a [vulnerability](https://github.com/parse-community/parse-server/blob/master/SECURITY.md).
- [ ] I am not just asking a [question](https://github.com/parse-community/.github/blob/master/SUPPORT.md).
- [ ] I have searched through [existing issues](https://github.com/parse-community/parse-server/issues?q=is%3Aissue).
- [ ] I can reproduce the issue with the [latest version of Parse Server](https://github.com/parse-community/parse-server/releases). <!-- We don't investigate issues for outdated releases. -->
### Issue Description
<!-- What is the specific issue with Parse Server? -->
### Steps to reproduce
<!-- How can someone else reproduce the issue? -->
### Actual Outcome
<!-- What outcome, for example query result, did you get? -->
### Expected Outcome
<!-- What outcome, for example query result, did you expect? -->
### Environment
<!-- Be specific with versions, don't use "latest" or semver ranges like "~x.y.z" or "^x.y.z". -->
Server
- Parse Server version: `FILL_THIS_OUT`
- Operating system: `FILL_THIS_OUT`
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): `FILL_THIS_OUT`
Database
- System (MongoDB or Postgres): `FILL_THIS_OUT`
- Database version: `FILL_THIS_OUT`
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): `FILL_THIS_OUT`
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc): `FILL_THIS_OUT`
- SDK version: `FILL_THIS_OUT`
### Logs
<!-- Include relevant logs here. Turn on additional logging by configuring VERBOSE=1 in your environment. -->
@@ -1,6 +1,9 @@
---
name: "\U0001F4A1 Feature request"
about: Suggest an idea for this project
name: "\U0001F4A1 Request a feature"
about: Suggest new functionality or an enhancement of existing functionality.
title: ''
labels: ''
assignees: ''
---
@@ -1,5 +0,0 @@
---
name: "🙋‍Getting Help"
about: Join https://community.parseplatform.org
---
@@ -1,56 +0,0 @@
---
name: "\U0001F525 parse-server 3.0.0"
about: Report an issue while migrating to parse-server 3.0.0
---
<!---
** Use this template only if you have an issue migrating to parse-server 3.0.0 **
If you have a question, ask on [Parse Community's Discourse forum](https://community.parseplatform.org/c/parse-server)
If you have a vulnerability disclosure, please follow our policy available here https://github.com/parse-community/parse-server/blob/master/SECURITY.md
You may also search through existing issues before opening a new one: https://github.com/parse-community/parse-server/issues?utf8=%E2%9C%93&q=is%3Aissue
--- Please use this template. If you don't use this template, your issue may be closed without comment. ---
--->
# Before opening the issue please ensure that you have:
- [ ] [Read the migration guide](https://github.com/parse-community/parse-server/blob/master/3.0.0.md) to parse-server 3.0.0
- [ ] [Read the migration guide](https://github.com/parse-community/Parse-SDK-JS/blob/master/2.0.0.md) to Parse SDK JS 2.0.0
### Issue Description
<!--- Describe your issue in as much detail as possible. -->
### Steps to reproduce
<!--- Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable. --->
### Expected Results
<!--- What you expected to happen. --->
### Actual Outcome
<!--- What is happening instead. --->
### Environment Setup
- **Server**
- parse-server version (Be specific! Don't say 'latest'.) : [FILL THIS OUT]
- Operating System: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [FILL THIS OUT]
- **Database**
- MongoDB version: [FILL THIS OUT]
- Storage engine: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]
### Logs/Trace
<!--- Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment. --->
@@ -1,49 +0,0 @@
---
name: "\U0001F4F2 Push Notifications"
about: Issues with setting up or delivering push notifications
---
<!---
**We use GitHub Issues for reporting bugs with parse-server.**
If you have a *question*, you should join the [Parse Community's Discourse forum](https://community.parseplatform.org/c/parse-server)
If you have a non-bug question, ask on Stack Overflow or Server Fault:
- https://stackoverflow.com/questions/tagged/parse.com
- https://serverfault.com/tags/parse
If you have a vulnerability disclosure, please follow our policy available here https://github.com/parse-community/parse-server/blob/master/SECURITY.md
You may also search through existing issues before opening a new one: https://github.com/parse-community/parse-server/issues?utf8=%E2%9C%93&q=is%3Aissue
--- Please use this template. If you don't use this template, your issue may be closed without comment. ---
--->
### Issue Description
<!--- Describe your issue in as much detail as possible. -->
### Push Configuration
Please provide a copy of your `push` configuration here, obfuscating any sensitive part.
### Environment Setup
- **Server**
- parse-server version (Be specific! Don't say 'latest'.) : [FILL THIS OUT]
- Operating System: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [FILL THIS OUT]
- **Database**
- MongoDB version: [FILL THIS OUT]
- Storage engine: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]
### Logs/Trace
<!--- Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment. --->
@@ -1,51 +0,0 @@
---
name: "\U0001F41B Report an issue"
about: Report an issue on parse-server
---
<!---
**We use GitHub Issues for reporting bugs with parse-server.**
If you have a *question*, you should join the [Parse Community's Discourse forum](https://community.parseplatform.org/c/parse-server).
If you have a vulnerability disclosure, please follow our policy available here https://github.com/parse-community/parse-server/blob/master/SECURITY.md
You may also search through existing issues before opening a new one: https://github.com/parse-community/parse-server/issues?utf8=%E2%9C%93&q=is%3Aissue
--- Please use this template. If you don't use this template, your issue may be closed without comment. ---
--->
### Issue Description
<!--- Describe your issue in as much detail as possible. -->
### Steps to reproduce
<!--- Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable. --->
### Expected Results
<!--- What you expected to happen. --->
### Actual Outcome
<!--- What is happening instead. --->
### Environment Setup
- **Server**
- parse-server version (Be specific! Don't say 'latest'.) : [FILL THIS OUT]
- Operating System: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [FILL THIS OUT]
- **Database**
- MongoDB version: [FILL THIS OUT]
- Storage engine: [FILL THIS OUT]
- Hardware: [FILL THIS OUT]
- Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]
### Logs/Trace
<!--- Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment. --->
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 🙋🏽‍♀️ Getting help with code
url: https://stackoverflow.com/questions/tagged/parse-platform
about: Get help with code-level questions on Stack Overflow.
- name: 🙋 Getting general help
url: https://community.parseplatform.org
about: Get help with other questions on our Community Forum.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

+1 -1
View File
@@ -17,7 +17,7 @@ exemptLabels:
- security
- up-for-grabs
# Label to use when marking an issue as stale
staleLabel: wontfix
staleLabel: stale
# Limit to only `issues` not `pulls`
only: issues
# Comment to post when marking an issue as stale. Set to `false` to disable
+1
View File
@@ -1,3 +1,4 @@
semi: true
trailingComma: "es5"
singleQuote: true
arrowParens: "avoid"
+13 -14
View File
@@ -4,12 +4,6 @@ dist: xenial
services:
- redis
- docker
addons:
postgresql: '11'
apt:
packages:
- postgresql-11-postgis-2.5
- postgresql-11-postgis-2.5-scripts
branches:
only:
- master
@@ -27,22 +21,14 @@ env:
jobs:
- MONGODB_VERSION=4.0.4 MONGODB_TOPOLOGY=replicaset MONGODB_STORAGE_ENGINE=wiredTiger
- MONGODB_VERSION=3.6.9
- PARSE_SERVER_TEST_DB=postgres
- PARSE_SERVER_TEST_CACHE=redis
- NODE_VERSION=12.12.0
before_install:
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- npm install -g greenkeeper-lockfile@1
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/11/main/postgresql.conf
- sudo cp /etc/postgresql/{10,11}/main/pg_hba.conf
- sudo service postgresql stop
- sudo service postgresql start 11
before_script:
- node -e 'require("./lib/index.js")'
- psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database
- psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database
- greenkeeper-lockfile-update
script:
- npm run lint
@@ -54,6 +40,19 @@ jobs:
allow_failures:
- env: NODE_VERSION=12.12.0
include:
- stage:
addons:
postgresql: '11'
apt:
packages:
- postgresql-11-postgis-3
- postgresql-11-postgis-3-scripts
env: POSTGRES_MAJOR_VERSION=11 PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://localhost:5433/parse_server_postgres_adapter_test_database
before_install: bash scripts/before_install_postgres.sh
before_script: bash scripts/before_script_postgres.sh
script:
- npm run lint
- npm run coverage
- stage: release
node_js: '10'
env:
+77 -7
View File
@@ -1,7 +1,77 @@
## Parse Server Changelog
### master
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.1.0...master)
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.3.0...master)
- IMPROVE: Optimized deletion of class field from schema by using an index if available to do an index scan instead of a collection scan. [#6815](https://github.com/parse-community/parse-server/issues/6815). Thanks to [Manuel Trezza](https://github.com/mtrezza).
### 4.3.0
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.2.0...4.3.0)
- PERFORMANCE: Optimizing pointer CLP query decoration done by DatabaseController#addPointerPermissions [#6747](https://github.com/parse-community/parse-server/pull/6747). Thanks to [mess-lelouch](https://github.com/mess-lelouch).
- SECURITY: Fix security breach on GraphQL viewer [78239ac](https://github.com/parse-community/parse-server/commit/78239ac9071167fdf243c55ae4bc9a2c0b0d89aa), [secuity advisory](https://github.com/parse-community/parse-server/security/advisories/GHSA-236h-rqv8-8q73). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- FIX: Save context not present if direct access enabled [#6764](https://github.com/parse-community/parse-server/pull/6764). Thanks to [Omair Vaiyani](https://github.com/omairvaiyani).
- NEW: Before Connect + Before Subscribe [#6793](https://github.com/parse-community/parse-server/pull/6793). Thanks to [dblythy](https://github.com/dblythy).
- FIX: Add version to playground to fix CDN [#6804](https://github.com/parse-community/parse-server/pull/6804). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- NEW (EXPERIMENTAL): Idempotency enforcement for client requests. This deduplicates requests where the client intends to send one request to Parse Server but due to network issues the server receives the request multiple times. **Caution, this is an experimental feature that may not be appropriate for production.** [#6748](https://github.com/parse-community/parse-server/issues/6748). Thanks to [Manuel Trezza](https://github.com/mtrezza).
- FIX: Add production Google Auth Adapter instead of using the development url [#6734](https://github.com/parse-community/parse-server/pull/6734). Thanks to [SebC.](https://github.com/SebC99).
- IMPROVE: Run Prettier JS Again Without requiring () on arrow functions [#6796](https://github.com/parse-community/parse-server/pull/6796). Thanks to [Diamond Lewis](https://github.com/dplewis).
- IMPROVE: Run Prettier JS [#6795](https://github.com/parse-community/parse-server/pull/6795). Thanks to [Diamond Lewis](https://github.com/dplewis).
- IMPROVE: Replace bcrypt with @node-rs/bcrypt [#6794](https://github.com/parse-community/parse-server/pull/6794). Thanks to [LongYinan](https://github.com/Brooooooklyn).
- IMPROVE: Make clear description of anonymous user [#6655](https://github.com/parse-community/parse-server/pull/6655). Thanks to [Jerome De Leon](https://github.com/JeromeDeLeon).
- IMPROVE: Simplify GraphQL merge system to avoid js ref bugs [#6791](https://github.com/parse-community/parse-server/pull/6791). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- NEW: Pass context in beforeDelete, afterDelete, beforeFind and Parse.Cloud.run [#6666](https://github.com/parse-community/parse-server/pull/6666). Thanks to [yog27ray](https://github.com/yog27ray).
- NEW: Allow passing custom gql schema function to ParseServer#start options [#6762](https://github.com/parse-community/parse-server/pull/6762). Thanks to [Luca](https://github.com/lucatk).
- NEW: Allow custom cors origin header [#6772](https://github.com/parse-community/parse-server/pull/6772). Thanks to [Kevin Yao](https://github.com/kzmeyao).
- FIX: Fix context for cascade-saving and saving existing object [#6735](https://github.com/parse-community/parse-server/pull/6735). Thanks to [Manuel](https://github.com/mtrezza).
- NEW: Add file bucket encryption using fileKey [#6765](https://github.com/parse-community/parse-server/pull/6765). Thanks to [Corey Baker](https://github.com/cbaker6).
- FIX: Removed gaze from dev dependencies and removed not working dev script [#6745](https://github.com/parse-community/parse-server/pull/6745). Thanks to [Vincent Semrau](https://github.com/vince1995).
- IMPROVE: Upgrade graphql-tools to v6 [#6701](https://github.com/parse-community/parse-server/pull/6701). Thanks to [Yaacov Rydzinski](https://github.com/yaacovCR).
- NEW: Support Metadata in GridFSAdapter [#6660](https://github.com/parse-community/parse-server/pull/6660). Thanks to [Diamond Lewis](https://github.com/dplewis).
- NEW: Allow to unset file from graphql [#6651](https://github.com/parse-community/parse-server/pull/6651). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- NEW: Handle shutdown for RedisCacheAdapter [#6658](https://github.com/parse-community/parse-server/pull/6658). Thanks to [promisenxu](https://github.com/promisenxu).
- FIX: Fix explain on user class [#6650](https://github.com/parse-community/parse-server/pull/6650). Thanks to [Manuel](https://github.com/mtrezza).
- FIX: Fix read preference for aggregate [#6585](https://github.com/parse-community/parse-server/pull/6585). Thanks to [Manuel](https://github.com/mtrezza).
- NEW: Add context to Parse.Object.save [#6626](https://github.com/parse-community/parse-server/pull/6626). Thanks to [Manuel](https://github.com/mtrezza).
- NEW: Adding ssl config params to Postgres URI [#6580](https://github.com/parse-community/parse-server/pull/6580). Thanks to [Corey Baker](https://github.com/cbaker6).
- FIX: Travis postgres update: removing unnecessary start of mongo-runner [#6594](https://github.com/parse-community/parse-server/pull/6594). Thanks to [Corey Baker](https://github.com/cbaker6).
- FIX: ObjectId size for Pointer in Postgres [#6619](https://github.com/parse-community/parse-server/pull/6619). Thanks to [Corey Baker](https://github.com/cbaker6).
- IMPROVE: Improve a test case [#6629](https://github.com/parse-community/parse-server/pull/6629). Thanks to [Gordon Sun](https://github.com/sunshineo).
- NEW: Allow to resolve automatically Parse Type fields from Custom Schema [#6562](https://github.com/parse-community/parse-server/pull/6562). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- FIX: Remove wrong console log in test [#6627](https://github.com/parse-community/parse-server/pull/6627). Thanks to [Gordon Sun](https://github.com/sunshineo).
- IMPROVE: Graphql tools v5 [#6611](https://github.com/parse-community/parse-server/pull/6611). Thanks to [Yaacov Rydzinski](https://github.com/yaacovCR).
- FIX: Catch JSON.parse and return 403 properly [#6589](https://github.com/parse-community/parse-server/pull/6589). Thanks to [Gordon Sun](https://github.com/sunshineo).
- PERFORMANCE: Allow covering relation queries with minimal index [#6581](https://github.com/parse-community/parse-server/pull/6581). Thanks to [Noah Silas](https://github.com/noahsilas).
- FIX: Fix Postgres group aggregation [#6522](https://github.com/parse-community/parse-server/pull/6522). Thanks to [Siddharth Ramesh](https://github.com/srameshr).
- NEW: Allow set user mapped from JWT directly on request [#6411](https://github.com/parse-community/parse-server/pull/6411). Thanks to [Gordon Sun](https://github.com/sunshineo).
### 4.2.0
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.1.0...4.2.0)
__BREAKING CHANGES:__
- CHANGE: The Sign-In with Apple authentication adapter parameter `client_id` has been changed to `clientId`. If using the Apple authentication adapter, this change requires to update the Parse Server configuration accordingly. See [#6523](https://github.com/parse-community/parse-server/pull/6523) for details.
___
- UPGRADE: Parse JS SDK to 2.12.0 [#6548](https://github.com/parse-community/parse-server/pull/6548)
- NEW: Support Group aggregation on multiple columns for Postgres [#6483](https://github.com/parse-community/parse-server/pull/6483). Thanks to [Siddharth Ramesh](https://github.com/srameshr).
- FIX: Improve test reliability by instructing Travis to only install one version of Postgres [#6490](https://github.com/parse-community/parse-server/pull/6490). Thanks to
[Corey Baker](https://github.com/cbaker6).
- FIX: Unknown type bug on overloaded types [#6494](https://github.com/parse-community/parse-server/pull/6494). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- FIX: Improve reliability of 'SignIn with AppleID' [#6416](https://github.com/parse-community/parse-server/pull/6416). Thanks to [Andy King](https://github.com/andrewking0207).
- FIX: Improve Travis reliability by separating Postgres & Mongo scripts [#6505](https://github.com/parse-community/parse-server/pull/6505). Thanks to
[Corey Baker](https://github.com/cbaker6).
- NEW: Apple SignIn support for multiple IDs [#6523](https://github.com/parse-community/parse-server/pull/6523). Thanks to [UnderratedDev](https://github.com/UnderratedDev).
- NEW: Add support for new Instagram API [#6398](https://github.com/parse-community/parse-server/pull/6398). Thanks to [Maravilho Singa](https://github.com/maravilhosinga).
- FIX: Updating Postgres/Postgis Call and Postgis to 3.0 [#6528](https://github.com/parse-community/parse-server/pull/6528). Thanks to
[Corey Baker](https://github.com/cbaker6).
- FIX: enableExpressErrorHandler logic [#6423](https://github.com/parse-community/parse-server/pull/6423). Thanks to [Nikolay Andryukhin](https://github.com/hybeats).
- FIX: Change Order Enum Strategy for GraphQL [#6515](https://github.com/parse-community/parse-server/pull/6515). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- FIX: Switch ACL to Relay Global Id for GraphQL [#6495](https://github.com/parse-community/parse-server/pull/6495). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- FIX: Handle keys for pointer fields properly for GraphQL [#6499](https://github.com/parse-community/parse-server/pull/6499). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- FIX: GraphQL file mutation [#6507](https://github.com/parse-community/parse-server/pull/6507). Thanks to [Antoine Cormouls](https://github.com/Moumouls).
- FIX: Aggregate geoNear with date query [#6540](https://github.com/parse-community/parse-server/pull/6540). Thanks to [Manuel](https://github.com/mtrezza).
- NEW: Add file triggers and file meta data [#6344](https://github.com/parse-community/parse-server/pull/6344). Thanks to [stevestencil](https://github.com/stevestencil).
- FIX: Improve local testing of postgres [#6531](https://github.com/parse-community/parse-server/pull/6531). Thanks to
[Corey Baker](https://github.com/cbaker6).
- NEW: Case insensitive username and email indexing and query planning for Postgres [#6506](https://github.com/parse-community/parse-server/issues/6441). Thanks to
[Corey Baker](https://github.com/cbaker6).
### 4.1.0
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.0.2...4.1.0)
@@ -17,11 +87,11 @@ __BREAKING CHANGES:__
2. Change username and email validation to be case insensitive. This change should be transparent in most use cases. The validation behavior should now behave 'as expected'. See [#5634](https://github.com/parse-community/parse-server/pull/5634) for details.
> __Special Note on Upgrading to Parse Server 4.0.0 and above__
>
>
> In addition to the breaking changes noted above, [#5634](https://github.com/parse-community/parse-server/pull/5634) introduces a two new case insensitive indexes on the `User` collection. Special care should be taken when upgrading to this version to ensure that:
>
>
> 1. The new indexes can be successfully created (see issue [#6465](https://github.com/parse-community/parse-server/issues/6465) for details on a potential issue for your installation).
>
>
> 2. Care is taken ensure that there is adequate compute capacity to create the index in the background while still servicing requests.
- FIX: attempt to get travis to deploy to npmjs again. See [#6475](https://github.com/parse-community/parse-server/pull/6457). Thanks to [Arthur Cinader](https://github.com/acinader).
@@ -35,11 +105,11 @@ __BREAKING CHANGES:__
[Full Changelog](https://github.com/parse-community/parse-server/compare/3.10.0...4.0.0)
> __Special Note on Upgrading to Parse Server 4.0.0 and above__
>
>
> In addition to the breaking changes noted below, [#5634](https://github.com/parse-community/parse-server/pull/5634) introduces a two new case insensitive indexes on the `User` collection. Special care should be taken when upgrading to this version to ensure that:
>
>
> 1. The new indexes can be successfully created (see issue [#6465](https://github.com/parse-community/parse-server/issues/6465) for details on a potential issue for your installation).
>
>
> 2. Care is taken ensure that there is adequate compute capacity to create the index in the background while still servicing requests.
- NEW: add hint option to Parse.Query [#6322](https://github.com/parse-community/parse-server/pull/6322). Thanks to [Steve Stencil](https://github.com/stevestencil)
+23 -8
View File
@@ -58,30 +58,45 @@ Once you have babel running in watch mode, you can start making changes to parse
If your pull request introduces a change that may affect the storage or retrieval of objects, you may want to make sure it plays nice with Postgres.
* Run the tests against the postgres database with `PARSE_SERVER_TEST_DB=postgres npm test`. You'll need to have postgres running on your machine and setup [appropriately](https://github.com/parse-community/parse-server/blob/master/.travis.yml#L37) or use [`Docker`](#run-a-parse-postgres-with-docker).
* Run the tests against the postgres database with `PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://postgres:password@localhost:5432/parse_server_postgres_adapter_test_database npm run testonly`. You'll need to have postgres running on your machine and setup [appropriately](https://github.com/parse-community/parse-server/blob/master/.travis.yml#L43) or use [`Docker`](#run-a-parse-postgres-with-docker).
* The Postgres adapter has a special debugger that traces all the sql commands. You can enable it with setting the environment variable `PARSE_SERVER_LOG_LEVEL=debug`
* If your feature is intended to only work with MongoDB, you should disable PostgreSQL-specific tests with:
- `describe_only_db('mongo')` // will create a `describe` that runs only on mongoDB
- `it_only_db('mongo')` // will make a test that only runs on mongo
- `it_exclude_dbs(['postgres'])` // will make a test that runs against all DB's but postgres
* Similarly, if your feature is intended to only work with PostgreSQL, you should disable MongoDB-specific tests with:
- `describe_only_db('postgres')` // will create a `describe` that runs only on postgres
- `it_only_db('postgres')` // will make a test that only runs on postgres
- `it_exclude_dbs(['mongo'])` // will make a test that runs against all DB's but mongo
#### Run a Parse Postgres with Docker
#### Run Postgres setup for Parse with Docker
To launch the compatible Postgres instance, copy and paste the following line into your shell:
[PostGIS images (select one with v2.2 or higher) on docker dashboard](https://hub.docker.com/r/postgis/postgis) is based off of the official [postgres](https://registry.hub.docker.com/_/postgres/) image and will work out-of-the-box (as long as you create a user with the necessary extensions for each of your Parse databases; see below). To launch the compatible Postgres instance, copy and paste the following line into your shell:
```sh
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_USER=$USER --rm mdillon/postgis:11-alpine && sleep 5 && docker exec -it parse-postgres psql -U $USER -c 'create database parse_server_postgres_adapter_test_database;' && docker exec -it parse-postgres psql -U $USER -c 'CREATE EXTENSION postgis;' -d parse_server_postgres_adapter_test_database && docker exec -it parse-postgres psql -U $USER -c 'CREATE EXTENSION postgis_topology;' -d parse_server_postgres_adapter_test_database
```
docker run -d --name parse-postgres -p 5432:5432 -e POSTGRES_PASSWORD=password --rm postgis/postgis:11-3.0-alpine && sleep 20 && docker exec -it parse-postgres psql -U postgres -c 'CREATE DATABASE parse_server_postgres_adapter_test_database;' && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION postgis;' -d parse_server_postgres_adapter_test_database && docker exec -it parse-postgres psql -U postgres -c 'CREATE EXTENSION postgis_topology;' -d parse_server_postgres_adapter_test_database
```
To stop the Postgres instance:
```sh
```
docker stop parse-postgres
```
You can also use the [postgis/postgis:11-2.5-alpine](https://hub.docker.com/r/postgis/postgis) image in a Dockerfile and copy this [script](https://github.com/parse-community/parse-server/blob/master/scripts/before_script_postgres.sh) to the image by adding the following lines:
```
#Install additional scripts. These are run in abc order during initial start
COPY ./scripts/setup-dbs.sh /docker-entrypoint-initdb.d/setup-dbs.sh
RUN chmod +x /docker-entrypoint-initdb.d/setup-dbs.sh
```
Note that the script above will ONLY be executed during initialization of the container with no data in the database, see the official [Postgres image](https://hub.docker.com/_/postgres) for details. If you want to use the script to run again be sure there is no data in the /var/lib/postgresql/data of the container.
### Generate Parse Server Config Definition
If you want to make changes to [Parse Server Configuration][config] add the desired configuration to [src/Options/index.js][config-index] and run `npm run definitions`. This will output [src/Options/Definitions.js][config-def] and [src/Options/docs.js][config-docs].
If you want to make changes to [Parse Server Configuration][config] add the desired configuration to [src/Options/index.js][config-index] and run `npm run definitions`. This will output [src/Options/Definitions.js][config-def] and [src/Options/docs.js][config-docs].
To view docs run `npm run docs` and check the `/out` directory.
+39 -20
View File
@@ -14,7 +14,7 @@
<a href="https://codecov.io/github/parse-community/parse-server?branch=master"><img alt="Coverage status" src="https://img.shields.io/codecov/c/github/parse-community/parse-server/master.svg"></a>
<a href="https://www.npmjs.com/package/parse-server"><img alt="npm version" src="https://img.shields.io/npm/v/parse-server.svg?style=flat"></a>
<a href="https://community.parseplatform.org/"><img alt="Join the conversation" src="https://img.shields.io/discourse/https/community.parseplatform.org/topics.svg"></a>
<a href="https://greenkeeper.io/"><img alt="Greenkeeper badge" src="https://badges.greenkeeper.io/parse-community/parse-server.svg"></a>
<a href="https://snyk.io/test/github/parse-community/parse-server"><img alt="Snyk badge" src="https://snyk.io/test/github/parse-community/parse-server/badge.svg"></a>
</p>
<p align="center">
@@ -32,8 +32,8 @@
</p>
<p align="center">
<a href="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/parse-server/backers/badge.svg" /></a>
<a href="#sponsors"><img alt="Sponsors on Open Collective" src="https://opencollective.com/parse-server/sponsors/badge.svg" /></a>
<a href="#backers"><img alt="Backers on Open Collective" src="https://opencollective.com/parse-server/tiers/backers/badge.svg" /></a>
<a href="#sponsors"><img alt="Sponsors on Open Collective" src="https://opencollective.com/parse-server/tiers/sponsors/badge.svg" /></a>
</p>
<br>
@@ -60,7 +60,7 @@ The full documentation for Parse Server is available in the [wiki](https://githu
- [Configuring File Adapters](#configuring-file-adapters)
- [Logging](#logging)
- [Live Queries](#live-queries)
- [GraphQL (beta)](#graphql-beta)
- [GraphQL](#graphql)
- [Upgrading to 3.0.0](#upgrading-to-300)
- [Support](#support)
- [Ride the Bleeding Edge](#want-to-ride-the-bleeding-edge)
@@ -79,7 +79,7 @@ The fastest and easiest way to get started is to run MongoDB and Parse Server lo
Before you start make sure you have installed:
- [NodeJS](https://www.npmjs.com/) that includes `npm`
- [MongoDB](https://www.mongodb.com/) or [PostgreSQL](https://www.postgresql.org/)
- [MongoDB](https://www.mongodb.com/) or [PostgreSQL](https://www.postgresql.org/)(with [PostGIS](https://postgis.net) 2.2.0 or higher)
- Optionally [Docker](https://www.docker.com/)
### Locally
@@ -388,6 +388,39 @@ Parse Server allows developers to choose from several options when hosting files
`GridFSBucketAdapter` is used by default and requires no setup, but if you're interested in using S3 or Google Cloud Storage, additional configuration information is available in the [Parse Server guide](http://docs.parseplatform.org/parse-server/guide/#configuring-file-adapters).
### Idempodency Enforcement
**Caution, this is an experimental feature that may not be appropriate for production.**
This feature deduplicates identical requests that are received by Parse Server mutliple times, typically due to network issues or network adapter access restrictions on mobile operating systems.
Identical requests are identified by their request header `X-Parse-Request-Id`. Therefore a client request has to include this header for deduplication to be applied. Requests that do not contain this header cannot be deduplicated and are processed normally by Parse Server. This means rolling out this feature to clients is seamless as Parse Server still processes request without this header when this feature is enbabled.
> This feature needs to be enabled on the client side to send the header and on the server to process the header. Refer to the specific Parse SDK docs to see whether the feature is supported yet.
Deduplication is only done for object creation and update (`POST` and `PUT` requests). Deduplication is not done for object finding and deletion (`GET` and `DELETE` requests), as these operations are already idempotent by definition.
#### Configuration example
```
let api = new ParseServer({
idempotencyOptions: {
paths: [".*"], // enforce for all requests
ttl: 120 // keep request IDs for 120s
}
}
```
#### Parameters
| Parameter | Optional | Type | Default value | Example values | Environment variable | Description |
|-----------|----------|--------|---------------|-----------|-----------|-------------|
| `idempotencyOptions` | yes | `Object` | `undefined` | | PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_OPTIONS | Setting this enables idempotency enforcement for the specified paths. |
| `idempotencyOptions.paths`| yes | `Array<String>` | `[]` | `.*` (all paths, includes the examples below), <br>`functions/.*` (all functions), <br>`jobs/.*` (all jobs), <br>`classes/.*` (all classes), <br>`functions/.*` (all functions), <br>`users` (user creation / update), <br>`installations` (installation creation / update) | PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_PATHS | An array of path patterns that have to match the request path for request deduplication to be enabled. The mount path must not be included, for example to match the request path `/parse/functions/myFunction` specifiy the path pattern `functions/myFunction`. A trailing slash of the request path is ignored, for example the path pattern `functions/myFunction` matches both `/parse/functions/myFunction` and `/parse/functions/myFunction/`. |
| `idempotencyOptions.ttl` | yes | `Integer` | `300` | `60` (60 seconds) | PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_TTL | The duration in seconds after which a request record is discarded from the database. Duplicate requests due to network issues can be expected to arrive within milliseconds up to several seconds. This value must be greater than `0`. |
#### Notes
- This feature is currently only available for MongoDB and not for Postgres.
### Logging
Parse Server will, by default, log:
@@ -410,12 +443,10 @@ Live queries are meant to be used in real-time reactive applications, where just
Take a look at [Live Query Guide](https://docs.parseplatform.org/parse-server/guide/#live-queries), [Live Query Server Setup Guide](https://docs.parseplatform.org/parse-server/guide/#scalability) and [Live Query Protocol Specification](https://github.com/parse-community/parse-server/wiki/Parse-LiveQuery-Protocol-Specification). You can setup a standalone server or multiple instances for scalability (recommended).
# GraphQL (beta)
# GraphQL
[GraphQL](https://graphql.org/), developed by Facebook, is an open-source data query and manipulation language for APIs. In addition to the traditional REST API, Parse Server automatically generates a GraphQL API based on your current application schema. Parse Server also allows you to define your custom GraphQL queries and mutations, whose resolvers can be bound to your cloud code functions.
⚠️ The Parse GraphQL ```beta``` implementation is fully functional but discussions are taking place on how to improve it. So new versions of Parse Server can bring breaking changes to the current API.
## Running
### Using the CLI
@@ -735,18 +766,6 @@ All the Cloud Code interfaces also have been updated to reflect those changes, a
We have written up a [migration guide](3.0.0.md), hoping this will help you transition to the next major release.
# Support
Please take a look at our [support document](https://github.com/parse-community/.github/blob/master/SUPPORT.md).
If you believe you've found an issue with Parse Server, make sure these boxes are checked before [reporting an issue](https://github.com/parse-community/parse-server/issues):
- [ ] You've met the [prerequisites](http://docs.parseplatform.org/parse-server/guide/#prerequisites).
- [ ] You're running the [latest version](https://github.com/parse-community/parse-server/releases) of Parse Server.
- [ ] You've searched through [existing issues](https://github.com/parse-community/parse-server/issues?utf8=%E2%9C%93&q=). Chances are that your issue has been reported or resolved before.
# Want to ride the bleeding edge?
It is recommend to use builds deployed npm for many reasons, but if you want to use
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+8 -10
View File
@@ -3,11 +3,14 @@
// Helper functions for accessing the instagram API.
var Parse = require('parse/node').Parse;
const httpsRequest = require('./httpsRequest'); // Returns a promise that fulfills iff this user id is valid.
const httpsRequest = require('./httpsRequest');
const defaultURL = 'https://graph.instagram.com/'; // Returns a promise that fulfills if this user id is valid.
function validateAuthData(authData) {
return request('users/self/?access_token=' + authData.access_token).then(response => {
const apiURL = authData.apiURL || defaultURL;
const path = `${apiURL}me?fields=id&access_token=${authData.access_token}`;
return httpsRequest.get(path).then(response => {
if (response && response.data && response.data.id == authData.id) {
return;
}
@@ -19,15 +22,10 @@ function validateAuthData(authData) {
function validateAppId() {
return Promise.resolve();
} // A promisey wrapper for api requests
function request(path) {
return httpsRequest.get('https://api.instagram.com/v1/' + path);
}
module.exports = {
validateAppId: validateAppId,
validateAuthData: validateAuthData
validateAppId,
validateAuthData
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9BZGFwdGVycy9BdXRoL2luc3RhZ3JhbS5qcyJdLCJuYW1lcyI6WyJQYXJzZSIsInJlcXVpcmUiLCJodHRwc1JlcXVlc3QiLCJ2YWxpZGF0ZUF1dGhEYXRhIiwiYXV0aERhdGEiLCJyZXF1ZXN0IiwiYWNjZXNzX3Rva2VuIiwidGhlbiIsInJlc3BvbnNlIiwiZGF0YSIsImlkIiwiRXJyb3IiLCJPQkpFQ1RfTk9UX0ZPVU5EIiwidmFsaWRhdGVBcHBJZCIsIlByb21pc2UiLCJyZXNvbHZlIiwicGF0aCIsImdldCIsIm1vZHVsZSIsImV4cG9ydHMiXSwibWFwcGluZ3MiOiI7O0FBQUE7QUFDQSxJQUFJQSxLQUFLLEdBQUdDLE9BQU8sQ0FBQyxZQUFELENBQ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XN0LmdldChwYXRoKS50aGVuKHJlc3BvbnNlID0+IHtcbiAgICBpZiAocmVzcG9uc2UgJiYgcmVzcG9uc2UuZGF0YSAmJiByZXNwb25zZS5kYXRhLmlkID09IGF1dGhEYXRhLmlkKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIHRocm93IG5ldyBQYXJzZS5FcnJvcihcbiAgICAgIFBhcnNlLkVycm9yLk9CSkVDVF9OT1RfRk9VTkQsXG4gICAgICAnSW5zdGFncmFtIGF1dGggaXMgaW52YWxpZCBmb3IgdGhpcyB1c2VyLidcbiAgICApO1xuICB9KTtcbn1cblxuLy8gUmV0dXJucyBhIHByb21pc2UgdGhhdCBmdWxmaWxscyBpZmYgdGhpcyBhcHAgaWQgaXMgdmFsaWQuXG5mdW5jdGlvbiB2YWxpZGF0ZUFwcElkKCkge1xuICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKCk7XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICB2YWxpZGF0ZUFwcElkLFxuICB2YWxpZGF0ZUF1dGhEYXRhLFxufTtcbiJdfQ==
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+26 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -14,7 +14,7 @@ const createObject = async (className, fields, config, auth, info) => {
fields = {};
}
return (await _rest.default.create(config, auth, className, fields, info.clientSDK)).response;
return (await _rest.default.create(config, auth, className, fields, info.clientSDK, info.context)).response;
};
exports.createObject = createObject;
@@ -26,15 +26,15 @@ const updateObject = async (className, objectId, fields, config, auth, info) =>
return (await _rest.default.update(config, auth, className, {
objectId
}, fields, info.clientSDK)).response;
}, fields, info.clientSDK, info.context)).response;
};
exports.updateObject = updateObject;
const deleteObject = async (className, objectId, config, auth, info) => {
await _rest.default.del(config, auth, className, objectId, info.clientSDK);
await _rest.default.del(config, auth, className, objectId, info.context);
return true;
};
exports.deleteObject = deleteObject;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9HcmFwaFFML2hlbHBlcnMvb2JqZWN0c011dGF0aW9ucy5qcyJdLCJuYW1lcyI6WyJjcmVhdGVPYmplY3QiLCJjbGFzc05hbWUiLCJmaWVsZHMiLCJjb25maWciLCJhdXRoIiwiaW5mbyIsInJlc3QiLCJjcmVhdGUiLCJjbGllbnRTREsiLCJyZXNwb25zZSIsInVwZGF0ZU9iamVjdCIsIm9iamVjdElkIiwidXBkYXRlIiwiZGVsZXRlT2JqZWN0IiwiZGVsIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7Ozs7QUFFQSxNQUFNQSxZQUFZLEdBQUcsT0FBT0MsU0FBUCxFQUFrQkMsTUFBbEIsRUFBMEJDLE1BQTFCLEVBQWtDQyxJQUFsQyxFQUF3Q0MsSUFBeEMsS0FBaUQ7QUFDcEUsTUFBSSxDQUFDSCxNQUFMLEVBQWE7QUFDWEEsSUFBQUEsTUFBTSxHQUFHLEVBQVQ7QUFDRDs7QUFFRCxTQUFPLENBQUMsTUFBTUksY0FBS0MsTUFBTCxDQUFZSixNQUFaLEVBQW9CQyxJQUFwQixFQUEwQkgsU0FBMUIsRUFBcUNDLE1BQXJDLEVBQTZDRyxJQUFJLENBQUNHLFNBQWxELENBQVAsRUFDSkMsUUFESDtBQUVELENBUEQ7Ozs7QUFTQSxNQUFNQyxZQUFZLEdBQUcsT0FDbkJULFNBRG1CL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iamVjdElkLCBpbmZvLmNvbnRleHQpO1xuICByZXR1cm4gdHJ1ZTtcbn07XG5cbmV4cG9ydCB7IGNyZWF0ZU9iamVjdCwgdXBkYXRlT2JqZWN0LCBkZWxldGVPYmplY3QgfTtcbiJdfQ==
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -55,7 +55,7 @@ const load = parseGraphQLSchema => {
} = (0, _parseClassTypes.extractKeysAndInclude)(selectedFields);
return _objectSpread({
className: type
}, (await objectsQueries.getObject(type, id, keys, include, undefined, undefined, config, auth, info, parseGraphQLSchema.parseClasses)));
}, await objectsQueries.getObject(type, id, keys, include, undefined, undefined, config, auth, info, parseGraphQLSchema.parseClasses));
} catch (e) {
parseGraphQLSchema.handleError(e);
}
@@ -68,4 +68,4 @@ const load = parseGraphQLSchema => {
};
exports.load = load;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9HcmFwaFFML2xvYWRlcnMvZGVmYXVsdFJlbGF5U2NoZW1hLmpzIl0sIm5hbWVzIjpbIkdMT0JBTF9JRF9BVFQiLCJkZXNjcmlwdGlvbiIsInR5cGUiLCJkZWZhdWx0R3JhcGhRTFR5cGVzIiwiT0JKRUNUX0lEIiwibG9hZCIsInBhcnNlR3JhcGhRTFNjaGVtYSIsIm5vZGVJbnRlcmZhY2UiLCJub2RlRmllbGQiLCJnbG9iYWxJZCIsImNvbnRleHQiLCJxdWVyeUluZm8iLCJpZCIsImNvbmZpZyIsImF1dGgiLCJpbmZvIiwic2VsZWN0ZWRGaWVsZHMiLCJrZXlzIiwiaW5jbHVkZSIsImNsYXNzTmFtZSIsIm9iamVjdHNRdWVyaWVzIiwiZ2V0T2JqZWN0IiwidW5kZWZpbmVkIiwicGFyc2VDbGFzc2VzIiwiZSIsImhhbmRsZUVycm9yIiwib2JqIiwicGFyc2VDbGFzc1R5cGVzIiwiY2xhc3NHcmFw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ICAgICAgICBwYXJzZUdyYXBoUUxTY2hlbWEucGFyc2VDbGFzc2VzXG4gICAgICAgICAgKSksXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHBhcnNlR3JhcGhRTFNjaGVtYS5oYW5kbGVFcnJvcihlKTtcbiAgICAgIH1cbiAgICB9LFxuICAgIG9iaiA9PiB7XG4gICAgICByZXR1cm4gcGFyc2VHcmFwaFFMU2NoZW1hLnBhcnNlQ2xhc3NUeXBlc1tvYmouY2xhc3NOYW1lXVxuICAgICAgICAuY2xhc3NHcmFwaFFMT3V0cHV0VHlwZTtcbiAgICB9XG4gICk7XG5cbiAgcGFyc2VHcmFwaFFMU2NoZW1hLmFkZEdyYXBoUUxUeXBlKG5vZGVJbnRlcmZhY2UsIHRydWUpO1xuICBwYXJzZUdyYXBoUUxTY2hlbWEucmVsYXlOb2RlSW50ZXJmYWNlID0gbm9kZUludGVyZmFjZTtcbiAgcGFyc2VHcmFwaFFMU2NoZW1hLmFkZEdyYXBoUUxRdWVyeSgnbm9kZScsIG5vZGVGaWVsZCwgdHJ1ZSk7XG59O1xuXG5leHBvcnQgeyBHTE9CQUxfSURfQVRULCBsb2FkIH07XG4iXX0=
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -7,7 +7,7 @@ exports.load = exports.definitions = void 0;
var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
var _graphqlTools = require("graphql-tools");
var _utils = require("@graphql-tools/utils");
var _FunctionsRouter = require("../../Routers/FunctionsRouter");
@@ -22,7 +22,7 @@ exports.definitions = definitions;
const load = parseGraphQLSchema => {
parseGraphQLSchema.graphQLSchemaDirectivesDefinitions = definitions;
class ResolveDirectiveVisitor extends _graphqlTools.SchemaDirectiveVisitor {
class ResolveDirectiveVisitor extends _utils.SchemaDirectiveVisitor {
visitFieldDefinition(field) {
field.resolve = async (_source, args, context) => {
try {
@@ -56,7 +56,7 @@ const load = parseGraphQLSchema => {
parseGraphQLSchema.graphQLSchemaDirectives.resolve = ResolveDirectiveVisitor;
class MockDirectiveVisitor extends _graphqlTools.SchemaDirectiveVisitor {
class MockDirectiveVisitor extends _utils.SchemaDirectiveVisitor {
visitFieldDefinition(field) {
field.resolve = () => {
return this.args.with;
@@ -69,4 +69,4 @@ const load = parseGraphQLSchema => {
};
exports.load = load;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9HcmFwaFFML2xvYWRlcnMvc2NoZW1hRGlyZWN0aXZlcy5qcyJdLCJuYW1lcyI6WyJkZWZpbml0aW9ucyIsImxvYWQiLCJwYXJzZUdyYXBoUUxTY2hlbWEiLCJncmFwaFFMU2NoZW1hRGlyZWN0aXZlc0RlZmluaXRpb25zIiwiUmVzb2x2ZURpcmVjdGl2ZVZpc2l0b3IiLCJTY2hlbWFEaXJlY3RpdmVWaXNpdG9yIiwidmlzaXRGaWVsZERlZmluaXRpb24iLCJmaWVsZCIsInJlc29sdmUiLCJfc291cmNlIiwiYXJncyIsImNvbnRleHQiLCJjb25maWciLCJhdXRoIiwiaW5mbyIsImZ1bmN0aW9uTmFtZSIsIm5hbWUiLCJ0byIsIkZ1bmN0aW9uc1JvdXRlciIsImhhbmRsZUNsb3VkRnVuY3Rpb24iLCJwYXJhbXMiLCJib2R5IiwicmVzcG9uc2UiLCJyZXN1bHQiLCJlIiwiaGFuZGxlRXJyb3IiLCJncmFwaFFMU2NoZW1hRGlyZWN0aXZlcyIsIk1vY2tEaXJlY3RpdmVWaXNpdG9yIiwid2l0aCIsIm1vY2siXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7OztBQUVPLE1BQU1BLFdBQVcsR0FBRyx3QkFBSTs7O0NBQXhCOzs7QUFLUCxNQUFNQyxJQUFJLEdBQU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bGQucmVzb2x2ZSA9ICgpID0+IHtcbiAgICAgICAgcmV0dXJuIHRoaXMuYXJncy53aXRoO1xuICAgICAgfTtcbiAgICB9XG4gIH1cblxuICBwYXJzZUdyYXBoUUxTY2hlbWEuZ3JhcGhRTFNjaGVtYURpcmVjdGl2ZXMubW9jayA9IE1vY2tEaXJlY3RpdmVWaXNpdG9yO1xufTtcblxuZXhwb3J0IHsgbG9hZCB9O1xuIl19
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -46,4 +46,4 @@ ParsePubSub.createSubscriber = function (config) {
return adapter.createSubscriber(config);
}
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MaXZlUXVlcnkvUGFyc2VQdWJTdWIuanMiXSwibmFtZXMiOlsiUGFyc2VQdWJTdWIiLCJ1c2VSZWRpcyIsImNvbmZpZyIsInJlZGlzVVJMIiwiY3JlYXRlUHVibGlzaGVyIiwiUmVkaXNQdWJTdWIiLCJhZGFwdGVyIiwicHViU3ViQWRhcHRlciIsIkV2ZW50RW1pdHRlclB1YlN1YiIsImNyZWF0ZVN1YnNjcmliZXIiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFFQTs7QUFFQSxNQUFNQSxXQUFXLEdBQUcsRUFBcEI7OztBQUVBLFNBQVNDLFFBQVQsQ0FBa0JDLE1BQWxCLEVBQXdDO0FBQ3RDLFFBQU1DLFFBQVEsR0FBR0QsTUFBTSxDQUFDQyxRQUF4QjtBQUNBLFNBQU8sT0FBT0EsUUFBUCxLQUFvQixXQUFwQixJQUFtQ0EsUUFBUSxLQUFLLEVBQXZEO0FBQ0Q7O0FBRURILFdBQVcsQ0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G5QYXJzZVB1YlN1Yi5jcmVhdGVTdWJzY3JpYmVyID0gZnVuY3Rpb24gKGNvbmZpZzogYW55KTogdm9pZCB7XG4gIGlmICh1c2VSZWRpcyhjb25maWcpKSB7XG4gICAgcmV0dXJuIFJlZGlzUHViU3ViLmNyZWF0ZVN1YnNjcmliZXIoY29uZmlnKTtcbiAgfSBlbHNlIHtcbiAgICBjb25zdCBhZGFwdGVyID0gbG9hZEFkYXB0ZXIoXG4gICAgICBjb25maWcucHViU3ViQWRhcHRlcixcbiAgICAgIEV2ZW50RW1pdHRlclB1YlN1YixcbiAgICAgIGNvbmZpZ1xuICAgICk7XG4gICAgaWYgKHR5cGVvZiBhZGFwdGVyLmNyZWF0ZVN1YnNjcmliZXIgIT09ICdmdW5jdGlvbicpIHtcbiAgICAgIHRocm93ICdwdWJTdWJBZGFwdGVyIHNob3VsZCBoYXZlIGNyZWF0ZVN1YnNjcmliZXIoKSc7XG4gICAgfVxuICAgIHJldHVybiBhZGFwdGVyLmNyZWF0ZVN1YnNjcmliZXIoY29uZmlnKTtcbiAgfVxufTtcblxuZXhwb3J0IHsgUGFyc2VQdWJTdWIgfTtcbiJdfQ==
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -64,4 +64,4 @@ class SessionTokenCache {
}
exports.SessionTokenCache = SessionTokenCache;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9MaXZlUXVlcnkvU2Vzc2lvblRva2VuQ2FjaGUuanMiXSwibmFtZXMiOlsidXNlckZvclNlc3Npb25Ub2tlbiIsInNlc3Npb25Ub2tlbiIsInEiLCJQYXJzZSIsIlF1ZXJ5IiwiZXF1YWxUbyIsImZpcnN0IiwidXNlTWFzdGVyS2V5IiwidGhlbiIsInNlc3Npb24iLCJQcm9taXNlIiwicmVqZWN0IiwiZ2V0IiwiU2Vzc2lvblRva2VuQ2FjaGUiLCJjb25zdHJ1Y3RvciIsInR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uKTtcbiAgICBpZiAodXNlcklkKSB7XG4gICAgICBsb2dnZXIudmVyYm9zZShcbiAgICAgICAgJ0ZldGNoIHVzZXJJZCAlcyBvZiBzZXNzaW9uVG9rZW4gJXMgZnJvbSBDYWNoZScsXG4gICAgICAgIHVzZXJJZCxcbiAgICAgICAgc2Vzc2lvblRva2VuXG4gICAgICApO1xuICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZSh1c2VySWQpO1xuICAgIH1cbiAgICByZXR1cm4gdXNlckZvclNlc3Npb25Ub2tlbihzZXNzaW9uVG9rZW4pLnRoZW4oXG4gICAgICB1c2VyID0+IHtcbiAgICAgICAgbG9nZ2VyLnZlcmJvc2UoXG4gICAgICAgICAgJ0ZldGNoIHVzZXJJZCAlcyBvZiBzZXNzaW9uVG9rZW4gJXMgZnJvbSBQYXJzZScsXG4gICAgICAgICAgdXNlci5pZCxcbiAgICAgICAgICBzZXNzaW9uVG9rZW5cbiAgICAgICAgKTtcbiAgICAgICAgY29uc3QgdXNlcklkID0gdXNlci5pZDtcbiAgICAgICAgdGhpcy5jYWNoZS5zZXQoc2Vzc2lvblRva2VuLCB1c2VySWQpO1xuICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKHVzZXJJZCk7XG4gICAgICB9LFxuICAgICAgZXJyb3IgPT4ge1xuICAgICAgICBsb2dnZXIuZXJyb3IoXG4gICAgICAgICAgJ0NhbiBub3QgZmV0Y2ggdXNlcklkIGZvciBzZXNzaW9uVG9rZW4gJWosIGVycm9yICVqJyxcbiAgICAgICAgICBzZXNzaW9uVG9rZW4sXG4gICAgICAgICAgZXJyb3JcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIFByb21pc2UucmVqZWN0KGVycm9yKTtcbiAgICAgIH1cbiAgICApO1xuICB9XG59XG5cbmV4cG9ydCB7IFNlc3Npb25Ub2tlbkNhY2hlIH07XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozL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GNoIHVzZXJJZCBmb3Igc2Vzc2lvblRva2VuICVqLCBlcnJvciAlaicsXG4gICAgICAgICAgc2Vzc2lvblRva2VuLFxuICAgICAgICAgIGVycm9yXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnJvcik7XG4gICAgICB9XG4gICAgKTtcbiAgfVxufVxuXG5leHBvcnQgeyBTZXNzaW9uVG9rZW5DYWNoZSB9O1xuIl19
File diff suppressed because one or more lines are too long
+10 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -87,4 +87,4 @@ module.exports = {
arrayParser,
objectParser
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9PcHRpb25zL3BhcnNlcnMuanMiXSwibmFtZXMiOlsibnVtYmVyUGFyc2VyIiwia2V5Iiwib3B0IiwiaW50T3B0IiwicGFyc2VJbnQiLCJOdW1iZXIiLCJpc0ludGVnZXIiLCJFcnJvciIsIm51bWJlck9yQm9vbFBhcnNlciIsIm9iamVjdFBhcnNlciIsIkpTT04iLCJwYXJzZSIsImFycmF5UGFyc2VyIiwiQXJyYXkiLCJpc0FycmF5Iiwic3BsaXQiLCJtb2R1bGVPck9iamVjdFBhcnNlciIsImUiLCJib29sZWFuUGFyc2VyIiwibnVsbFBhcnNlciIsIm1vZHVsZSIsImV4cG9ydHMiXSwibWFwcGluZ3MiOiI7O0FBQUEsU0FBU0EsWUFBVCxDQUFzQkMsR0FBdEIsRUFBMkI7QUFDekIsU0FBTyxVQUFTQyxHQUFULEVBQWM7QUFDbkIsVUFBTUMsTUFBTSxHQUFHQyxRQUFRLENBQUNGLEdBQUQsQ0FBdkI7O0FBQ0EsUUFBSSxDQUFDRyxNQUFNLENBQUNDLFNBQVAsQ0FBaUJILE1BQWpCLENBQUwsRUFBK0I7QUFDN0IsWUFBTSxJQUFJSSxLQUFK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Q7XG4gIH0gZWxzZSBpZiAodHlwZW9mIG9wdCA9PT0gJ3N0cmluZycpIHtcbiAgICByZXR1cm4gb3B0LnNwbGl0KCcsJyk7XG4gIH0gZWxzZSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKGAke29wdH0gc2hvdWxkIGJlIGEgY29tbWEgc2VwYXJhdGVkIHN0cmluZyBvciBhbiBhcnJheWApO1xuICB9XG59XG5cbmZ1bmN0aW9uIG1vZHVsZU9yT2JqZWN0UGFyc2VyKG9wdCkge1xuICBpZiAodHlwZW9mIG9wdCA9PSAnb2JqZWN0Jykge1xuICAgIHJldHVybiBvcHQ7XG4gIH1cbiAgdHJ5IHtcbiAgICByZXR1cm4gSlNPTi5wYXJzZShvcHQpO1xuICB9IGNhdGNoIChlKSB7XG4gICAgLyogKi9cbiAgfVxuICByZXR1cm4gb3B0O1xufVxuXG5mdW5jdGlvbiBib29sZWFuUGFyc2VyKG9wdCkge1xuICBpZiAob3B0ID09IHRydWUgfHwgb3B0ID09ICd0cnVlJyB8fCBvcHQgPT0gJzEnKSB7XG4gICAgcmV0dXJuIHRydWU7XG4gIH1cbiAgcmV0dXJuIGZhbHNlO1xufVxuXG5mdW5jdGlvbiBudWxsUGFyc2VyKG9wdCkge1xuICBpZiAob3B0ID09ICdudWxsJykge1xuICAgIHJldHVybiBudWxsO1xuICB9XG4gIHJldHVybiBvcHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBudW1iZXJQYXJzZXIsXG4gIG51bWJlck9yQm9vbFBhcnNlcixcbiAgbnVsbFBhcnNlcixcbiAgYm9vbGVhblBhcnNlcixcbiAgbW9kdWxlT3JPYmplY3RQYXJzZXIsXG4gIGFycmF5UGFyc2VyLFxuICBvYmplY3RQYXJzZXIsXG59O1xuIl19
+10 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+7 -5
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6 -4
View File
@@ -9,6 +9,8 @@ var _ClassesRouter = _interopRequireDefault(require("./ClassesRouter"));
var _rest = _interopRequireDefault(require("../rest"));
var _middlewares = require("../middlewares");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// InstallationsRouter.js
@@ -22,7 +24,7 @@ class InstallationsRouter extends _ClassesRouter.default {
const options = _ClassesRouter.default.optionsFromBody(body);
return _rest.default.find(req.config, req.auth, '_Installation', body.where, options, req.info.clientSDK).then(response => {
return _rest.default.find(req.config, req.auth, '_Installation', body.where, options, req.info.clientSDK, req.info.context).then(response => {
return {
response: response
};
@@ -36,10 +38,10 @@ class InstallationsRouter extends _ClassesRouter.default {
this.route('GET', '/installations/:objectId', req => {
return this.handleGet(req);
});
this.route('POST', '/installations', req => {
this.route('POST', '/installations', _middlewares.promiseEnsureIdempotency, req => {
return this.handleCreate(req);
});
this.route('PUT', '/installations/:objectId', req => {
this.route('PUT', '/installations/:objectId', _middlewares.promiseEnsureIdempotency, req => {
return this.handleUpdate(req);
});
this.route('DELETE', '/installations/:objectId', req => {
@@ -52,4 +54,4 @@ class InstallationsRouter extends _ClassesRouter.default {
exports.InstallationsRouter = InstallationsRouter;
var _default = InstallationsRouter;
exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Sb3V0ZXJzL0luc3RhbGxhdGlvbnNSb3V0ZXIuanMiXSwibmFtZXMiOlsiSW5zdGFsbGF0aW9uc1JvdXRlciIsIkNsYXNzZXNSb3V0ZXIiLCJjbGFzc05hbWUiLCJoYW5kbGVGaW5kIiwicmVxIiwiYm9keSIsIk9iamVjdCIsImFzc2lnbiIsIkpTT05Gcm9tUXVlcnkiLC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cblxuZXhwb3J0IGRlZmF1bHQgSW5zdGFsbGF0aW9uc1JvdXRlcjtcbiJdfQ==
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -16,4 +16,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
_index.ParseServer.createLiveQueryServer(undefined, options);
}
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbGkvcGFyc2UtbGl2ZS1xdWVyeS1zZXJ2ZXIuanMiXSwibmFtZXMiOlsiZGVmaW5pdGlvbnMiLCJzdGFydCIsInByb2dyYW0iLCJvcHRpb25zIiwibG9nT3B0aW9ucyIsIlBhcnNlU2VydmVyIiwiY3JlYXRlTGl2ZVF1ZXJ5U2VydmVyIiwidW5kZWZpbmVkIl0sIm1hcHBpbmdzIjoiOztBQUFBOztBQUNBOztBQUNBOzs7O0FBRUEscUJBQU87QUFDTEEsRUFBQUEsV0FBVyxFQUFYQSw2QkFESztBQUVMQyxFQUFBQSxLQUFLLEVBQUUsVUFBU0MsT0FBVCxFQUFrQkMsT0FBbEIsRUFBMkJDLFVBQTNCLEVBQXVDO0FBQzVDQSxJQUFBQSxVQUFVOztBQUNWQyx1QkFBWUMscUJBQVosQ0FBa0NDLFNBQWxDLEVBQTZDSixPQUE3QztBQUNEO0FBTEksQ0FBUCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBkZWZpbml0aW9ucyBmcm9tICcuL2RlZmluaXRpb25zL3BhcnNlLWxpdmUtcXVlcnktc2VydmVyJztcbmltcG9ydCBydW5uZXIgZnJvbSAnLi91dGlscy9ydW5uZXInO1xuaW1wb3J0IHsgUGFyc2VTZXJ2ZXIgfSBmcm9tICcuLi9pbmRleCc7XG5cbnJ1bm5lcih7XG4gIGRlZmluaXRpb25zLFxuICBzdGFydDogZnVuY3Rpb24ocHJvZ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zKCk7XG4gICAgUGFyc2VTZXJ2ZXIuY3JlYXRlTGl2ZVF1ZXJ5U2VydmVyKHVuZGVmaW5lZCwgb3B0aW9ucyk7XG4gIH0sXG59KTtcbiJdfQ==
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+101 -10
View File
File diff suppressed because one or more lines are too long
+10 -5
View File
@@ -5,10 +5,15 @@
var bcrypt = require('bcryptjs');
try {
bcrypt = require('bcrypt');
} catch (e) {}
/* */
// Returns a promise for a hashed password string.
const _bcrypt = require('@node-rs/bcrypt');
bcrypt = {
hash: _bcrypt.hash,
compare: _bcrypt.verify
};
} catch (e) {
/* */
} // Returns a promise for a hashed password string.
function hash(password) {
@@ -30,4 +35,4 @@ module.exports = {
hash: hash,
compare: compare
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wYXNzd29yZC5qcyJdLCJuYW1lcyI6WyJiY3J5cHQiLCJyZXF1aXJlIiwiZSIsImhhc2giLCJwYXNzd29yZCIsImNvbXBhcmUiLCJoYXNoZWRQYXNzd29yZCIsIlByb21pc2UiLCJyZXNvbHZlIiwibW9kdWxlIiwiZXhwb3J0cyJdLCJtYXBwaW5ncyI6Ijs7QUFBQTtBQUNBO0FBQ0EsSUFBSUEsTUFBTSxHQUFHQyxPQUFPLENBQUMsVUFBRCxDQUFwQjs7QUFFQSxJQUFJO0FBQ0ZELEVBQUFBLE1BQU0sR0FBR0MsT0FBTyxDQUFDLFFBQUQsQ0FBaEI7QUFDRCxDQUZELENBRUUsT0FBT0MsQ0FBUCxFQUFVLENBRVg7QUFEQztBQUdGOzs7QUFDQSxTQUFTQyxJQUFULENBQWNDLFFBQWQsRUFBd0I7QUFDdEIsU0FBT0osTUFBTSxDQUFDRyxJQUFQLENBQVlDLFFBQVosRUFBc0IsRUFBdEIsQ0FBUDtBQUNELEMsQ0FFRDtBQUNBOzs7QUFDQSx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b21pc2UgZm9yIHdoZXRoZXIgdGhpcyBwYXNzd29yZCBjb21wYXJlcyB0byBlcXVhbCB0aGlzXG4vLyBoYXNoZWQgcGFzc3dvcmQuXG5mdW5jdGlvbiBjb21wYXJlKHBhc3N3b3JkLCBoYXNoZWRQYXNzd29yZCkge1xuICAvLyBDYW5ub3QgYmNyeXB0IGNvbXBhcmUgd2hlbiBvbmUgaXMgdW5kZWZpbmVkXG4gIGlmICghcGFzc3dvcmQgfHwgIWhhc2hlZFBhc3N3b3JkKSB7XG4gICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZShmYWxzZSk7XG4gIH1cbiAgcmV0dXJuIGJjcnlwdC5jb21wYXJlKHBhc3N3b3JkLCBoYXNoZWRQYXNzd29yZCk7XG59XG5cbm1vZHVsZS5leHBvcnRzID0ge1xuICBoYXNoOiBoYXNoLFxuICBjb21wYXJlOiBjb21wYXJlLFxufTtcbiJdfQ==
+13 -13
View File
File diff suppressed because one or more lines are too long
+151 -9
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+3113 -2904
View File
File diff suppressed because it is too large Load Diff
+51 -52
View File
@@ -1,6 +1,6 @@
{
"name": "parse-server",
"version": "4.1.0",
"version": "4.9.3",
"description": "An express module providing a Parse-compatible API server",
"main": "lib/index.js",
"repository": {
@@ -19,83 +19,84 @@
],
"license": "BSD-3-Clause",
"dependencies": {
"@apollographql/graphql-playground-html": "1.6.24",
"@apollographql/graphql-playground-html": "1.6.26",
"@graphql-tools/links": "^6.2.4",
"@graphql-tools/stitch": "6.2.2",
"@graphql-tools/utils": "6.2.2",
"@parse/fs-files-adapter": "1.0.1",
"@parse/push-adapter": "3.2.0",
"@parse/s3-files-adapter": "1.4.0",
"@parse/push-adapter": "3.3.0",
"@parse/s3-files-adapter": "1.5.0",
"@parse/simple-mailgun-adapter": "1.1.0",
"apollo-server-express": "2.11.0",
"apollo-server-express": "2.17.0",
"bcryptjs": "2.4.3",
"body-parser": "1.19.0",
"commander": "5.0.0",
"commander": "5.1.0",
"cors": "2.8.5",
"deepcopy": "2.0.0",
"deepcopy": "2.1.0",
"express": "4.17.1",
"follow-redirects": "1.10.0",
"graphql": "14.6.0",
"follow-redirects": "1.13.0",
"graphql": "15.3.0",
"graphql-list-fields": "2.0.2",
"graphql-relay": "^0.6.0",
"graphql-tools": "^4.0.7",
"graphql-upload": "10.0.0",
"graphql-relay": "0.6.0",
"graphql-upload": "11.0.0",
"intersect": "1.0.1",
"jsonwebtoken": "8.5.1",
"jwks-rsa": "1.7.0",
"ldapjs": "1.0.2",
"lodash": "4.17.15",
"jwks-rsa": "1.9.0",
"ldapjs": "2.1.1",
"lodash": "4.17.20",
"lru-cache": "5.1.1",
"mime": "2.4.4",
"mongodb": "3.5.5",
"parse": "2.11.0",
"pg-promise": "10.4.4",
"pluralize": "^8.0.0",
"mime": "2.4.6",
"mongodb": "3.6.2",
"parse": "2.16.0",
"pg-promise": "10.6.1",
"pluralize": "8.0.0",
"redis": "3.0.2",
"semver": "7.1.3",
"subscriptions-transport-ws": "0.9.16",
"semver": "7.3.2",
"subscriptions-transport-ws": "0.9.18",
"tv4": "1.3.0",
"uuid": "3.4.0",
"winston": "3.2.1",
"winston-daily-rotate-file": "4.4.2",
"ws": "7.2.3"
"uuid": "8.3.0",
"winston": "3.3.3",
"winston-daily-rotate-file": "4.5.0",
"ws": "7.3.1"
},
"devDependencies": {
"@babel/cli": "7.8.4",
"@babel/core": "7.8.7",
"@babel/plugin-proposal-object-rest-spread": "7.8.3",
"@babel/plugin-transform-flow-strip-types": "7.8.3",
"@babel/preset-env": "7.8.7",
"@babel/cli": "7.10.0",
"@babel/core": "7.10.0",
"@babel/plugin-proposal-object-rest-spread": "7.10.0",
"@babel/plugin-transform-flow-strip-types": "7.9.0",
"@babel/preset-env": "7.10.0",
"@parse/minami": "1.0.0",
"apollo-cache-inmemory": "1.6.5",
"apollo-client": "2.6.6",
"apollo-link": "1.2.13",
"apollo-link-http": "1.5.16",
"apollo-link-ws": "1.0.19",
"apollo-upload-client": "12.1.0",
"apollo-utilities": "1.3.3",
"apollo-cache-inmemory": "1.6.6",
"apollo-client": "2.6.10",
"apollo-link": "1.2.14",
"apollo-link-http": "1.5.17",
"apollo-link-ws": "1.0.20",
"apollo-upload-client": "13.0.0",
"apollo-utilities": "1.3.4",
"babel-eslint": "10.1.0",
"bcrypt-nodejs": "0.0.3",
"cross-env": "7.0.2",
"deep-diff": "1.0.2",
"eslint": "6.8.0",
"eslint-plugin-flowtype": "4.5.0",
"eslint-plugin-flowtype": "5.1.3",
"flow-bin": "0.119.1",
"form-data": "3.0.0",
"gaze": "1.1.3",
"graphql-tag": "^2.10.1",
"husky": "4.2.3",
"graphql-tag": "2.10.1",
"husky": "4.2.5",
"jasmine": "3.5.0",
"jsdoc": "3.6.3",
"jsdoc-babel": "0.5.0",
"lint-staged": "10.0.8",
"lint-staged": "10.2.3",
"mongodb-runner": "4.8.0",
"node-fetch": "2.6.0",
"nyc": "15.0.0",
"prettier": "1.19.0"
"node-fetch": "2.6.1",
"nyc": "15.1.0",
"prettier": "2.0.5"
},
"scripts": {
"definitions": "node ./resources/buildConfigDefinitions.js",
"docs": "jsdoc -c ./jsdoc-conf.json",
"dev": "npm run build && node bin/dev",
"lint": "flow && eslint --cache ./",
"lint-fix": "eslint --fix --cache ./",
"build": "babel src/ -d lib/ --copy-files",
"watch": "babel --watch src/ -d lib/ --copy-files",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner start",
@@ -104,6 +105,7 @@
"posttest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} mongodb-runner stop",
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=4.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=mmapv1} TESTING=1 nyc jasmine",
"start": "node ./bin/parse-server",
"prettier": "prettier --write {src,spec}/**/*.js",
"prepare": "npm run build",
"postinstall": "node -p 'require(\"./postinstall.js\")()'"
},
@@ -114,16 +116,13 @@
"parse-server": "./bin/parse-server"
},
"optionalDependencies": {
"bcrypt": "4.0.1"
"@node-rs/bcrypt": "0.4.1"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/parse-server",
"logo": "https://opencollective.com/parse-server/logo.txt?reverse=true&variant=binary"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parse-server"
@@ -136,7 +135,7 @@
"lint-staged": {
"{src,spec}/**/*.js": [
"prettier --write",
"eslint --cache",
"eslint --fix --cache",
"git add"
]
}
+10
View File
@@ -52,6 +52,9 @@ function getENVPrefix(iface) {
if (iface.id.name === 'LiveQueryOptions') {
return 'PARSE_SERVER_LIVEQUERY_';
}
if (iface.id.name === 'IdempotencyOptions') {
return 'PARSE_SERVER_EXPERIMENTAL_IDEMPOTENCY_';
}
}
function processProperty(property, iface) {
@@ -170,6 +173,13 @@ function parseDefaultValue(elt, value, t) {
});
literalValue = t.objectExpression(props);
}
if (type == 'IdempotencyOptions') {
const object = parsers.objectParser(value);
const props = Object.keys(object).map((key) => {
return t.objectProperty(key, object[value]);
});
literalValue = t.objectExpression(props);
}
if (type == 'ProtectedFields') {
const prop = t.objectProperty(
t.stringLiteral('_User'), t.objectPattern([
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
set -e
source ~/.nvm/nvm.sh
echo "[SCRIPT] Before Install Script :: Setup Postgres ${POSTGRES_MAJOR_VERSION}"
nvm install $NODE_VERSION
nvm use $NODE_VERSION
npm install -g greenkeeper-lockfile@1
if [[ $POSTGRES_MAJOR_VERSION -lt 11 ]]; then
# Setup postgres 9 or 10
sudo sed -i 's/port = 5432/port = 5433/' /etc/postgresql/${POSTGRES_MAJOR_VERSION}/main/postgresql.conf
# Stop the current running service
sudo service postgresql stop
# Remove correct version of postgres
if [[ $POSTGRES_MAJOR_VERSION -lt 10 ]]; then
sudo apt-get remove -q 'postgresql-10.*'
else
sudo apt-get remove -q 'postgresql-9.*'
fi
sudo service postgresql start
else
# Setup postgres 11 or higher
#Copy defauilt hba config file and tell postgres to restart
sudo cp /etc/postgresql/{10,${POSTGRES_MAJOR_VERSION}}/main/pg_hba.conf
sudo systemctl restart postgresql@${POSTGRES_MAJOR_VERSION}-main
fi
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -e
echo "[SCRIPT] Before Script :: Setup Parse DB for Postgres ${POSTGRES_MAJOR_VERSION}"
node -e 'require("./lib/index.js")'
greenkeeper-lockfile-update
psql -v ON_ERROR_STOP=1 -p 5433 --username "postgres" --dbname "${POSTGRES_DB}" <<-EOSQL
CREATE DATABASE parse_server_postgres_adapter_test_database;
\c parse_server_postgres_adapter_test_database;
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
EOSQL
+550 -140
View File
@@ -19,13 +19,12 @@ const responses = {
microsoft: { id: 'userId', mail: 'userMail' },
};
describe('AuthenticationProviders', function() {
describe('AuthenticationProviders', function () {
[
'apple',
'gcenter',
'gpgames',
'facebook',
'facebookaccountkit',
'github',
'instagram',
'google',
@@ -42,7 +41,8 @@ describe('AuthenticationProviders', function() {
'weibo',
'phantauth',
'microsoft',
].map(function(providerName) {
'keycloak',
].map(function (providerName) {
it('Should validate structure of ' + providerName, done => {
const provider = require('../lib/Adapters/Auth/' + providerName);
jequal(typeof provider.validateAuthData, 'function');
@@ -66,7 +66,7 @@ describe('AuthenticationProviders', function() {
});
it(`should provide the right responses for adapter ${providerName}`, async () => {
const noResponse = ['twitter', 'apple', 'gcenter'];
const noResponse = ['twitter', 'apple', 'gcenter', 'google', 'keycloak'];
if (noResponse.includes(providerName)) {
return;
}
@@ -101,7 +101,7 @@ describe('AuthenticationProviders', function() {
});
});
const getMockMyOauthProvider = function() {
const getMockMyOauthProvider = function () {
return {
authData: {
id: '12345',
@@ -114,7 +114,7 @@ describe('AuthenticationProviders', function() {
synchronizedAuthToken: null,
synchronizedExpiration: null,
authenticate: function(options) {
authenticate: function (options) {
if (this.shouldError) {
options.error(this, 'An error occurred');
} else if (this.shouldCancel) {
@@ -123,7 +123,7 @@ describe('AuthenticationProviders', function() {
options.success(this, this.authData);
}
},
restoreAuthentication: function(authData) {
restoreAuthentication: function (authData) {
if (!authData) {
this.synchronizedUserId = null;
this.synchronizedAuthToken = null;
@@ -135,10 +135,10 @@ describe('AuthenticationProviders', function() {
this.synchronizedExpiration = authData.expiration_date;
return true;
},
getAuthType: function() {
getAuthType: function () {
return 'myoauth';
},
deauthenticate: function() {
deauthenticate: function () {
this.loggedOut = true;
this.restoreAuthentication(null);
},
@@ -146,16 +146,16 @@ describe('AuthenticationProviders', function() {
};
Parse.User.extend({
extended: function() {
extended: function () {
return true;
},
});
const createOAuthUser = function(callback) {
const createOAuthUser = function (callback) {
return createOAuthUserWithSessionToken(undefined, callback);
};
const createOAuthUserWithSessionToken = function(token, callback) {
const createOAuthUserWithSessionToken = function (token, callback) {
const jsonBody = {
authData: {
myoauth: getMockMyOauthProvider().authData,
@@ -336,10 +336,10 @@ describe('AuthenticationProviders', function() {
token: 'world',
};
const adapter = {
validateAppId: function() {
validateAppId: function () {
return Promise.resolve();
},
validateAuthData: function(authData) {
validateAuthData: function (authData) {
if (
authData.id == validAuthData.id &&
authData.token == validAuthData.token
@@ -359,13 +359,16 @@ describe('AuthenticationProviders', function() {
validateAuthenticationHandler(authenticationHandler);
const validator = authenticationHandler.getValidatorForProvider(
'customAuthentication'
'customAuthentication',
{ requestObject: true }
);
validateValidator(validator);
validator(validAuthData).then(
() => {
expect(authDataSpy).toHaveBeenCalled();
expect(authDataSpy).toHaveBeenCalledWith(validAuthData, adapter, {
requestObject: true,
});
// AppIds are not provided in the adapter, should not be called
expect(appIdSpy).not.toHaveBeenCalled();
done();
@@ -512,146 +515,163 @@ describe('AuthenticationProviders', function() {
expect(appIds).toEqual(['a', 'b']);
expect(providerOptions).toEqual(options.custom);
});
});
it('properly loads Facebook accountkit adapter with options', () => {
const options = {
facebookaccountkit: {
appIds: ['a', 'b'],
appSecret: 'secret',
},
};
const {
adapter,
appIds,
providerOptions,
} = authenticationLoader.loadAuthAdapter('facebookaccountkit', options);
validateAuthenticationAdapter(adapter);
expect(appIds).toEqual(['a', 'b']);
expect(providerOptions.appSecret).toEqual('secret');
describe('instagram auth adapter', () => {
const instagram = require('../lib/Adapters/Auth/instagram');
const httpsRequest = require('../lib/Adapters/Auth/httpsRequest');
it('should use default api', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ data: { id: 'userId' } });
});
await instagram.validateAuthData(
{ id: 'userId', access_token: 'the_token' },
{}
);
expect(httpsRequest.get).toHaveBeenCalledWith(
'https://graph.instagram.com/me?fields=id&access_token=the_token'
);
});
it('should fail if Facebook appIds is not configured properly', done => {
const options = {
facebookaccountkit: {
appIds: [],
},
};
const { adapter, appIds } = authenticationLoader.loadAuthAdapter(
'facebookaccountkit',
options
);
adapter.validateAppId(appIds).then(done.fail, err => {
expect(err.code).toBe(Parse.Error.OBJECT_NOT_FOUND);
done();
it('should pass in api url', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ data: { id: 'userId' } });
});
});
it('should fail to validate Facebook accountkit auth with bad token', done => {
const options = {
facebookaccountkit: {
appIds: ['a', 'b'],
await instagram.validateAuthData(
{
id: 'userId',
access_token: 'the_token',
apiURL: 'https://new-api.instagram.com/v1/',
},
};
const authData = {
id: 'fakeid',
access_token: 'badtoken',
};
const { adapter } = authenticationLoader.loadAuthAdapter(
'facebookaccountkit',
options
{}
);
adapter.validateAuthData(authData).then(done.fail, err => {
expect(err.code).toBe(190);
expect(err.type).toBe('OAuthException');
done();
});
});
it('should fail to validate Facebook accountkit auth with bad token regardless of app secret proof', done => {
const options = {
facebookaccountkit: {
appIds: ['a', 'b'],
appSecret: 'badsecret',
},
};
const authData = {
id: 'fakeid',
access_token: 'badtoken',
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'facebookaccountkit',
options
expect(httpsRequest.get).toHaveBeenCalledWith(
'https://new-api.instagram.com/v1/me?fields=id&access_token=the_token'
);
adapter.validateAuthData(authData, providerOptions).then(done.fail, err => {
expect(err.code).toBe(190);
expect(err.type).toBe('OAuthException');
done();
});
});
});
describe('google auth adapter', () => {
const google = require('../lib/Adapters/Auth/google');
const httpsRequest = require('../lib/Adapters/Auth/httpsRequest');
const jwt = require('jsonwebtoken');
it('should use id_token for validation is passed', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ sub: 'userId' });
});
await google.validateAuthData({ id: 'userId', id_token: 'the_token' }, {});
});
it('should use id_token for validation is passed and responds with user_id', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ user_id: 'userId' });
});
await google.validateAuthData({ id: 'userId', id_token: 'the_token' }, {});
});
it('should use access_token for validation is passed and responds with user_id', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ user_id: 'userId' });
});
await google.validateAuthData(
{ id: 'userId', access_token: 'the_token' },
{}
);
});
it('should use access_token for validation is passed with sub', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ sub: 'userId' });
});
await google.validateAuthData({ id: 'userId', id_token: 'the_token' }, {});
});
it('should fail when the id_token is invalid', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ sub: 'badId' });
});
it('should throw error with missing id_token', async () => {
try {
await google.validateAuthData(
{ id: 'userId', id_token: 'the_token' },
{}
);
await google.validateAuthData({}, {});
fail();
} catch (e) {
expect(e.message).toBe('Google auth is invalid for this user.');
expect(e.message).toBe('id token is invalid for this user.');
}
});
it('should fail when the access_token is invalid', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({ sub: 'badId' });
});
it('should not decode invalid id_token', async () => {
try {
await google.validateAuthData(
{ id: 'userId', access_token: 'the_token' },
{ id: 'the_user_id', id_token: 'the_token' },
{}
);
fail();
} catch (e) {
expect(e.message).toBe('Google auth is invalid for this user.');
expect(e.message).toBe('provided token does not decode as JWT');
}
});
// it('should throw error if public key used to encode token is not available', async () => {
// const fakeDecodedToken = { header: { kid: '789', alg: 'RS256' } };
// try {
// spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
// await google.validateAuthData({ id: 'the_user_id', id_token: 'the_token' }, {});
// fail();
// } catch (e) {
// expect(e.message).toBe(
// `Unable to find matching key for Key ID: ${fakeDecodedToken.header.kid}`
// );
// }
// });
it('(using client id as string) should verify id_token', async () => {
const fakeClaim = {
iss: 'https://accounts.google.com',
aud: 'secret',
exp: Date.now(),
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
spyOn(jwt, 'verify').and.callFake(() => fakeClaim);
const result = await google.validateAuthData(
{ id: 'the_user_id', id_token: 'the_token' },
{ clientId: 'secret' }
);
expect(result).toEqual(fakeClaim);
});
it('(using client id as string) should throw error with with invalid jwt issuer', async () => {
const fakeClaim = {
iss: 'https://not.google.com',
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
spyOn(jwt, 'verify').and.callFake(() => fakeClaim);
try {
await google.validateAuthData(
{ id: 'the_user_id', id_token: 'the_token' },
{ clientId: 'secret' }
);
fail();
} catch (e) {
expect(e.message).toBe(
'id token not issued by correct provider - expected: accounts.google.com or https://accounts.google.com | from: https://not.google.com'
);
}
});
xit('(using client id as string) should throw error with invalid jwt client_id', async () => {
const fakeClaim = {
iss: 'https://accounts.google.com',
aud: 'secret',
exp: Date.now(),
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
spyOn(jwt, 'verify').and.callFake(() => fakeClaim);
try {
await google.validateAuthData(
{ id: 'INSERT ID HERE', token: 'INSERT APPLE TOKEN HERE' },
{ clientId: 'secret' }
);
fail();
} catch (e) {
expect(e.message).toBe('jwt audience invalid. expected: secret');
}
});
xit('should throw error with invalid user id', async () => {
const fakeClaim = {
iss: 'https://accounts.google.com',
aud: 'secret',
exp: Date.now(),
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
spyOn(jwt, 'verify').and.callFake(() => fakeClaim);
try {
await google.validateAuthData(
{ id: 'invalid user', token: 'INSERT APPLE TOKEN HERE' },
{ clientId: 'INSERT CLIENT ID HERE' }
);
fail();
} catch (e) {
expect(e.message).toBe('auth data is invalid for this user.');
}
});
});
@@ -687,6 +707,255 @@ describe('google play games service auth', () => {
});
});
describe('keycloak auth adapter', () => {
const keycloak = require('../lib/Adapters/Auth/keycloak');
const httpsRequest = require('../lib/Adapters/Auth/httpsRequest');
it('validateAuthData should fail without access token', async () => {
const authData = {
id: 'fakeid',
};
try {
await keycloak.validateAuthData(authData);
fail();
} catch (e) {
expect(e.message).toBe('Missing access token and/or User id');
}
});
it('validateAuthData should fail without user id', async () => {
const authData = {
access_token: 'sometoken',
};
try {
await keycloak.validateAuthData(authData);
fail();
} catch (e) {
expect(e.message).toBe('Missing access token and/or User id');
}
});
it('validateAuthData should fail without config', async () => {
const options = {
keycloak: {
config: null,
},
};
const authData = {
id: 'fakeid',
access_token: 'sometoken',
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'keycloak',
options
);
try {
await adapter.validateAuthData(authData, providerOptions);
fail();
} catch (e) {
expect(e.message).toBe('Missing keycloak configuration');
}
});
it('validateAuthData should fail connect error', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.reject({
text: JSON.stringify({ error: 'hosting_error' }),
});
});
const options = {
keycloak: {
config: {
'auth-server-url': 'http://example.com',
realm: 'new',
},
},
};
const authData = {
id: 'fakeid',
access_token: 'sometoken',
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'keycloak',
options
);
try {
await adapter.validateAuthData(authData, providerOptions);
fail();
} catch (e) {
expect(e.message).toBe('Could not connect to the authentication server');
}
});
it('validateAuthData should fail with error description', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.reject({
text: JSON.stringify({ error_description: 'custom error message' }),
});
});
const options = {
keycloak: {
config: {
'auth-server-url': 'http://example.com',
realm: 'new',
},
},
};
const authData = {
id: 'fakeid',
access_token: 'sometoken',
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'keycloak',
options
);
try {
await adapter.validateAuthData(authData, providerOptions);
fail();
} catch (e) {
expect(e.message).toBe('custom error message');
}
});
it('validateAuthData should fail with invalid auth', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({});
});
const options = {
keycloak: {
config: {
'auth-server-url': 'http://example.com',
realm: 'new',
},
},
};
const authData = {
id: 'fakeid',
access_token: 'sometoken',
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'keycloak',
options
);
try {
await adapter.validateAuthData(authData, providerOptions);
fail();
} catch (e) {
expect(e.message).toBe('Invalid authentication');
}
});
it('validateAuthData should fail with invalid groups', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({
data: {
sub: 'fakeid',
roles: ['role1'],
groups: ['unknown'],
},
});
});
const options = {
keycloak: {
config: {
'auth-server-url': 'http://example.com',
realm: 'new',
},
},
};
const authData = {
id: 'fakeid',
access_token: 'sometoken',
roles: ['role1'],
groups: ['group1'],
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'keycloak',
options
);
try {
await adapter.validateAuthData(authData, providerOptions);
fail();
} catch (e) {
expect(e.message).toBe('Invalid authentication');
}
});
it('validateAuthData should fail with invalid roles', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({
data: {
sub: 'fakeid',
roles: 'unknown',
groups: ['group1'],
},
});
});
const options = {
keycloak: {
config: {
'auth-server-url': 'http://example.com',
realm: 'new',
},
},
};
const authData = {
id: 'fakeid',
access_token: 'sometoken',
roles: ['role1'],
groups: ['group1'],
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'keycloak',
options
);
try {
await adapter.validateAuthData(authData, providerOptions);
fail();
} catch (e) {
expect(e.message).toBe('Invalid authentication');
}
});
it('validateAuthData should handle authentication', async () => {
spyOn(httpsRequest, 'get').and.callFake(() => {
return Promise.resolve({
data: {
sub: 'fakeid',
roles: ['role1'],
groups: ['group1'],
},
});
});
const options = {
keycloak: {
config: {
'auth-server-url': 'http://example.com',
realm: 'new',
},
},
};
const authData = {
id: 'fakeid',
access_token: 'sometoken',
roles: ['role1'],
groups: ['group1'],
};
const { adapter, providerOptions } = authenticationLoader.loadAuthAdapter(
'keycloak',
options
);
await adapter.validateAuthData(authData, providerOptions);
expect(httpsRequest.get).toHaveBeenCalledWith({
host: 'http://example.com',
path: '/realms/new/protocol/openid-connect/userinfo',
headers: {
Authorization: 'Bearer sometoken',
},
});
});
});
describe('oauth2 auth adapter', () => {
const oauth2 = require('../lib/Adapters/Auth/oauth2');
const httpsRequest = require('../lib/Adapters/Auth/httpsRequest');
@@ -1138,7 +1407,7 @@ describe('apple signin auth adapter', () => {
const jwt = require('jsonwebtoken');
const util = require('util');
it('should throw error with missing id_token', async () => {
it('(using client id as string) should throw error with missing id_token', async () => {
try {
await apple.validateAuthData({}, { clientId: 'secret' });
fail();
@@ -1147,6 +1416,15 @@ describe('apple signin auth adapter', () => {
}
});
it('(using client id as array) should throw error with missing id_token', async () => {
try {
await apple.validateAuthData({}, { clientId: ['secret'] });
fail();
} catch (e) {
expect(e.message).toBe('id token is invalid for this user.');
}
});
it('should not decode invalid id_token', async () => {
try {
await apple.validateAuthData(
@@ -1220,7 +1498,19 @@ describe('apple signin auth adapter', () => {
}
});
it('should verify id_token', async () => {
it('(using client id as array) should not verify invalid id_token', async () => {
try {
await apple.validateAuthData(
{ id: 'the_user_id', token: 'the_token' },
{ clientId: ['secret'] }
);
fail();
} catch (e) {
expect(e.message).toBe('provided token does not decode as JWT');
}
});
it('(using client id as string) should verify id_token', async () => {
const fakeClaim = {
iss: 'https://appleid.apple.com',
aud: 'secret',
@@ -1242,7 +1532,51 @@ describe('apple signin auth adapter', () => {
expect(result).toEqual(fakeClaim);
});
it('should throw error with with invalid jwt issuer', async () => {
it('(using client id as array) should verify id_token', async () => {
const fakeClaim = {
iss: 'https://appleid.apple.com',
aud: 'secret',
exp: Date.now(),
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
const fakeGetSigningKeyAsyncFunction = () => {
return { kid: '123', rsaPublicKey: 'the_rsa_public_key' };
};
spyOn(util, 'promisify').and.callFake(() => fakeGetSigningKeyAsyncFunction);
spyOn(jwt, 'verify').and.callFake(() => fakeClaim);
const result = await apple.validateAuthData(
{ id: 'the_user_id', token: 'the_token' },
{ clientId: ['secret'] }
);
expect(result).toEqual(fakeClaim);
});
it('(using client id as array with multiple items) should verify id_token', async () => {
const fakeClaim = {
iss: 'https://appleid.apple.com',
aud: 'secret',
exp: Date.now(),
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
const fakeGetSigningKeyAsyncFunction = () => {
return { kid: '123', rsaPublicKey: 'the_rsa_public_key' };
};
spyOn(util, 'promisify').and.callFake(() => fakeGetSigningKeyAsyncFunction);
spyOn(jwt, 'verify').and.callFake(() => fakeClaim);
const result = await apple.validateAuthData(
{ id: 'the_user_id', token: 'the_token' },
{ clientId: ['secret', 'secret 123'] }
);
expect(result).toEqual(fakeClaim);
});
it('(using client id as string) should throw error with with invalid jwt issuer', async () => {
const fakeClaim = {
iss: 'https://not.apple.com',
sub: 'the_user_id',
@@ -1268,10 +1602,11 @@ describe('apple signin auth adapter', () => {
}
});
it('should throw error with with invalid jwt client_id', async () => {
// TODO: figure out a way to generate our own apple signed tokens, perhaps with a parse apple account
// and a private key
xit('(using client id as array) should throw error with with invalid jwt issuer', async () => {
const fakeClaim = {
iss: 'https://appleid.apple.com',
aud: 'invalid_client_id',
iss: 'https://not.apple.com',
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
@@ -1284,17 +1619,91 @@ describe('apple signin auth adapter', () => {
try {
await apple.validateAuthData(
{ id: 'the_user_id', token: 'the_token' },
{ clientId: 'secret' }
{
id: 'INSERT ID HERE',
token: 'INSERT APPLE TOKEN HERE WITH INVALID JWT ISSUER',
},
{ clientId: ['INSERT CLIENT ID HERE'] }
);
fail();
} catch (e) {
expect(e.message).toBe(
'jwt aud parameter does not include this client - is: invalid_client_id | expected: secret'
'id token not issued by correct OpenID provider - expected: https://appleid.apple.com | from: https://not.apple.com'
);
}
});
it('(using client id as string) should throw error with with invalid jwt issuer', async () => {
const fakeClaim = {
iss: 'https://not.apple.com',
sub: 'the_user_id',
};
const fakeDecodedToken = { header: { kid: '123', alg: 'RS256' } };
spyOn(jwt, 'decode').and.callFake(() => fakeDecodedToken);
const fakeGetSigningKeyAsyncFunction = () => {
return { kid: '123', rsaPublicKey: 'the_rsa_public_key' };
};
spyOn(util, 'promisify').and.callFake(() => fakeGetSigningKeyAsyncFunction);
spyOn(jwt, 'verify').and.callFake(() => fakeClaim);
try {
await apple.validateAuthData(
{
id: 'INSERT ID HERE',
token: 'INSERT APPLE TOKEN HERE WITH INVALID JWT ISSUER',
},
{ clientId: 'INSERT CLIENT ID HERE' }
);
fail();
} catch (e) {
expect(e.message).toBe(
'id token not issued by correct OpenID provider - expected: https://appleid.apple.com | from: https://not.apple.com'
);
}
});
// TODO: figure out a way to generate our own apple signed tokens, perhaps with a parse apple account
// and a private key
xit('(using client id as string) should throw error with invalid jwt clientId', async () => {
try {
await apple.validateAuthData(
{ id: 'INSERT ID HERE', token: 'INSERT APPLE TOKEN HERE' },
{ clientId: 'secret' }
);
fail();
} catch (e) {
expect(e.message).toBe('jwt audience invalid. expected: secret');
}
});
// TODO: figure out a way to generate our own apple signed tokens, perhaps with a parse apple account
// and a private key
xit('(using client id as array) should throw error with invalid jwt clientId', async () => {
try {
await apple.validateAuthData(
{ id: 'INSERT ID HERE', token: 'INSERT APPLE TOKEN HERE' },
{ clientId: ['secret'] }
);
fail();
} catch (e) {
expect(e.message).toBe('jwt audience invalid. expected: secret');
}
});
// TODO: figure out a way to generate our own apple signed tokens, perhaps with a parse apple account
// and a private key
xit('should throw error with invalid user id', async () => {
try {
await apple.validateAuthData(
{ id: 'invalid user', token: 'INSERT APPLE TOKEN HERE' },
{ clientId: 'INSERT CLIENT ID HERE' }
);
fail();
} catch (e) {
expect(e.message).toBe('auth data is invalid for this user.');
}
});
it('should throw error with with invalid user id', async () => {
const fakeClaim = {
iss: 'https://appleid.apple.com',
@@ -1320,6 +1729,7 @@ describe('apple signin auth adapter', () => {
}
});
});
describe('Apple Game Center Auth adapter', () => {
const gcenter = require('../lib/Adapters/Auth/gcenter');
+531 -136
View File
File diff suppressed because it is too large Load Diff
+262 -2
View File
@@ -1,8 +1,8 @@
const DatabaseController = require('../lib/Controllers/DatabaseController.js');
const validateQuery = DatabaseController._validateQuery;
describe('DatabaseController', function() {
describe('validateQuery', function() {
describe('DatabaseController', function () {
describe('validateQuery', function () {
it('should not restructure simple cases of SERVER-13732', done => {
const query = {
$or: [{ a: 1 }, { a: 2 }],
@@ -55,4 +55,264 @@ describe('DatabaseController', function() {
done();
});
});
describe('addPointerPermissions', function () {
const CLASS_NAME = 'Foo';
const USER_ID = 'userId';
const ACL_GROUP = [USER_ID];
const OPERATION = 'find';
const databaseController = new DatabaseController();
const schemaController = jasmine.createSpyObj('SchemaController', [
'testPermissionsForClassName',
'getClassLevelPermissions',
'getExpectedType',
]);
it('should not decorate query if no pointer CLPs are present', done => {
const clp = buildCLP();
const query = { a: 'b' };
schemaController.testPermissionsForClassName
.withArgs(CLASS_NAME, ACL_GROUP, OPERATION)
.and.returnValue(true);
schemaController.getClassLevelPermissions
.withArgs(CLASS_NAME)
.and.returnValue(clp);
const output = databaseController.addPointerPermissions(
schemaController,
CLASS_NAME,
OPERATION,
query,
ACL_GROUP
);
expect(output).toEqual({ ...query });
done();
});
it('should decorate query if a pointer CLP entry is present', done => {
const clp = buildCLP(['user']);
const query = { a: 'b' };
schemaController.testPermissionsForClassName
.withArgs(CLASS_NAME, ACL_GROUP, OPERATION)
.and.returnValue(false);
schemaController.getClassLevelPermissions
.withArgs(CLASS_NAME)
.and.returnValue(clp);
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'user')
.and.returnValue({ type: 'Pointer' });
const output = databaseController.addPointerPermissions(
schemaController,
CLASS_NAME,
OPERATION,
query,
ACL_GROUP
);
expect(output).toEqual({ ...query, user: createUserPointer(USER_ID) });
done();
});
it('should decorate query if an array CLP entry is present', done => {
const clp = buildCLP(['users']);
const query = { a: 'b' };
schemaController.testPermissionsForClassName
.withArgs(CLASS_NAME, ACL_GROUP, OPERATION)
.and.returnValue(false);
schemaController.getClassLevelPermissions
.withArgs(CLASS_NAME)
.and.returnValue(clp);
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'users')
.and.returnValue({ type: 'Array' });
const output = databaseController.addPointerPermissions(
schemaController,
CLASS_NAME,
OPERATION,
query,
ACL_GROUP
);
expect(output).toEqual({
...query,
users: { $all: [createUserPointer(USER_ID)] },
});
done();
});
it('should decorate query if an object CLP entry is present', done => {
const clp = buildCLP(['user']);
const query = { a: 'b' };
schemaController.testPermissionsForClassName
.withArgs(CLASS_NAME, ACL_GROUP, OPERATION)
.and.returnValue(false);
schemaController.getClassLevelPermissions
.withArgs(CLASS_NAME)
.and.returnValue(clp);
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'user')
.and.returnValue({ type: 'Object' });
const output = databaseController.addPointerPermissions(
schemaController,
CLASS_NAME,
OPERATION,
query,
ACL_GROUP
);
expect(output).toEqual({
...query,
user: createUserPointer(USER_ID),
});
done();
});
it('should decorate query if a pointer CLP is present and the same field is part of the query', done => {
const clp = buildCLP(['user']);
const query = { a: 'b', user: 'a' };
schemaController.testPermissionsForClassName
.withArgs(CLASS_NAME, ACL_GROUP, OPERATION)
.and.returnValue(false);
schemaController.getClassLevelPermissions
.withArgs(CLASS_NAME)
.and.returnValue(clp);
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'user')
.and.returnValue({ type: 'Pointer' });
const output = databaseController.addPointerPermissions(
schemaController,
CLASS_NAME,
OPERATION,
query,
ACL_GROUP
);
expect(output).toEqual({
$and: [{ user: createUserPointer(USER_ID) }, { ...query }],
});
done();
});
it('should transform the query to an $or query if multiple array/pointer CLPs are present', done => {
const clp = buildCLP(['user', 'users', 'userObject']);
const query = { a: 'b' };
schemaController.testPermissionsForClassName
.withArgs(CLASS_NAME, ACL_GROUP, OPERATION)
.and.returnValue(false);
schemaController.getClassLevelPermissions
.withArgs(CLASS_NAME)
.and.returnValue(clp);
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'user')
.and.returnValue({ type: 'Pointer' });
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'users')
.and.returnValue({ type: 'Array' });
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'userObject')
.and.returnValue({ type: 'Object' });
const output = databaseController.addPointerPermissions(
schemaController,
CLASS_NAME,
OPERATION,
query,
ACL_GROUP
);
expect(output).toEqual({
$or: [
{ ...query, user: createUserPointer(USER_ID) },
{ ...query, users: { $all: [createUserPointer(USER_ID)] } },
{ ...query, userObject: createUserPointer(USER_ID) },
],
});
done();
});
it('should throw an error if for some unexpected reason the property specified in the CLP is neither a pointer nor an array', done => {
const clp = buildCLP(['user']);
const query = { a: 'b' };
schemaController.testPermissionsForClassName
.withArgs(CLASS_NAME, ACL_GROUP, OPERATION)
.and.returnValue(false);
schemaController.getClassLevelPermissions
.withArgs(CLASS_NAME)
.and.returnValue(clp);
schemaController.getExpectedType
.withArgs(CLASS_NAME, 'user')
.and.returnValue({ type: 'Number' });
expect(() => {
databaseController.addPointerPermissions(
schemaController,
CLASS_NAME,
OPERATION,
query,
ACL_GROUP
);
}).toThrow(
Error(
`An unexpected condition occurred when resolving pointer permissions: ${CLASS_NAME} user`
)
);
done();
});
});
});
function buildCLP(pointerNames) {
const OPERATIONS = [
'count',
'find',
'get',
'create',
'update',
'delete',
'addField',
];
const clp = OPERATIONS.reduce((acc, op) => {
acc[op] = {};
if (pointerNames && pointerNames.length) {
acc[op].pointerFields = pointerNames;
}
return acc;
}, {});
clp.protectedFields = {};
clp.writeUserFields = [];
clp.readUserFields = [];
return clp;
}
function createUserPointer(userId) {
return {
__type: 'Pointer',
className: '_User',
objectId: userId,
};
}
+24 -54
View File
@@ -1,63 +1,33 @@
const ParseServer = require('../lib/index');
const express = require('express');
const request = require('../lib/request');
describe('Enable express error handler', () => {
it('should call the default handler in case of error, like updating a non existing object', done => {
const serverUrl = 'http://localhost:12667/parse';
const appId = 'anOtherTestApp';
const masterKey = 'anOtherTestMasterKey';
let server;
let lastError;
const parseServer = ParseServer.ParseServer(
it('should call the default handler in case of error, like updating a non existing object', async (done) => {
const parseServer = await reconfigureServer(
Object.assign({}, defaultConfiguration, {
appId: appId,
masterKey: masterKey,
serverURL: serverUrl,
enableExpressErrorHandler: true,
serverStartComplete: () => {
expect(Parse.applicationId).toEqual('anOtherTestApp');
const app = express();
app.use('/parse', parseServer);
server = app.listen(12667);
app.use(function(err, req, res, next) {
next;
lastError = err;
});
request({
method: 'PUT',
url: serverUrl + '/classes/AnyClass/nonExistingId',
headers: {
'X-Parse-Application-Id': appId,
'X-Parse-Master-Key': masterKey,
'Content-Type': 'application/json',
},
body: { someField: 'blablabla' },
})
.then(() => {
fail('Should throw error');
})
.catch(response => {
const reqError = response.data;
expect(reqError).toBeDefined();
expect(lastError).toBeDefined();
expect(lastError.code).toEqual(101);
expect(lastError.message).toEqual('Object not found.');
expect(lastError.code).toEqual(reqError.code);
expect(lastError.message).toEqual(reqError.error);
})
.then(() => {
server.close(done);
});
},
})
);
parseServer.app.use(function (err, req, res, next) {
expect(err.message).toBe('Object not found.');
next(err);
});
try {
await request({
method: 'PUT',
url: defaultConfiguration.serverURL + '/classes/AnyClass/nonExistingId',
headers: {
'X-Parse-Application-Id': defaultConfiguration.appId,
'X-Parse-Master-Key': defaultConfiguration.masterKey,
'Content-Type': 'application/json',
},
body: { someField: 'blablabla' },
});
fail('Should throw error');
} catch (response) {
expect(response).toBeDefined();
expect(response.status).toEqual(500);
parseServer.server.close(done);
}
});
});
+13 -5
View File
@@ -8,6 +8,7 @@ const GridStoreAdapter = require('../lib/Adapters/Files/GridStoreAdapter')
.GridStoreAdapter;
const Config = require('../lib/Config');
const FilesController = require('../lib/Controllers/FilesController').default;
const databaseURI = 'mongodb://localhost:27017/parse';
const mockAdapter = {
createFile: () => {
@@ -29,7 +30,7 @@ describe('FilesController', () => {
'mongodb://localhost:27017/parse'
);
const filesController = new FilesController(gridStoreAdapter);
const result = filesController.expandFilesInObject(config, function() {});
const result = filesController.expandFilesInObject(config, function () {});
expect(result).toBeUndefined();
@@ -65,13 +66,11 @@ describe('FilesController', () => {
// and 2 the message that will be sent back to the client.
const log1 = logs.find(
x => x.message === 'Error creating a file: it failed with xyz'
x => x.message === 'Error creating a file: it failed with xyz'
);
expect(log1.level).toBe('error');
const log2 = logs.find(
x => x.message === 'Could not store file: yolo.txt.'
);
const log2 = logs.find(x => x.message === 'it failed with xyz');
expect(log2.level).toBe('error');
expect(log2.code).toBe(130);
@@ -137,6 +136,15 @@ describe('FilesController', () => {
done();
});
it('should handle adapter without getMetadata', async () => {
const gridStoreAdapter = new GridFSBucketAdapter(databaseURI);
gridStoreAdapter.getMetadata = null;
const filesController = new FilesController(gridStoreAdapter);
const result = await filesController.getMetadata();
expect(result).toEqual({});
});
it('should reject slashes in file names', done => {
const gridStoreAdapter = new GridFSBucketAdapter(
'mongodb://localhost:27017/parse'
+86 -1
View File
@@ -4,6 +4,8 @@ const GridFSBucketAdapter = require('../lib/Adapters/Files/GridFSBucketAdapter')
.GridFSBucketAdapter;
const { randomString } = require('../lib/cryptoUtils');
const databaseURI = 'mongodb://localhost:27017/parse';
const request = require('../lib/request');
const Config = require('../lib/Config');
async function expectMissingFile(gfsAdapter, name) {
try {
@@ -14,7 +16,7 @@ async function expectMissingFile(gfsAdapter, name) {
}
}
describe('GridFSBucket and GridStore interop', () => {
describe_only_db('mongo')('GridFSBucket and GridStore interop', () => {
beforeEach(async () => {
const gsAdapter = new GridStoreAdapter(databaseURI);
const db = await gsAdapter._connect();
@@ -33,6 +35,89 @@ describe('GridFSBucket and GridStore interop', () => {
expect(gfsResult.toString('utf8')).toBe(originalString);
});
it('an encypted file created in GridStore should be available in GridFS', async () => {
const gsAdapter = new GridStoreAdapter(databaseURI);
const gfsAdapter = new GridFSBucketAdapter(
databaseURI,
{},
'89E4AFF1-DFE4-4603-9574-BFA16BB446FD'
);
await expectMissingFile(gfsAdapter, 'myFileName');
const originalString = 'abcdefghi';
await gfsAdapter.createFile('myFileName', originalString);
const gsResult = await gsAdapter.getFileData('myFileName');
expect(gsResult.toString('utf8')).not.toBe(originalString);
const gfsResult = await gfsAdapter.getFileData('myFileName');
expect(gfsResult.toString('utf8')).toBe(originalString);
});
it('should save metadata', async () => {
const gfsAdapter = new GridFSBucketAdapter(databaseURI);
const originalString = 'abcdefghi';
const metadata = { hello: 'world' };
await gfsAdapter.createFile('myFileName', originalString, null, {
metadata,
});
const gfsResult = await gfsAdapter.getFileData('myFileName');
expect(gfsResult.toString('utf8')).toBe(originalString);
let gfsMetadata = await gfsAdapter.getMetadata('myFileName');
expect(gfsMetadata.metadata).toEqual(metadata);
// Empty json for file not found
gfsMetadata = await gfsAdapter.getMetadata('myUnknownFile');
expect(gfsMetadata).toEqual({});
});
it('should save metadata with file', async () => {
const gfsAdapter = new GridFSBucketAdapter(databaseURI);
await reconfigureServer({ filesAdapter: gfsAdapter });
const str = 'Hello World!';
const data = [];
for (let i = 0; i < str.length; i++) {
data.push(str.charCodeAt(i));
}
const metadata = { foo: 'bar' };
const file = new Parse.File('hello.txt', data, 'text/plain');
file.addMetadata('foo', 'bar');
await file.save();
let fileData = await gfsAdapter.getMetadata(file.name());
expect(fileData.metadata).toEqual(metadata);
// Can only add metadata on create
file.addMetadata('hello', 'world');
await file.save();
fileData = await gfsAdapter.getMetadata(file.name());
expect(fileData.metadata).toEqual(metadata);
const headers = {
'X-Parse-Application-Id': 'test',
'X-Parse-REST-API-Key': 'rest',
};
const response = await request({
method: 'GET',
headers,
url: `http://localhost:8378/1/files/test/metadata/${file.name()}`,
});
fileData = response.data;
expect(fileData.metadata).toEqual(metadata);
});
it('should handle getMetadata error', async () => {
const config = Config.get('test');
config.filesController.getMetadata = () => Promise.reject();
const headers = {
'X-Parse-Application-Id': 'test',
'X-Parse-REST-API-Key': 'rest',
};
const response = await request({
method: 'GET',
headers,
url: `http://localhost:8378/1/files/test/metadata/filename.txt`,
});
expect(response.data).toEqual({});
});
it('properly fetches a large file from GridFS', async () => {
const gfsAdapter = new GridFSBucketAdapter(databaseURI);
const twoMegabytesFile = randomString(2048 * 1024);
+256
View File
@@ -0,0 +1,256 @@
'use strict';
const Config = require('../lib/Config');
const Definitions = require('../lib/Options/Definitions');
const request = require('../lib/request');
const rest = require('../lib/rest');
const auth = require('../lib/Auth');
const uuid = require('uuid');
describe_only_db('mongo')('Idempotency', () => {
// Parameters
/** Enable TTL expiration simulated by removing entry instead of waiting for MongoDB TTL monitor which
runs only every 60s, so it can take up to 119s until entry removal - ain't nobody got time for that */
const SIMULATE_TTL = true;
// Helpers
async function deleteRequestEntry(reqId) {
const config = Config.get(Parse.applicationId);
const res = await rest.find(
config,
auth.master(config),
'_Idempotency',
{ reqId: reqId },
{ limit: 1 }
);
await rest.del(
config,
auth.master(config),
'_Idempotency',
res.results[0].objectId
);
}
async function setup(options) {
await reconfigureServer({
appId: Parse.applicationId,
masterKey: Parse.masterKey,
serverURL: Parse.serverURL,
idempotencyOptions: options,
});
}
// Setups
beforeEach(async () => {
if (SIMULATE_TTL) {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 200000;
}
await setup({
paths: [
'functions/.*',
'jobs/.*',
'classes/.*',
'users',
'installations',
],
ttl: 30,
});
});
// Tests
it('should enforce idempotency for cloud code function', async () => {
let counter = 0;
Parse.Cloud.define('myFunction', () => {
counter++;
});
const params = {
method: 'POST',
url: 'http://localhost:8378/1/functions/myFunction',
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': 'abc-123',
},
};
expect(Config.get(Parse.applicationId).idempotencyOptions.ttl).toBe(30);
await request(params);
await request(params).then(fail, e => {
expect(e.status).toEqual(400);
expect(e.data.error).toEqual('Duplicate request');
});
expect(counter).toBe(1);
});
it('should delete request entry after TTL', async () => {
let counter = 0;
Parse.Cloud.define('myFunction', () => {
counter++;
});
const params = {
method: 'POST',
url: 'http://localhost:8378/1/functions/myFunction',
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': 'abc-123',
},
};
await expectAsync(request(params)).toBeResolved();
if (SIMULATE_TTL) {
await deleteRequestEntry('abc-123');
} else {
await new Promise(resolve => setTimeout(resolve, 130000));
}
await expectAsync(request(params)).toBeResolved();
expect(counter).toBe(2);
});
it('should enforce idempotency for cloud code jobs', async () => {
let counter = 0;
Parse.Cloud.job('myJob', () => {
counter++;
});
const params = {
method: 'POST',
url: 'http://localhost:8378/1/jobs/myJob',
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': 'abc-123',
},
};
await expectAsync(request(params)).toBeResolved();
await request(params).then(fail, e => {
expect(e.status).toEqual(400);
expect(e.data.error).toEqual('Duplicate request');
});
expect(counter).toBe(1);
});
it('should enforce idempotency for class object creation', async () => {
let counter = 0;
Parse.Cloud.afterSave('MyClass', () => {
counter++;
});
const params = {
method: 'POST',
url: 'http://localhost:8378/1/classes/MyClass',
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': 'abc-123',
},
};
await expectAsync(request(params)).toBeResolved();
await request(params).then(fail, e => {
expect(e.status).toEqual(400);
expect(e.data.error).toEqual('Duplicate request');
});
expect(counter).toBe(1);
});
it('should enforce idempotency for user object creation', async () => {
let counter = 0;
Parse.Cloud.afterSave('_User', () => {
counter++;
});
const params = {
method: 'POST',
url: 'http://localhost:8378/1/users',
body: {
username: 'user',
password: 'pass',
},
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': 'abc-123',
},
};
await expectAsync(request(params)).toBeResolved();
await request(params).then(fail, e => {
expect(e.status).toEqual(400);
expect(e.data.error).toEqual('Duplicate request');
});
expect(counter).toBe(1);
});
it('should enforce idempotency for installation object creation', async () => {
let counter = 0;
Parse.Cloud.afterSave('_Installation', () => {
counter++;
});
const params = {
method: 'POST',
url: 'http://localhost:8378/1/installations',
body: {
installationId: '1',
deviceType: 'ios',
},
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': 'abc-123',
},
};
await expectAsync(request(params)).toBeResolved();
await request(params).then(fail, e => {
expect(e.status).toEqual(400);
expect(e.data.error).toEqual('Duplicate request');
});
expect(counter).toBe(1);
});
it('should not interfere with calls of different request ID', async () => {
let counter = 0;
Parse.Cloud.afterSave('MyClass', () => {
counter++;
});
const promises = [...Array(100).keys()].map(() => {
const params = {
method: 'POST',
url: 'http://localhost:8378/1/classes/MyClass',
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': uuid.v4(),
},
};
return request(params);
});
await expectAsync(Promise.all(promises)).toBeResolved();
expect(counter).toBe(100);
});
it('should re-throw any other error unchanged when writing request entry fails for any other reason', async () => {
spyOn(rest, 'create').and.rejectWith(
new Parse.Error(0, 'some other error')
);
Parse.Cloud.define('myFunction', () => {});
const params = {
method: 'POST',
url: 'http://localhost:8378/1/functions/myFunction',
headers: {
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey,
'X-Parse-Request-Id': 'abc-123',
},
};
await request(params).then(fail, e => {
expect(e.status).toEqual(400);
expect(e.data.error).toEqual('some other error');
});
});
it('should use default configuration when none is set', async () => {
await setup({});
expect(Config.get(Parse.applicationId).idempotencyOptions.ttl).toBe(
Definitions.IdempotencyOptions.ttl.default
);
expect(Config.get(Parse.applicationId).idempotencyOptions.paths).toBe(
Definitions.IdempotencyOptions.paths.default
);
});
it('should throw on invalid configuration', async () => {
await expectAsync(setup({ paths: 1 })).toBeRejected();
await expectAsync(setup({ ttl: 'a' })).toBeRejected();
await expectAsync(setup({ ttl: 0 })).toBeRejected();
await expectAsync(setup({ ttl: -1 })).toBeRejected();
});
});
+56
View File
@@ -356,4 +356,60 @@ describe('middlewares', () => {
middlewares.DEFAULT_ALLOWED_HEADERS
);
});
it('should set default Access-Control-Allow-Origin if allowOrigin is empty', () => {
AppCache.put(fakeReq.body._ApplicationId, {
allowOrigin: undefined,
});
const headers = {};
const res = {
header: (key, value) => {
headers[key] = value;
},
};
const allowCrossDomain = middlewares.allowCrossDomain(
fakeReq.body._ApplicationId
);
allowCrossDomain(fakeReq, res, () => {});
expect(headers['Access-Control-Allow-Origin']).toEqual('*');
});
it('should set custom origin to Access-Control-Allow-Origin if allowOrigin is provided', () => {
AppCache.put(fakeReq.body._ApplicationId, {
allowOrigin: 'https://parseplatform.org/',
});
const headers = {};
const res = {
header: (key, value) => {
headers[key] = value;
},
};
const allowCrossDomain = middlewares.allowCrossDomain(
fakeReq.body._ApplicationId
);
allowCrossDomain(fakeReq, res, () => {});
expect(headers['Access-Control-Allow-Origin']).toEqual(
'https://parseplatform.org/'
);
});
it('should use user provided on field userFromJWT', done => {
AppCache.put(fakeReq.body._ApplicationId, {
masterKey: 'masterKey',
});
fakeReq.userFromJWT = 'fake-user';
middlewares.handleParseHeaders(fakeReq, fakeRes, () => {
expect(fakeReq.auth.user).toEqual('fake-user');
done();
});
});
it('should give invalid response when upload file without x-parse-application-id in header', () => {
AppCache.put(fakeReq.body._ApplicationId, {
masterKey: 'masterKey',
});
fakeReq.body = Buffer.from('fake-file');
middlewares.handleParseHeaders(fakeReq, fakeRes);
expect(fakeRes.status).toHaveBeenCalledWith(403);
});
});

Some files were not shown because too many files have changed in this diff Show More