@esposter/shared 2.11.0 → 2.13.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/dist/index.d.ts +22 -3
- package/dist/index.js +28 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,19 @@ declare enum BinaryOperator {
|
|
|
5
5
|
gt = "gt",
|
|
6
6
|
le = "le",
|
|
7
7
|
lt = "lt",
|
|
8
|
+
ne = "ne",
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/models/azure/Literal.d.ts
|
|
12
|
+
declare enum Literal {
|
|
13
|
+
NaN = "NaN",
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/models/azure/UnaryOperator.d.ts
|
|
17
|
+
declare enum UnaryOperator {
|
|
18
|
+
and = "and",
|
|
19
|
+
not = "not",
|
|
20
|
+
or = "or",
|
|
8
21
|
}
|
|
9
22
|
//#endregion
|
|
10
23
|
//#region src/models/shared/Operation.d.ts
|
|
@@ -32,8 +45,14 @@ declare class NotInitializedError<T extends string = string> extends Error {
|
|
|
32
45
|
constructor(name: T);
|
|
33
46
|
}
|
|
34
47
|
//#endregion
|
|
35
|
-
//#region src/services/azure/
|
|
36
|
-
declare const
|
|
48
|
+
//#region src/services/azure/isNull.d.ts
|
|
49
|
+
declare const isNull: (key: string) => string;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/services/azure/isPartitionKey.d.ts
|
|
52
|
+
declare const isPartitionKey: (partitionKey: string, operator?: BinaryOperator) => string;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/services/azure/isRowKey.d.ts
|
|
55
|
+
declare const isRowKey: (rowKey: string) => string;
|
|
37
56
|
//#endregion
|
|
38
57
|
//#region src/services/prettier/css.d.ts
|
|
39
58
|
declare const css: typeof String.raw;
|
|
@@ -738,4 +757,4 @@ declare const UUIDV4_REGEX: RegExp;
|
|
|
738
757
|
//#region src/util/id/uuid/uuidValidateV4.d.ts
|
|
739
758
|
declare const uuidValidateV4: (uuid: string) => boolean;
|
|
740
759
|
//#endregion
|
|
741
|
-
export { BinaryOperator, CamelToKebab, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, InvalidOperationError, KebabToCamel, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, SkipFirst, TakeFirst, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, capitalize, css, exhaustiveGuard,
|
|
760
|
+
export { BinaryOperator, CamelToKebab, ExcludeFunctionProperties, FunctionProperties, ID_SEPARATOR, InvalidOperationError, KebabToCamel, Literal, MergeObjectsStrict, NIL, NotFoundError, NotInitializedError, Operation, SkipFirst, TakeFirst, TupleSlice, TupleSplit, TupleSplitHead, TupleSplitTail, UUIDV4_REGEX, UnaryOperator, capitalize, css, exhaustiveGuard, html, isNull, isPartitionKey, isPlainObject, isRowKey, mergeObjectsStrict, streamToText, toKebabCase, uncapitalize, uuidValidateV4 };
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,26 @@ let BinaryOperator = /* @__PURE__ */ function(BinaryOperator$1) {
|
|
|
5
5
|
BinaryOperator$1["gt"] = "gt";
|
|
6
6
|
BinaryOperator$1["le"] = "le";
|
|
7
7
|
BinaryOperator$1["lt"] = "lt";
|
|
8
|
+
BinaryOperator$1["ne"] = "ne";
|
|
8
9
|
return BinaryOperator$1;
|
|
9
10
|
}({});
|
|
10
11
|
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/models/azure/Literal.ts
|
|
14
|
+
let Literal = /* @__PURE__ */ function(Literal$1) {
|
|
15
|
+
Literal$1["NaN"] = "NaN";
|
|
16
|
+
return Literal$1;
|
|
17
|
+
}({});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/models/azure/UnaryOperator.ts
|
|
21
|
+
let UnaryOperator = /* @__PURE__ */ function(UnaryOperator$1) {
|
|
22
|
+
UnaryOperator$1["and"] = "and";
|
|
23
|
+
UnaryOperator$1["not"] = "not";
|
|
24
|
+
UnaryOperator$1["or"] = "or";
|
|
25
|
+
return UnaryOperator$1;
|
|
26
|
+
}({});
|
|
27
|
+
|
|
11
28
|
//#endregion
|
|
12
29
|
//#region src/models/error/InvalidOperationError.ts
|
|
13
30
|
var InvalidOperationError = class extends Error {
|
|
@@ -48,8 +65,16 @@ let Operation = /* @__PURE__ */ function(Operation$1) {
|
|
|
48
65
|
}({});
|
|
49
66
|
|
|
50
67
|
//#endregion
|
|
51
|
-
//#region src/services/azure/
|
|
52
|
-
const
|
|
68
|
+
//#region src/services/azure/isNull.ts
|
|
69
|
+
const isNull = (key) => `(${UnaryOperator.not}(${key} ${BinaryOperator.ne} ${Literal.NaN}) ${UnaryOperator.or} ${key} ${BinaryOperator.eq} 'null')`;
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/services/azure/isPartitionKey.ts
|
|
73
|
+
const isPartitionKey = (partitionKey, operator = BinaryOperator.eq) => `PartitionKey ${operator} '${partitionKey}'`;
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/services/azure/isRowKey.ts
|
|
77
|
+
const isRowKey = (rowKey) => `RowKey ${BinaryOperator.eq} '${rowKey}'`;
|
|
53
78
|
|
|
54
79
|
//#endregion
|
|
55
80
|
//#region src/services/prettier/css.ts
|
|
@@ -112,4 +137,4 @@ const UUIDV4_REGEX = /^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-
|
|
|
112
137
|
const uuidValidateV4 = (uuid) => UUIDV4_REGEX.test(uuid);
|
|
113
138
|
|
|
114
139
|
//#endregion
|
|
115
|
-
export { BinaryOperator, ID_SEPARATOR, InvalidOperationError, NIL, NotFoundError, NotInitializedError, Operation, UUIDV4_REGEX, capitalize, css, exhaustiveGuard,
|
|
140
|
+
export { BinaryOperator, ID_SEPARATOR, InvalidOperationError, Literal, NIL, NotFoundError, NotInitializedError, Operation, UUIDV4_REGEX, UnaryOperator, capitalize, css, exhaustiveGuard, html, isNull, isPartitionKey, isPlainObject, isRowKey, mergeObjectsStrict, streamToText, toKebabCase, uncapitalize, uuidValidateV4 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esposter/shared",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "A library that contains shared typescript code.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/Esposter/Esposter/blob/main/packages/shared#readme",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"typecheck": "tsc",
|
|
31
31
|
"export:gen": "ctix build --config ../configuration/.ctirc-ts"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "1765c0d90ecc03c94e942d88b8d8da962a8f53bc"
|
|
34
34
|
}
|