@nestia/migrate 12.0.0-rc.2 → 12.0.0-rc.3
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/LICENSE +21 -21
- package/lib/_virtual/_tstl.mjs +2 -2
- package/lib/_virtual/index.mjs +2 -2
- package/lib/_virtual/index2.mjs +2 -2
- package/lib/_virtual/index3.mjs +2 -2
- package/lib/archivers/NestiaMigrateFileArchiver2.mjs +2 -2
- package/lib/archivers/NestiaMigrateFileArchiver2.mjs.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +47 -47
- package/lib/bundles/NEST_TEMPLATE.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE2.mjs +47 -47
- package/lib/bundles/NEST_TEMPLATE2.mjs.map +1 -1
- package/lib/bundles/SDK_TEMPLATE.js +20 -20
- package/lib/bundles/SDK_TEMPLATE.js.map +1 -1
- package/lib/bundles/SDK_TEMPLATE2.mjs +20 -20
- package/lib/bundles/SDK_TEMPLATE2.mjs.map +1 -1
- package/lib/index2.mjs +1 -1
- package/lib/module2.mjs +2 -2
- package/lib/programmers/NestiaMigrateApiProgrammer2.mjs +4 -4
- package/lib/programmers/NestiaMigrateApiProgrammer2.mjs.map +1 -1
- package/lib/programmers/index2.mjs +1 -1
- package/lib/structures/index2.mjs +1 -1
- package/package.json +6 -6
- package/src/NestiaMigrateApplication.ts +196 -196
- package/src/analyzers/NestiaMigrateControllerAnalyzer.ts +51 -51
- package/src/archivers/NestiaMigrateFileArchiver.ts +28 -28
- package/src/bundles/NEST_TEMPLATE.ts +47 -47
- package/src/bundles/SDK_TEMPLATE.ts +20 -20
- package/src/executable/NestiaMigrateCommander.ts +115 -115
- package/src/executable/NestiaMigrateInquirer.ts +106 -106
- package/src/executable/bundle.js +323 -349
- package/src/executable/migrate.ts +7 -7
- package/src/factories/ExpressionFactory.ts +23 -23
- package/src/factories/FormatCheatSheet.ts +71 -71
- package/src/factories/IdentifierFactory.ts +84 -84
- package/src/factories/LiteralFactory.ts +54 -54
- package/src/factories/StatementFactory.ts +56 -56
- package/src/factories/TypeFactory.ts +27 -27
- package/src/factories/TypeLiteralFactory.ts +62 -62
- package/src/index.ts +4 -4
- package/src/internal/ts.ts +75 -75
- package/src/module.ts +6 -6
- package/src/programmers/NestiaMigrateApiFileProgrammer.ts +55 -55
- package/src/programmers/NestiaMigrateApiFunctionProgrammer.ts +358 -358
- package/src/programmers/NestiaMigrateApiNamespaceProgrammer.ts +511 -511
- package/src/programmers/NestiaMigrateApiProgrammer.ts +108 -108
- package/src/programmers/NestiaMigrateApiSimulationProgrammer.ts +309 -309
- package/src/programmers/NestiaMigrateApiStartProgrammer.ts +198 -198
- package/src/programmers/NestiaMigrateDtoProgrammer.ts +117 -117
- package/src/programmers/NestiaMigrateE2eFileProgrammer.ts +155 -155
- package/src/programmers/NestiaMigrateE2eProgrammer.ts +48 -48
- package/src/programmers/NestiaMigrateImportProgrammer.ts +119 -119
- package/src/programmers/NestiaMigrateNestControllerProgrammer.ts +70 -70
- package/src/programmers/NestiaMigrateNestMethodProgrammer.ts +402 -402
- package/src/programmers/NestiaMigrateNestModuleProgrammer.ts +64 -64
- package/src/programmers/NestiaMigrateNestProgrammer.ts +89 -89
- package/src/programmers/NestiaMigrateSchemaProgrammer.ts +475 -475
- package/src/programmers/index.ts +15 -15
- package/src/structures/INestiaMigrateConfig.ts +19 -19
- package/src/structures/INestiaMigrateContext.ts +9 -9
- package/src/structures/INestiaMigrateController.ts +8 -8
- package/src/structures/INestiaMigrateFile.ts +5 -5
- package/src/structures/index.ts +4 -4
- package/src/utils/FilePrinter.ts +44 -44
- package/src/utils/MapUtil.ts +13 -13
- package/src/utils/StringUtil.ts +109 -109
- package/README.md +0 -93
package/src/programmers/index.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from "./NestiaMigrateApiFileProgrammer";
|
|
2
|
-
export * from "./NestiaMigrateApiFunctionProgrammer";
|
|
3
|
-
export * from "./NestiaMigrateApiNamespaceProgrammer";
|
|
4
|
-
export * from "./NestiaMigrateApiProgrammer";
|
|
5
|
-
export * from "./NestiaMigrateApiSimulationProgrammer";
|
|
6
|
-
export * from "./NestiaMigrateApiStartProgrammer";
|
|
7
|
-
export * from "./NestiaMigrateDtoProgrammer";
|
|
8
|
-
export * from "./NestiaMigrateE2eFileProgrammer";
|
|
9
|
-
export * from "./NestiaMigrateE2eProgrammer";
|
|
10
|
-
export * from "./NestiaMigrateImportProgrammer";
|
|
11
|
-
export * from "./NestiaMigrateNestControllerProgrammer";
|
|
12
|
-
export * from "./NestiaMigrateNestMethodProgrammer";
|
|
13
|
-
export * from "./NestiaMigrateNestModuleProgrammer";
|
|
14
|
-
export * from "./NestiaMigrateNestProgrammer";
|
|
15
|
-
export * from "./NestiaMigrateSchemaProgrammer";
|
|
1
|
+
export * from "./NestiaMigrateApiFileProgrammer";
|
|
2
|
+
export * from "./NestiaMigrateApiFunctionProgrammer";
|
|
3
|
+
export * from "./NestiaMigrateApiNamespaceProgrammer";
|
|
4
|
+
export * from "./NestiaMigrateApiProgrammer";
|
|
5
|
+
export * from "./NestiaMigrateApiSimulationProgrammer";
|
|
6
|
+
export * from "./NestiaMigrateApiStartProgrammer";
|
|
7
|
+
export * from "./NestiaMigrateDtoProgrammer";
|
|
8
|
+
export * from "./NestiaMigrateE2eFileProgrammer";
|
|
9
|
+
export * from "./NestiaMigrateE2eProgrammer";
|
|
10
|
+
export * from "./NestiaMigrateImportProgrammer";
|
|
11
|
+
export * from "./NestiaMigrateNestControllerProgrammer";
|
|
12
|
+
export * from "./NestiaMigrateNestMethodProgrammer";
|
|
13
|
+
export * from "./NestiaMigrateNestModuleProgrammer";
|
|
14
|
+
export * from "./NestiaMigrateNestProgrammer";
|
|
15
|
+
export * from "./NestiaMigrateSchemaProgrammer";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import ts from "../internal/ts";
|
|
2
|
-
|
|
3
|
-
import { NestiaMigrateNestMethodProgrammer } from "../programmers/NestiaMigrateNestMethodProgrammer";
|
|
4
|
-
|
|
5
|
-
export interface INestiaMigrateConfig {
|
|
6
|
-
simulate: boolean;
|
|
7
|
-
e2e: boolean;
|
|
8
|
-
package?: string;
|
|
9
|
-
keyword?: boolean;
|
|
10
|
-
author?: {
|
|
11
|
-
tag: string;
|
|
12
|
-
value: string;
|
|
13
|
-
};
|
|
14
|
-
programmer?: {
|
|
15
|
-
controllerMethod?: (
|
|
16
|
-
ctx: NestiaMigrateNestMethodProgrammer.IContext,
|
|
17
|
-
) => ts.MethodDeclaration;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
1
|
+
import ts from "../internal/ts";
|
|
2
|
+
|
|
3
|
+
import { NestiaMigrateNestMethodProgrammer } from "../programmers/NestiaMigrateNestMethodProgrammer";
|
|
4
|
+
|
|
5
|
+
export interface INestiaMigrateConfig {
|
|
6
|
+
simulate: boolean;
|
|
7
|
+
e2e: boolean;
|
|
8
|
+
package?: string;
|
|
9
|
+
keyword?: boolean;
|
|
10
|
+
author?: {
|
|
11
|
+
tag: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
|
+
programmer?: {
|
|
15
|
+
controllerMethod?: (
|
|
16
|
+
ctx: NestiaMigrateNestMethodProgrammer.IContext,
|
|
17
|
+
) => ts.MethodDeclaration;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IHttpMigrateApplication } from "@typia/interface";
|
|
2
|
-
|
|
3
|
-
import { INestiaMigrateConfig } from "./INestiaMigrateConfig";
|
|
4
|
-
|
|
5
|
-
export interface INestiaMigrateContext {
|
|
6
|
-
mode: "nest" | "sdk";
|
|
7
|
-
application: IHttpMigrateApplication;
|
|
8
|
-
config: INestiaMigrateConfig;
|
|
9
|
-
}
|
|
1
|
+
import { IHttpMigrateApplication } from "@typia/interface";
|
|
2
|
+
|
|
3
|
+
import { INestiaMigrateConfig } from "./INestiaMigrateConfig";
|
|
4
|
+
|
|
5
|
+
export interface INestiaMigrateContext {
|
|
6
|
+
mode: "nest" | "sdk";
|
|
7
|
+
application: IHttpMigrateApplication;
|
|
8
|
+
config: INestiaMigrateConfig;
|
|
9
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IHttpMigrateRoute } from "@typia/interface";
|
|
2
|
-
|
|
3
|
-
export interface INestiaMigrateController {
|
|
4
|
-
name: string;
|
|
5
|
-
path: string;
|
|
6
|
-
location: string;
|
|
7
|
-
routes: IHttpMigrateRoute[];
|
|
8
|
-
}
|
|
1
|
+
import { IHttpMigrateRoute } from "@typia/interface";
|
|
2
|
+
|
|
3
|
+
export interface INestiaMigrateController {
|
|
4
|
+
name: string;
|
|
5
|
+
path: string;
|
|
6
|
+
location: string;
|
|
7
|
+
routes: IHttpMigrateRoute[];
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface INestiaMigrateFile {
|
|
2
|
-
location: string;
|
|
3
|
-
file: string;
|
|
4
|
-
content: string;
|
|
5
|
-
}
|
|
1
|
+
export interface INestiaMigrateFile {
|
|
2
|
+
location: string;
|
|
3
|
+
file: string;
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
package/src/structures/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./INestiaMigrateConfig";
|
|
2
|
-
export * from "./INestiaMigrateContext";
|
|
3
|
-
export * from "./INestiaMigrateController";
|
|
4
|
-
export * from "./INestiaMigrateFile";
|
|
1
|
+
export * from "./INestiaMigrateConfig";
|
|
2
|
+
export * from "./INestiaMigrateContext";
|
|
3
|
+
export * from "./INestiaMigrateController";
|
|
4
|
+
export * from "./INestiaMigrateFile";
|
package/src/utils/FilePrinter.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SyntaxKind,
|
|
3
|
-
TsPrinter,
|
|
4
|
-
addSyntheticLeadingComment,
|
|
5
|
-
factory,
|
|
6
|
-
} from "@ttsc/factory";
|
|
7
|
-
|
|
8
|
-
import ts from "../internal/ts";
|
|
9
|
-
|
|
10
|
-
export namespace FilePrinter {
|
|
11
|
-
export const description = <Node extends ts.Node>(
|
|
12
|
-
node: Node,
|
|
13
|
-
comment: string,
|
|
14
|
-
): Node => {
|
|
15
|
-
if (comment.length === 0) return node;
|
|
16
|
-
addSyntheticLeadingComment(
|
|
17
|
-
node,
|
|
18
|
-
SyntaxKind.MultiLineCommentTrivia,
|
|
19
|
-
[
|
|
20
|
-
"*",
|
|
21
|
-
...comment
|
|
22
|
-
.split("\r\n")
|
|
23
|
-
.join("\n")
|
|
24
|
-
.split("\n")
|
|
25
|
-
.map(
|
|
26
|
-
(str) =>
|
|
27
|
-
` * ${str.split("*/").join("*\\\\/").split("*\\/").join("*\\\\/")}`,
|
|
28
|
-
),
|
|
29
|
-
"",
|
|
30
|
-
].join("\n"),
|
|
31
|
-
true,
|
|
32
|
-
);
|
|
33
|
-
return node;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const newLine = () =>
|
|
37
|
-
factory.createExpressionStatement(factory.createIdentifier("\n"));
|
|
38
|
-
|
|
39
|
-
export const write = (props: {
|
|
40
|
-
statements: ts.Statement[];
|
|
41
|
-
top?: string;
|
|
42
|
-
}): string =>
|
|
43
|
-
(props.top ?? "") + new TsPrinter().printFile(undefined, props.statements);
|
|
44
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
SyntaxKind,
|
|
3
|
+
TsPrinter,
|
|
4
|
+
addSyntheticLeadingComment,
|
|
5
|
+
factory,
|
|
6
|
+
} from "@ttsc/factory";
|
|
7
|
+
|
|
8
|
+
import ts from "../internal/ts";
|
|
9
|
+
|
|
10
|
+
export namespace FilePrinter {
|
|
11
|
+
export const description = <Node extends ts.Node>(
|
|
12
|
+
node: Node,
|
|
13
|
+
comment: string,
|
|
14
|
+
): Node => {
|
|
15
|
+
if (comment.length === 0) return node;
|
|
16
|
+
addSyntheticLeadingComment(
|
|
17
|
+
node,
|
|
18
|
+
SyntaxKind.MultiLineCommentTrivia,
|
|
19
|
+
[
|
|
20
|
+
"*",
|
|
21
|
+
...comment
|
|
22
|
+
.split("\r\n")
|
|
23
|
+
.join("\n")
|
|
24
|
+
.split("\n")
|
|
25
|
+
.map(
|
|
26
|
+
(str) =>
|
|
27
|
+
` * ${str.split("*/").join("*\\\\/").split("*\\/").join("*\\\\/")}`,
|
|
28
|
+
),
|
|
29
|
+
"",
|
|
30
|
+
].join("\n"),
|
|
31
|
+
true,
|
|
32
|
+
);
|
|
33
|
+
return node;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const newLine = () =>
|
|
37
|
+
factory.createExpressionStatement(factory.createIdentifier("\n"));
|
|
38
|
+
|
|
39
|
+
export const write = (props: {
|
|
40
|
+
statements: ts.Statement[];
|
|
41
|
+
top?: string;
|
|
42
|
+
}): string =>
|
|
43
|
+
(props.top ?? "") + new TsPrinter().printFile(undefined, props.statements);
|
|
44
|
+
}
|
package/src/utils/MapUtil.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export namespace MapUtil {
|
|
2
|
-
export const take =
|
|
3
|
-
<Key, T>(dict: Map<Key, T>) =>
|
|
4
|
-
(key: Key) =>
|
|
5
|
-
(generator: () => T): T => {
|
|
6
|
-
const oldbie: T | undefined = dict.get(key);
|
|
7
|
-
if (oldbie) return oldbie;
|
|
8
|
-
|
|
9
|
-
const value: T = generator();
|
|
10
|
-
dict.set(key, value);
|
|
11
|
-
return value;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
1
|
+
export namespace MapUtil {
|
|
2
|
+
export const take =
|
|
3
|
+
<Key, T>(dict: Map<Key, T>) =>
|
|
4
|
+
(key: Key) =>
|
|
5
|
+
(generator: () => T): T => {
|
|
6
|
+
const oldbie: T | undefined = dict.get(key);
|
|
7
|
+
if (oldbie) return oldbie;
|
|
8
|
+
|
|
9
|
+
const value: T = generator();
|
|
10
|
+
dict.set(key, value);
|
|
11
|
+
return value;
|
|
12
|
+
};
|
|
13
|
+
}
|
package/src/utils/StringUtil.ts
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
export namespace StringUtil {
|
|
2
|
-
export const capitalize = (str: string) =>
|
|
3
|
-
str[0]!.toUpperCase() + str.slice(1).toLowerCase();
|
|
4
|
-
|
|
5
|
-
export const splitWithNormalization = (path: string) =>
|
|
6
|
-
path
|
|
7
|
-
.split("/")
|
|
8
|
-
.map((str) => normalize(str.trim()))
|
|
9
|
-
.filter((str) => !!str.length);
|
|
10
|
-
|
|
11
|
-
export const escapeNonVariable = (str: string): string => {
|
|
12
|
-
str = escape(str);
|
|
13
|
-
for (const [before, after] of VARIABLE_REPLACERS)
|
|
14
|
-
str = str.split(before).join(after);
|
|
15
|
-
for (let i: number = 0; i <= 9; ++i)
|
|
16
|
-
if (str[0] === i.toString()) {
|
|
17
|
-
str = "_" + str;
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
if (str === "") return "_empty_";
|
|
21
|
-
return str;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const escape = (str: string): string => {
|
|
26
|
-
str = str.trim();
|
|
27
|
-
if (RESERVED.has(str)) return `_${str}`;
|
|
28
|
-
else if (str.length !== 0 && "0" <= str[0]! && str[0]! <= "9")
|
|
29
|
-
str = `_${str}`;
|
|
30
|
-
return str;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const normalize = (str: string): string =>
|
|
34
|
-
escape(str.split(".").join("_").split("-").join("_"));
|
|
35
|
-
|
|
36
|
-
const RESERVED: Set<string> = new Set([
|
|
37
|
-
"break",
|
|
38
|
-
"case",
|
|
39
|
-
"catch",
|
|
40
|
-
"class",
|
|
41
|
-
"const",
|
|
42
|
-
"continue",
|
|
43
|
-
"debugger",
|
|
44
|
-
"default",
|
|
45
|
-
"delete",
|
|
46
|
-
"do",
|
|
47
|
-
"else",
|
|
48
|
-
"enum",
|
|
49
|
-
"export",
|
|
50
|
-
"extends",
|
|
51
|
-
"false",
|
|
52
|
-
"finally",
|
|
53
|
-
"for",
|
|
54
|
-
"function",
|
|
55
|
-
"if",
|
|
56
|
-
"import",
|
|
57
|
-
"in",
|
|
58
|
-
"instanceof",
|
|
59
|
-
"module",
|
|
60
|
-
"new",
|
|
61
|
-
"null",
|
|
62
|
-
"package",
|
|
63
|
-
"public",
|
|
64
|
-
"private",
|
|
65
|
-
"protected",
|
|
66
|
-
"return",
|
|
67
|
-
"super",
|
|
68
|
-
"switch",
|
|
69
|
-
"this",
|
|
70
|
-
"throw",
|
|
71
|
-
"true",
|
|
72
|
-
"try",
|
|
73
|
-
"typeof",
|
|
74
|
-
"var",
|
|
75
|
-
"void",
|
|
76
|
-
"while",
|
|
77
|
-
"with",
|
|
78
|
-
]);
|
|
79
|
-
|
|
80
|
-
const VARIABLE_REPLACERS: [string, string][] = [
|
|
81
|
-
["`", "_backquote_"],
|
|
82
|
-
["!", "_exclamation_"],
|
|
83
|
-
["@", "_at_"],
|
|
84
|
-
["#", "_hash_"],
|
|
85
|
-
["$", "_dollar_"],
|
|
86
|
-
["%", "_percent_"],
|
|
87
|
-
["^", "_caret_"],
|
|
88
|
-
["&", "_and_"],
|
|
89
|
-
["*", "_star_"],
|
|
90
|
-
["(", "_lparen_"],
|
|
91
|
-
[")", "_rparen_"],
|
|
92
|
-
["-", "_"],
|
|
93
|
-
["+", "_plus_"],
|
|
94
|
-
["|", "_or_"],
|
|
95
|
-
["{", "_blt_"],
|
|
96
|
-
["}", "_bgt_"],
|
|
97
|
-
["<", "_lt_"],
|
|
98
|
-
[">", "_gt_"],
|
|
99
|
-
["[", "_alt_"],
|
|
100
|
-
["]", "_agt_"],
|
|
101
|
-
[",", "_comma_"],
|
|
102
|
-
["'", "_singlequote_"],
|
|
103
|
-
['"', "_doublequote_"],
|
|
104
|
-
[" ", "_space_"],
|
|
105
|
-
["?", "_question_"],
|
|
106
|
-
[":", "_colon_"],
|
|
107
|
-
[";", "_semicolon_"],
|
|
108
|
-
["...", "_rest_"],
|
|
109
|
-
];
|
|
1
|
+
export namespace StringUtil {
|
|
2
|
+
export const capitalize = (str: string) =>
|
|
3
|
+
str[0]!.toUpperCase() + str.slice(1).toLowerCase();
|
|
4
|
+
|
|
5
|
+
export const splitWithNormalization = (path: string) =>
|
|
6
|
+
path
|
|
7
|
+
.split("/")
|
|
8
|
+
.map((str) => normalize(str.trim()))
|
|
9
|
+
.filter((str) => !!str.length);
|
|
10
|
+
|
|
11
|
+
export const escapeNonVariable = (str: string): string => {
|
|
12
|
+
str = escape(str);
|
|
13
|
+
for (const [before, after] of VARIABLE_REPLACERS)
|
|
14
|
+
str = str.split(before).join(after);
|
|
15
|
+
for (let i: number = 0; i <= 9; ++i)
|
|
16
|
+
if (str[0] === i.toString()) {
|
|
17
|
+
str = "_" + str;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
if (str === "") return "_empty_";
|
|
21
|
+
return str;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const escape = (str: string): string => {
|
|
26
|
+
str = str.trim();
|
|
27
|
+
if (RESERVED.has(str)) return `_${str}`;
|
|
28
|
+
else if (str.length !== 0 && "0" <= str[0]! && str[0]! <= "9")
|
|
29
|
+
str = `_${str}`;
|
|
30
|
+
return str;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const normalize = (str: string): string =>
|
|
34
|
+
escape(str.split(".").join("_").split("-").join("_"));
|
|
35
|
+
|
|
36
|
+
const RESERVED: Set<string> = new Set([
|
|
37
|
+
"break",
|
|
38
|
+
"case",
|
|
39
|
+
"catch",
|
|
40
|
+
"class",
|
|
41
|
+
"const",
|
|
42
|
+
"continue",
|
|
43
|
+
"debugger",
|
|
44
|
+
"default",
|
|
45
|
+
"delete",
|
|
46
|
+
"do",
|
|
47
|
+
"else",
|
|
48
|
+
"enum",
|
|
49
|
+
"export",
|
|
50
|
+
"extends",
|
|
51
|
+
"false",
|
|
52
|
+
"finally",
|
|
53
|
+
"for",
|
|
54
|
+
"function",
|
|
55
|
+
"if",
|
|
56
|
+
"import",
|
|
57
|
+
"in",
|
|
58
|
+
"instanceof",
|
|
59
|
+
"module",
|
|
60
|
+
"new",
|
|
61
|
+
"null",
|
|
62
|
+
"package",
|
|
63
|
+
"public",
|
|
64
|
+
"private",
|
|
65
|
+
"protected",
|
|
66
|
+
"return",
|
|
67
|
+
"super",
|
|
68
|
+
"switch",
|
|
69
|
+
"this",
|
|
70
|
+
"throw",
|
|
71
|
+
"true",
|
|
72
|
+
"try",
|
|
73
|
+
"typeof",
|
|
74
|
+
"var",
|
|
75
|
+
"void",
|
|
76
|
+
"while",
|
|
77
|
+
"with",
|
|
78
|
+
]);
|
|
79
|
+
|
|
80
|
+
const VARIABLE_REPLACERS: [string, string][] = [
|
|
81
|
+
["`", "_backquote_"],
|
|
82
|
+
["!", "_exclamation_"],
|
|
83
|
+
["@", "_at_"],
|
|
84
|
+
["#", "_hash_"],
|
|
85
|
+
["$", "_dollar_"],
|
|
86
|
+
["%", "_percent_"],
|
|
87
|
+
["^", "_caret_"],
|
|
88
|
+
["&", "_and_"],
|
|
89
|
+
["*", "_star_"],
|
|
90
|
+
["(", "_lparen_"],
|
|
91
|
+
[")", "_rparen_"],
|
|
92
|
+
["-", "_"],
|
|
93
|
+
["+", "_plus_"],
|
|
94
|
+
["|", "_or_"],
|
|
95
|
+
["{", "_blt_"],
|
|
96
|
+
["}", "_bgt_"],
|
|
97
|
+
["<", "_lt_"],
|
|
98
|
+
[">", "_gt_"],
|
|
99
|
+
["[", "_alt_"],
|
|
100
|
+
["]", "_agt_"],
|
|
101
|
+
[",", "_comma_"],
|
|
102
|
+
["'", "_singlequote_"],
|
|
103
|
+
['"', "_doublequote_"],
|
|
104
|
+
[" ", "_space_"],
|
|
105
|
+
["?", "_question_"],
|
|
106
|
+
[":", "_colon_"],
|
|
107
|
+
[";", "_semicolon_"],
|
|
108
|
+
["...", "_rest_"],
|
|
109
|
+
];
|
package/README.md
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# Nestia
|
|
2
|
-

|
|
3
|
-
|
|
4
|
-
[](https://github.com/samchon/nestia/blob/master/LICENSE)
|
|
5
|
-
[](https://www.npmjs.com/package/@nestia/fetcher)
|
|
6
|
-
[](https://www.npmjs.com/package/@nestia/fetcher)
|
|
7
|
-
[](https://github.com/samchon/nestia/actions?query=workflow%3Atest)
|
|
8
|
-
[](https://nestia.io/docs/)
|
|
9
|
-
[](https://gurubase.io/g/nestia)
|
|
10
|
-
[](https://discord.gg/E94XhzrUCZ)
|
|
11
|
-
|
|
12
|
-
Nestia is a set of helper libraries for NestJS, supporting below features:
|
|
13
|
-
|
|
14
|
-
- `@nestia/core`:
|
|
15
|
-
- Super-fast/easy decorators
|
|
16
|
-
- Advanced WebSocket routes
|
|
17
|
-
- `@nestia/sdk`:
|
|
18
|
-
- Swagger generator, more evolved than ever
|
|
19
|
-
- SDK library generator for clients
|
|
20
|
-
- Mockup Simulator for client applications
|
|
21
|
-
- Automatic E2E test functions generator
|
|
22
|
-
- `@nestia/e2e`: Test program utilizing e2e test functions
|
|
23
|
-
- `@nestia/benchmark`: Benchmark program using e2e test functions
|
|
24
|
-
- `@nestia/editor`: Swagger-UI with Online TypeScript Editor
|
|
25
|
-
- [`@agentica`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
|
|
26
|
-
- [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
|
|
27
|
-
- `nestia`: Just CLI (command line interface) tool
|
|
28
|
-
|
|
29
|
-
> [!NOTE]
|
|
30
|
-
>
|
|
31
|
-
> - **Only one line** required, with pure TypeScript type
|
|
32
|
-
> - Enhance performance **30x** up
|
|
33
|
-
> - Runtime validator is **20,000x faster** than `class-validator`
|
|
34
|
-
> - JSON serialization is **200x faster** than `class-transformer`
|
|
35
|
-
> - Software Development Kit
|
|
36
|
-
> - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
|
|
37
|
-
> - Mockup simulator means embedded backend simulator in the SDK
|
|
38
|
-
> - similar with [msw](https://mswjs.io/), but fully automated
|
|
39
|
-
|
|
40
|
-

|
|
41
|
-
|
|
42
|
-
> Left is NestJS server code, and right is client (frontend) code utilizing SDK
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Sponsors and Backers
|
|
48
|
-
Thanks for your support.
|
|
49
|
-
|
|
50
|
-
Your donation would encourage `nestia` development.
|
|
51
|
-
|
|
52
|
-
[](https://opencollective.com/nestia)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## Guide Documents
|
|
58
|
-
Check out the document in the [website](https://nestia.io/docs/):
|
|
59
|
-
|
|
60
|
-
### 🏠 Home
|
|
61
|
-
- [Introduction](https://nestia.io/docs/)
|
|
62
|
-
- [Setup](https://nestia.io/docs/setup/)
|
|
63
|
-
- [Pure TypeScript](https://nestia.io/docs/pure)
|
|
64
|
-
|
|
65
|
-
### 📖 Features
|
|
66
|
-
- Core Library
|
|
67
|
-
- [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
|
|
68
|
-
- [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
|
|
69
|
-
- [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
|
|
70
|
-
- [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
|
|
71
|
-
- [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
|
|
72
|
-
- [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
|
|
73
|
-
- [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
|
|
74
|
-
- [`@TypedException`](https://nestia.io/docs/core/TypedException/)
|
|
75
|
-
- Software Development Kit
|
|
76
|
-
- [SDK Builder](https://nestia.io/docs/sdk/)
|
|
77
|
-
- [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
|
|
78
|
-
- [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
|
|
79
|
-
- [Distribution](https://nestia.io/docs/sdk/distribute/)
|
|
80
|
-
- Swagger Document
|
|
81
|
-
- [Swagger Builder](https://nestia.io/docs/swagger/)
|
|
82
|
-
- [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
|
|
83
|
-
- [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
|
|
84
|
-
- [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
|
|
85
|
-
- E2E Testing
|
|
86
|
-
- [Why E2E Test?](https://nestia.io/docs/e2e/why/)
|
|
87
|
-
- [Test Program Development](https://nestia.io/docs/e2e/development/)
|
|
88
|
-
- [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
|
|
89
|
-
|
|
90
|
-
### 🔗 Appendix
|
|
91
|
-
- [API Documents](https://nestia.io/api)
|
|
92
|
-
- [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
|
|
93
|
-
- [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
|