@pc-nexus/storage 0.8.0-next.6 → 0.8.0-next.7
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,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
# 0.8.0-next.7 (2026-08-12)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- #NEXUS-3811 InvalidError 类不支持 new ,以免后续引入不可控的message (#1402) b9c0525, closes #NEXUS-3811 #1402 #NEXUS-3811
|
|
10
|
+
- **backend:** refactor ces condition error #NEXUS-4010 (#1387) 222c8aa, closes #NEXUS-4010 #1387 #NEXUS-4010 #NEXUS-4010
|
|
11
|
+
|
|
5
12
|
# 0.8.0-next.6 (2026-08-07)
|
|
6
13
|
|
|
7
14
|
# 0.8.0-next.5 (2026-08-07)
|
|
@@ -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":"AAQA,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,gBA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import { CesConditionInvalidError, NexusInternalError, } from "@pc-nexus/internal";
|
|
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
7
|
if (!this._field) {
|
|
8
|
-
throw
|
|
9
|
-
message: `The value of field is required.`,
|
|
10
|
-
});
|
|
8
|
+
throw CesConditionInvalidError.fieldRequired();
|
|
11
9
|
}
|
|
12
10
|
return this._field;
|
|
13
11
|
}
|
|
@@ -76,10 +74,7 @@ export class InnerConditionBuilder {
|
|
|
76
74
|
assertAtRootLevel() {
|
|
77
75
|
if (!this.isAtRootLevel()) {
|
|
78
76
|
const logicalOp = this.currentLevel[logicalOpSymbol];
|
|
79
|
-
throw
|
|
80
|
-
errObject: "root operator",
|
|
81
|
-
key: logicalOp,
|
|
82
|
-
});
|
|
77
|
+
throw CesConditionInvalidError.logicalOperatorRequired();
|
|
83
78
|
}
|
|
84
79
|
}
|
|
85
80
|
assertAtLogicalLevel(expect) {
|
|
@@ -87,16 +82,11 @@ export class InnerConditionBuilder {
|
|
|
87
82
|
const isRootLevel = _.isNil(logicalOp);
|
|
88
83
|
if (expect) {
|
|
89
84
|
if (logicalOp !== expect) {
|
|
90
|
-
throw new
|
|
91
|
-
errObject: "logical operator",
|
|
92
|
-
key: expect,
|
|
93
|
-
});
|
|
85
|
+
throw new NexusInternalError();
|
|
94
86
|
}
|
|
95
87
|
}
|
|
96
88
|
else if (isRootLevel) {
|
|
97
|
-
throw
|
|
98
|
-
message: `The value of logical operator is required.`,
|
|
99
|
-
});
|
|
89
|
+
throw CesConditionInvalidError.logicalOperatorRequired();
|
|
100
90
|
}
|
|
101
91
|
}
|
|
102
92
|
logicalClosure(logicalOp, closure) {
|
|
@@ -192,14 +182,10 @@ export class InnerConditionBuilder {
|
|
|
192
182
|
return Number.MIN_SAFE_INTEGER;
|
|
193
183
|
}
|
|
194
184
|
if (_.isRegExp(value)) {
|
|
195
|
-
throw
|
|
196
|
-
message: "Regular expressions is not supported as comparison values.",
|
|
197
|
-
});
|
|
185
|
+
throw CesConditionInvalidError.regexpNotSupported();
|
|
198
186
|
}
|
|
199
187
|
if (_.isNaN(value)) {
|
|
200
|
-
throw
|
|
201
|
-
message: "NaN is not supported as comparison values.",
|
|
202
|
-
});
|
|
188
|
+
throw CesConditionInvalidError.nanNotSupported();
|
|
203
189
|
}
|
|
204
190
|
return value;
|
|
205
191
|
}
|
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,
|
|
1
|
+
{"version":3,"file":"kvs.d.ts","sourceRoot":"","sources":["../../../src/lib/kvs/kvs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAsD,MAAM,oBAAoB,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvE,cAAM,GAAG;;IAqBQ,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,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { invoke, KvsValueInvalidError } from "@pc-nexus/internal";
|
|
2
2
|
class Kvs {
|
|
3
3
|
#assertKvsValueSupported(value) {
|
|
4
4
|
if (typeof value === "number") {
|
|
5
5
|
if (!Number.isFinite(value)) {
|
|
6
|
-
throw
|
|
7
|
-
message: "NaN, Infinity and -Infinity are not supported as kvs values.",
|
|
8
|
-
});
|
|
6
|
+
throw KvsValueInvalidError.nonFiniteNumber();
|
|
9
7
|
}
|
|
10
8
|
return;
|
|
11
9
|
}
|
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.7",
|
|
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.7",
|
|
34
34
|
"lodash": "^4.17.21"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {},
|