@nestia/sdk 1.6.4-dev.20230817 → 1.6.4-dev.20230817-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.
@@ -4,5 +4,5 @@ import { IRoute } from "../structures/IRoute";
4
4
  import { GenericAnalyzer } from "./GenericAnalyzer";
5
5
  import { ImportAnalyzer } from "./ImportAnalyzer";
6
6
  export declare namespace ExceptionAnalyzer {
7
- const analyze: (checker: ts.TypeChecker) => (genericDict: GenericAnalyzer.Dictionary, importDict: ImportAnalyzer.Dictionary) => (func: IController.IFunction) => (declaration: ts.MethodDeclaration) => Record<number | "2xx" | "3xx" | "4xx" | "5xx", IRoute.IOutput>;
7
+ const analyze: (checker: ts.TypeChecker) => (genericDict: GenericAnalyzer.Dictionary, importDict: ImportAnalyzer.Dictionary) => (func: IController.IFunction) => (declaration: ts.MethodDeclaration) => Record<number | "2XX" | "3XX" | "4XX" | "5XX", IRoute.IOutput>;
8
8
  }
@@ -643,10 +643,10 @@ var SwaggerGenerator;
643
643
  const elements = text.split(" ").map((str) => str.trim());
644
644
  const status = elements[0];
645
645
  if (isNaN(Number(status)) &&
646
- status !== "2xx" &&
647
- status !== "3xx" &&
648
- status !== "4xx" &&
649
- status !== "5xx")
646
+ status !== "2XX" &&
647
+ status !== "3XX" &&
648
+ status !== "4XX" &&
649
+ status !== "5XX")
650
650
  continue;
651
651
  const description = elements.length === 1 ? undefined : elements.slice(1).join(" ");
652
652
  const oldbie = output[status];
@@ -17,7 +17,7 @@ export declare namespace IController {
17
17
  type?: string;
18
18
  contentType: "application/json" | "text/plain";
19
19
  security: Record<string, string[]>[];
20
- exceptions: Record<number | "2xx" | "3xx" | "4xx" | "5xx", IController.IException>;
20
+ exceptions: Record<number | "2XX" | "3XX" | "4XX" | "5XX", IController.IException>;
21
21
  }
22
22
  type IParameter = ICommonParameter | IQueryParameter | IHeadersParameter | IBodyParameter | IPathParameter;
23
23
  interface ICommonParameter {
@@ -63,7 +63,7 @@ export declare namespace IController {
63
63
  }
64
64
  interface IException {
65
65
  type: string;
66
- status: number | "2xx" | "3xx" | "4xx" | "5xx";
66
+ status: number | "2XX" | "3XX" | "4XX" | "5XX";
67
67
  description: string | undefined;
68
68
  }
69
69
  }
@@ -24,7 +24,7 @@ export interface IRoute {
24
24
  source: string;
25
25
  }>;
26
26
  security: Record<string, string[]>[];
27
- exceptions: Record<number | "2xx" | "3xx" | "4xx" | "5xx", IRoute.IOutput>;
27
+ exceptions: Record<number | "2XX" | "3XX" | "4XX" | "5XX", IRoute.IOutput>;
28
28
  }
29
29
  export declare namespace IRoute {
30
30
  type IParameter = IController.IParameter & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/sdk",
3
- "version": "1.6.4-dev.20230817",
3
+ "version": "1.6.4-dev.20230817-2",
4
4
  "description": "Nestia SDK and Swagger generator",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "homepage": "https://nestia.io",
37
37
  "dependencies": {
38
- "@nestia/fetcher": "^1.6.4-dev.20230817",
38
+ "@nestia/fetcher": "^1.6.4-dev.20230817-2",
39
39
  "cli": "^1.0.1",
40
40
  "glob": "^7.2.0",
41
41
  "path-to-regexp": "^6.2.1",
@@ -47,7 +47,7 @@
47
47
  "typia": "^4.2.3"
48
48
  },
49
49
  "peerDependencies": {
50
- "@nestia/fetcher": ">= 1.6.4-dev.20230817",
50
+ "@nestia/fetcher": ">= 1.6.4-dev.20230817-2",
51
51
  "@nestjs/common": ">= 7.0.1",
52
52
  "@nestjs/core": ">= 7.0.1",
53
53
  "reflect-metadata": ">= 0.1.12",
@@ -17,9 +17,9 @@ export namespace ExceptionAnalyzer {
17
17
  (func: IController.IFunction) =>
18
18
  (
19
19
  declaration: ts.MethodDeclaration,
20
- ): Record<number | "2xx" | "3xx" | "4xx" | "5xx", IRoute.IOutput> => {
20
+ ): Record<number | "2XX" | "3XX" | "4XX" | "5XX", IRoute.IOutput> => {
21
21
  const output: Record<
22
- number | "2xx" | "3xx" | "4xx" | "5xx",
22
+ number | "2XX" | "3XX" | "4XX" | "5XX",
23
23
  IRoute.IOutput
24
24
  > = {} as any;
25
25
  for (const decorator of declaration.modifiers ?? [])
@@ -39,7 +39,7 @@ export namespace ExceptionAnalyzer {
39
39
  (func: IController.IFunction) =>
40
40
  (
41
41
  output: Record<
42
- number | "2xx" | "3xx" | "4xx" | "5xx",
42
+ number | "2XX" | "3XX" | "4XX" | "5XX",
43
43
  IRoute.IOutput
44
44
  >,
45
45
  ) =>
@@ -134,13 +134,13 @@ export namespace ReflectAnalyzer {
134
134
 
135
135
  function _Get_exceptions(
136
136
  value: any,
137
- ): Record<number | "2xx" | "3xx" | "4xx" | "5xx", IController.IException> {
137
+ ): Record<number | "2XX" | "3XX" | "4XX" | "5XX", IController.IException> {
138
138
  const entire: IController.IException[] | undefined =
139
139
  Reflect.getMetadata("swagger/TypedException", value);
140
140
  return Object.fromEntries(
141
141
  (entire ?? []).map((exp) => [exp.status, exp]),
142
142
  ) as Record<
143
- number | "2xx" | "3xx" | "4xx" | "5xx",
143
+ number | "2XX" | "3XX" | "4XX" | "5XX",
144
144
  IController.IException
145
145
  >;
146
146
  }
@@ -600,10 +600,10 @@ export namespace SwaggerGenerator {
600
600
  const status: string = elements[0];
601
601
  if (
602
602
  isNaN(Number(status)) &&
603
- status !== "2xx" &&
604
- status !== "3xx" &&
605
- status !== "4xx" &&
606
- status !== "5xx"
603
+ status !== "2XX" &&
604
+ status !== "3XX" &&
605
+ status !== "4XX" &&
606
+ status !== "5XX"
607
607
  )
608
608
  continue;
609
609
 
@@ -20,7 +20,7 @@ export namespace IController {
20
20
  contentType: "application/json" | "text/plain";
21
21
  security: Record<string, string[]>[];
22
22
  exceptions: Record<
23
- number | "2xx" | "3xx" | "4xx" | "5xx",
23
+ number | "2XX" | "3XX" | "4XX" | "5XX",
24
24
  IController.IException
25
25
  >;
26
26
  }
@@ -75,7 +75,7 @@ export namespace IController {
75
75
 
76
76
  export interface IException {
77
77
  type: string;
78
- status: number | "2xx" | "3xx" | "4xx" | "5xx";
78
+ status: number | "2XX" | "3XX" | "4XX" | "5XX";
79
79
  description: string | undefined;
80
80
  }
81
81
  }
@@ -24,7 +24,7 @@ export interface IRoute {
24
24
  | { type: "assigner"; source: string }
25
25
  >;
26
26
  security: Record<string, string[]>[];
27
- exceptions: Record<number | "2xx" | "3xx" | "4xx" | "5xx", IRoute.IOutput>;
27
+ exceptions: Record<number | "2XX" | "3XX" | "4XX" | "5XX", IRoute.IOutput>;
28
28
  }
29
29
 
30
30
  export namespace IRoute {