@galloptechadmin/bao-an-phat
v1.0.0
Published
Core utilities for Bao An Phat project
Downloads
21
Maintainers
Readme
Edit a file, create a new file, and clone from Bitbucket in under 2 minutes
When you're done, you can delete the content in this README and update the file with details for others getting started with your repository.
We recommend that you open this README in another tab as you perform the tasks below. You can watch our video for a full demo of all the steps in this tutorial. Open the video in a new tab to avoid leaving Bitbucket.
Edit a file
You’ll start by editing this README file to learn how to edit a file in Bitbucket.
- Click Source on the left side.
- Click the README.md link from the list of files.
- Click the Edit button.
- Delete the following text: Delete this line to make a change to the README from Bitbucket.
- After making your change, click Commit and then Commit again in the dialog. The commit page will open and you’ll see the change you just made.
- Go back to the Source page.
Create a file
Next, you’ll add a new file to this repository.
- Click the New file button at the top of the Source page.
- Give the file a filename of contributors.txt.
- Enter your name in the empty file space.
- Click Commit and then Commit again in the dialog.
- Go back to the Source page.
Before you move on, go ahead and explore the repository. You've already seen the Source page, but check out the Commits, Branches, and Settings pages.
Clone a repository
Use these steps to clone from SourceTree, our client for using the repository command-line free. Cloning allows you to work on your files locally. If you don't yet have SourceTree, download and install first. If you prefer to clone from the command line, see Clone a repository.
- You’ll see the clone button under the Source heading. Click that button.
- Now click Check out in SourceTree. You may need to create a SourceTree account or log in.
- When you see the Clone New dialog in SourceTree, update the destination path and name if you’d like to and then click Clone.
- Open the directory you just created to see your repository’s files.
Now that you're more familiar with your Bitbucket repository, go ahead and add a new file locally. You can push your change back to Bitbucket with SourceTree, or you can add, commit, and push from the command line.
[@galloptechadmin/nest-core]: NestJS TypeORM Query Utils
[@galloptechadmin/nest-core] là một bộ công cụ mạnh mẽ dành cho NestJS và TypeORM, được thiết kế để xử lý dễ dàng các tham số truy vấn HTTP phức tạp như Phân trang (Pagination), Sắp xếp (Sorting), Lọc (Filtering) và Bao gồm Quan hệ (Including Relations), etc.
✨ Tính năng nổi bật
- Custom Parameter Decorators: Dễ dàng trích xuất các tham số truy vấn từ URL (
@PaginationParams,@SortingParams, v.v.). - TypeORM Conversion Helpers: Tự động chuyển đổi chuỗi truy vấn sang các đối tượng
FindOptionscủa TypeORM (where,order,relations). - Base Service: Cung cấp lớp trừu tượng
BaseService<Entity>với các phương thức truy vấn và phân trang có sẵn. - Lọc Nâng Cao: Hỗ trợ đầy đủ các quy tắc lọc (EQ, NEQ, GT, LT, LIKE, IN, IS_NULL) và lọc theo phạm vi (
gtevàlte).
(Installation)
Sử dụng npm để thêm package vào dự án của bạn:
npm install [@galloptechadmin/nest-core]
## (Usage)
Helpers & Utilities
Bạn có thể sử dụng các hàm helper:
getOrder(sorts): Chuyển đổi @SortingParams thành đối tượng FindOptionsOrder
getWhere(filters): Chuyển đổi @FilteringParams thành đối tượng FindOptionsWhere
getRelation(include): Chuyển đổi @IncludeRelations thành đối tượng quan hệ lồng nhau
BackendValidationPipe: Custom Pipe để định dạng lỗi validation thành JSON dễ đọc
HttpExceptionFilter: Exception filter tùy chỉnh để định dạng phản hồi lỗi HTTP
## Quy Trình Cập Nhật Package và Chạy Pipelines
1. git add .
2. git commit -m "feat: thêm hàm feature mới"
3. Tăng version của tag (package.json và package-lock.json)
4. Ví dụ version hiện tại là v1.0.0
5. npm version patch : fix error => v1.0.0 -> v1.0.1
6. npm version minor : new feature => v1.0.0 -> v1.1.0
7. npm version major : breaking changes => v1.0.0 -> v2.0.0
## Ví dụ quy trình thực hiện:
1. git add .
2. git git commit -m "feat: thêm hàm feature mới"
3. npm version patch
4. git push origin core --follow-tags
## License
Giấy phép (License)
Package này được phát hành dưới Giấy phép MIT.
[Galloptech] © [2025]