@hodfords/nestjs-grpc-helper 11.3.4 → 11.3.6

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.
@@ -11,7 +11,15 @@ function AnyType({ isDto } = {}) {
11
11
  return JSON.stringify(object.value);
12
12
  }
13
13
  if (object.options.groups?.includes('__getData')) {
14
- return JSON.parse(object.value);
14
+ if (typeof object.value !== 'string') {
15
+ return object.value;
16
+ }
17
+ try {
18
+ return JSON.parse(object.value);
19
+ }
20
+ catch {
21
+ return object.value;
22
+ }
15
23
  }
16
24
  return object.value;
17
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"any-type.decorator.js","sourceRoot":"","sources":["../../../lib/decorators/any-type.decorator.ts"],"names":[],"mappings":";;AAEA,0BAeC;AAjBD,yDAA8C;AAE9C,SAAgB,OAAO,CAAC,EAAE,KAAK,KAA0B,EAAE;IACvD,OAAO,IAAA,6BAAS,EAAC,CAAC,MAAM,EAAE,EAAE;QACxB,IAAI,KAAK,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YAChD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,MAAM,CAAC,KAAK,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC"}
1
+ {"version":3,"file":"any-type.decorator.js","sourceRoot":"","sources":["../../../lib/decorators/any-type.decorator.ts"],"names":[],"mappings":";;AAEA,0BAsBC;AAxBD,yDAA8C;AAE9C,SAAgB,OAAO,CAAC,EAAE,KAAK,KAA0B,EAAE;IACvD,OAAO,IAAA,6BAAS,EAAC,CAAC,MAAM,EAAE,EAAE;QACxB,IAAI,KAAK,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;YAChD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;gBACnC,OAAO,MAAM,CAAC,KAAK,CAAC;YACxB,CAAC;YACD,IAAI,CAAC;gBACD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACpC,CAAC;YAAC,MAAM,CAAC;gBACL,OAAO,MAAM,CAAC,KAAK,CAAC;YACxB,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC,KAAK,CAAC;IACxB,CAAC,CAAC,CAAC;AACP,CAAC"}
package/index.d.ts CHANGED
@@ -7,6 +7,9 @@ export * from './decorators/any-type.decorator';
7
7
  export * from './helpers/generate.helper';
8
8
  export * from './helpers/mock.helper';
9
9
  export * from './type-helpers/pick-type.helper';
10
+ export * from './type-helpers/omit-type.helper';
11
+ export * from './type-helpers/partial-type.helper';
12
+ export * from './type-helpers/intersection-type.helper';
10
13
  export * from './types/property-option.type';
11
14
  export * from './types/sdk-build-config.type';
12
15
  export * from './sdk-stub/helpers/grpc.helper';
package/index.js CHANGED
@@ -23,6 +23,9 @@ __exportStar(require("./decorators/any-type.decorator"), exports);
23
23
  __exportStar(require("./helpers/generate.helper"), exports);
24
24
  __exportStar(require("./helpers/mock.helper"), exports);
25
25
  __exportStar(require("./type-helpers/pick-type.helper"), exports);
26
+ __exportStar(require("./type-helpers/omit-type.helper"), exports);
27
+ __exportStar(require("./type-helpers/partial-type.helper"), exports);
28
+ __exportStar(require("./type-helpers/intersection-type.helper"), exports);
26
29
  __exportStar(require("./types/property-option.type"), exports);
27
30
  __exportStar(require("./types/sdk-build-config.type"), exports);
28
31
  __exportStar(require("./sdk-stub/helpers/grpc.helper"), exports);
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,kEAAgD;AAChD,8DAA4C;AAC5C,oEAAkD;AAClD,qEAAmD;AACnD,kEAAgD;AAChD,4DAA0C;AAC1C,wDAAsC;AACtC,kEAAgD;AAChD,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,2EAAyD;AACzD,+DAA6C;AAC7C,4DAA0C;AAC1C,8EAA4D;AAC5D,uCAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,kEAAgD;AAChD,8DAA4C;AAC5C,oEAAkD;AAClD,qEAAmD;AACnD,kEAAgD;AAChD,4DAA0C;AAC1C,wDAAsC;AACtC,kEAAgD;AAChD,kEAAgD;AAChD,qEAAmD;AACnD,0EAAwD;AACxD,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,2EAAyD;AACzD,+DAA6C;AAC7C,4DAA0C;AAC1C,8EAA4D;AAC5D,uCAAqC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hodfords/nestjs-grpc-helper",
3
- "version": "11.3.4",
3
+ "version": "11.3.6",
4
4
  "description": "A utility for simplifying gRPC integration and communication in NestJS applications",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",