@nestia/core 2.1.2-dev.20230927 → 2.1.2-dev.20230927-2

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.
@@ -8,11 +8,11 @@ require("reflect-metadata");
8
8
  function TypedException(status, description, type) {
9
9
  return function TypedException(target, propertyKey, descriptor) {
10
10
  var array = (function () {
11
- var oldbie = Reflect.getMetadata("swagger/TypedException", target[propertyKey]);
11
+ var oldbie = Reflect.getMetadata("nestia/TypedException", target[propertyKey]);
12
12
  if (oldbie !== undefined)
13
13
  return oldbie;
14
14
  var newbie = [];
15
- Reflect.defineMetadata("swagger/TypedException", newbie, target[propertyKey]);
15
+ Reflect.defineMetadata("nestia/TypedException", newbie, target[propertyKey]);
16
16
  return newbie;
17
17
  })();
18
18
  array.push({
@@ -1 +1 @@
1
- {"version":3,"file":"TypedException.js","sourceRoot":"","sources":["../../src/decorators/TypedException.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AA+C1B;;GAEG;AACH,SAAgB,cAAc,CAC1B,MAA8C,EAC9C,WAAgC,EAChC,IAAyB;IAEzB,OAAO,SAAS,cAAc,CAC1B,MAAkB,EAClB,WAA4B,EAC5B,UAAwC;QAExC,IAAM,KAAK,GAAa,CAAC;YACrB,IAAM,MAAM,GAAyB,OAAO,CAAC,WAAW,CACpD,wBAAwB,EACvB,MAAc,CAAC,WAAW,CAAC,CAC/B,CAAC;YACF,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,MAAM,CAAC;YAExC,IAAM,MAAM,GAAa,EAAE,CAAC;YAC5B,OAAO,CAAC,cAAc,CAClB,wBAAwB,EACxB,MAAM,EACL,MAAc,CAAC,WAAW,CAAC,CAC/B,CAAC;YACF,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,EAAE,CAAC;QACL,KAAK,CAAC,IAAI,CAAC;YACP,MAAM,QAAA;YACN,WAAW,aAAA;YACX,IAAI,EAAE,IAAK;SACd,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC;AACN,CAAC;AAhCD,wCAgCC"}
1
+ {"version":3,"file":"TypedException.js","sourceRoot":"","sources":["../../src/decorators/TypedException.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AA+C1B;;GAEG;AACH,SAAgB,cAAc,CAC1B,MAA8C,EAC9C,WAAgC,EAChC,IAAyB;IAEzB,OAAO,SAAS,cAAc,CAC1B,MAAkB,EAClB,WAA4B,EAC5B,UAAwC;QAExC,IAAM,KAAK,GAAa,CAAC;YACrB,IAAM,MAAM,GAAyB,OAAO,CAAC,WAAW,CACpD,uBAAuB,EACtB,MAAc,CAAC,WAAW,CAAC,CAC/B,CAAC;YACF,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,MAAM,CAAC;YAExC,IAAM,MAAM,GAAa,EAAE,CAAC;YAC5B,OAAO,CAAC,cAAc,CAClB,uBAAuB,EACvB,MAAM,EACL,MAAc,CAAC,WAAW,CAAC,CAC/B,CAAC;YACF,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,EAAE,CAAC;QACL,KAAK,CAAC,IAAI,CAAC;YACP,MAAM,QAAA;YACN,WAAW,aAAA;YACX,IAAI,EAAE,IAAK;SACd,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC;AACN,CAAC;AAhCD,wCAgCC"}
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TypedExceptionProgrammer = void 0;
7
7
  var typescript_1 = __importDefault(require("typescript"));
8
+ var TypeFactory_1 = require("typia/lib/factories/TypeFactory");
8
9
  var TypedExceptionProgrammer;
9
10
  (function (TypedExceptionProgrammer) {
10
11
  TypedExceptionProgrammer.generate = function (_a) {
@@ -23,7 +24,7 @@ var TypedExceptionProgrammer;
23
24
  if (expression.arguments.length === 3)
24
25
  return expression;
25
26
  // DO TRANSFORM
26
- var name = node.getFullText().trim();
27
+ var name = TypeFactory_1.TypeFactory.getFullName(checker)(type);
27
28
  return typescript_1.default.factory.updateCallExpression(expression, expression.expression, expression.typeArguments, [
28
29
  expression.arguments[0],
29
30
  (_b = expression.arguments[1]) !== null && _b !== void 0 ? _b : typescript_1.default.factory.createIdentifier("undefined"),
@@ -1 +1 @@
1
- {"version":3,"file":"TypedExceptionProgrammer.js","sourceRoot":"","sources":["../../src/programmers/TypedExceptionProgrammer.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA4B;AAI5B,IAAiB,wBAAwB,CA8BxC;AA9BD,WAAiB,wBAAwB;IACxB,iCAAQ,GACjB,UAAC,EAAoC;YAAlC,OAAO,aAAA;QACV,OAAA,UAAC,UAA6B;;YAC1B,mCAAmC;YACnC,IAAI,CAAC,CAAA,MAAA,UAAU,CAAC,aAAa,0CAAG,CAAC,CAAC,CAAA;gBAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;YAEnE,gBAAgB;YAChB,IAAM,IAAI,GAAgB,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YACtD,IAAM,IAAI,GAAY,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;YAExD,IAAI,IAAI,CAAC,eAAe,EAAE;gBAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YAEjE,kCAAkC;YAClC,IAAI,UAAU,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,UAAU,CAAC;YAEzD,eAAe;YACf,IAAM,IAAI,GAAW,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;YAC/C,OAAO,oBAAE,CAAC,OAAO,CAAC,oBAAoB,CAClC,UAAU,EACV,UAAU,CAAC,UAAU,EACrB,UAAU,CAAC,aAAa,EACxB;gBACI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;gBACvB,MAAA,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,mCACnB,oBAAE,CAAC,OAAO,CAAC,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AAS,CAAC,CAAC,CAAC;gBACvB,MAAA,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,mCACnB,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,WAAW,CAAC;gBAC5C,oBAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC;aACvC,CACJ,CAAC;QACN,CAAC;IA1BD,CA0BC,CAAC;AACV,CAAC,EA9BgB,wBAAwB,wCAAxB,wBAAwB,QA8BxC;AAED,IAAM,aAAa,GACf,4EAA4E,CAAC;AACjF,IAAM,mBAAmB,GACrB,yEAAyE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/core",
3
- "version": "2.1.2-dev.20230927",
3
+ "version": "2.1.2-dev.20230927-2",
4
4
  "description": "Super-fast validation decorators of NestJS",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "homepage": "https://nestia.io",
36
36
  "dependencies": {
37
- "@nestia/fetcher": "^2.1.2-dev.20230927",
37
+ "@nestia/fetcher": "^2.1.2-dev.20230927-2",
38
38
  "@nestjs/common": ">= 7.0.1",
39
39
  "@nestjs/core": ">= 7.0.1",
40
40
  "@nestjs/platform-express": ">= 7.0.1",
@@ -44,10 +44,10 @@
44
44
  "raw-body": ">= 2.0.0",
45
45
  "reflect-metadata": ">= 0.1.12",
46
46
  "rxjs": ">= 6.0.0",
47
- "typia": "^5.1.2-dev.20230927"
47
+ "typia": "^5.1.2"
48
48
  },
49
49
  "peerDependencies": {
50
- "@nestia/fetcher": ">=2.1.2-dev.20230927",
50
+ "@nestia/fetcher": ">=2.1.2-dev.20230927-2",
51
51
  "@nestjs/common": ">=7.0.1",
52
52
  "@nestjs/core": ">=7.0.1",
53
53
  "@nestjs/platform-express": ">=7.0.1",
@@ -56,7 +56,7 @@
56
56
  "reflect-metadata": ">=0.1.12",
57
57
  "rxjs": ">=6.0.0",
58
58
  "typescript": ">=4.8.0",
59
- "typia": ">=5.1.2-dev.20230927 <6.0.0"
59
+ "typia": ">=5.1.2 <6.0.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@trivago/prettier-plugin-sort-imports": "^4.0.0",
@@ -60,14 +60,14 @@ export function TypedException<T>(
60
60
  ) {
61
61
  const array: IProps[] = (() => {
62
62
  const oldbie: IProps[] | undefined = Reflect.getMetadata(
63
- `swagger/TypedException`,
63
+ `nestia/TypedException`,
64
64
  (target as any)[propertyKey],
65
65
  );
66
66
  if (oldbie !== undefined) return oldbie;
67
67
 
68
68
  const newbie: IProps[] = [];
69
69
  Reflect.defineMetadata(
70
- `swagger/TypedException`,
70
+ `nestia/TypedException`,
71
71
  newbie,
72
72
  (target as any)[propertyKey],
73
73
  );
@@ -1,5 +1,7 @@
1
1
  import ts from "typescript";
2
2
 
3
+ import { TypeFactory } from "typia/lib/factories/TypeFactory";
4
+
3
5
  import { INestiaTransformProject } from "../options/INestiaTransformProject";
4
6
 
5
7
  export namespace TypedExceptionProgrammer {
@@ -19,7 +21,7 @@ export namespace TypedExceptionProgrammer {
19
21
  if (expression.arguments.length === 3) return expression;
20
22
 
21
23
  // DO TRANSFORM
22
- const name: string = node.getFullText().trim();
24
+ const name: string = TypeFactory.getFullName(checker)(type);
23
25
  return ts.factory.updateCallExpression(
24
26
  expression,
25
27
  expression.expression,