Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite errorResponse, and add a way to inject server into plugin #40

Merged
merged 19 commits into from
Apr 26, 2024

Conversation

armada45-pixel
Copy link
Contributor

Add get server

function for plugin can get server instance
Example on readme

This option can fix problem like this => #29
and make you can work with multiple route instance.

Add throw on error

Throw error when rate-limit reached
Example on readme

Add git ignore file type

To ignore all lock file

Add update all Dependencies ( using pnpm )

Change scoping type to LifeCycleType

Add NeedRequestIP type

This type just make sure server instance have requestIP function

README.md Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/@types/Options.ts Outdated Show resolved Hide resolved
src/@types/Options.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
bun.lockb Outdated Show resolved Hide resolved
Copy link
Owner

@rayriffy rayriffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

several changes needed, nice pr tho

@armada45-pixel
Copy link
Contributor Author

Add export default config

for use default config as global config

Readme

like i said, I don't know how to make it simplify.
#40 (comment)

@armada45-pixel
Copy link
Contributor Author

armada45-pixel commented Apr 26, 2024

@rayriffy อ้าว คนไทยนี่
ผมอธิบายงี้นะ ผมไม่ค่อยเก่งอังกฤษ พวกคำอธิบายใน option อะไรพวกนี้ ผมไม่รู้จะเขียนยังไง
ส่วนตัวอธิบาย commit มันอาจจะดู อ๋องๆหน่อย ก็นั้นแหละ ผมไม่ค่อยเก่งอังกฤษ

@armada45-pixel armada45-pixel requested a review from rayriffy April 26, 2024 09:41
@rayriffy rayriffy changed the title Dev arm 1 rewrite errorResponse, and add a way to inject server into plugin Apr 26, 2024
@rayriffy rayriffy merged commit 17f10e3 into rayriffy:main Apr 26, 2024
1 check passed
rayriffy added a commit that referenced this pull request May 22, 2024
* - add update all dependencies ( using pnpm )
- update dependencies

* - remove cache bun.lockb

* - add using server
- add getServer type

* better getServer ?

* change get server to using object store server

* - add throw error when rate-limit reached
- add type needRequestIP
- edit getserver for support only need requestIP function

* add getServer Docs

* add throwOnError Docs

* export default option

* fix for #40 (review)

* update dependencies

* add default options use as global option in example

* fix: export variable name as-is

* refactor: grouping if condition

* refactor: errorResponse

* chore: regenerate lockfile

* refactor: getServer -> injectServer

* docs: changeset

* fix: redundant typeof check

* Version Packages

* change type inject Server return value to server or null

* update dependencies

* fix #42

* update dependencies

* app.server null fixed

* docs: typo

* feat: changeset

* update dependencies

* fix rate limit not working

* add script run multiInstanceInjected file

* change scope

* fix: scoping

* fix: typo

---------

Co-authored-by: Phumrapee Limpianchop <git@rayriffy.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants