custom-class-validator-tools 1.0.12 → 1.0.13

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 CHANGED
@@ -1,4 +1,9 @@
1
1
  export * from './src/decorator/validate/function/string-validator.function';
2
+ export * from './src/decorator/transform/any-to-bigint.decorator';
3
+ export * from './src/decorator/transform/any-to-number.decorator';
4
+ export * from './src/decorator/transform/any-to-string.decorator';
5
+ export * from './src/decorator/transform/number-to-boolean.decorator';
6
+ export * from './src/decorator/transform/string-to-boolean.decorator';
2
7
  export * from './src/decorator/validate/is-not-empty-bigint-string.decorator';
3
8
  export * from './src/decorator/validate/is-not-empty-bigint.decorator';
4
9
  export * from './src/decorator/validate/is-not-empty-boolean-string.decorator';
@@ -39,5 +44,3 @@ export * from './src/decorator/validate/is-undefinable-sql-time.decorator';
39
44
  export * from './src/decorator/validate/is-undefinable-string.decorator';
40
45
  export * from './src/decorator/validate/is-undefinable.decorator';
41
46
  export * from './src/function/validate-with-header.decorators';
42
- export * from './src/util/is-boolean';
43
- export * from './src/util/is-empty';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // created from ctix
2
+ // 2022-06-12 14:53:54
3
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
4
  if (k2 === undefined) k2 = k;
5
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -15,7 +15,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
16
  };
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ // 2022-06-12 14:53:54
18
19
  __exportStar(require("./src/decorator/validate/function/string-validator.function"), exports);
20
+ __exportStar(require("./src/decorator/transform/any-to-bigint.decorator"), exports);
21
+ __exportStar(require("./src/decorator/transform/any-to-number.decorator"), exports);
22
+ __exportStar(require("./src/decorator/transform/any-to-string.decorator"), exports);
23
+ __exportStar(require("./src/decorator/transform/number-to-boolean.decorator"), exports);
24
+ __exportStar(require("./src/decorator/transform/string-to-boolean.decorator"), exports);
19
25
  __exportStar(require("./src/decorator/validate/is-not-empty-bigint-string.decorator"), exports);
20
26
  __exportStar(require("./src/decorator/validate/is-not-empty-bigint.decorator"), exports);
21
27
  __exportStar(require("./src/decorator/validate/is-not-empty-boolean-string.decorator"), exports);
@@ -56,5 +62,3 @@ __exportStar(require("./src/decorator/validate/is-undefinable-sql-time.decorator
56
62
  __exportStar(require("./src/decorator/validate/is-undefinable-string.decorator"), exports);
57
63
  __exportStar(require("./src/decorator/validate/is-undefinable.decorator"), exports);
58
64
  __exportStar(require("./src/function/validate-with-header.decorators"), exports);
59
- __exportStar(require("./src/util/is-boolean"), exports);
60
- __exportStar(require("./src/util/is-empty"), exports);
@@ -30,7 +30,7 @@ const FF = __importStar(require("fp-ts/function"));
30
30
  const AnyToBigInt = () => {
31
31
  const toPlain = (0, class_transformer_1.Transform)(({ value }) => value, { toPlainOnly: true });
32
32
  const toClass = (target, key) => (0, class_transformer_1.Transform)(({ obj }) => {
33
- return FF.pipe(FE.tryCatch(() => BigInt(obj[key]), () => undefined), FE.fold(left => left, right => right));
33
+ return FF.pipe(FE.tryCatch(() => BigInt(obj[key]), () => obj[key]), FE.fold(left => left, right => right));
34
34
  })(target, key);
35
35
  return function (target, key) {
36
36
  toPlain(target, key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "custom-class-validator-tools",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -23,10 +23,10 @@
23
23
  "fp-ts": "^2.11.9"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/jest": "^27.4.1",
26
+ "@types/jest": "^28.1.1",
27
27
  "@typescript-eslint/eslint-plugin": "^5.16.0",
28
28
  "@typescript-eslint/parser": "^5.16.0",
29
- "ctix": "^0.6.0",
29
+ "ctix": "^1.1.0",
30
30
  "eslint": "^8.11.0",
31
31
  "eslint-config-prettier": "^8.5.0",
32
32
  "eslint-plugin-import": "^2.25.4",