* Moves LiveQuery pub/sub to adapter folder
* Adds ability to provide custom adapter for LiveQuery pubsub
* Adds test for function based adapter
* Pass all options to createSubscriber
* nits
* Add tests. Fail request if any of the 4 optional keys does not match
* Only require one key to be supplied in the request, except when no keys are configured
* Use const over let, var
* Add acl role check to _matchesACL, start adding tests.
* Add tests for ACL role checks in LiveQueryServer.
* Switch to arrow functions, add immutabalized code from @acinader, swap for loop style.
* Add failing test for updating installations with masterKey
* Prevent auth.installationId from being used when using masterKey
This allows masterKey to update any installation object
Fixes ParsePlatform/parse-server##2887
* Add failing test for multiple .notEqualTo on relation with same class
* Fix multiple .notEqualTo on relations with the same class
Multiple should use the union of all objectIds not the intersect
FixesParsePlatform/parse-server#1596
* Allow configuration options for Postgres
* Fix the use of incorrect options object.
* Refactor and test the postgres config parser.
* Remove unnecessary try/catch
* Remove unnecessary try/catch
* Add blank line at the end of the test file
* Rename file for consistency purposes
* Removes runtime dependency babel-polyfill (#2692)
* Removes runtime dependency babel-polyfill
* removes references to polyfilled array includes
* Better support for polyfilling
* Removes unnecessary log
* Adds killswitch if tests are polyfilled
* Reverts usage of includes on strings
* Reproduction for #1567
* Recursive handling of nested pointer keys in select
* Better support for multi-level nested keys
* Adds support for selecting columns natively (mongo)
* Support for postgres column selections
* Filter-out empty keys for pg
Move password masking functionality into LoggerController.
The is a more aggresive approach to masking password string in the logs.
Cleaning the url is still in the PromiseRouter because picking it out of the log string
would be fragile.
This will cause more log messages to be scanned for password strings, and may cause a password
string to be obsfucated that is not neccesarily part of parse internals -- but i think that is
still a good thing....
see: #2755 & #2680
* Lookup for email in username field to match docs if email is undefined
* Adds support for sendMail option to when email is selected
* Proper does not exists clause
* Adds CloudCode handler for beforeFind
- Allows cloud code to modify a query before it is run
- Works with promises for a safer environment
- Supports modifiying the current query
- Supports issuing new queries
* Adds test for cornercase empty queries from rest
* Makes sure restOptions is always definied
* Adds jobs endpoint protected by masterKey
* Adds connection timeout for 15 minutes in jobs
* Refactors pushStatusHandler into StatusHandler
* Adds reporting of _JobStatus
* Only accept strings as messages
* Adds test for masterKey basic auth
* Adds CloudCodeRouter for cloud_code endpoint of job status, enable Jobs feature on dashboard
* xit racing test
* Adds passing tests
* Better containsAll implementation
* Full Geopoint support, fix inverted lat/lng
* Adds support for $and operator / PointerPermissions specs
* Fix issue updating CLPs on schema
* Extends query support
* Adds RestCreate to the specs
* Adds User specs
* Adds error handlers for failing tests
* nits
* Proper JSON update of AuthData
* fix for #1259 with PG
* Fix for Installations _PushStatus test
* Adds support for GlobalConfig
* Enables relations tests
* Exclude spec as legacy
* Makes corner case for 1 in GlobalConfig
* Make parse-server cloud code logging much to parse.com legacy. (fixes#2501)
1. More closely mimic the wording. Include the user id.
2. Truncate input and result at 1k char.
3. Use more sensible metadata that would makes sense to index. The guideline I used was: if it makes sense to filter on, put it in metadata. If it makes sense to "free text" search on, then put it in the message.
- file and console output, logging an object does not do what on might expect. For example, logging a function's "params":
```
expected:
info: Ran cloud function aFunction for user qWHLVEsbEe with:
Input: {"foo":"bar","bar":"baz"}
Result: "it worked!" functionName=aFunction, params= { foo: "bar", "bar": baz }, user=qWHLVEsbEe
what you actually get:
info: Ran cloud function aFunction for user qWHLVEsbEe with:
Input: {"foo":"bar","bar":"baz"}
Result: "it worked!" functionName=aFunction, foo=bar, bar=baz, user=qWHLVEsbEe
```
- logging highly variable metadata is pretty useless for indexing when logs are sent to a logging repository like elastic search. In that use case, you want to index stuff you expect to filter on like user, hook type.
- finally, putting the same input and result data in both the metadata and the message makes each message much larger with no additional value (that I know of anyway :).
4. Change some of the naming of functions in trigger.js to make future work easier. I was confused about why there were three logging functions in trigger and it took me awhile to get that before hooks and after hooks are logged differently. I just changed the names to make it obvious at first glance.
5. Add some try/catches to help any future futzers see syntax errors, etc instead of just hanging.
Some log examples from unit test output:
```
info: Ran cloud function loggerTest for user YUD2os1i5B with:
Input: {}
Result: {} functionName=loggerTest, user=YUD2os1i5B
info: beforeSave triggered for MyObject for user nssehQ3wtz:
Input: {}
Result: {} className=MyObject, triggerType=beforeSave, user=nssehQ3wtz
info: afterSave triggered for MyObject for user XdznQgTD0p:
Input: {"createdAt":"2016-08-19T01:11:31.249Z","updatedAt":"2016-08-19T01:11:31.249Z","objectId":"POoOOLL89U"} className=MyObject, triggerType=afterSave, user=XdznQgTD0p
error: beforeSave failed for MyObject for user 7JHqCZgnhf:
Input: {}
Error: {"code":141,"message":"uh oh!"} className=MyObject, triggerType=beforeSave, code=141, message=uh oh!, user=7JHqCZgnhf
info: Ran cloud function aFunction for user YR3nOoT3r9 with:
Input: {"foo":"bar"}
Result: "it worked!" functionName=aFunction, user=YR3nOoT3r9
error: Failed running cloud function aFunction for user Xm6NpOyuMC with:
Input: {"foo":"bar"}
Error: {"code":141,"message":"it failed!"} functionName=aFunction, code=141, message=it failed!, user=Xm6NpOyuMC
info: Ran cloud function aFunction for user CK1lvkmaLg with:
Input: {"longString":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lobortis semper diam, ac euismod diam pharetra sed. Etiam eget efficitur neque. Proin nec diam mi. Sed ut purus dolor. Nulla nulla nibh, ornare vitae ornare et, scelerisque rutrum eros. Mauris venenatis tincidunt turpis a mollis. Donec gravida eget enim in luctus.\n\nSed porttitor commodo orci, ut pretium eros convallis eget. Curabitur pretium velit in odio dictum luctus. Vivamus ac tristique arcu, a semper tellus. Morbi euismod purus dapibus vestibulum sagittis. Nunc dapibus vehicula leo at scelerisque. Donec porta mauris quis nulla imperdiet consectetur. Curabitur sagittis eleifend arcu eget elementum. Aenean interdum tincidunt ornare. Pellentesque sit amet interdum tortor. Pellentesque blandit nisl eget euismod consequat. Etiam feugiat felis sit amet porta pulvinar. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\nNulla faucibus sem ipsum, at rhoncus diam pulvinar at. Vivamus consectetur, diam... (truncated)
Result: {"longString":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus lobortis semper diam, ac euismod diam pharetra sed. Etiam eget efficitur neque. Proin nec diam mi. Sed ut purus dolor. Nulla nulla nibh, ornare vitae ornare et, scelerisque rutrum eros. Mauris venenatis tincidunt turpis a mollis. Donec gravida eget enim in luctus.\n\nSed porttitor commodo orci, ut pretium eros convallis eget. Curabitur pretium velit in odio dictum luctus. Vivamus ac tristique arcu, a semper tellus. Morbi euismod purus dapibus vestibulum sagittis. Nunc dapibus vehicula leo at scelerisque. Donec porta mauris quis nulla imperdiet consectetur. Curabitur sagittis eleifend arcu eget elementum. Aenean interdum tincidunt ornare. Pellentesque sit amet interdum tortor. Pellentesque blandit nisl eget euismod consequat. Etiam feugiat felis sit amet porta pulvinar. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n\nNulla faucibus sem ipsum, at rhoncus diam pulvinar at. Vivamus consectetur, diam... (truncated) functionName=aFunction, user=CK1lvkmaLg
```
* Implement PR comments:
- add back params to metadata and add back to the test
- use screaming snake case for conts
* fix typo
* Adds files related tests through fs-adapter with PG
* Schema deletions implementations
* Adds Hooks spec
* Fix test
* Adds support for containsAll (numbers and strings)
* Better support for deleteFields and deleteClass
* Recursive JSON update for authData
* Adds node_modules to travis cache
* Disable temporarily to make tests pass
* Adds _perishable_token support for _User class
* ignore when a table creation fails at init (table exists)
* Adds support for AddUnique and Remove
* PG 9.4 compatible functions
* Re-enable tests
* nit
* Better handling of schema creation race
* Implemented syncing afterSave/afterDelete trigger calls with REST request execution flow (Issue 2489). After this change, afterSave and afterDelete triggers CAN return a promise, which needs to be resolved inside a trigger for REST request flow to continue. If trigger doesn't return a promise, request flow continues.
* Added {} to multiline if.
* Fixed bad commit.
* Fixed problem with beforeSave triggers becoming async.
* Start DB runner from tests
* Connect GridstoreAdapter only when needed
* removes unused package
* better test errors reporting
* Adds support for __op.Delete
* Better test error reporting
* Makes sure all tests can run without crashing
* Use xdescribe to skip test suite
* Removes unused dependencies
* Let volatiles classes be created with PG on start
* Do not fail if class dont exist
* adds index.spec.js to the pg suite
* Use a new config each test to prevent side effects
* Enable EmailVerificationToken specs with pg
* Makes sure failure output is not cut
* Reduces number of ignored tests in ParseObject.spec
* Inspect reconfiguration errors
* Mark GlobalConfig is incompatible with PG
- Problem is with nested updates (param.prop = value)
* PG: Nested JSON queries and updates
- Adds support for nested json and . operator queries
- Adds debug support for PG adapter
- Adds loglevel support in helper
* Enable working specs in ParseUser
* Sets default logLevel in tests to undefined
* Adds File type support, retores purchaseValidation specs
* Adds support for updating jsonb objects
- Restores PushController tests
* Proper implementation of deleteByQuery and ORs
- Adds ParseInstallation spec to the test suite
* xit only failing tests
* Nit on ParseAPI spec
* add sorting operator
* properly bound order keys
* reverts describe_only_db behavior
* Enables passing tests
* Adds basic support for relations, upsertOneObject aliased to createObject
* progress on queries options
* Fix ACL update related problems
* Creates relation tables on class creation
* Adds Relation tests
* remove flaky tests
* use promises instead of CB
* disable flaky test
* nits
* Fixes on schema spec
- Next thing is to implemenet geopoint and files correctly
* fix failues
* Basic GeoPoint support
* Adds support for $nearSphere/$maxDistance geopoint queries
* enable passing tests
* drop tables afterEach for PG, clean up relation tables too
* Better initialization/dropTables
* Refactor logging to provide common logger from LoggerAdapter
Move logger logic de WinstonLoggerAdapter
Further improvements in configuration
Use logger instead of getLogger
- Removes PLog module
Reverts name changes
nits
* Adds additional logging levels as requirements
* Adds tests for logging configuration
* removes flaky test
* investigate...
* further investigation
* Adds silent option to disable console output
* Restores logs with VERBOSE in tests
* Expose controller instead of adapter, reduces method requirements for adapter
* Shuffles initializations around
* Fix doc
* Load cloudCode last to make sure the logger is available
* Adds test to make sure we can load an adapter from npm module
* extract defaults
* Adds defaultMongoURI to defaults
* fix defaults values
* Proper error for PG failures
* Disable flaky test