Commit Graph

1423 Commits

Author SHA1 Message Date
Yuki Takeichi
fe62e92aa1 Add NullCacheAdapter (#2636)
* Add NullCacheAdapter

* clear returns promise explicitly

* Add NullCacheAdapter accessor
2016-09-07 08:08:09 -04:00
Florent Vilmart
33e3993a37 Fixes issue where info logs would appear in error logs (#2647)
* Reproduction of #2639

* Make sure the error level options is enforced
2016-09-04 12:07:40 -04:00
Greenkeeper
5676a6fbda chore(package): update pg-promise to version 5.3.3 (#2648)
https://greenkeeper.io/
2016-09-03 10:43:32 -04:00
Diwakar Cherukumilli
28bd37884d Adds ability to set an account lockout policy (#2601)
* Adds ability to set account lockout policy

* change fit to it in tests
2016-09-02 20:00:47 -04:00
Flavio Torres
f6516a1d1e change log level to debug for classes without subscribers (#2594) (#2637) 2016-09-02 14:29:05 -04:00
Brage G. Staven
9d2d208609 Fixed 'undefined' when getting request header (#2635) 2016-09-01 08:12:30 -04:00
Florent Vilmart
ac11e03e24 Removes Flaky PG Tests from test suite (#2632)
Removes some tests from running in the suite as they fail randomly on Travis
2016-09-01 00:09:28 -04:00
Florent Vilmart
be9fb435dd Revert "Update jasmine to version 2.5.0 🚀" (#2631) 2016-08-31 21:04:21 -04:00
Greenkeeper
05805a6a70 chore(package): update jasmine to version 2.5.0 (#2624)
https://greenkeeper.io/
2016-08-31 11:16:06 -04:00
Michael Vogt
e0c0608457 remove non referenced dependency, parse-server-simple-mailgun-adapter will include it (#2625) 2016-08-31 11:15:38 -04:00
Florent Vilmart
26ce63513c Removes mongodb v2.6.11 from test suite (#2619) 2016-08-30 11:30:08 -04:00
Florent Vilmart
f727e8dd4e updates dev dependencies (#2618) 2016-08-30 10:33:56 -04:00
garethx
3e5b90ca3d Add HyperDev to providers list (#2617) 2016-08-30 09:49:56 -04:00
Florent Vilmart
10ace495d8 Adds jobs endpoint protected by masterKey (#2560)
* 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
2016-08-30 07:19:21 -04:00
Greenkeeper
4b2a780e03 chore(package): update pg-promise to version 5.3.2 (#2557)
https://greenkeeper.io/
2016-08-29 21:48:44 -04:00
Florent Vilmart
4d78446cb9 Adds --cluster support (#2596)
* Adds --cluster support

* Restart failing child processes
2016-08-29 21:43:35 -04:00
Greenkeeper
d65f4a6f75 chore(package): update mongodb to version 2.2.9 (#2608)
https://greenkeeper.io/
2016-08-29 21:17:36 -04:00
Tom J
2aa14adf87 Only allow basic auth credentials with a known appId (#2574)
* Only allow basic auth credentials with a known appId

* Update middlewares.js

* Updating basic auth tests to use valid appId
2016-08-25 13:04:23 -04:00
Nurdaulet
8eafe45664 vk.com provider registered (#2579)
* vk.com auth data manager implemented

* vk.com provider registered

* Removed all the unnecessary changes

* Revert "Removed all the unnecessary changes"

This reverts commit 7dec6297421045c149aa49e4b888a02c38b96f9e.

* Revert "vk.com provider registered"

This reverts commit 25705d3d1272e44d5c5801050adf8eafec95cd27.

* Reverted all the unnecessary changes

* vk.com auth manager bugs fixed
2016-08-25 13:03:48 -04:00
Greenkeeper
a99bd82c43 chore(package): update parse-server-push-adapter to version 1.1.0 (#2588)
https://greenkeeper.io/
2016-08-25 13:03:36 -04:00
Nurdaulet
307a725884 vk.com auth data manager implemented (#2578) 2016-08-24 12:39:46 -04:00
Dharam Gollapudi
5ca4844bef Fix a typo (#2563)
Update connectionPrefix with collectionPrefix
2016-08-22 12:52:56 -04:00
Florent Vilmart
23e47f2e28 Makes sure routes don't overlap and yield a header set error (#2559) 2016-08-21 13:57:12 -04:00
Florent Vilmart
9ab488b6a0 Postgres: $all, $and CLP and more (#2551)
* 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
2016-08-20 16:07:48 -04:00
Drew
e1de9f3a12 Changelog 2.2.18 (#2558) 2016-08-20 10:16:22 -04:00
Greenkeeper
7fa3c9916c chore(package): update winston-daily-rotate-file to version 1.3.0 (#2547)
https://greenkeeper.io/
2016-08-19 18:12:32 -04:00
Greenkeeper
0fd6ce35e2 chore(package): update parse-server-s3-adapter to version 1.0.5 (#2536)
https://greenkeeper.io/
2016-08-19 18:11:51 -04:00
Florent Vilmart
3a08ec9ce8 Adds bcrypt native binding for better login performance (#2549)
* Adds bcrypt native binding for better login performance

* Swaps bcrypt-nodejs for bcryptjs as compatible with bcrypt native

* Fixes package versions
2016-08-19 13:53:57 -07:00
Greenkeeper
9429659d90 chore(package): update mongodb to version 2.2.7 (#2554)
https://greenkeeper.io/
2016-08-19 16:40:02 -04:00
Arthur Cinader
5f67caefde Make parse-server cloud code logging closer parse.com legacy (#2550)
* 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
2016-08-19 16:39:51 -04:00
Greenkeeper
277df54dc8 chore(package): update pg-promise to version 5.3.1 (#2519)
https://greenkeeper.io/
2016-08-19 11:31:02 -04:00
Florent Vilmart
9ecb9a3595 Postgres: Operations, Hooks, OAuth login, Files support (#2528)
* 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
2016-08-18 18:05:26 -04:00
Marko Matić
3164b478ea Syncing afterSave/afterDelete trigger calls (Issue #2489) (#2499)
* 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.
2016-08-17 09:26:42 -04:00
Emilie Montredon
430ae378f2 Updated README.md (#2538)
Created a new email adapter to use Mailjet with parse-server to send email verification and reset password emails.
2016-08-17 09:26:18 -04:00
Arthur Cinader
7616b8d3ec Fix capitalization, typo, and grammar mistake (#2533)
* Fix capitalization, typo, and grammar mistake

* fix two typos.
2016-08-16 16:29:34 -04:00
Héctor Ramos
fc73518b98 Update ISSUE_TEMPLATE.md 2016-08-15 14:07:50 -07:00
Arthur Cinader
24a2416d10 fix typo (#2525) 2016-08-15 16:49:45 -04:00
Florent Vilmart
c0249283ac Advancements with postgres (#2510)
* 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
2016-08-15 16:48:39 -04:00
Florent Vilmart
2f1ee2186b Makes sure _acl is set as empty {} (#2495)
* regression test for #2465

* Makes sure _acl is set when locked down

- Fixes #2465
2016-08-12 13:15:55 -07:00
Brage G. Staven
e690b73bb5 Stream video with GridStoreAdapter (implements byte-range requests) (#2437)
* Stream video with GridStoreAdapter

* fixing nits. Removing test(Range not accepted as header)

* nit

* Changed names. Added function to check if stream-requirements is fulfilled.
2016-08-12 15:58:18 -04:00
Greenkeeper
122c3fd1a3 chore(package): update lodash to version 4.15.0 (#2506)
https://greenkeeper.io/
2016-08-12 15:55:09 -04:00
Andrew Lane
80de86c8ae Implement Janrain Capture and Janrain Engage auth provider (#2436)
* Janrain engage auth provider
* Modeled after the existing providers in /src/authDataManager/ and also after https://github.com/janrain/Janrain-Sample-Code/blob/master/widget-examples/server.js
* See also: http://developers.janrain.com/overview/social-login/identity-providers/user-profile-data/#normalized-user-profile-data

* Janrain capture auth provider
* Modeled after the existing providers in /src/authDataManager/
* See also: https://docs.janrain.com/api/registration/entity/#entity

* Janrain engage auth provider
* Modeled after the existing providers in /src/authDataManager/ and also after https://github.com/janrain/Janrain-Sample-Code/blob/master/widget-examples/server.js
* See also: http://developers.janrain.com/overview/social-login/identity-providers/user-profile-data/#normalized-user-profile-data

* Janrain capture auth provider
* Modeled after the existing providers in /src/authDataManager/
* See also: https://docs.janrain.com/api/registration/entity/#entity

* Adding missing newlines at EOF
2016-08-12 13:34:24 -04:00
Florent Vilmart
a5a172918e Refactor logging to provide common logger from LoggerAdapter (#2478)
* 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
2016-08-12 10:25:24 -07:00
CongHoang
6e0a25dea0 fix export Bytes data type to JSON (#2409) 2016-08-09 12:05:46 -04:00
Antoine Lenoir
452887bd05 Change pushHash with stringified data (#2397)
* Change pushHash with stringify data

* stringify data.alert for pushHash

* stringify data.alert if object for pushHash

* test push notification when data.alert is an object
2016-08-09 12:00:56 -04:00
MBDeveloper
e6d31a07ab Add function name to the request object - this can help in generic way to log the function calls. (#2309) 2016-08-09 11:28:57 -04:00
Felix Dumit
a87ab6f1c4 Support for validating LinkedIn SDK access_tokens (#2486) 2016-08-09 08:38:22 -04:00
Greenkeeper
cbcd44bd72 chore(package): update lodash to version 4.14.2 (#2485)
https://greenkeeper.io/
2016-08-08 22:13:06 -04:00
Greenkeeper
1a90405fad chore(package): update request-promise to version 4.1.1 (#2483)
https://greenkeeper.io/
2016-08-08 11:58:14 -04:00
Greenkeeper
b6b09e68de chore(package): update babel-core to version 6.13.2 (#2471)
https://greenkeeper.io/
2016-08-07 20:03:11 -07:00