* Fixes an issue that would let the beforeDelete be called when user has no access to the object
* Ensure we properly lock user
- Improves find method so we can attempt to read for a write poking the right ACL instead of using masterKey
- This ensure we do not run beforeDelete/beforeFind/beforeSave in the wrong scenarios
* nits
* Caps insufficient
* chore(package): update jasmine to version 3.0.0
Closes#4547
* Fixes failing tests for jasmine 3.0
Starting 3.0, done(something) will fail
* Update tests so they dont leverage var, but let and const
With jasmine 3.0, the randomization engine was making the test fails because of the scope of `var`
* Remove randomizer
* Use same adapter for PG tests, drop table to ensure the tests dont side effect
* Adds flow types / Configuration interfaces
* Lets call it options
* Use a single interface to generate the configurations
* Translates options to definitions only if comments are set
* improves logic
* Moves objects around
* Fixes issue affecting logging of circular objects
* fixes undefined env
* Moves all defaults to defaults
* Adds back CLI defaults
* Restored defaults in commander.js
* Merge provided defaults and platform defaults
* Addresses visual nits
* Improves Config.js code
* Adds ability to pass the default value in trailing comments
* Load platform defaults from the definitions file
* proper default values on various options
* Adds ParseServer.start and server.start(options) as quick startup methods
* Moves creating liveQueryServer http into ParseServer.js
* removes dead code
* Adds tests to guarantee we can start a LQ Server from main module
* Fixes incorrect code regading liveQuery init port
* Start a http server for LQ if port is specified
* ensure we dont fail if config.port is not set
* Specify port
* ignore other path skipped in tests
* Adds test for custom middleware setting
* Refactors new Config into Config.get
- Hides AppCache from ParseServer.js, use Config.put which validates
* Extracts controller creation into Controllers/index.js
- This makes the ParseServer init way simpler
* Move serverURL inference into ParseServer
* review nits
1. Add no space in paren rule
2. fix spec/eslintrc.json so it allow for inheriting from root rc.
Because the spce rc specified reccomended, it "turned off" all of the
rule tweaks in the root. This fixes that.
Currently in the logs if an invalid function is called the error
message just says "invalid function" which is decidedly unhelpful
when looking through server logs. Now it will say
"Invalid function: "functionName""
* 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
* 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
* 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
* HooksRouter is enabled by default
* Adds middleswares on PromiseRouter, fixes#2410
* Move testing line to helper
* Modernize middlewares.js
* Moves DB uniqueness initialization to DBController, modernize
* Moves testing related code to spec folder
* remove unused _removeHook function
* Adds tests, docs for Analytics and improvements
* nit
* moves back TestUtils
* reload the right data
More passing postgres tests
Handle schema updates, and $in for non array columns
remove authdata from user and implement ensureUniqueness
Make some tests work, detect existing classes
Throw proper error for unique index violation
fix findOneAndUpdate
Support more types
support more type
Support boolean, fix _rperm/_wperm, add TODO
Support string types and also simplify tests
Move operator flattening into Parse Server and out of mongo adapters
Move authdata transform for create into Parse Server
Move authdata transforms completely in to Parse Server
Fix test setup
inline addSchema
Inject default schema to response from DB adapter
* Mark tests that don't work in Postgres
* Exclude one more test
* Exclude some more failing tests
* Exclude more tests
* reload the right data
More passing postgres tests
Handle schema updates, and $in for non array columns
remove authdata from user and implement ensureUniqueness
Make some tests work, detect existing classes
Throw proper error for unique index violation
* fix findOneAndUpdate
WIP
Notes on how to upgrade to 2.3.0 safely
index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"
reconfigure username/email tests
Start dealing with test shittyness
most tests passing
Make specific server config for tests async
Fix more tests
Save callback to variable
undo
remove uses of _collection
reorder some params
reorder find() arguments
finishsh touching up argument order
Accept a database adapter as a parameter
First passing test with postgres!
Fix tests
Setup travis
sudo maybe?
use postgres username
reorder find() arguments
Build objects with default fields correctly
Don't tell adapter about ACL
WIP
Passing postgres test with user
Fix up createdAt, updatedAt, nad _hashed_password handling
reconfigure username/email tests
Fix broken cloud code
Save callback to variable
undo
Fix all tests where connections are left open after server closes.
Fix issues caused by missing gridstore adapter
remove uses of _collection
reorder find() arguments
Accept a database adapter as a parameter
sudo maybe?
use postgres username
reorder find() arguments
Build objects with default fields correctly
Don't tell adapter about ACL
WIP
* Remove adaptiveCollection
* Remove an adaptiveCollection use
* Remove an adaptiveCollection
* make adaptiveCollection private
* Remove collection from mongoadapter
* Move schema collection usage into mongo adapter
* stop relying on mongo format for removing join tables
* reduce usage of schemaCollection
* remove uses of _collection
* Move CLP setting into mongo adapter
* remove all uses of schemaCollection
* make schemaCollection private
* remove transform from schemaCollection
* rename some stuff
* Tweak paramaters and stuff
* reorder some params
* reorder find() arguments
* finishsh touching up argument order
* Accept a database adapter as a parameter
* First passing test with postgres!
* Actually use the provided className
* index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"
* Start dealing with test shittyness
* Make specific server config for tests async
* Fix email validation
* Fix broken cloud code
* Save callback to variable
* undo
* Fix tests
* Setup travis
* fix travis maybe
* try removing db user
* indentation?
* remove postgres version setting
* sudo maybe?
* use postgres username
* fix check for _PushStatus
* excludes
* remove db=mongo
* allow postgres to fail
* Fix allow failure
* postgres 9.4
* Remove mongo implementations and fix test
* Fix test leaving behind connections
* Add unique indexing
* Add unique indexing for username/email
* WIP
* Finish unique indexes
* Notes on how to upgrade to 2.3.0 safely
* index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"
* reconfigure username/email tests
* Start dealing with test shittyness
* Remove tests for files that we are removing
* most tests passing
* fix failing test
* Make specific server config for tests async
* Fix more tests
* fix more tests
* Fix another test
* fix more tests
* Fix email validation
* move some stuff around
* Destroy server to ensure all connections are gone
* Fix broken cloud code
* Save callback to variable
* no need to delete non existant cloud
* undo
* Fix all tests where connections are left open after server closes.
* Fix issues caused by missing gridstore adapter
* Update guide for 2.3.0 and fix final tests
* use strict
* don't use features that won't work in node 4
* Fix syntax error
* Fix typos
* Add duplicate finding command
* Update 2.3.0.md
* Use adapter.count
* use adapter.upsertOneObject
* Use adapter.deleteObjectsByQuery
* Use adapter.find
* use adapter.find
* Update tests to avoid mongoFind
* Fix a test to not use mongoFind
* Fix a test to not use mongoFind
* remove some mongoFind
* Remove some mongoFind
* Remove some mongoFind
* Remove more mongoFind
* remove more mongoFind
* remove more mongoFind
* remove more mongoFind
* remove more mongoFind
* remove more mongoFind
* remove more mongoFind
* remove more mongoFind
* remove more mongoFind
* Restore update ios device token with duplicate device token to original
* remove a mongoFind
* remove a mongoFind
* formatting
* formatting
* remove a mongoFind
* remove a mongoFind
* remove a mongoFind
* kill mongoFind
* Fix tests
* Fix tests
* fix syntax
* Fix test
* Move Parse Server logic into Parse Server and out of MongoAdapter
* Move untransforming up one level
* Make find() in MongoStorageAdapter
* Put nested object untransforming into it's own function
* Simplfy nested untransform
* Don't mess with inner object keys called _auth_data_*
* Prevent untransforming inner object keys named _p_*
* Fix inner keys named _rperm, _wperm
* Fix bugs with inner objects behaving strange when other fields have same name as key in specific circumstances
* remove params from untransform nested object
* Revert changes to find
* Split transformAtom into transfromTopLevelAtom and transformInteriorAtom
* Use single param for inArray and inObject
* Tidyness in transformKeyValue
* Add transformInteriorKeyValue
* Remove update from tranformInteriorKeyValue
* Split out transform update
* Move validation out of transfromUpdate
* Remove force paramater from transformTopLevelAtom throw error after if necessary
* Turn transformKeyValue into transfromKey since it is only used for that purpose
* Remove unnecessary stuff from transformKey
* convert transformKey to use parse format schema
* interior keys fixes
* Add test for interior keys with special names
* Correct validation of inner keys
* destructuring in DB controller
* deleteObject in db adapter
* Turns out we can't have delete by object ID because of ACLs...
* Fix tests
* destructure acl
* Don't reject with object