monsqlize 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -60
- package/LICENSE +201 -21
- package/README.md +537 -1828
- package/changelogs/README.md +160 -0
- package/changelogs/v2.0.0.md +222 -0
- package/dist/cjs/index.cjs +10600 -0
- package/dist/cjs/mongodb/common/transaction-aware.cjs +10 -0
- package/dist/cjs/transaction/CacheLockManager.cjs +100 -0
- package/dist/cjs/transaction/Transaction.cjs +158 -0
- package/dist/cjs/transaction/TransactionManager.cjs +298 -0
- package/dist/esm/index.mjs +10650 -0
- package/dist/types/base.d.ts +81 -0
- package/dist/types/collection.d.ts +1031 -0
- package/dist/types/expression.d.ts +115 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/lock.d.ts +74 -0
- package/dist/types/model.d.ts +526 -0
- package/dist/types/mongodb.d.ts +49 -0
- package/dist/types/monsqlize.d.ts +491 -0
- package/dist/types/pool.d.ts +84 -0
- package/dist/types/runtime.d.ts +362 -0
- package/dist/types/saga.d.ts +143 -0
- package/dist/types/slow-query-log.d.ts +126 -0
- package/dist/types/sync.d.ts +103 -0
- package/dist/types/transaction.d.ts +132 -0
- package/package.json +67 -69
- package/index.d.ts +0 -206
- package/index.mjs +0 -52
- package/lib/cache-invalidation.js +0 -279
- package/lib/cache.js +0 -530
- package/lib/common/cursor.js +0 -59
- package/lib/common/docs-urls.js +0 -73
- package/lib/common/index-options.js +0 -223
- package/lib/common/log.js +0 -61
- package/lib/common/namespace.js +0 -22
- package/lib/common/normalize.js +0 -34
- package/lib/common/page-result.js +0 -43
- package/lib/common/runner.js +0 -57
- package/lib/common/server-features.js +0 -232
- package/lib/common/shape-builders.js +0 -27
- package/lib/common/validation.js +0 -113
- package/lib/connect.js +0 -99
- package/lib/constants.js +0 -55
- package/lib/count-queue.js +0 -188
- package/lib/distributed-cache-invalidator.js +0 -260
- package/lib/errors.js +0 -168
- package/lib/expression/cache/ExpressionCache.js +0 -114
- package/lib/expression/compiler/ExpressionCompiler.js +0 -1090
- package/lib/expression/compiler/ExpressionCompilerExtensions.js +0 -531
- package/lib/expression/detector.js +0 -84
- package/lib/expression/factory.js +0 -29
- package/lib/expression/index.js +0 -19
- package/lib/function-cache.js +0 -533
- package/lib/index.js +0 -1251
- package/lib/infrastructure/ConnectionPoolManager.js +0 -464
- package/lib/infrastructure/HealthChecker.js +0 -281
- package/lib/infrastructure/PoolConfig.js +0 -199
- package/lib/infrastructure/PoolSelector.js +0 -225
- package/lib/infrastructure/PoolStats.js +0 -244
- package/lib/infrastructure/ssh-tunnel-ssh2.js +0 -212
- package/lib/infrastructure/ssh-tunnel.js +0 -41
- package/lib/infrastructure/uri-parser.js +0 -36
- package/lib/lock/Lock.js +0 -67
- package/lib/lock/errors.js +0 -28
- package/lib/lock/index.js +0 -13
- package/lib/logger.js +0 -225
- package/lib/model/examples/test.js +0 -311
- package/lib/model/features/defaults.js +0 -161
- package/lib/model/features/populate.js +0 -568
- package/lib/model/features/relations.js +0 -120
- package/lib/model/features/soft-delete.js +0 -349
- package/lib/model/features/version.js +0 -157
- package/lib/model/features/virtuals.js +0 -219
- package/lib/model/index.js +0 -1265
- package/lib/mongodb/common/accessor-helpers.js +0 -59
- package/lib/mongodb/common/agg-pipeline.js +0 -36
- package/lib/mongodb/common/aggregation-validator.js +0 -127
- package/lib/mongodb/common/iid.js +0 -28
- package/lib/mongodb/common/lexicographic-expr.js +0 -53
- package/lib/mongodb/common/shape.js +0 -32
- package/lib/mongodb/common/sort.js +0 -39
- package/lib/mongodb/common/transaction-aware.js +0 -25
- package/lib/mongodb/connect.js +0 -234
- package/lib/mongodb/index.js +0 -639
- package/lib/mongodb/management/admin-ops.js +0 -200
- package/lib/mongodb/management/bookmark-ops.js +0 -167
- package/lib/mongodb/management/cache-ops.js +0 -50
- package/lib/mongodb/management/collection-ops.js +0 -387
- package/lib/mongodb/management/database-ops.js +0 -202
- package/lib/mongodb/management/index-ops.js +0 -475
- package/lib/mongodb/management/index.js +0 -17
- package/lib/mongodb/management/namespace.js +0 -31
- package/lib/mongodb/management/validation-ops.js +0 -268
- package/lib/mongodb/queries/aggregate.js +0 -172
- package/lib/mongodb/queries/chain.js +0 -631
- package/lib/mongodb/queries/count.js +0 -99
- package/lib/mongodb/queries/distinct.js +0 -78
- package/lib/mongodb/queries/find-and-count.js +0 -193
- package/lib/mongodb/queries/find-by-ids.js +0 -236
- package/lib/mongodb/queries/find-one-by-id.js +0 -171
- package/lib/mongodb/queries/find-one.js +0 -71
- package/lib/mongodb/queries/find-page.js +0 -618
- package/lib/mongodb/queries/find.js +0 -171
- package/lib/mongodb/queries/index.js +0 -51
- package/lib/mongodb/queries/watch.js +0 -538
- package/lib/mongodb/writes/common/batch-retry.js +0 -65
- package/lib/mongodb/writes/delete-batch.js +0 -323
- package/lib/mongodb/writes/delete-many.js +0 -181
- package/lib/mongodb/writes/delete-one.js +0 -173
- package/lib/mongodb/writes/find-one-and-delete.js +0 -203
- package/lib/mongodb/writes/find-one-and-replace.js +0 -239
- package/lib/mongodb/writes/find-one-and-update.js +0 -240
- package/lib/mongodb/writes/increment-one.js +0 -259
- package/lib/mongodb/writes/index.js +0 -46
- package/lib/mongodb/writes/insert-batch.js +0 -508
- package/lib/mongodb/writes/insert-many.js +0 -223
- package/lib/mongodb/writes/insert-one.js +0 -169
- package/lib/mongodb/writes/replace-one.js +0 -226
- package/lib/mongodb/writes/result-handler.js +0 -237
- package/lib/mongodb/writes/update-batch.js +0 -416
- package/lib/mongodb/writes/update-many.js +0 -275
- package/lib/mongodb/writes/update-one.js +0 -273
- package/lib/mongodb/writes/upsert-one.js +0 -203
- package/lib/multi-level-cache.js +0 -244
- package/lib/operators.js +0 -330
- package/lib/redis-cache-adapter.js +0 -267
- package/lib/saga/SagaContext.js +0 -67
- package/lib/saga/SagaDefinition.js +0 -32
- package/lib/saga/SagaExecutor.js +0 -201
- package/lib/saga/SagaOrchestrator.js +0 -186
- package/lib/saga/index.js +0 -11
- package/lib/slow-query-log/base-storage.js +0 -70
- package/lib/slow-query-log/batch-queue.js +0 -97
- package/lib/slow-query-log/config-manager.js +0 -196
- package/lib/slow-query-log/index.js +0 -238
- package/lib/slow-query-log/mongodb-storage.js +0 -324
- package/lib/slow-query-log/query-hash.js +0 -39
- package/lib/sync/ChangeStreamSyncManager.js +0 -405
- package/lib/sync/ResumeTokenStore.js +0 -192
- package/lib/sync/SyncConfig.js +0 -127
- package/lib/sync/SyncTarget.js +0 -240
- package/lib/sync/index.js +0 -20
- package/lib/transaction/CacheLockManager.js +0 -162
- package/lib/transaction/DistributedCacheLockManager.js +0 -475
- package/lib/transaction/Transaction.js +0 -315
- package/lib/transaction/TransactionManager.js +0 -267
- package/lib/transaction/index.js +0 -11
- package/lib/utils/objectid-converter.js +0 -632
- package/types/README.md +0 -122
- package/types/base.ts +0 -94
- package/types/batch.ts +0 -187
- package/types/cache.ts +0 -71
- package/types/chain.ts +0 -254
- package/types/collection.ts +0 -357
- package/types/expression.ts +0 -109
- package/types/function-cache.d.ts +0 -135
- package/types/lock.ts +0 -95
- package/types/model/definition.ts +0 -152
- package/types/model/index.ts +0 -10
- package/types/model/instance.ts +0 -121
- package/types/model/relations.ts +0 -121
- package/types/model/virtuals.ts +0 -32
- package/types/monsqlize.ts +0 -245
- package/types/options.ts +0 -192
- package/types/pagination.ts +0 -154
- package/types/pool.ts +0 -125
- package/types/query.ts +0 -71
- package/types/saga.ts +0 -125
- package/types/stream.ts +0 -64
- package/types/sync.ts +0 -79
- package/types/transaction.ts +0 -79
- package/types/write.ts +0 -77
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CHANGELOG
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
>
|
|
3
|
+
> Summary index — current release details are packaged in [changelogs/v2.0.0.md](./changelogs/v2.0.0.md); historical details live in the repository changelog archive.
|
|
4
|
+
> **Last updated**: 2026-06-01
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
|
|
|
11
|
-
|
|
12
|
-
| [
|
|
13
|
-
| [v1.
|
|
14
|
-
| [v1.2.
|
|
15
|
-
| [v1.2.
|
|
16
|
-
| [v1.2.
|
|
17
|
-
| [v1.
|
|
18
|
-
| [v1.1.
|
|
19
|
-
| [v1.1.
|
|
20
|
-
| [v1.1.
|
|
21
|
-
| [v1.1.
|
|
8
|
+
## Version Overview
|
|
9
|
+
|
|
10
|
+
| Version | Date | Summary | Details |
|
|
11
|
+
|---------|------|---------|---------|
|
|
12
|
+
| [v2.0.0](./changelogs/v2.0.0.md) | 2026-06-01 | 🎉 **v2.0.0 — TypeScript rewrite**: full TypeScript source, cache-hub integration, schema-dsl `^2.0.3` TS dependency, Apache-2.0 licensing, English README, MultiLevel cache support, v1 API compat preserved, optimized npm artifact boundary without default sourcemaps, JSDoc coverage complete, `getPoolStats/getPoolHealth` keyed by pool name, v1 compat fixes included, workspace smooth-upgrade bridge validated for downstream consumers | [View](./changelogs/v2.0.0.md) |
|
|
13
|
+
| [v1.3.0](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.3.0.md) | 2026-04-27 | 🆕 **新功能**:链式池访问 API — `pool(name)` / `use(dbName)` / `scopedCollection()` / `scopedModel()` 四个公开方法,支持多连接池多数据库路由,connection 合并语义,TypeScript 类型签名完整覆盖 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.3.0.md) |
|
|
14
|
+
| [v1.2.3](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.3.md) | 2026-04-26 | 🐛 **Bug Fix**:`model()` 方法修复注册 key 直接作为 MongoDB 集合名的问题,优先读 `definition.collection > definition.name`,注册 key 仅作 fallback,向后兼容 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.3.md) |
|
|
15
|
+
| [v1.2.2](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.2.md) | 2026-04-24 | 🆕 **新功能**:Model 数据源绑定 — `connection: { pool?, database? }` 支持 Model 绑定指定连接池和/或数据库,四种组合路由,向后兼容;🐛 **Bug Fix**:修复 `Model._clear()` 导致 `msq.model()` 实例缓存失效失效,populate 关系丢失问题 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.2.md) |
|
|
16
|
+
| [v1.2.1](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.1.md) | 2026-04-13 | 🐛 **Bug 修复**:`msq.model()` 实例缓存 + 索引去重 + 死代码清理 + `types/monsqlize.ts` 补全 `model()` / `collection()` 类型 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.1.md) |
|
|
17
|
+
| [v1.2.0](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.0.md) | 2026-04-13 | 🐛 **Bug 修复 + 新功能**:`findPage` 正式支持 `projection` 投影参数(修复静默忽略问题)+ 有效投影策略自动保护游标排序字段 + 8 个测试用例 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.2.0.md) |
|
|
18
|
+
| [v1.1.9](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.9.md) | 2026-04-02 | 🚨 **P1 Bug 修复**:MultiLevelCache L2→L1 回填 TTL 缺失(null 永久驻留 L1)+ 新增 `backfillLocalTTL` 配置 + Redis `getWithTTL` 方法 + 14 个回归测试 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.9.md) |
|
|
19
|
+
| [v1.1.8](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.8.md) | 2026-03-16 | 🆕 **新功能**:Model 热重载支持(`undefine()` + `redefine()` + `_loadModels` reload 模式)+ 22个测试 (100%通过) | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.8.md) |
|
|
20
|
+
| [v1.1.6](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.6.md) | 2026-02-11 | 🎉 **重大功能**:精准缓存失效机制 + 🚨 upsert 缓存失效 Bug 修复 + 36个测试 (100%通过) | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.6.md) |
|
|
21
|
+
| [v1.1.4](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.4.md) | 2026-02-09 | 🎉 重大功能:通用函数缓存 - 52个测试 (100%通过) + 多层缓存 delPattern 修复 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.4.md) |
|
|
22
|
+
| [v1.1.3](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.3.md) | 2026-02-03 | 📚 文档完善:多连接池文档优化 + 健康检查详解 + 验证体系规范 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.3.md) |
|
|
22
23
|
| [v1.1.2](#v112---日志优化) | 2026-01-27 | 🔧 优化:ObjectId 转换日志默认静默 + Saga 日志修复 | [查看](#v112---日志优化) |
|
|
23
24
|
| [v1.1.1](#v111---objectid-跨版本兼容) | 2026-01-27 | 🔧 Bug修复:新增跨版本 ObjectId 兼容性(支持 mongoose bson@4.x/5.x)| [查看](#v111---objectid-跨版本兼容) |
|
|
24
|
-
| [v1.1.0](
|
|
25
|
-
| [v1.0.9](
|
|
26
|
-
| [v1.0.8](
|
|
27
|
-
| [v1.0.7](
|
|
28
|
-
| [v1.0.6](
|
|
29
|
-
| [v1.0.5](
|
|
30
|
-
| [v1.0.4](
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
| [v1.0.0](
|
|
25
|
+
| [v1.1.0](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.0.md) | 2026-01-21 | 🎉 重大更新:新增49个操作符,实现100% MongoDB操作符支持(122/122)| [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.0.md) |
|
|
26
|
+
| [v1.0.9](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.9.md) | 2026-01-19 | 🎉 重大功能:统一表达式系统 - 67个操作符 + 107个测试 (100%通过) | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.9.md) |
|
|
27
|
+
| [v1.0.8](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.8.md) | 2026-01-17 | 🎉 重大功能:多连接池 + Update 聚合管道 + Saga 事务 + Change Stream 同步 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.8.md) |
|
|
28
|
+
| [v1.0.7](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.7.md) | 2026-01-09 | 🔧 依赖更新:schema-dsl@1.1.3 修复类型错误消息 + 测试用例 Schema 语法修复 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.7.md) |
|
|
29
|
+
| [v1.0.6](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.6.md) | 2026-01-08 | 文档完善:新增 ObjectId 自动转换文档 + 验证所有 v1.3.0+ 功能文档 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.6.md) |
|
|
30
|
+
| [v1.0.5](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.5.md) | 2026-01-08 | Schema 验证默认启用 + Model 自动加载机制 + 类型定义完善 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.5.md) |
|
|
31
|
+
| [v1.0.4](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.4.md) | 2026-01-07 | 新功能:虚拟字段、默认值 + Bug 修复:嵌套 Populate + 测试改进 | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.4.md) |
|
|
32
|
+
| v1.0.3 | 2025-12-31 | 新增 Model 层(Schema 验证、自定义方法、生命周期钩子、自动时间戳) | 早期状态归档未随当前仓库保留 |
|
|
33
|
+
| v1.0.2 | 2025-12-30 | 新增批量操作方法(deleteBatch/updateBatch) | 早期状态归档未随当前仓库保留 |
|
|
34
|
+
| v1.0.1 | 2025-12-29 | 稳定版本,生产就绪 | 早期状态归档未随当前仓库保留 |
|
|
35
|
+
| [v1.0.0](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.0.md) | 2025-12-03 | 正式发布,生产就绪,已发布到 npm | [查看](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.0.md) |
|
|
35
36
|
|
|
36
37
|
---
|
|
37
38
|
|
|
@@ -114,10 +115,7 @@ await collection('users').find(
|
|
|
114
115
|
npm update monsqlize
|
|
115
116
|
```
|
|
116
117
|
|
|
117
|
-
📖 **详细分析**:
|
|
118
|
-
- [三轮验证报告](./reports/upsert-缓存失效-三轮验证报告.md)
|
|
119
|
-
- [问题深度分析](./reports/upsert-缓存失效机制分析报告.md)
|
|
120
|
-
- [完整修复总结](./reports/upsert-缓存失效-完整修复总结.md)
|
|
118
|
+
📖 **详细分析**: 历史验证报告未作为当前 npm 包资产发布;如需追溯,请以仓库归档或项目内部报告为准。
|
|
121
119
|
|
|
122
120
|
#### 其他改进
|
|
123
121
|
|
|
@@ -181,7 +179,7 @@ npm update monsqlize
|
|
|
181
179
|
npm update monsqlize
|
|
182
180
|
```
|
|
183
181
|
|
|
184
|
-
📖 **详细变更**: [查看完整变更日志](
|
|
182
|
+
📖 **详细变更**: [查看完整变更日志](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.1.3.md)
|
|
185
183
|
|
|
186
184
|
---
|
|
187
185
|
|
|
@@ -250,8 +248,8 @@ const msq = new MonSQLize({
|
|
|
250
248
|
- `lib/saga/SagaOrchestrator.js`: 修复 Redis 识别逻辑
|
|
251
249
|
|
|
252
250
|
**详细文档**:
|
|
253
|
-
- [ObjectId 日志配置](
|
|
254
|
-
- [FAQ - Q3: 如何关闭日志](
|
|
251
|
+
- [ObjectId 日志配置](https://github.com/vextjs/monSQLize/blob/main/docs/objectid-logging-optimization.md)
|
|
252
|
+
- [FAQ - Q3: 如何关闭日志](https://github.com/vextjs/monSQLize/blob/main/docs/objectid-cross-version-faq.md#q3)
|
|
255
253
|
|
|
256
254
|
---
|
|
257
255
|
|
|
@@ -294,7 +292,7 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
294
292
|
// ✅ 成功:自动将旧版本 ObjectId 转换为 bson@6.x 版本
|
|
295
293
|
```
|
|
296
294
|
|
|
297
|
-
**详细文档**: [查看 docs/objectid-cross-version.md](
|
|
295
|
+
**详细文档**: [查看 docs/objectid-cross-version.md](https://github.com/vextjs/monSQLize/blob/main/docs/objectid-cross-version.md)
|
|
298
296
|
|
|
299
297
|
---
|
|
300
298
|
|
|
@@ -360,7 +358,7 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
360
358
|
- 支持超时和重试
|
|
361
359
|
- 完整的错误处理
|
|
362
360
|
|
|
363
|
-
**详细信息**: [查看 changelogs/v1.0.8.md](
|
|
361
|
+
**详细信息**: [查看 changelogs/v1.0.8.md](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.8.md)
|
|
364
362
|
|
|
365
363
|
---
|
|
366
364
|
|
|
@@ -375,7 +373,7 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
375
373
|
- ✅ 所有测试通过(38/38 测试套件,100%)
|
|
376
374
|
- ✅ 将 schema-dsl 从 devDependencies 移至 dependencies(Model 层运行时依赖)
|
|
377
375
|
|
|
378
|
-
**详细信息**: [查看 changelogs/v1.0.7.md](
|
|
376
|
+
**详细信息**: [查看 changelogs/v1.0.7.md](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.7.md)
|
|
379
377
|
|
|
380
378
|
---
|
|
381
379
|
|
|
@@ -389,7 +387,7 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
389
387
|
- ✅ 新增 ObjectId 自动转换完整文档(600行)
|
|
390
388
|
- ✅ 验证所有 v1.3.0+ 功能都有文档
|
|
391
389
|
|
|
392
|
-
**详细信息**: [查看 changelogs/v1.0.6.md](
|
|
390
|
+
**详细信息**: [查看 changelogs/v1.0.6.md](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.6.md)
|
|
393
391
|
|
|
394
392
|
---
|
|
395
393
|
|
|
@@ -403,7 +401,7 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
403
401
|
- ✅ Model 自动加载机制(减少样板代码)
|
|
404
402
|
- ✅ 类型定义完善
|
|
405
403
|
|
|
406
|
-
**详细信息**: [查看 changelogs/v1.0.5.md](
|
|
404
|
+
**详细信息**: [查看 changelogs/v1.0.5.md](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.5.md)
|
|
407
405
|
|
|
408
406
|
---
|
|
409
407
|
|
|
@@ -417,7 +415,7 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
417
415
|
- ✅ 默认值(插入时自动填充)
|
|
418
416
|
- ✅ 嵌套 Populate Bug 修复
|
|
419
417
|
|
|
420
|
-
**详细信息**: [查看 changelogs/v1.0.4.md](
|
|
418
|
+
**详细信息**: [查看 changelogs/v1.0.4.md](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.4.md)
|
|
421
419
|
|
|
422
420
|
---
|
|
423
421
|
|
|
@@ -433,7 +431,7 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
433
431
|
- ✅ 1000+ 测试用例
|
|
434
432
|
- ✅ 77%+ 测试覆盖率
|
|
435
433
|
|
|
436
|
-
**详细信息**: [查看 changelogs/v1.0.0.md](
|
|
434
|
+
**详细信息**: [查看 changelogs/v1.0.0.md](https://github.com/vextjs/monSQLize/blob/main/changelogs/v1.0.0.md)
|
|
437
435
|
|
|
438
436
|
---
|
|
439
437
|
|
|
@@ -442,18 +440,17 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
|
|
|
442
440
|
> **说明**: 详细变更文档位于 `changelogs/` 目录
|
|
443
441
|
|
|
444
442
|
```
|
|
445
|
-
changelogs/
|
|
446
|
-
├── README.md # 变更文档说明
|
|
447
|
-
├── TEMPLATE.md # 变更文档模板
|
|
448
|
-
├──
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
```
|
|
443
|
+
changelogs/
|
|
444
|
+
├── README.md # 变更文档说明
|
|
445
|
+
├── TEMPLATE.md # 变更文档模板
|
|
446
|
+
├── v2.0.0.md # 当前发布详细变更
|
|
447
|
+
└── v1.x.y.md # 历史版本详细变更(仓库归档)
|
|
448
|
+
```
|
|
452
449
|
|
|
453
450
|
**注意**:
|
|
454
451
|
- `changelogs/` 目录包含所有版本的详细变更文档
|
|
455
452
|
- 本文件(CHANGELOG.md)仅提供版本概览和里程碑摘要
|
|
456
|
-
-
|
|
453
|
+
- 早期 `STATUS.md` 状态看板已不再作为当前仓库和 npm 包资产保留。
|
|
457
454
|
|
|
458
455
|
---
|
|
459
456
|
|
|
@@ -469,14 +466,14 @@ changelogs/
|
|
|
469
466
|
|
|
470
467
|
2. **更新 CHANGELOG.md**(本文件)
|
|
471
468
|
- 在"版本概览"表格最上方添加新行
|
|
472
|
-
-
|
|
473
|
-
|
|
474
|
-
3.
|
|
475
|
-
-
|
|
469
|
+
- 格式:版本列和详情列都指向 `./changelogs/vX.Y.Z.md`,当前 npm 包默认只随带当前发布版本的详细文档。
|
|
470
|
+
|
|
471
|
+
3. **更新状态看板**(如项目重新启用)
|
|
472
|
+
- 当前仓库未保留 `STATUS.md` 作为发布资产;如后续恢复状态看板,再同步版本章节和需求状态。
|
|
476
473
|
|
|
477
474
|
4. **提交变更**
|
|
478
475
|
```bash
|
|
479
|
-
git add CHANGELOG.md changelogs/vX.Y.Z.md
|
|
476
|
+
git add CHANGELOG.md changelogs/vX.Y.Z.md
|
|
480
477
|
git commit -m "docs: 发布 vX.Y.Z"
|
|
481
478
|
```
|
|
482
479
|
|
|
@@ -497,12 +494,11 @@ changelogs/
|
|
|
497
494
|
|
|
498
495
|
## 相关文档
|
|
499
496
|
|
|
500
|
-
- [
|
|
501
|
-
- [
|
|
502
|
-
- [
|
|
503
|
-
- [docs/](./docs/INDEX.md) - API 文档
|
|
497
|
+
- [changelogs/v2.0.0.md](./changelogs/v2.0.0.md) - 当前发布详细变更文档
|
|
498
|
+
- [README.md](./README.md) - 项目说明
|
|
499
|
+
- [docs/](https://github.com/vextjs/monSQLize/blob/main/docs/index.md) - API 文档
|
|
504
500
|
|
|
505
501
|
---
|
|
506
502
|
|
|
507
|
-
**最后更新**: 2026-01
|
|
503
|
+
**最后更新**: 2026-06-01
|
|
508
504
|
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,201 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
https://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 vextjs
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|