monsqlize 1.1.8 → 1.2.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 +3 -1
- package/lib/connect.js +99 -99
- package/lib/mongodb/common/agg-pipeline.js +4 -1
- package/lib/mongodb/queries/find-page.js +44 -4
- package/lib/multi-level-cache.js +39 -8
- package/lib/redis-cache-adapter.js +29 -0
- package/package.json +121 -121
- package/types/collection.ts +357 -357
- package/types/pagination.ts +5 -0
package/package.json
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "monsqlize",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "A lightweight MongoDB ORM with multi-level caching, transaction support, distributed features, Saga distributed transactions, unified expression system with 122 operators, and universal function caching (100% MongoDB support)",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "index.mjs",
|
|
7
|
-
"type": "commonjs",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"require": "./lib/index.js",
|
|
11
|
-
"import": "./index.mjs",
|
|
12
|
-
"types": "./index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"types": "./index.d.ts",
|
|
17
|
-
"files": [
|
|
18
|
-
"lib/",
|
|
19
|
-
"types/",
|
|
20
|
-
"index.d.ts",
|
|
21
|
-
"index.mjs",
|
|
22
|
-
"README.md",
|
|
23
|
-
"LICENSE",
|
|
24
|
-
"CHANGELOG.md"
|
|
25
|
-
],
|
|
26
|
-
"keywords": [
|
|
27
|
-
"mongodb",
|
|
28
|
-
"database",
|
|
29
|
-
"orm",
|
|
30
|
-
"cache",
|
|
31
|
-
"transaction",
|
|
32
|
-
"distributed",
|
|
33
|
-
"pagination",
|
|
34
|
-
"performance",
|
|
35
|
-
"mongodb-driver",
|
|
36
|
-
"nosql",
|
|
37
|
-
"query-builder",
|
|
38
|
-
"api"
|
|
39
|
-
],
|
|
40
|
-
"author": "vext.js Team",
|
|
41
|
-
"license": "MIT",
|
|
42
|
-
"repository": {
|
|
43
|
-
"type": "git",
|
|
44
|
-
"url": "https://github.com/vextjs/monSQLize.git"
|
|
45
|
-
},
|
|
46
|
-
"bugs": {
|
|
47
|
-
"url": "https://github.com/vextjs/monSQLize/issues"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://github.com/vextjs/monSQLize#readme",
|
|
50
|
-
"engines": {
|
|
51
|
-
"node": ">=16.0.0"
|
|
52
|
-
},
|
|
53
|
-
"scripts": {
|
|
54
|
-
"test": "node test/run-tests.js",
|
|
55
|
-
"test:unit": "node test/run-tests.js",
|
|
56
|
-
"test:performance": "node test/performance/transaction-benchmark.js",
|
|
57
|
-
"test:coverage": "nyc --reporter=text --reporter=lcov node test/run-tests.js",
|
|
58
|
-
"coverage": "nyc --reporter=text --reporter=lcov --reporter=html node test/run-tests.js",
|
|
59
|
-
"benchmark": "node test/benchmark/run-benchmarks.js",
|
|
60
|
-
"test:compatibility": "node test/compatibility/run-node-test.js",
|
|
61
|
-
"test:compatibility:node": "node scripts/test-node-versions.js",
|
|
62
|
-
"test:compatibility:driver": "node scripts/test-driver-versions-simple.js",
|
|
63
|
-
"test:compatibility:driver:full": "node scripts/test-driver-versions-simple.js --drivers=4.17.2,5.9.2,6.17.0,7.0.0",
|
|
64
|
-
"test:compatibility:driver:quick": "node test/compatibility/run-driver-test.js",
|
|
65
|
-
"test:compatibility:server": "node scripts/test-server-versions.js --use-memory-server",
|
|
66
|
-
"test:compatibility:server:quick": "node test/compatibility/run-server-test.js",
|
|
67
|
-
"test:compatibility:server:docker": "node scripts/test-server-versions.js",
|
|
68
|
-
"lint": "eslint lib/ test/ --ext .js",
|
|
69
|
-
"lint:fix": "eslint lib/ test/ --ext .js --fix",
|
|
70
|
-
"type-check": "tsc",
|
|
71
|
-
"postpublish": "echo '✅ 发布成功!请创建 GitHub Release: https://github.com/vextjs/monSQLize/releases/new?tag=v'$npm_package_version"
|
|
72
|
-
},
|
|
73
|
-
"peerDependenciesMeta": {
|
|
74
|
-
"ioredis": {
|
|
75
|
-
"optional": true
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
"optionalDependencies": {
|
|
79
|
-
"ioredis": "^5.8.2"
|
|
80
|
-
},
|
|
81
|
-
"devDependencies": {
|
|
82
|
-
"@eslint/js": "^9.39.1",
|
|
83
|
-
"@types/node": "^25.0.1",
|
|
84
|
-
"benchmark": "^2.1.4",
|
|
85
|
-
"chai": "^6.2.1",
|
|
86
|
-
"eslint": "^9.39.1",
|
|
87
|
-
"mocha": "^11.7.5",
|
|
88
|
-
"mongodb-memory-server": "^10.1.2",
|
|
89
|
-
"nyc": "^15.1.0",
|
|
90
|
-
"sinon": "^21.0.0",
|
|
91
|
-
"tsd": "^0.33.0",
|
|
92
|
-
"typescript": "^5.9.3"
|
|
93
|
-
},
|
|
94
|
-
"nyc": {
|
|
95
|
-
"include": [
|
|
96
|
-
"lib/**/*.js"
|
|
97
|
-
],
|
|
98
|
-
"exclude": [
|
|
99
|
-
"test/**",
|
|
100
|
-
"examples/**",
|
|
101
|
-
"scripts/**",
|
|
102
|
-
"reports/**"
|
|
103
|
-
],
|
|
104
|
-
"reporter": [
|
|
105
|
-
"text",
|
|
106
|
-
"lcov",
|
|
107
|
-
"html"
|
|
108
|
-
],
|
|
109
|
-
"check-coverage": true,
|
|
110
|
-
"lines": 70,
|
|
111
|
-
"statements": 70,
|
|
112
|
-
"functions": 70,
|
|
113
|
-
"branches": 65
|
|
114
|
-
},
|
|
115
|
-
"dependencies": {
|
|
116
|
-
"async-lock": "^1.4.1",
|
|
117
|
-
"mongodb": "^6.17.0",
|
|
118
|
-
"schema-dsl": "^1.2.4",
|
|
119
|
-
"ssh2": "^1.17.0"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "monsqlize",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "A lightweight MongoDB ORM with multi-level caching, transaction support, distributed features, Saga distributed transactions, unified expression system with 122 operators, and universal function caching (100% MongoDB support)",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "index.mjs",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"require": "./lib/index.js",
|
|
11
|
+
"import": "./index.mjs",
|
|
12
|
+
"types": "./index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"types": "./index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"lib/",
|
|
19
|
+
"types/",
|
|
20
|
+
"index.d.ts",
|
|
21
|
+
"index.mjs",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"CHANGELOG.md"
|
|
25
|
+
],
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mongodb",
|
|
28
|
+
"database",
|
|
29
|
+
"orm",
|
|
30
|
+
"cache",
|
|
31
|
+
"transaction",
|
|
32
|
+
"distributed",
|
|
33
|
+
"pagination",
|
|
34
|
+
"performance",
|
|
35
|
+
"mongodb-driver",
|
|
36
|
+
"nosql",
|
|
37
|
+
"query-builder",
|
|
38
|
+
"api"
|
|
39
|
+
],
|
|
40
|
+
"author": "vext.js Team",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/vextjs/monSQLize.git"
|
|
45
|
+
},
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/vextjs/monSQLize/issues"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/vextjs/monSQLize#readme",
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=16.0.0"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"test": "node test/run-tests.js",
|
|
55
|
+
"test:unit": "node test/run-tests.js",
|
|
56
|
+
"test:performance": "node test/performance/transaction-benchmark.js",
|
|
57
|
+
"test:coverage": "nyc --reporter=text --reporter=lcov node test/run-tests.js",
|
|
58
|
+
"coverage": "nyc --reporter=text --reporter=lcov --reporter=html node test/run-tests.js",
|
|
59
|
+
"benchmark": "node test/benchmark/run-benchmarks.js",
|
|
60
|
+
"test:compatibility": "node test/compatibility/run-node-test.js",
|
|
61
|
+
"test:compatibility:node": "node scripts/test-node-versions.js",
|
|
62
|
+
"test:compatibility:driver": "node scripts/test-driver-versions-simple.js",
|
|
63
|
+
"test:compatibility:driver:full": "node scripts/test-driver-versions-simple.js --drivers=4.17.2,5.9.2,6.17.0,7.0.0",
|
|
64
|
+
"test:compatibility:driver:quick": "node test/compatibility/run-driver-test.js",
|
|
65
|
+
"test:compatibility:server": "node scripts/test-server-versions.js --use-memory-server",
|
|
66
|
+
"test:compatibility:server:quick": "node test/compatibility/run-server-test.js",
|
|
67
|
+
"test:compatibility:server:docker": "node scripts/test-server-versions.js",
|
|
68
|
+
"lint": "eslint lib/ test/ --ext .js",
|
|
69
|
+
"lint:fix": "eslint lib/ test/ --ext .js --fix",
|
|
70
|
+
"type-check": "tsc",
|
|
71
|
+
"postpublish": "echo '✅ 发布成功!请创建 GitHub Release: https://github.com/vextjs/monSQLize/releases/new?tag=v'$npm_package_version"
|
|
72
|
+
},
|
|
73
|
+
"peerDependenciesMeta": {
|
|
74
|
+
"ioredis": {
|
|
75
|
+
"optional": true
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"optionalDependencies": {
|
|
79
|
+
"ioredis": "^5.8.2"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@eslint/js": "^9.39.1",
|
|
83
|
+
"@types/node": "^25.0.1",
|
|
84
|
+
"benchmark": "^2.1.4",
|
|
85
|
+
"chai": "^6.2.1",
|
|
86
|
+
"eslint": "^9.39.1",
|
|
87
|
+
"mocha": "^11.7.5",
|
|
88
|
+
"mongodb-memory-server": "^10.1.2",
|
|
89
|
+
"nyc": "^15.1.0",
|
|
90
|
+
"sinon": "^21.0.0",
|
|
91
|
+
"tsd": "^0.33.0",
|
|
92
|
+
"typescript": "^5.9.3"
|
|
93
|
+
},
|
|
94
|
+
"nyc": {
|
|
95
|
+
"include": [
|
|
96
|
+
"lib/**/*.js"
|
|
97
|
+
],
|
|
98
|
+
"exclude": [
|
|
99
|
+
"test/**",
|
|
100
|
+
"examples/**",
|
|
101
|
+
"scripts/**",
|
|
102
|
+
"reports/**"
|
|
103
|
+
],
|
|
104
|
+
"reporter": [
|
|
105
|
+
"text",
|
|
106
|
+
"lcov",
|
|
107
|
+
"html"
|
|
108
|
+
],
|
|
109
|
+
"check-coverage": true,
|
|
110
|
+
"lines": 70,
|
|
111
|
+
"statements": 70,
|
|
112
|
+
"functions": 70,
|
|
113
|
+
"branches": 65
|
|
114
|
+
},
|
|
115
|
+
"dependencies": {
|
|
116
|
+
"async-lock": "^1.4.1",
|
|
117
|
+
"mongodb": "^6.17.0",
|
|
118
|
+
"schema-dsl": "^1.2.4",
|
|
119
|
+
"ssh2": "^1.17.0"
|
|
120
|
+
}
|
|
121
|
+
}
|