This commit enhances type safety and fixes type-related issues
throughout the project including:
- Updated type definitions in entities, repositories, and models
- Improved type annotations in services and controllers
- Fixed type issues in adapters and utilities
- Enhanced test file type definitions
- Added typings/index.d.ts for global type declarations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Improved CI parallelization and shard-aware job naming for faster,
clearer test runs.
* **Bug Fixes**
* More robust handling of binary paths and change-stream edge cases to
reduce rare failures.
* Prevented unintended data mutation and tightened minor
version-handling resilience.
* **Chores**
* Streamlined test scripts and updated dependency resolution.
* Added Prettier ignore rules, relaxed selected lint rules, and small
build script formatting cleanup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Updates the oxlint configuration to use the new shared
`@eggjs/oxlint-config` package, significantly simplifying the project's
linting setup while maintaining all existing functionality.
## Changes
- **Added** `@eggjs/oxlint-config@1.0.0` as a dev dependency
- **Updated** `.oxlintrc.json` to extend from the shared configuration
- **Simplified** configuration from 156 lines to 20 lines (87%
reduction)
- **Maintained** all project-specific overrides:
- `max-params: 6` (vs shared config's 5)
- `no-console: "warn"` (vs shared config's "allow")
- `import/no-anonymous-default-export: "error"` (vs shared config's
"allow")
- Added `mocha` environment for test files
- Preserved `index.d.ts` ignore pattern
## Benefits
- **Consistency**: Now uses the same base linting rules as other EggJS
projects
- **Maintainability**: Rule updates are centralized in the shared config
- **Simplicity**: Dramatically reduced configuration complexity
- **Future-proof**: Automatic updates when the shared config is improved
The configuration now only contains project-specific overrides, making
it much easier to understand and maintain. All existing linting behavior
is preserved - the project passes all linting checks with zero warnings
and errors.
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
close https://github.com/cnpm/cnpmcore/issues/821
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Introduced a GitHub Actions workflow to automate building, tagging,
publishing, and attesting Docker images for multiple platforms.
* **Documentation**
* Updated Docker deployment documentation to reflect the new image
repository and usage instructions.
* **Chores**
* Updated Docker build scripts and Dockerfiles for improved image
building and logging.
* Upgraded the "oxlint" development dependency.
* Removed the "prepare" script from project scripts.
* Adjusted TypeScript configuration to disable declaration file
generation and exclude test files from compilation.
* Updated linter configuration to allow additional code patterns.
* Improved code comments for better linting and error suppression.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Updated linter configuration to relax certain code style rules.
* Upgraded the oxlint development dependency and corrected project URLs
in metadata.
* **Refactor**
* Simplified arrow function syntax in various controllers, services, and
type declarations for improved code readability.
* **Tests**
* Streamlined mock implementations in test files for more concise
syntax.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#### PR Dependency Tree
* **PR #813** 👈
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Updated linting configuration to explicitly allow import extensions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
> Fix potential performance issues caused by using
`information_schema.tables` in distributed databases
1. 📊 `information_schema.tables` has no index, consumes large amounts of
memory, and requires aggregation after being generated per instance.
2. 🚚 Execution plans involve multi-table joins, distributed operations,
GROUP BY, and similar operations.
3. ♻️ Consistently use `SELECT COUNT` with index.
----------
> 修复在分布式 db 中,使用 `information_schema.tables` 可能导致的性能问题
1. 📊 `information_schema.tables` 内部无索引,占用大量内存,需要根据实例数生成后聚合
2. 🚚 执行计划涉及多表连接、分布式操作、GROUP BY 等操作
3. ♻️ 统一使用 `select count`,通过索引计算
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Unified the method for retrieving total row counts across all
databases for improved consistency.
- **Chores**
- Updated linting configuration to allow grouped exports.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced an admin-protected endpoint for binary synchronization with
support for additional data.
- Added enhanced logic to dynamically retrieve and update the latest
binary versions for multiple platforms.
- **Improvements**
- Optimized binary data fetching by migrating to a more dynamic,
cloud-based data source.
- **Dependency Management**
- Updated project dependencies to improve XML parsing capabilities while
removing outdated tools.
- **Tests**
- Revised test workflows to verify the new synchronization parameters
and data structures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- unicorn/prefer-number-properties
- typescript/no-import-type-side-effects
- unicorn/no-array-for-each
- typescript/no-dynamic-delete
- no-empty-function
- import/unambiguous
- max-depth 6
- unicorn/prefer-array-some
- unicorn/prefer-string-slice
- no-lonely-if
- max-nested-callbacks 5
- unicorn/explicit-length-check
- unicorn/no-lonely-if
- no-negated-condition
- no-else-return
- unicorn/prefer-date-now
- typescript/prefer-ts-expect-error
- typescript/ban-ts-comment
- no-throw-literal
- typescript/prefer-enum-initializers
- unicorn/no-typeof-undefined
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Chores**
- Upgraded dependency version of `oxlint` to `^0.16.0` for improved code
quality.
- **Refactor**
- Streamlined internal logic for error handling, string manipulation,
and data parsing, enhancing maintainability and performance.
- Simplified conditional logic and iteration methods in various services
and controllers for improved clarity.
- Updated import statements for type clarity and consistency across the
codebase.
- **Tests**
- Improved test assertions and iteration methods to provide clearer
verification of system reliability.
- Enhanced logging functionality in test cases for better visibility of
output and error handling.
- Modified assertions to ensure more precise requirements in test cases.
These behind-the-scenes enhancements contribute to a more robust and
stable application, ensuring a smoother experience for end-users.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->