parse-community / parse-community/parse-server
Parse.Cloud.FunctionRequest type doesn't have log definitions but they still work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
Parse.Cloud.FunctionRequest doesn't not have typing for log
Parse.Cloud.TriggerRequest does
However one can use request.log.info inside a parse cloud function but we need to deal with typescript errors.
Can we add log to FunctionRequest as we sometimes do need additional logging for functions?
Steps to reproduce
Try to use a request.log.info or request.log.error inside a Parse.Cloud.Function in a typescript environment
Actual Outcome
It works but only if we use @ts-ignore
Expected Outcome
Not get type errors
Environment
Node 18.6
Server
- Parse Server version: `6.2.0
- Operating system:
Ubuntu 22 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
AWS
Database
- System (MongoDB or Postgres):
MongoDB - Database version: `5.2
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
Javascript - SDK version:
4.1
Logs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript definition for Parse.Cloud.FunctionRequest and compare it with the definition for Parse.Cloud.TriggerRequest, which already exposes log. Add the missing log typing and run the relevant TypeScript checks or tests to confirm request.log.info and request.log.error no longer produce type errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100