Commit Graph

107 Commits

Author SHA1 Message Date
Daniel
b2beaa86ff feat: Add Cloud Code triggers Parse.Cloud.beforeFind(Parse.File)and Parse.Cloud.afterFind(Parse.File) (#8700) 2025-03-27 18:22:14 +01:00
Daniel
bf9db75e86 feat: Upgrade to Parse JS SDK 6.0.0 (#9624)
BREAKING CHANGE: This upgrades to the Parse JS SDK 6.0.0. See the [change log](https://github.com/parse-community/Parse-SDK-JS/releases/tag/6.0.0) of the Parse JS SDK for breaking changes and more details.
2025-03-03 00:47:40 +01:00
Doug Drechsel
2a63129ff6 test: Add more test IDs (#9285) 2024-08-16 21:21:56 +02:00
Manuel
9552a4cbee ci: Fix test exclusion list in combination with other exclusions (#9277) 2024-08-13 22:13:19 +02:00
Diamond Lewis
90a1e4a200 feat: Add Cloud Code triggers Parse.Cloud.beforeSave and Parse.Cloud.afterSave for Parse Config (#9232) 2024-07-20 20:35:41 +02:00
Manuel
901cff5edd test: Add test IDs (#9205) 2024-07-18 15:41:04 +02:00
Diamond Lewis
e355f36ed4 ci: Find duplicate and slow tests (#9188) 2024-07-16 10:34:10 +02:00
Diamond Lewis
e7199e8d07 test: Investigate flaky tests by turning off tests randomizer (#9181) 2024-07-08 01:20:28 +02:00
Onur
4e6a375b51 feat: Deprecation DEPPS7: Remove deprecated Cloud Code file trigger syntax (#8855)
BREAKING CHANGE: Cloud Code file trigger syntax has been aligned with object trigger syntax, for example `Parse.Cloud.beforeDeleteFile'` has been changed to `Parse.Cloud.beforeDelete(Parse.File, (request) => {})'`
2024-02-14 22:54:30 +01:00
Rikard Teodorsson
7d32d8934f fix: Context not passed to Cloud Code Trigger beforeFind when using Parse.Query.include (#8765) 2023-10-14 02:57:47 +02:00
Diamond Lewis
a9c34ef1e2 feat: Add context to Cloud Code Triggers beforeLogin and afterLogin (#8724) 2023-09-20 10:47:35 +02:00
Manuel
977edeaf28 test: Add tests for isGet parameter in Cloud Code trigger beforeFind (#8738) 2023-09-06 02:42:50 +02:00
Manuel
5954f0ffa0 refactor: Parse Pointer allows to access internal Parse Server classes and circumvent beforeFind query trigger (#8735) 2023-09-04 16:01:02 +02:00
Daniel
a9d376b61f feat: Add property Parse.Server.version to determine current version of Parse Server in Cloud Code (#8670) 2023-07-05 22:11:35 +02:00
Daniel
068fb9e777 refactor: Add option to convert Parse.Object to instance in Cloud Function payload (#8646) 2023-06-23 16:29:54 +02:00
Daniel
03fba97e05 feat: Add zones for rate limiting by ip, user, session, global (#8508) 2023-06-09 13:27:56 +02:00
Daniel
28aeda3f16 feat: Allow Parse.Object pointers in Cloud Code arguments (#8490) 2023-05-25 22:02:33 +02:00
Daniel
d0d30c4f13 feat: Remove deprecation DEPPS1: Native MongoDB syntax in aggregation pipeline (#8362)
BREAKING CHANGE: The MongoDB aggregation pipeline requires native MongoDB syntax instead of the custom Parse Server syntax; for example pipeline stage names require a leading dollar sign like `$match` and the MongoDB document ID is referenced using `_id` instead of `objectId` (#8362)
2023-01-05 15:53:43 +01:00
Daniel
99fcf45e55 feat: Asynchronous initialization of Parse Server (#8232)
BREAKING CHANGE: This release introduces the asynchronous initialization of Parse Server to prevent mounting Parse Server before being ready to receive request; it changes how Parse Server is imported, initialized and started; it also removes the callback `serverStartComplete`; see the [Parse Server 6 migration guide](https://github.com/parse-community/parse-server/blob/alpha/6.0.0.md) for more details (#8232)
2022-12-21 15:30:13 +01:00
dblythy
f29d9720e9 fix: Cloud Code trigger beforeSave does not work with Parse.Role (#8320) 2022-11-19 03:27:51 +01:00
dblythy
130d29074e fix: Throwing error in Cloud Code Triggers afterLogin, afterLogout crashes server (#8280)
BREAKING CHANGE: Throwing an error in Cloud Code Triggers `afterLogin`, `afterLogout` returns a rejected promise; in previous releases it crashed the server if you did not handle the error on the Node.js process level; consider adapting your code if your app currently handles these errors on the Node.js process level with `process.on('unhandledRejection', ...)`
2022-11-10 22:00:40 +01:00
dblythy
2d79c0835b feat: Remove deprecation DEPPS4: Remove convenience method for http request Parse.Cloud.httpRequest (#8287)
BREAKING CHANGE: The convenience method for HTTP requests `Parse.Cloud.httpRequest` is removed; use your preferred 3rd party library for making HTTP requests
2022-11-10 18:28:49 +01:00
dblythy
9f111158ed feat: add convenience access to Parse Server configuration in Cloud Code via Parse.Server (#8244) 2022-10-29 19:03:31 +02:00
dblythy
c6dcad8d16 feat: align file trigger syntax with class trigger; use the new syntax Parse.Cloud.beforeSave(Parse.File, (request) => {}), the old syntax Parse.Cloud.beforeSaveFile((request) => {}) has been deprecated (#7966) 2022-05-29 20:48:55 +02:00
dblythy
47d796ea58 fix: afterSave trigger removes pointer in Parse object (#7913) 2022-05-20 10:47:38 +02:00
dblythy
19900fcdf8 fix: return correct response when revert is used in beforeSave (#7839) 2022-05-01 02:39:56 +02:00
yog27ray
315290d161 feat: add Cloud Code context to ParseObject.fetch (#7779) 2022-01-25 12:40:22 +01:00
Corey
c789f6c979 refactor: test moved to correct test group (#7717) 2021-11-25 19:16:46 +01:00
Manuel
b64640c570 revert: refactor: allow ES import for cloud string if package type is module
This reverts commit 0225340ccb.
2021-11-10 16:26:20 +01:00
Kingtous
174886e385 fix: combined and query with relational query condition returns incorrect results (#7593) 2021-10-29 19:03:50 +02:00
dblythy
12eb6c823b refactor: replace hardcoded error codes with references (#7546) 2021-10-18 20:19:47 +02:00
dblythy
ab1dddd406 fix: add deprecation warning for Parse.Cloud.httpRequest (#7595) 2021-10-09 05:04:12 +02:00
dblythy
68a3a87501 fix: set objects in afterFind triggers (#7311) 2021-10-09 02:34:09 +02:00
dblythy
0225340ccb refactor: allow ES import for cloud string if package type is module (#7560)
* allow module import for Parse Cloud

* Update .babelrc

* catch esm error

* Update ParseServer.js

* add tests

* Update CHANGELOG.md

* Update CloudCode.spec.js

Co-authored-by: Manuel <5673677+mtrezza@users.noreply.github.com>
2021-09-14 14:10:37 +02:00
Corey
c8e822b958 Accept context via header X-Parse-Cloud-Context (#7437)
* failing testcase

* add header

* switch to X-Parse-Cloud-Context header

* add back blank line that lint removed

* test replacing context header with body context. Add support for setting body with json string

* add back blank line

* cover error when _context body is wrong

* Update middlewares.js

* revert accidental status change

* make sure context always decodes to an object else throw error

* improve context object check

Co-authored-by: Antonio Davi Macedo Coelho de Castro <adavimacedo@gmail.com>
2021-07-25 21:17:03 -07:00
Diamond Lewis
9563793303 Allow single server instance in test suite (#7262)
* initial pass

* reconfigureServer when needed

* finish postgres tests

* mongo tests

* more tests

* clean up

* re-add skipped test

* Fix transaction tests

* handle batch

* AuthenticationAdapter fix

* More reconfiguration

* clean up

* properly terminate cli servers

* handle Parse.Push

* Flaky PushController

* ensure reconfigureServer when changed

* fix postgres tests

* remove console.log

* LiveQuery spec remove duplicates and listeners
2021-03-13 09:05:22 -06:00
Antonio Davi Macedo Coelho de Castro
603cc1ffbc Fix error when a not yet inserted job is updated (#7196)
* Fix error when a not yet inserted job is updated

* Add entry to changelog

* revert the upsert change and fix the test

* Revert the change so job execute a single time

* Fix other tests with potential similar problem
2021-02-18 11:27:59 -08:00
Kartal Kaan Bozdoğan
7224cde023 fix: Pass customObjectId in beforeSave (#7167)
* beforeSave custom object id fix

* Added regression test case for issue #6733
2021-02-12 15:57:22 -06:00
dblythy
d47891f7e3 Send email via Parse.Cloud.sendEmail (#7096)
* initial

* more tests

* Update CHANGELOG.md

* review

* log on error

* change logger to error

* rename

* Update Parse.Cloud.js
2020-12-30 10:23:44 -06:00
dblythy
41a052c2c3 Fix: context for afterFind (#7078)
* Fix: context for afterFind

* Update CHANGELOG.md

Co-authored-by: Manuel <trezza.m@gmail.com>
2020-12-18 14:54:48 +01:00
Diamond Lewis
ca1b78220f Prevent invalid column names (className and length) (#7053)
* Prevent invalid column names

* remove className as invalid

* remove className from beforeSave hook response

* improve tests
2020-12-09 12:19:15 -06:00
Antonio Davi Macedo Coelho de Castro
54a61b7694 GitHub actions (#7035)
* Trying to setup GitHub Actions

* Try to fix the workflow steps

* Fix NODE_VERSION

* Fix services

* Fix services 2

* Fix redis service, remove docker service

* Missing npm install

* Fix Use Node.js step name

* Remove greenkeeper

* I believe we do not need this command

* Try to include postgres

* Fix postgres script

* Remove before install script

* Fix postgres before script

* Try to fix connection to postgres

* Fix postgress port

* Postgres host

* Still trying to connect on postgres

* Still trying to connect on postgres - localhost

* Split postgres in a separate job

* Add postgres healthcheck

* Set postgres just like github example

* Fix postgres scripts with new credentials

* Still trying to fix postgres connection

* Now it looks only the username is wrong

* Passing postgres password in the right way

* try to install postgis

* New attempt to install postgis

* Fix postgis image name

* Try to output tests

* We need to start mongo

* Increase tests timeout

* Fix flaky test

* Add GitHub Actions badge

* Badge as html

* Fix badge link

* Remove Travis

* try to fix coverage

* Fix flaky test

* Improve ci workflow

* Change the mongo default test version

* Fix the job name in the if clause

* Ubuntu18.0.4

* Downgrade to 4.0.21

* Fix cache keys:

* Trying with mongo 4.0.4

* Rever os and mongo versions

* remove latest node
2020-12-03 08:15:48 -08:00
Diamond Lewis
c1971b2ab1 fix(beforeSave/afterSave): Return value instead of Parse.Op for nested fields (#7005)
* fix(beforeSave): Return value instead of Parse.Op

* afterSave test

* Improve Tests

* Fixed postgres test by saveArgumentsByValue
2020-11-12 13:14:44 -08:00
Diamond Lewis
a4c84c09be fix(beforeSave): Skip Sanitizing Database results (#7003)
* fix(beforeSave): Skip Sanitizing Database results

* fix test
2020-11-11 17:39:25 -08:00
dblythy
6fc3afce71 skipWithMasterKey on Built-In Validator (#6972)
* Initial Commit

* Change to resolveMasterKey

* Change to skipWithMasterKey
2020-10-26 12:49:30 -07:00
Diamond Lewis
74ba81104e Remove unused parameter in Cloud Function (#6969) 2020-10-25 22:41:23 -05:00
Diamond Lewis
e6ac3b6932 fix(prettier): Properly handle lint-stage files (#6970)
Now handles top level files and recursive files in folders.

Set max line length to be 100
2020-10-25 15:06:58 -05:00
dblythy
c2f2281e6d Validation Handler Update (#6968)
* Initial Commit

* Update FunctionsRouter.js

* Update FunctionsRouter.js

* Change params to fields

* Changes requested

* Fix failing tests

* More tests

* More tests

* Remove existing functionality

* Remove legacy tests

* fix array typo

* Update triggers.js

* Docs

* Allow requireUserKeys to be object

* validateMasterKey

* Improve documentation

Co-authored-by: Diamond Lewis <findlewis@gmail.com>
2020-10-25 12:36:54 -05:00
dblythy
68a1b30275 Show a message if cloud functions are duplicated (#6963)
* Update triggers.js

* Update CloudCode.spec.js

* Logger changes

* Update CloudCode.spec.js
2020-10-22 20:06:25 -05:00
dblythy
c68d05512f Pass request.query to afterFind (#6960)
* Initial Commit

* Update triggers.js
2020-10-21 21:40:40 -05:00