@pc-nexus/storage 0.8.0-next.0 → 0.8.0-next.10
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 +47 -0
- package/lib/ces/condition-builder/condition.builder.d.ts +11 -11
- package/lib/ces/condition-builder/condition.builder.d.ts.map +1 -1
- package/lib/ces/condition-builder/condition.builder.js +4 -4
- package/lib/ces/condition-builder/inner-condition.builder.d.ts +12 -13
- package/lib/ces/condition-builder/inner-condition.builder.d.ts.map +1 -1
- package/lib/ces/condition-builder/inner-condition.builder.js +63 -44
- package/lib/kvs/kvs.d.ts +1 -0
- package/lib/kvs/kvs.d.ts.map +1 -1
- package/lib/kvs/kvs.js +26 -1
- package/lib/nos/type.d.ts +2 -24
- package/lib/nos/type.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
# 0.8.0-next.10 (2026-08-27)
|
|
6
|
+
|
|
7
|
+
# 0.8.0-next.9 (2026-08-25)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- #NEXUS-4274 【错误码】KVS value: NaN Infinity -Infinity 错误信息重新梳理 (#1478) 3640f3a, closes #NEXUS-4274 #1478 #NEXUS-4274
|
|
12
|
+
|
|
13
|
+
# 0.8.0-next.8 (2026-08-14)
|
|
14
|
+
|
|
15
|
+
# 0.8.0-next.7 (2026-08-12)
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- #NEXUS-3811 InvalidError 类不支持 new ,以免后续引入不可控的message (#1402) b9c0525, closes #NEXUS-3811 #1402 #NEXUS-3811
|
|
20
|
+
- **backend:** refactor ces condition error #NEXUS-4010 (#1387) 222c8aa, closes #NEXUS-4010 #1387 #NEXUS-4010 #NEXUS-4010
|
|
21
|
+
|
|
22
|
+
# 0.8.0-next.6 (2026-08-07)
|
|
23
|
+
|
|
24
|
+
# 0.8.0-next.5 (2026-08-07)
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
- #NEXUS-3863 kvs补充一下,set时的infinity,nan的边界值测试 (#1369) f7a03f6, closes #NEXUS-3863 #1369 #NEXUS-3863
|
|
29
|
+
- ces update 允许 "{}"&condition 比较值不支持正则 NaN&infinity 转换为安全数字 (#1363) d94cda4, closes #1363
|
|
30
|
+
- exists: false/true 与 eq/ne: null 行为一致&允许所有类型字段 eq/ne: null (#1346) 223659d, closes #1346
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
- **backend:** refactor error and remove deprecated error #NEXUS-3701 (#1299) 6c2949e, closes #NEXUS-3701 #1299 #NEXUS-3701 #NEXUS-3701 #NEXUS-3701 #NEXUS-3701 #NEXUS-3701 #NEXUS-3701 #NEXUS-3701
|
|
35
|
+
- **backend:** refactor findOptions ,insertOptions ,update entity #NEXUS-4008 (#1376) 8231826, closes #NEXUS-4008 #1376
|
|
36
|
+
- **backend:** supported error message as unify message #NEXUS-3834 (#1347) be56895, closes #NEXUS-3834 #1347 #NEXUS-3834 #NEXUS-3834 #NEXUS-3834 #NEXUS-3834 #NEXUS-3834 #NEXUS-3834
|
|
37
|
+
- remove CES ConditionBuilder ignoreUndefined/keepNaN #NEXUS-3857 (#1348) 1e103c0, closes #NEXUS-3857 #1348
|
|
38
|
+
|
|
39
|
+
# 0.8.0-next.4 (2026-07-27)
|
|
40
|
+
|
|
41
|
+
# 0.8.0-next.3 (2026-07-24)
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
- 补充 nos RPC 向 sdk 看齐 (#1242) 467cb68, closes #1242
|
|
46
|
+
|
|
47
|
+
# 0.8.0-next.2 (2026-07-20)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CurrentLevelType,
|
|
1
|
+
import type { CurrentLevelType, KeyChains, LogicalLevelType, Condition, QueryOperatorCondition$contains, RootLevelType, TypeAtKeyChain, ValueAlternativeType, Document } from "@pc-nexus/internal";
|
|
2
2
|
import { InnerConditionBuilder } from "./inner-condition.builder.js";
|
|
3
3
|
export interface CommonConditionBuilder<Schema = Document, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>> {
|
|
4
4
|
field<TFieldChains extends KeyChains<Schema>>(field: TFieldChains): LimitComparisonConditionBuilder<Schema, TFieldChains, CurrentLevel, TypeAtKeyChain<Schema, TFieldChains>>;
|
|
@@ -12,25 +12,25 @@ export interface LogicalConditionBuilder<Schema = Document, FieldChains extends
|
|
|
12
12
|
type LimitComparisonConditionBuilder<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>, FieldType = TypeAtKeyChain<Schema, FieldChains>> = FieldType extends number ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists" | "gt" | "gte" | "lt" | "lte"> : FieldType extends string ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists" | "contains" | "notContains"> : FieldType extends boolean ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists"> : FieldType extends any[] ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "contains" | "notContains" | "eq" | "ne" | "exists"> : FieldType extends Document ? Pick<ComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>, "eq" | "ne" | "exists"> : never;
|
|
13
13
|
export type ComparisonConditionBuilderReturnType<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> = LogicalConditionBuilder<Schema, never, CurrentLevel, V> & LimitComparisonConditionBuilder<Schema, FieldChains, CurrentLevel, V>;
|
|
14
14
|
export interface ComparisonConditionBuilder<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> {
|
|
15
|
-
eq(value: ValueAlternativeType<V
|
|
16
|
-
ne(value: ValueAlternativeType<V
|
|
17
|
-
gt(value: ValueAlternativeType<V
|
|
18
|
-
gte(value: ValueAlternativeType<V
|
|
19
|
-
lt(value: ValueAlternativeType<V
|
|
20
|
-
lte(value: ValueAlternativeType<V
|
|
21
|
-
contains(value: QueryOperatorCondition$contains<V
|
|
22
|
-
notContains(value: QueryOperatorCondition$contains<V
|
|
15
|
+
eq(value: ValueAlternativeType<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
16
|
+
ne(value: ValueAlternativeType<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
17
|
+
gt(value: ValueAlternativeType<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
18
|
+
gte(value: ValueAlternativeType<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
19
|
+
lt(value: ValueAlternativeType<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
20
|
+
lte(value: ValueAlternativeType<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
21
|
+
contains(value: QueryOperatorCondition$contains<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
22
|
+
notContains(value: QueryOperatorCondition$contains<V>): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
23
23
|
exists(exists?: boolean): ComparisonConditionBuilderReturnType<Schema, FieldChains, CurrentLevel, V>;
|
|
24
24
|
}
|
|
25
25
|
export declare class ConditionBuilder<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> implements LogicalConditionBuilder<Schema, FieldChains, CurrentLevel, V> {
|
|
26
26
|
protected _innerBuilder: InnerConditionBuilder<Schema, FieldChains, CurrentLevel, V>;
|
|
27
|
-
constructor(
|
|
27
|
+
constructor();
|
|
28
28
|
and(closure: (andBuilder: LogicalOperatorBuilder<Schema>) => void): LogicalOperatorReturnType<Schema, never, CurrentLevel>;
|
|
29
29
|
or(closure: (orBuilder: LogicalOperatorBuilder<Schema>) => void): LogicalOperatorReturnType<Schema, never, CurrentLevel>;
|
|
30
30
|
field<TFieldChains extends FieldChains>(field: TFieldChains): LimitComparisonConditionBuilder<Schema, TFieldChains, CurrentLevel, TypeAtKeyChain<Schema, TFieldChains>>;
|
|
31
31
|
}
|
|
32
32
|
export declare class ConditionBuilderHelper<Schema = Document, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> extends ConditionBuilder<Schema, FieldChains, CurrentLevel, V> {
|
|
33
|
-
static create<Schema>(
|
|
33
|
+
static create<Schema>(): ConditionBuilderHelper<Schema>;
|
|
34
34
|
done(reset?: boolean): Condition;
|
|
35
35
|
}
|
|
36
36
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/condition.builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"condition.builder.d.ts","sourceRoot":"","sources":["../../../../src/lib/ces/condition-builder/condition.builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,+BAA+B,EAC/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EAAE,KAAK,EAAE,YAAY,CAAC;IAK1H,EAAE,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,sBAAsB,CAAC,MAAM,CAAC,KAAK,IAAI,GAAG,yBAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC;IAKxH,KAAK,CAAC,YAAY,SAAS,WAAW,EACzC,KAAK,EAAE,YAAY,GACpB,+BAA+B,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAI/G;AAED,qBAAa,sBAAsB,CAC/B,MAAM,GAAG,QAAQ,EACjB,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,MAAM,EAAE,WAAW,CAAC,CACzC,SAAQ,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;WAC9C,MAAM,CAAC,MAAM,KAAK,sBAAsB,CAAC,MAAM,CAAC;IAGvD,IAAI,CAAC,KAAK,UAAO,GAAG,SAAS;CAGvC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InnerConditionBuilder } from "./inner-condition.builder.js";
|
|
2
2
|
export class ConditionBuilder {
|
|
3
3
|
_innerBuilder;
|
|
4
|
-
constructor(
|
|
5
|
-
this._innerBuilder = new InnerConditionBuilder(
|
|
4
|
+
constructor() {
|
|
5
|
+
this._innerBuilder = new InnerConditionBuilder();
|
|
6
6
|
}
|
|
7
7
|
and(closure) {
|
|
8
8
|
this._innerBuilder.and(closure);
|
|
@@ -18,8 +18,8 @@ export class ConditionBuilder {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
export class ConditionBuilderHelper extends ConditionBuilder {
|
|
21
|
-
static create(
|
|
22
|
-
return new ConditionBuilderHelper(
|
|
21
|
+
static create() {
|
|
22
|
+
return new ConditionBuilderHelper();
|
|
23
23
|
}
|
|
24
24
|
done(reset = true) {
|
|
25
25
|
return this._innerBuilder.done(reset);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { CurrentLevelType, EqOptions, KeyChains, LogicalLevelType, Query, Condition,
|
|
1
|
+
import type { CurrentLevelType, EqOptions, KeyChains, LogicalLevelType, Query, Condition, QueryOperatorCondition$contains, RootLevelType, TypeAtKeyChain, ValueAlternativeType } from "@pc-nexus/internal";
|
|
2
2
|
import { QueryOperator } from "@pc-nexus/internal";
|
|
3
3
|
export declare class InnerConditionBuilder<Schema = Record<string, any>, FieldChains extends KeyChains<Schema> = KeyChains<Schema>, CurrentLevel extends CurrentLevelType<Schema> = RootLevelType<Schema>, V = TypeAtKeyChain<Schema, FieldChains>> {
|
|
4
|
+
#private;
|
|
4
5
|
private _field;
|
|
5
|
-
private baseOptions;
|
|
6
6
|
private get currentField();
|
|
7
7
|
private set currentField(value);
|
|
8
8
|
private root;
|
|
9
9
|
private currentLevel;
|
|
10
|
-
static create<Schema>(
|
|
11
|
-
constructor(
|
|
10
|
+
static create<Schema>(): InnerConditionBuilder<Schema>;
|
|
11
|
+
constructor();
|
|
12
12
|
done(reset?: boolean): Condition;
|
|
13
13
|
reset(this: InnerConditionBuilder<Schema, never, CurrentLevelType<Schema>>): InnerConditionBuilder<Schema>;
|
|
14
14
|
private getRawQuery;
|
|
@@ -22,18 +22,17 @@ export declare class InnerConditionBuilder<Schema = Record<string, any>, FieldCh
|
|
|
22
22
|
private logicalClose;
|
|
23
23
|
and(closure: (andBuilder: InnerConditionBuilder<Schema, never, LogicalLevelType<Schema>>) => void): InnerConditionBuilder<Schema, FieldChains, CurrentLevel, V>;
|
|
24
24
|
or(closure: (orBuilder: InnerConditionBuilder<Schema, never, LogicalLevelType<Schema>>) => void): InnerConditionBuilder<Schema, FieldChains, CurrentLevel, V>;
|
|
25
|
-
private shouldReserveValue;
|
|
26
25
|
private updateQuery;
|
|
27
26
|
field<TFieldChains extends FieldChains>(field: TFieldChains): InnerConditionBuilder<Schema, TFieldChains, CurrentLevel>;
|
|
28
27
|
resetFieldConditions(): this;
|
|
29
|
-
eq<OP extends QueryOperator.EQ | QueryOperator.NE | QueryOperator.GT | QueryOperator.GTE | QueryOperator.LTE | QueryOperator.LT | QueryOperator.Contains | QueryOperator.NotContains = QueryOperator.EQ>(value: ValueAlternativeType<V>, { queryOperator
|
|
30
|
-
ne(value: ValueAlternativeType<V
|
|
31
|
-
gte(value: ValueAlternativeType<V
|
|
32
|
-
gt(value: ValueAlternativeType<V
|
|
33
|
-
lte(value: ValueAlternativeType<V
|
|
34
|
-
lt(value: ValueAlternativeType<V
|
|
35
|
-
contains(value: QueryOperatorCondition$contains<V
|
|
36
|
-
notContains(value: QueryOperatorCondition$contains<V
|
|
28
|
+
eq<OP extends QueryOperator.EQ | QueryOperator.NE | QueryOperator.GT | QueryOperator.GTE | QueryOperator.LTE | QueryOperator.LT | QueryOperator.Contains | QueryOperator.NotContains = QueryOperator.EQ>(value: ValueAlternativeType<V>, { queryOperator }?: EqOptions<OP>): this;
|
|
29
|
+
ne(value: ValueAlternativeType<V>): this;
|
|
30
|
+
gte(value: ValueAlternativeType<V>): this;
|
|
31
|
+
gt(value: ValueAlternativeType<V>): this;
|
|
32
|
+
lte(value: ValueAlternativeType<V>): this;
|
|
33
|
+
lt(value: ValueAlternativeType<V>): this;
|
|
34
|
+
contains(value: QueryOperatorCondition$contains<V>): this;
|
|
35
|
+
notContains(value: QueryOperatorCondition$contains<V>): this;
|
|
37
36
|
exists(exists?: boolean): this;
|
|
38
37
|
}
|
|
39
38
|
//# sourceMappingURL=inner-condition.builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,MAAM,EAAE,WAAW,CAAC;;IAEvC,OAAO,CAAC,MAAM,CAA0B;IAExC,OAAO,KAAK,YAAY,GAYvB;IAED,OAAO,KAAK,YAAY,QAEvB;IAED,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,YAAY,CAAgB;WAEtB,MAAM,CAAC,MAAM,KAAK,qBAAqB,CAAC,MAAM,CAAC;;IAQtD,IAAI,CAAC,KAAK,UAAO,GAAG,SAAS;IAgB7B,KAAK,CAAC,IAAI,EAAE,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,qBAAqB,CAAC,MAAM,CAAC;IAOjH,OAAO,CAAC,WAAW;IAIZ,KAAK,CACR,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAC5F,QAAQ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AoB,CAAC,CAAC,CAAC,GAAG,IAAI;IAIxC,GAAG,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI;IAKzC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI;IAKxC,GAAG,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI;IAKzC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI;IAKxC,QAAQ,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC,CAAC,GAAG,IAAI;IAKzD,WAAW,CAAC,KAAK,EAAE,+BAA+B,CAAC,CAAC,CAAC,GAAG,IAAI;IAK5D,MAAM,CAAC,MAAM,UAAO,GAAG,IAAI;CAUrC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CesConditionInvalidError, InvalidErrorCode, NexusInputValidator, 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
|
-
baseOptions = { ignoreUndefined: false, keepNaN: false };
|
|
7
6
|
get currentField() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
8
|
+
kind: "value",
|
|
9
|
+
rule: "required",
|
|
10
|
+
errObject: "query condition field",
|
|
11
|
+
}, this._field, true);
|
|
11
12
|
return this._field;
|
|
12
13
|
}
|
|
13
14
|
set currentField(field) {
|
|
@@ -15,11 +16,10 @@ export class InnerConditionBuilder {
|
|
|
15
16
|
}
|
|
16
17
|
root;
|
|
17
18
|
currentLevel;
|
|
18
|
-
static create(
|
|
19
|
-
return new InnerConditionBuilder(
|
|
19
|
+
static create() {
|
|
20
|
+
return new InnerConditionBuilder();
|
|
20
21
|
}
|
|
21
|
-
constructor(
|
|
22
|
-
Object.assign(this.baseOptions, options);
|
|
22
|
+
constructor() {
|
|
23
23
|
this.reset();
|
|
24
24
|
}
|
|
25
25
|
done(reset = true) {
|
|
@@ -75,8 +75,11 @@ export class InnerConditionBuilder {
|
|
|
75
75
|
}
|
|
76
76
|
assertAtRootLevel() {
|
|
77
77
|
if (!this.isAtRootLevel()) {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
79
|
+
kind: "value",
|
|
80
|
+
rule: "required",
|
|
81
|
+
errObject: "query condition logical operator",
|
|
82
|
+
}, undefined, true);
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
assertAtLogicalLevel(expect) {
|
|
@@ -84,15 +87,19 @@ export class InnerConditionBuilder {
|
|
|
84
87
|
const isRootLevel = _.isNil(logicalOp);
|
|
85
88
|
if (expect) {
|
|
86
89
|
if (logicalOp !== expect) {
|
|
87
|
-
throw new
|
|
90
|
+
throw new NexusInternalError();
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
else if (isRootLevel) {
|
|
91
|
-
|
|
94
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
95
|
+
kind: "value",
|
|
96
|
+
rule: "required",
|
|
97
|
+
errObject: "query condition logical operator",
|
|
98
|
+
}, logicalOp, true);
|
|
92
99
|
}
|
|
93
100
|
}
|
|
94
101
|
logicalClosure(logicalOp, closure) {
|
|
95
|
-
const logicalQB = new InnerConditionBuilder(
|
|
102
|
+
const logicalQB = new InnerConditionBuilder().logicalOpen(logicalOp);
|
|
96
103
|
closure(logicalQB);
|
|
97
104
|
logicalQB.logicalClose(logicalOp);
|
|
98
105
|
if (this.isAtRootLevel()) {
|
|
@@ -130,16 +137,6 @@ export class InnerConditionBuilder {
|
|
|
130
137
|
or(closure) {
|
|
131
138
|
return this.logicalClosure(LogicalOperator.Or, closure);
|
|
132
139
|
}
|
|
133
|
-
shouldReserveValue(value, options) {
|
|
134
|
-
options = { ...this.baseOptions, ...options };
|
|
135
|
-
if (options.ignoreUndefined && value === undefined) {
|
|
136
|
-
return false;
|
|
137
|
-
}
|
|
138
|
-
if (!options.keepNaN && Number.isNaN(value)) {
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
return true;
|
|
142
|
-
}
|
|
143
140
|
updateQuery(field, condition) {
|
|
144
141
|
if (this.isAtRootLevel()) {
|
|
145
142
|
if (field in LogicalOperator && _.isArray(condition)) {
|
|
@@ -186,44 +183,66 @@ export class InnerConditionBuilder {
|
|
|
186
183
|
}
|
|
187
184
|
return this;
|
|
188
185
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
186
|
+
#normalizeValue(value) {
|
|
187
|
+
if (value === Number.POSITIVE_INFINITY) {
|
|
188
|
+
return Number.MAX_SAFE_INTEGER;
|
|
189
|
+
}
|
|
190
|
+
if (value === Number.NEGATIVE_INFINITY) {
|
|
191
|
+
return Number.MIN_SAFE_INTEGER;
|
|
193
192
|
}
|
|
194
|
-
|
|
193
|
+
if (_.isRegExp(value)) {
|
|
194
|
+
throw CesConditionInvalidError.regexpNotSupported();
|
|
195
|
+
}
|
|
196
|
+
NexusInputValidator.getInstance().validate(InvalidErrorCode.CesCondition, {
|
|
197
|
+
kind: "value",
|
|
198
|
+
rule: "notConst",
|
|
199
|
+
errObject: "query condition comparison",
|
|
200
|
+
value: Number.NaN,
|
|
201
|
+
}, value, true);
|
|
202
|
+
return value;
|
|
203
|
+
}
|
|
204
|
+
eq(value, { queryOperator = QueryOperator.EQ } = {}) {
|
|
205
|
+
const field = this.currentField;
|
|
206
|
+
const normalizedValue = this.#normalizeValue(value);
|
|
207
|
+
this.updateQuery(field, { [queryOperator]: normalizedValue });
|
|
195
208
|
return this;
|
|
196
209
|
}
|
|
197
|
-
ne(value
|
|
198
|
-
return this.eq(value, {
|
|
210
|
+
ne(value) {
|
|
211
|
+
return this.eq(value, { queryOperator: QueryOperator.NE });
|
|
199
212
|
}
|
|
200
|
-
gte(value
|
|
201
|
-
this.eq(value, { queryOperator: QueryOperator.GTE
|
|
213
|
+
gte(value) {
|
|
214
|
+
this.eq(value, { queryOperator: QueryOperator.GTE });
|
|
202
215
|
return this;
|
|
203
216
|
}
|
|
204
|
-
gt(value
|
|
205
|
-
this.eq(value, { queryOperator: QueryOperator.GT
|
|
217
|
+
gt(value) {
|
|
218
|
+
this.eq(value, { queryOperator: QueryOperator.GT });
|
|
206
219
|
return this;
|
|
207
220
|
}
|
|
208
|
-
lte(value
|
|
209
|
-
this.eq(value, { queryOperator: QueryOperator.LTE
|
|
221
|
+
lte(value) {
|
|
222
|
+
this.eq(value, { queryOperator: QueryOperator.LTE });
|
|
210
223
|
return this;
|
|
211
224
|
}
|
|
212
|
-
lt(value
|
|
213
|
-
this.eq(value, { queryOperator: QueryOperator.LT
|
|
225
|
+
lt(value) {
|
|
226
|
+
this.eq(value, { queryOperator: QueryOperator.LT });
|
|
214
227
|
return this;
|
|
215
228
|
}
|
|
216
|
-
contains(value
|
|
217
|
-
this.eq(value, { queryOperator: QueryOperator.Contains
|
|
229
|
+
contains(value) {
|
|
230
|
+
this.eq(value, { queryOperator: QueryOperator.Contains });
|
|
218
231
|
return this;
|
|
219
232
|
}
|
|
220
|
-
notContains(value
|
|
221
|
-
this.eq(value, { queryOperator: QueryOperator.NotContains
|
|
233
|
+
notContains(value) {
|
|
234
|
+
this.eq(value, { queryOperator: QueryOperator.NotContains });
|
|
222
235
|
return this;
|
|
223
236
|
}
|
|
224
237
|
exists(exists = true) {
|
|
225
238
|
const field = this.currentField;
|
|
226
|
-
|
|
239
|
+
const value = !!exists;
|
|
240
|
+
if (value) {
|
|
241
|
+
this.updateQuery(field, { [QueryOperator.NE]: null });
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
this.updateQuery(field, { [QueryOperator.EQ]: null });
|
|
245
|
+
}
|
|
227
246
|
return this;
|
|
228
247
|
}
|
|
229
248
|
}
|
package/lib/kvs/kvs.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { KvsValueType } from "@pc-nexus/internal";
|
|
2
2
|
import { KvsGetOptions, KvsSetResult, KvsSetOptions } from "./type.js";
|
|
3
3
|
declare class Kvs {
|
|
4
|
+
#private;
|
|
4
5
|
set<T extends KvsValueType>(key: string, value: T, options?: KvsSetOptions): Promise<KvsSetResult<T>>;
|
|
5
6
|
get<T extends KvsValueType>(key: string, options?: KvsGetOptions): Promise<T | undefined>;
|
|
6
7
|
delete(key: string): Promise<void>;
|
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,6 +1,31 @@
|
|
|
1
|
-
import { invoke } from "@pc-nexus/internal";
|
|
1
|
+
import { invoke, NexusInputValidator, InvalidErrorCode } from "@pc-nexus/internal";
|
|
2
2
|
class Kvs {
|
|
3
|
+
#assertKvsValueSupported(value) {
|
|
4
|
+
if (typeof value === "number") {
|
|
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);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
if (value === null || typeof value !== "object") {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
for (const item of value) {
|
|
19
|
+
this.#assertKvsValueSupported(item);
|
|
20
|
+
}
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
for (const nested of Object.values(value)) {
|
|
24
|
+
this.#assertKvsValueSupported(nested);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
3
27
|
async set(key, value, options) {
|
|
28
|
+
this.#assertKvsValueSupported(value);
|
|
4
29
|
const response = await invoke("storage/kvs", "set", {
|
|
5
30
|
key,
|
|
6
31
|
value,
|
package/lib/nos/type.d.ts
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
key: string;
|
|
4
|
-
size: number;
|
|
5
|
-
checksum: string;
|
|
6
|
-
checksum_type: ChecksumType;
|
|
7
|
-
}
|
|
8
|
-
export interface NosUploadUrlOptions {
|
|
9
|
-
overwrite?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface PreSignedUrlResult {
|
|
12
|
-
url: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ObjectMetadata {
|
|
15
|
-
key: string;
|
|
16
|
-
name: string;
|
|
17
|
-
mime_type?: string;
|
|
18
|
-
checksum: string;
|
|
19
|
-
size: number;
|
|
20
|
-
created_at?: number;
|
|
21
|
-
}
|
|
22
|
-
export type GenerateUploadUrlPayload = Pick<UploadUrlBody, "size" | "checksum" | "checksum_type">;
|
|
23
|
-
export type PresignedURLToObjectMetadataMap = Record<string, UploadUrlBody>;
|
|
24
|
-
export type PresignedURLToObjectKeyMap = Record<string, string>;
|
|
1
|
+
import { ChecksumType, UploadUrlBody, NosUploadUrlOptions, PreSignedUrlResult, ObjectMetadata, GenerateUploadUrlPayload, PresignedURLToObjectMetadataMap, PresignedURLToObjectKeyMap } from "@pc-nexus/internal";
|
|
2
|
+
export type { ChecksumType, UploadUrlBody, NosUploadUrlOptions, PreSignedUrlResult, ObjectMetadata, GenerateUploadUrlPayload, PresignedURLToObjectMetadataMap, PresignedURLToObjectKeyMap, };
|
|
25
3
|
//# sourceMappingURL=type.d.ts.map
|
package/lib/nos/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/nos/type.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/lib/nos/type.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,+BAA+B,EAC/B,0BAA0B,EAC7B,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACR,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,+BAA+B,EAC/B,0BAA0B,GAC7B,CAAC"}
|
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.10",
|
|
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.10",
|
|
34
34
|
"lodash": "^4.17.21"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {},
|