@pc-nexus/storage 0.8.0-next.8 → 0.8.0-next.9
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
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
# 0.8.0-next.9 (2026-08-25)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- #NEXUS-4274 【错误码】KVS value: NaN Infinity -Infinity 错误信息重新梳理 (#1478) 3640f3a, closes #NEXUS-4274 #1478 #NEXUS-4274
|
|
10
|
+
|
|
5
11
|
# 0.8.0-next.8 (2026-08-14)
|
|
6
12
|
|
|
7
13
|
# 0.8.0-next.7 (2026-08-12)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inner-condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/inner-condition.builder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inner-condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/inner-condition.builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,SAAS,EAGT,gBAAgB,EAChB,KAAK,EACL,SAAS,EAET,+BAA+B,EAE/B,aAAa,EACb,cAAc,EACd,oBAAoB,EACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAuD,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxG,qBAAa,qBAAqB,CAC9B,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,WAAW,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,EACzD,YAAY,SAAS,gBAAgB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC,MAAM,CAAC,EACrE,CAAC,GAAG,cAAc,CAAC,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2
2
|
import { LogicalOperator, logicalOpSymbol, parentLevelSymbol, QueryOperator } from "@pc-nexus/internal";
|
|
3
3
|
import _ from "lodash";
|
|
4
4
|
export class InnerConditionBuilder {
|
|
5
5
|
_field;
|
|
6
6
|
get currentField() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
8
|
+
kind: "value",
|
|
9
|
+
rule: "required",
|
|
10
|
+
errObject: "query condition field",
|
|
11
|
+
}, this._field, true);
|
|
10
12
|
return this._field;
|
|
11
13
|
}
|
|
12
14
|
set currentField(field) {
|
|
@@ -73,8 +75,11 @@ export class InnerConditionBuilder {
|
|
|
73
75
|
}
|
|
74
76
|
assertAtRootLevel() {
|
|
75
77
|
if (!this.isAtRootLevel()) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
79
|
+
kind: "value",
|
|
80
|
+
rule: "required",
|
|
81
|
+
errObject: "query condition logical operator",
|
|
82
|
+
}, undefined, true);
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
85
|
assertAtLogicalLevel(expect) {
|
|
@@ -86,7 +91,11 @@ export class InnerConditionBuilder {
|
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
else if (isRootLevel) {
|
|
89
|
-
|
|
94
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
95
|
+
kind: "value",
|
|
96
|
+
rule: "required",
|
|
97
|
+
errObject: "query condition logical operator",
|
|
98
|
+
}, logicalOp, true);
|
|
90
99
|
}
|
|
91
100
|
}
|
|
92
101
|
logicalClosure(logicalOp, closure) {
|
|
@@ -184,9 +193,12 @@ export class InnerConditionBuilder {
|
|
|
184
193
|
if (_.isRegExp(value)) {
|
|
185
194
|
throw CesConditionInvalidError.regexpNotSupported();
|
|
186
195
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
196
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
197
|
+
kind: "value",
|
|
198
|
+
rule: "notConst",
|
|
199
|
+
errObject: "query condition comparison",
|
|
200
|
+
value: Number.NaN,
|
|
201
|
+
}, value, true);
|
|
190
202
|
return value;
|
|
191
203
|
}
|
|
192
204
|
eq(value, { queryOperator = QueryOperator.EQ } = {}) {
|
package/lib/kvs/kvs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kvs.d.ts","sourceRoot":"","sources":["../../../src/lib/kvs/kvs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,
|
|
1
|
+
{"version":3,"file":"kvs.d.ts","sourceRoot":"","sources":["../../../src/lib/kvs/kvs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAuE,MAAM,oBAAoB,CAAC;AAC/H,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvE,cAAM,GAAG;;IA8BQ,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAWrG,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IASzF,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAKlD;AACD,eAAO,MAAM,GAAG,KAAY,CAAC"}
|
package/lib/kvs/kvs.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { invoke,
|
|
1
|
+
import { invoke, NexusInputValidator, InvalidErrorCode } from "@pc-nexus/internal";
|
|
2
2
|
class Kvs {
|
|
3
3
|
#assertKvsValueSupported(value) {
|
|
4
4
|
if (typeof value === "number") {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
for (const forbidden of [Number.NaN, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY]) {
|
|
6
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.KvsValue, {
|
|
7
|
+
kind: "value",
|
|
8
|
+
rule: "notConst",
|
|
9
|
+
errObject: "kvs value",
|
|
10
|
+
value: forbidden,
|
|
11
|
+
}, value, true);
|
|
7
12
|
}
|
|
8
|
-
return;
|
|
9
13
|
}
|
|
10
14
|
if (value === null || typeof value !== "object") {
|
|
11
15
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pc-nexus/storage",
|
|
3
|
-
"version": "0.8.0-next.
|
|
3
|
+
"version": "0.8.0-next.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"type": "module",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@pc-nexus/internal": "0.8.0-next.
|
|
33
|
+
"@pc-nexus/internal": "0.8.0-next.9",
|
|
34
34
|
"lodash": "^4.17.21"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {},
|