Skip to content

Commit

Permalink
Perf/arr field sort (#36)
Browse files Browse the repository at this point in the history
* perf: 支持数组类型的字段排序

* feat: 支持 traceId

* fix: ci
  • Loading branch information
huhushirley authored Jul 15, 2024
1 parent d6a2cc3 commit dc1a8cc
Show file tree
Hide file tree
Showing 15 changed files with 4,788 additions and 9,946 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,27 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run test:coverage
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm run build
- run: pnpm test
- run: pnpm run test:coverage
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
16 changes: 11 additions & 5 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@
PORT: 3000
MONGODB:
URL: 'mongodb://127.0.0.1:27017/test'
OPTIONS:
readPreference: secondaryPreferred

# for production
# LOGGERS:
# base:
# transport: null
# MONGODB_QUERY_OPTIONS:
# maxTimeMs: 10000 # mongodb 查询超时时间
# maxResultWindow: 10000 # 最大查询数的限制
# SERVER_RATELIMIT:
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordGroupAPI/group$': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordCountAPI/count': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordAPI/queryArray': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordCountAPI/count': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordAPI/queryArray': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}$': 1000 # spaceId + entityId 支持正则表达式
# 单机限流时间
# SERVER_RATELIMIT_RESET_INTERVAL_MS: 20
# 单机限流重试时间
# SERVER_RATELIMIT_RETRY_INTERVAL_MS: 10

LOGGERS:
base:
level: info
transport:
target: pino-pretty
Loading

0 comments on commit dc1a8cc

Please sign in to comment.