@senhainfo/shared-utils 1.5.17 → 1.5.18

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.
@@ -0,0 +1,7 @@
1
+ interface Condition {
2
+ apply: boolean;
3
+ text: string;
4
+ }
5
+ export declare function buildWhere(conditions: Condition[]): string;
6
+ export {};
7
+ //# sourceMappingURL=build-where.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-where.d.ts","sourceRoot":"","sources":["../src/build-where.ts"],"names":[],"mappings":"AAAA,UAAU,SAAS;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,MAAM,CAO1D"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildWhere = buildWhere;
4
+ function buildWhere(conditions) {
5
+ const where = conditions
6
+ .filter((condition) => condition.apply)
7
+ .map((condition) => condition.text)
8
+ .join(' and ');
9
+ return where ? `where ${where}` : '';
10
+ }
11
+ //# sourceMappingURL=build-where.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-where.js","sourceRoot":"","sources":["../src/build-where.ts"],"names":[],"mappings":";;AAKA,gCAOC;AAPD,SAAgB,UAAU,CAAC,UAAuB;IAChD,MAAM,KAAK,GAAG,UAAU;SACrB,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;SACtC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC;SAClC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEjB,OAAO,KAAK,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvC,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,17 +1,19 @@
1
- export * from "./app-log";
2
- export * from "./assign-default-values";
3
- export * from "./execute-promise";
4
- export * from "./format-case";
5
- export * from "./format-text";
6
- export * from "./generate-metadata-response";
7
- export * from "./get-ip-address";
8
- export * from "./get-random-data";
9
- export * from "./http-status-enum";
10
- export * from "./parse-request-url";
11
- export * from "./process-form-data";
12
- export * from "./remove-undefined-props";
13
- export * from "./split-array";
14
- export * from "./windows-service";
15
- export * from "./xor-encrypt";
16
- export * as Exceptions from "./exceptions";
1
+ export * from './app-log';
2
+ export * from './assign-default-values';
3
+ export * from './build-where';
4
+ export * from './execute-promise';
5
+ export * from './format-case';
6
+ export * from './format-text';
7
+ export * from './generate-metadata-response';
8
+ export * from './get-ip-address';
9
+ export * from './get-random-data';
10
+ export * from './http-status-enum';
11
+ export * from './parse-request-url';
12
+ export * from './process-form-data';
13
+ export * from './remove-undefined-props';
14
+ export * from './split-array';
15
+ export * from './types';
16
+ export * from './windows-service';
17
+ export * from './xor-encrypt';
18
+ export * as Exceptions from './exceptions';
17
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAE9B,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAE9B,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC"}
package/lib/index.js CHANGED
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.Exceptions = void 0;
40
40
  __exportStar(require("./app-log"), exports);
41
41
  __exportStar(require("./assign-default-values"), exports);
42
+ __exportStar(require("./build-where"), exports);
42
43
  __exportStar(require("./execute-promise"), exports);
43
44
  __exportStar(require("./format-case"), exports);
44
45
  __exportStar(require("./format-text"), exports);
@@ -50,6 +51,7 @@ __exportStar(require("./parse-request-url"), exports);
50
51
  __exportStar(require("./process-form-data"), exports);
51
52
  __exportStar(require("./remove-undefined-props"), exports);
52
53
  __exportStar(require("./split-array"), exports);
54
+ __exportStar(require("./types"), exports);
53
55
  __exportStar(require("./windows-service"), exports);
54
56
  __exportStar(require("./xor-encrypt"), exports);
55
57
  exports.Exceptions = __importStar(require("./exceptions"));
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0DAAwC;AACxC,oDAAkC;AAClC,gDAA8B;AAC9B,gDAA8B;AAC9B,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,2DAAyC;AACzC,gDAA8B;AAC9B,oDAAkC;AAClC,gDAA8B;AAE9B,2DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0DAAwC;AACxC,gDAA8B;AAC9B,oDAAkC;AAClC,gDAA8B;AAC9B,gDAA8B;AAC9B,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,sDAAoC;AACpC,sDAAoC;AACpC,2DAAyC;AACzC,gDAA8B;AAC9B,0CAAwB;AACxB,oDAAkC;AAClC,gDAA8B;AAE9B,2DAA2C"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export type PartialNullable<T> = {
2
+ [P in keyof T]?: T[P] | null;
3
+ };
4
+ export type OnlyFields<Type> = {
5
+ [Key in keyof Type as Type[Key] extends Function ? never : Key]: Type[Key];
6
+ };
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;KAC9B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;CAC7B,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,IAAI,IAAI;KAC5B,GAAG,IAAI,MAAM,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,QAAQ,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;CAC3E,CAAC"}
package/lib/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senhainfo/shared-utils",
3
- "version": "1.5.17",
3
+ "version": "1.5.18",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/senha-info/senha-shared-utils.git"