Commit Graph

1255 Commits

Author SHA1 Message Date
Florent Vilmart
147b493e23 Results invalid session when providing an invalid session token (#2154)
* Results invalid session when providing an invalid session token

* Reverts unsafe loggers

* Fixes failing tests

- The tests were failin when run in sequence as we called done() before the JSSDK had a chance to register the session token, therefore having a proper logout call in afterEach
2016-06-26 23:20:02 -04:00
Hussam Moqhim
a861c4e506 Fix issue #2134: creating an anonymous user (#2155)
* fix issue #2134

* username is returned only when generated

* fix unit tests

* incorporate @flovilmart review
2016-06-26 23:19:37 -04:00
Greenkeeper
2a4fbf7a15 chore(package): update pg-promise to version 5.0.2 (#2151)
https://greenkeeper.io/
2016-06-26 12:26:12 -07:00
Glenn Reyes
98d1ae808a Add postmark email adapter alternative (#2146)
* Add postmark email adapter alternative

* Link postmark adapter to npm package

* Link mandrill adapter to npm package

* List email adapters
2016-06-25 16:14:07 -04:00
Florent Vilmart
c32ed52f04 Changelog 2.2.14 (#2148) 2016-06-25 15:22:06 -04:00
Florent Vilmart
3e413683f7 Makes HTTPResponse serializable (#2143)
* Use the callback body instead of response.body that may not be set

* Adds test to handle undefined responses

* Adds toJSON method to properly serialize HTTPResponse

* Use ES5 defineProperty to make keys enumerable

* removes body key from serialization

* Indent nits
2016-06-25 10:56:02 -07:00
Greenkeeper
35b4c063fb chore(package): update pg-promise to version 4.8.0 (#2129)
https://greenkeeper.io/
2016-06-23 09:25:17 -07:00
Greenkeeper
29ffbabd3d chore(package): update babel-core to version 6.10.4 (#2119)
https://greenkeeper.io/
2016-06-21 18:53:56 -07:00
Greenkeeper
57cecd800c chore(package): update body-parser to version 1.15.2 (#2107)
https://greenkeeper.io/
2016-06-21 12:54:16 -07:00
Greenkeeper
c36ca0c44e chore(package): update pg-promise to version 4.7.5 (#2111)
https://greenkeeper.io/
2016-06-21 10:59:28 -07:00
Nikita Lutsenko
a96b0afac5 Merge pull request #2118 from ParsePlatform/greenkeeper-babel-core-6.9.1
Update babel-core to version 6.9.1 🚀
2016-06-21 10:36:42 -07:00
greenkeeperio-bot
1feedef21d chore(package): update babel-core to version 6.9.1
https://greenkeeper.io/
2016-06-21 09:54:14 -07:00
Drew
006540cda5 Implement pointer types in postgres. (#2086)
* Support pointers in postgres

* implement count

* Fix bug in createClass
2016-06-17 11:09:42 -07:00
Drew
ab06055369 Postgres exclude failing tests (#2081)
* 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
2016-06-17 12:59:16 -04:00
Vitaly Tomilov
7da4debbe0 Update PostgresStorageAdapter.js (#2087)
1. Deleting tables in a transaction, as opposed to just a task.
2. Added transaction where it was supposed to be. However, it is not enough, the logic is still broken there...

First, do not use `.catch` before `.then`. It is dangerous without good understanding how it actually works.

Check this out:
```js
        .catch(error => {
          if (error.code === PostgresRelationDoesNotExistError) {
            return this.createClass(className, {fields: {[fieldName]: type}}) // this gets into the following `.then`
          } else if (error.code === PostgresDuplicateColumnError) {
            // Column already exists, created by other request. Carry on to
            // See if it's the right type.
           
// this will get the following `.then` with `undefined` as the value

          } else {
            throw error;
          }
        })
```
2016-06-17 00:04:58 -07:00
Drew
c37a4ea1a1 Incorporate vitaly-t changes (#2085) 2016-06-16 19:34:00 -07:00
Drew
9d078003a6 Pin pg-postgres version (#2084) 2016-06-16 18:44:31 -07:00
Vitaly Tomilov
a685ed8814 Update package.json (#2083)
upgrading pg-promise version.
2016-06-16 18:43:08 -07:00
Drew
0ff35e18f0 Add more postgres support (#2080)
* 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
2016-06-16 15:39:05 -07:00
Drew
1a75101146 Fix flaky test (#2078)
* Debug flaky test

* create new object instead of modifying and assigning existing object

* use getOneSchema instead of this.data when updating fields

* Remove debug stuff

* Don't try to validate existing fields

* run just one test

* Verbose test all

* Use schema instead of this.data

* Switch to all tests
2016-06-16 15:34:33 -07:00
Greenkeeper
627b4164bb chore(package): update express to version 4.14.0 (#2079)
https://greenkeeper.io/
2016-06-16 10:39:13 -07:00
Fosco Marotto
d1f77a9a98 Merge pull request #2053 from drew-gross/postgres-3
Continue with postgres support
2016-06-16 10:19:07 -07:00
Greenkeeper
35ed09a7b4 chore(package): update redis to version 2.6.2 (#2076)
https://greenkeeper.io/
2016-06-16 08:53:30 -07:00
Blayne Chard
2eb861db66 Fixing typo in _loadRoles which prevents caching of roles. (#2063) 2016-06-15 22:22:23 -07:00
Drew
ae0ba7b5a9 Pin packages (#2073)
* Pin all package versions

Closes #2040

* Pin packages to a working version

* Drop extra stuff
2016-06-15 23:28:07 -04:00
Drew
726c866a4d Remove console.log 2016-06-15 17:25:17 -07:00
Drew
f7f5bab75d Remove attempt to fix tests 2016-06-15 17:24:00 -07:00
Drew
9ed3fcc536 Remove duplicate test 2016-06-15 17:23:29 -07:00
Drew Gross
8130658583 Fix purge 2016-06-15 15:01:21 -07:00
Drew Gross
f23d80ec9a Ignore coverage requirements for postgres adapter until I can figure out how to run coverage on it. 2016-06-15 13:11:51 -07:00
Drew Gross
510a890a03 centralize mongo schema handling logic 2016-06-15 13:11:51 -07:00
Drew Gross
a69a88f3a4 Fix some stuff 2016-06-15 13:11:51 -07:00
Drew Gross
f796d69d19 Move $options validation into Parse Server 2016-06-15 13:11:51 -07:00
Drew Gross
452b737be4 WIP 2016-06-15 13:11:51 -07:00
Drew Gross
634d672ad1 passing another test 2016-06-15 13:11:51 -07:00
Drew Gross
803b9be97a Add unique indexing for username/email
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
2016-06-15 13:11:51 -07:00
Drew Gross
2cafd6919f Passing postgres test with user 2016-06-15 13:11:51 -07:00
Drew Gross
f75c8b3a4d index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"
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
2016-06-15 13:11:51 -07:00
Lemuel Barango
693707b33c fixed typo in comment (#2070) 2016-06-15 13:09:20 -07:00
Florent Vilmart
39f11a5134 Update .travis.yml (#2065)
Runs coverage no matter what build result.
2016-06-14 20:10:48 -07:00
Marco Cheung
b2a5092627 Endpoint for purging all objects in class (#2032)
* Endpoint for purging all objects in class

* Use deleteObjectsByQuery

* Standalone handling function and purge cache

* Change endpoint url
2016-06-14 15:52:49 -07:00
Marco Cheung
d9f8486790 Fix role test (#2057) 2016-06-14 10:17:15 -07:00
Héctor Ramos
5838a49396 Move logging docs to Advanced configuration (#1895) 2016-06-13 13:05:33 -07:00
Greenkeeper
63e2ceeb02 chore(package): update deepcopy to version 0.6.3 (#2049)
https://greenkeeper.io/
2016-06-13 09:36:50 -07:00
Marco Cheung
7c8ad7e071 Throw error when push is missing configuration (#2035) 2016-06-13 09:26:02 -07:00
Marco Cheung
0ec78d478b Fix checking existent class for allowClientClassCreation (#2051) 2016-06-13 09:21:52 -07:00
Drew
2cc1b0cfa9 Remove unused function (#2046) 2016-06-13 07:34:57 -04:00
Vitaly Tomilov
324cd85775 Update PostgresStorageAdapter.js (#2045)
1. removing `return` where it does nothing;
2. changing repeated queries to be executed as a task. See [Chaining Queries](https://github.com/vitaly-t/pg-promise/wiki/chaining-queries).
2016-06-12 17:27:02 -07:00
Drew
5518edc2a5 Postgres adapter (#2012)
* 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
2016-06-12 16:35:13 -07:00
Drew
d559cb2382 Move transform acl (#2021)
* Move ACL transforming into Parse Server

For the database adapters, it will be more performant and easier to work with _rperm and _wperm than with the ACL object. This way we can type it as an array and so on, and once we have stronger validations in Parse Server, we can type it as an array containing strings of length < x, which will be much much better in sql databases.

* Use destructuring
2016-06-12 13:39:41 -07:00