Commit Graph

2094 Commits

Author SHA1 Message Date
Florent Vilmart
10631371e6 Introduces flow types for storage (#4349)
* Introduces flow types for storage

* Better typing of QueryOptions

* Adds flow types to SchemaCOntroller,

- runs flow on pre tests
- fixes flow

* Adds ClassLevelPermissions type

* Moves Controller types into a single file

* Changes import styles

* Changes import styles

* fixing method setIndexesWithSchemaFormat (#4454)

Fixing invalid database code in method `setIndexesWithSchemaFormat`:

* It must be a transaction, not a task, as it executes multiple database changes
* It should contain the initial queries inside the transaction, providing the context, not outside it;
* Replaced the code with the ES6 Generator notation
* Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters

* nits

* Fixes tests, improves flow typing
2017-12-30 20:44:18 -05:00
greenkeeper[bot]
f0f1870aa3 Update mongodb to the latest version 🚀 (#4449)
* fix(package): update mongodb to version 3.0.0

* Compatibility with MongoDB client 3.0

* Updates Gridstore as well

* Set Read preference to Primary when not specified, to match original implementation

* Update MongoStorageAdapter.js

* Bumps to 3.0.1
2017-12-30 00:23:43 -05:00
Diamond Lewis
6143988a82 Support pointer in distinct query (#4471)
* Support pointer in distinct query

* extract transform pointer string
2017-12-29 21:32:40 -06:00
Florent Vilmart
7d773a5d8a fix(package): update mime to version 2.1.0 (#4446)
Closes #4443
2017-12-29 15:31:14 -05:00
Florent Vilmart
e3a26540da chore(package): update nodemon to version 1.14.6 (#4472)
Closes #4417
2017-12-29 15:30:56 -05:00
greenkeeper[bot]
c549663c96 fix(package): update mime to version 2.0.5 (#4443) 2017-12-29 13:43:54 -05:00
greenkeeper[bot]
58f32c4745 fix(package): update ws to version 3.3.3 (#4429) 2017-12-29 13:27:43 -05:00
Florent Vilmart
2ee68d3a8b chore(package): update cross-env to version 5.1.3 (#4445)
Closes #4441
2017-12-29 13:27:16 -05:00
Benjamin Wilson Friedman
7a9d4044af Scrub Passwords with URL Encoded Characters (#4433)
* scrub passwords with url encoded characters from logs

* compose query string from parsed params, redacting based on key if needed
2017-12-29 13:16:32 -05:00
Diamond Lewis
04f8673edd PG: Support for multiple projection in aggregate (#4469) 2017-12-29 17:39:16 +00:00
Vitaly Tomilov
6ba939994d consistent error throwing (#4470)
should use `throw` inside `.catch`.
2017-12-29 17:06:55 +00:00
Vitaly Tomilov
bb053301e5 refactoring method createClass (#4465)
* refactoring method createClass

Removing error-analysis conditions that are irrelevant, i.e. since we are only returning the batch, the error will always have `data` set to the size of the input array, as per [the library's API](http://vitaly-t.github.io/spex/errors.BatchError.html).

* Update PostgresStorageAdapter.js

removing the use of the default separator.
2017-12-28 01:43:34 +00:00
Vitaly Tomilov
7bb9c6da59 refactoring deleteAllClasses (#4464)
* refactoring deleteAllClasses

...to re-use the connection.

* Update PostgresStorageAdapter.js

removing extra spaces.
2017-12-27 22:41:50 +00:00
Vitaly Tomilov
b4aca8afc9 Reuse connection in getAllClasses (#4463)
as per the title.
2017-12-27 20:44:11 +00:00
Vitaly Tomilov
5681b3f902 Refactoring method addFieldIfNotExists (#4461)
* Refactoring method `addFieldIfNotExists`

* Using ES6 Generators syntax
* Passing in the context into method `createClass`, to reuse the connection
* Extending method `createClass` to reuse connections

* Update PostgresStorageAdapter.js

forgot: extending method `createClass` to reuse the connection.

* Update PostgresStorageAdapter.js

fixing the re-throw logic.
2017-12-27 18:14:15 +00:00
Vitaly Tomilov
820ae2b894 Better connection use in setClassLevelPermissions (#4460)
Method `setClassLevelPermissions` should use `.task` to share the connection for the two consecutive operations. It doesn't need a transaction, because the first operation does not need to roll back when the second one fails.
2017-12-27 00:30:50 +00:00
Vitaly Tomilov
a868beda93 Refactoring method createTable (#4456)
* Refactoring method createTable

Replacing the weird task + transaction chain, by replacing it with just one transaction that encapsulates the complete logic.

* Update PostgresStorageAdapter.js

correcting the sequence to match the original exactly.

* Update PostgresStorageAdapter.js

Nesting the transaction inside a task, so it can execute successfully no matter if the containing task succeeds or fails.

* Update PostgresStorageAdapter.js

adding the missing bracket.
2017-12-26 00:14:16 +00:00
Vitaly Tomilov
34453bff46 PostgreSQL performance optimization (#4457)
Performance-optimizing transactions to execute all non-result queries as a single operation.
2017-12-25 21:08:04 +00:00
Vitaly Tomilov
415ee3a1fd fixing method setIndexesWithSchemaFormat (#4454)
Fixing invalid database code in method `setIndexesWithSchemaFormat`:

* It must be a transaction, not a task, as it executes multiple database changes
* It should contain the initial queries inside the transaction, providing the context, not outside it;
* Replaced the code with the ES6 Generator notation
* Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters
2017-12-24 19:03:35 +00:00
Vitaly Tomilov
a2b2f18927 db connection context fix (#4453)
fixing use of the wrong connection context inside a task
2017-12-24 17:56:23 +00:00
Vitaly Tomilov
e0a31d2aeb improving database logic. (#4451)
improving database logic.
2017-12-24 16:34:01 +00:00
Vitaly Tomilov
08ba738227 refactoring database code (#4448)
* refactoring database code

Starting to refactor the database code for better use of promises + ES6 generators, to prepare for ES7 await/async.

* Update PostgresStorageAdapter.js

* Update PostgresStorageAdapter.js

naming the transaction.
2017-12-24 15:58:20 +00:00
Premith
33de770709 Add Parse Server Generic Email Adapter to README (#4101)
Added a generic email plugin to send Parse Server password reset and verification emails with generic accounts like Gmail. This module uses the nodemailer library.
2017-12-19 11:37:31 -08:00
Florent Vilmart
bad217911c Adds ability to login with email when provided as username (#4420) 2017-12-12 08:49:45 -05:00
Florent Vilmart
8fd5f31089 Adds infos about vulnerability disclosures (#4413)
* Create SECURITY.md

* Update SECURITY.md

* Update SECURITY.md

* Update ISSUE_TEMPLATE.md

* Update ISSUE_TEMPLATE.md

* Clarify time table from contact to fix

* change times to days
2017-12-05 08:52:13 -05:00
greenkeeper[bot]
0bf69975de fix(package): update parse to version 1.11.0 (#4414) 2017-12-05 08:51:41 -05:00
Florent Vilmart
1f22ee36e7 Release 2.7.1
(#4410)
* Adds failing test for 4409

* Adds fix

*  Release 2.7.1
2017-12-01 09:16:58 -05:00
Arthur Cinader
ca542c3750 Fix test name to match what's tested 2017-11-30 12:40:39 -08:00
Arthur Cinader
1876d3f3fd Add doesNotMatchKeyInQuery case... 2017-11-30 12:40:39 -08:00
Henrik Malmberg
4ceff38811 added test for dot-notation in matchesKeyInQuery 2017-11-30 12:40:39 -08:00
Henrik Malmberg
741f869140 Allows to use dot-notation to match against a complex structure when using matchesKeyInQuery 2017-11-30 12:40:39 -08:00
Vitaly Tomilov
9d1d8515fc pg-promise refactoring (#4401)
initial refactoring of `pg-promise` code.
2017-11-30 08:30:15 +07:00
Addison Elliott
9eed81e636 Remove nsp check from Travis YML (#4403)
nsp is done through a GitHub PR hook and managed separately from Travis CI
2017-11-29 16:01:27 -05:00
Florent Vilmart
e2d33678a9 Makes all scripts cross platforms (#4383) 2017-11-27 23:22:07 -05:00
Florent Vilmart
6102648855 Release 2.7.0 (#4385)
*  Release 2.7.0

* Update CHANGELOG.md
2017-11-25 19:54:52 -05:00
Addison Elliott
dd55bbe700 Fix eslint errors on Windows (#4364)
* Fix eslint errors on Windows

On Windows, when run `npm run lint`, a **LOT** of the following errors
appeared:
```
 error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style
```

This error only occurs on Windows because the `linebreak-style` eslint
setting was set to "unix". This is fixed by making the eslint config
file a Javascript script and setting the platform based on the build
platform.

Thus, the `linebreak-style` will be "windows" or "unix" depending on the
users platform.

* Remove linespace ending check in Lint

Add .gitattributes that will convert line endings automatically to LF when uploading to GitHub

* Remove bat file extension from gitattributes

Include lint check for line endings

* Change tabs to spaces

* Force LF line endings for each file upon downloading

Restore eslint linebreak style check for unix since LF line endings will be enforced

* Add a few more text files to the gitattributes

* Added png as binary file to gitattributes file

This was necessary because git was showing that the CRLF line endings were being converted to LF for PNG files on Windows
2017-11-25 16:06:52 -05:00
Diamond Lewis
4bccf96ae7 Add Indexes to Schema API (#4240)
* Add Indexes to Schema API

* error handling

* ci errors

* postgres support

* full text compound indexes

* pg clean up

* get indexes on startup

* test compound index on startup

* add default _id to index, full Text index on startup

* lint

* fix test
2017-11-25 15:39:31 -05:00
Florent Vilmart
6a1510729a Bump nodejs version to 6+ (#4272)
* let travis build against 3.x

* Cleanup dependencies and bump min version to current LTS

* Makes npm-git push all branches to -preview

* restores releases

* Bumps mime to 2.0.3 (requires node 6+)

* Bumps express to latest version

* Fixes linting issue after upgrade

* Use travis-branch for partial releases
2017-11-25 15:39:31 -05:00
Florent Vilmart
ea57c523da let travis build against 3.x 2017-11-25 15:39:31 -05:00
Benjamin Wilson Friedman
219ad7224a Fixes sessionTokens being overridden in 'find' (#4332)
* remove session token replacement code

* adds cases for _User/_Session with sessionToken and with/without masterKey
2017-11-25 15:28:08 -05:00
Addison Elliott
2b9397a5a9 Update contributing.md (#4368)
* Update CONTRIBUTING.md

Clean up some of the language in the document.

Add command to run for testing on Windows

* Update CONTRIBUTING.md

Update coverage directory

* Update CONTRIBUTING.md

Add details about how to run test coverage
2017-11-25 15:20:16 -05:00
Florent Vilmart
4f56ec6265 fix(package): update commander to version 2.12.1 (#4382)
Closes #4371
2017-11-25 14:53:47 -05:00
greenkeeper[bot]
cc48e5412e fix(package): update commander to version 2.12.0 (#4371) 2017-11-25 14:53:14 -05:00
greenkeeper[bot]
c0215399a2 fix(package): update ws to version 3.3.2 (#4367) 2017-11-25 14:53:00 -05:00
greenkeeper[bot]
49d0a651b5 chore(package): update uws to version 9.14.0 (#4366) 2017-11-25 14:52:46 -05:00
Benjamin Wilson Friedman
7944e2bd2d Remove hidden properties from aggregate responses (#4351)
* Remove hidden properties from aggregrate responses

* transform results from mongo & postgres

* Adjust ordering to comply with tests
2017-11-22 23:07:45 -08:00
greenkeeper[bot]
37ceae0812 fix(package): update pg-promise to version 7.3.2 (#4362) 2017-11-18 21:12:52 +00:00
CHANG, TZU-YEN
8bf6abfee3 Patch handleShutdown feature (#4361)
* Add handleShutdown Test of MongoStorageAdapter.

* Add `handleShutdown` function in PostgresStorageAdapter, with it's test.

* Replace the _pgp to _client

* Use  `adapter._client.$pool.ending` to ckeck is ending

* Add `handleShutdown()` in ParseServer.spec.js

* Trigger

* Set Server to Default
2017-11-18 15:20:19 -05:00
Florent Vilmart
de73f3723c Scoped packages (#4354)
* Updates for scoped packages dependencies

* bumps s3 adapter

* Update README.md

* Update README.md

* Update README.md
2017-11-17 08:32:58 -05:00
Benjamin Wilson Friedman
e1d04cd655 Adds Table of Contents to README (#4357)
* adds table of contents

* remove empty line, moved greenkeeper up with other statuses
2017-11-16 18:49:11 -05:00