typia 3.6.2 → 3.6.4
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/README.md +2 -1
- package/lib/factories/internal/metadata/emplace_metadata_object.js +8 -7
- package/lib/factories/internal/metadata/emplace_metadata_object.js.map +1 -1
- package/lib/functional/$is_uuid.js +1 -1
- package/lib/functional/$is_uuid.js.map +1 -1
- package/lib/module.d.ts +2 -2
- package/package.json +1 -1
- package/src/executable/setup/ArgumentParser.ts +91 -91
- package/src/executable/setup/FileRetriever.ts +33 -33
- package/src/executable/setup/PackageManager.ts +92 -92
- package/src/executable/setup/PluginConfigurator.ts +99 -99
- package/src/factories/internal/metadata/emplace_metadata_object.ts +142 -140
- package/src/functional/$is_uuid.ts +1 -2
- package/src/module.ts +1946 -1946
- package/src/programmers/AssertCloneProgrammer.ts +70 -70
- package/src/programmers/AssertParseProgrammer.ts +65 -65
- package/src/programmers/AssertProgrammer.ts +232 -232
- package/src/programmers/AssertPruneProgrammer.ts +67 -67
- package/src/programmers/AssertStringifyProgrammer.ts +71 -71
- package/src/programmers/CheckerProgrammer.ts +893 -893
- package/src/programmers/CloneProgrammer.ts +386 -386
- package/src/programmers/FeatureProgrammer.ts +505 -505
- package/src/programmers/IsCloneProgrammer.ts +80 -80
- package/src/programmers/IsParseProgrammer.ts +74 -74
- package/src/programmers/IsPruneProgrammer.ts +75 -75
- package/src/programmers/IsStringifyProgrammer.ts +81 -81
- package/src/programmers/PruneProgrammer.ts +341 -341
- package/src/programmers/RandomProgrammer.ts +391 -391
- package/src/programmers/StringifyProgrammer.ts +795 -795
- package/src/programmers/ValidateCloneProgrammer.ts +90 -90
- package/src/programmers/ValidateParseProgrammer.ts +69 -69
- package/src/programmers/ValidateProgrammer.ts +266 -266
- package/src/programmers/ValidatePruneProgrammer.ts +83 -83
- package/src/programmers/ValidateStringifyProgrammer.ts +89 -89
- package/src/transformers/features/miscellaneous/AssertCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/AssertPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateAssertCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateAssertPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateIsCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateIsPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreatePruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateRandomGenerator.ts +42 -42
- package/src/transformers/features/miscellaneous/CreateValidateCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateValidatePruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/IsCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/IsPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/PruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/RandomTransformer.ts +48 -48
- package/src/transformers/features/miscellaneous/ValidateCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/ValidatePruneTransformer.ts +9 -9
- package/src/transformers/features/parsers/AssertParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/CreateAssertParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/CreateIsParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/CreateValidateParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/IsParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/ValidateParseTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/AssertStringifyTransformer.ts +10 -10
- package/src/transformers/features/stringifiers/CreateAssertStringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/CreateIsStringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/CreateStringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/CreateValidateStringifyProgrammer.ts +11 -11
- package/src/transformers/features/stringifiers/IsStringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/StringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/ValidateStringifyTransformer.ts +10 -10
- package/src/transformers/features/validators/AssertTransformer.ts +11 -11
- package/src/transformers/features/validators/CreateAssertTransformer.ts +12 -12
- package/src/transformers/features/validators/CreateIsTransformer.ts +10 -10
- package/src/transformers/features/validators/CreateValidateTransformer.ts +12 -12
- package/src/transformers/features/validators/IsTransformer.ts +10 -10
- package/src/transformers/features/validators/ValidateTransformer.ts +11 -11
- package/src/transformers/internal/GenericTransformer.ts +99 -99
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
|
|
3
|
-
import { IdentifierFactory } from "../factories/IdentifierFactory";
|
|
4
|
-
import { StatementFactory } from "../factories/StatementFactory";
|
|
5
|
-
import { TypeFactory } from "../factories/TypeFactory";
|
|
6
|
-
|
|
7
|
-
import { IProject } from "../transformers/IProject";
|
|
8
|
-
|
|
9
|
-
import { CloneProgrammer } from "./CloneProgrammer";
|
|
10
|
-
import { ValidateProgrammer } from "./ValidateProgrammer";
|
|
11
|
-
|
|
12
|
-
export namespace ValidateCloneProgrammer {
|
|
13
|
-
export const generate =
|
|
14
|
-
(project: IProject, modulo: ts.LeftHandSideExpression) =>
|
|
15
|
-
(type: ts.Type, name?: string) =>
|
|
16
|
-
ts.factory.createArrowFunction(
|
|
17
|
-
undefined,
|
|
18
|
-
undefined,
|
|
19
|
-
[
|
|
20
|
-
IdentifierFactory.parameter(
|
|
21
|
-
"input",
|
|
22
|
-
TypeFactory.keyword("any"),
|
|
23
|
-
),
|
|
24
|
-
],
|
|
25
|
-
ts.factory.createTypeReferenceNode(
|
|
26
|
-
`typia.IValidation<typia.Primitive<${
|
|
27
|
-
name ?? TypeFactory.getFullName(project.checker, type)
|
|
28
|
-
}>>`,
|
|
29
|
-
),
|
|
30
|
-
undefined,
|
|
31
|
-
ts.factory.createBlock([
|
|
32
|
-
StatementFactory.constant(
|
|
33
|
-
"validate",
|
|
34
|
-
ValidateProgrammer.generate(
|
|
35
|
-
{
|
|
36
|
-
...project,
|
|
37
|
-
options: {
|
|
38
|
-
...project.options,
|
|
39
|
-
functional: false,
|
|
40
|
-
numeric: true,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
modulo,
|
|
44
|
-
)(type, name),
|
|
45
|
-
),
|
|
46
|
-
StatementFactory.constant(
|
|
47
|
-
"clone",
|
|
48
|
-
CloneProgrammer.generate(
|
|
49
|
-
{
|
|
50
|
-
...project,
|
|
51
|
-
options: {
|
|
52
|
-
...project.options,
|
|
53
|
-
functional: false,
|
|
54
|
-
numeric: false,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
modulo,
|
|
58
|
-
)(type, name),
|
|
59
|
-
),
|
|
60
|
-
StatementFactory.constant(
|
|
61
|
-
"output",
|
|
62
|
-
ts.factory.createAsExpression(
|
|
63
|
-
ts.factory.createCallExpression(
|
|
64
|
-
ts.factory.createIdentifier("validate"),
|
|
65
|
-
undefined,
|
|
66
|
-
[ts.factory.createIdentifier("input")],
|
|
67
|
-
),
|
|
68
|
-
TypeFactory.keyword("any"),
|
|
69
|
-
),
|
|
70
|
-
),
|
|
71
|
-
ts.factory.createIfStatement(
|
|
72
|
-
ts.factory.createIdentifier("output.success"),
|
|
73
|
-
ts.factory.createExpressionStatement(
|
|
74
|
-
ts.factory.createBinaryExpression(
|
|
75
|
-
ts.factory.createIdentifier("output.data"),
|
|
76
|
-
ts.SyntaxKind.EqualsToken,
|
|
77
|
-
ts.factory.createCallExpression(
|
|
78
|
-
ts.factory.createIdentifier("clone"),
|
|
79
|
-
undefined,
|
|
80
|
-
[ts.factory.createIdentifier("input")],
|
|
81
|
-
),
|
|
82
|
-
),
|
|
83
|
-
),
|
|
84
|
-
),
|
|
85
|
-
ts.factory.createReturnStatement(
|
|
86
|
-
ts.factory.createIdentifier("output"),
|
|
87
|
-
),
|
|
88
|
-
]),
|
|
89
|
-
);
|
|
90
|
-
}
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
|
|
3
|
+
import { IdentifierFactory } from "../factories/IdentifierFactory";
|
|
4
|
+
import { StatementFactory } from "../factories/StatementFactory";
|
|
5
|
+
import { TypeFactory } from "../factories/TypeFactory";
|
|
6
|
+
|
|
7
|
+
import { IProject } from "../transformers/IProject";
|
|
8
|
+
|
|
9
|
+
import { CloneProgrammer } from "./CloneProgrammer";
|
|
10
|
+
import { ValidateProgrammer } from "./ValidateProgrammer";
|
|
11
|
+
|
|
12
|
+
export namespace ValidateCloneProgrammer {
|
|
13
|
+
export const generate =
|
|
14
|
+
(project: IProject, modulo: ts.LeftHandSideExpression) =>
|
|
15
|
+
(type: ts.Type, name?: string) =>
|
|
16
|
+
ts.factory.createArrowFunction(
|
|
17
|
+
undefined,
|
|
18
|
+
undefined,
|
|
19
|
+
[
|
|
20
|
+
IdentifierFactory.parameter(
|
|
21
|
+
"input",
|
|
22
|
+
TypeFactory.keyword("any"),
|
|
23
|
+
),
|
|
24
|
+
],
|
|
25
|
+
ts.factory.createTypeReferenceNode(
|
|
26
|
+
`typia.IValidation<typia.Primitive<${
|
|
27
|
+
name ?? TypeFactory.getFullName(project.checker, type)
|
|
28
|
+
}>>`,
|
|
29
|
+
),
|
|
30
|
+
undefined,
|
|
31
|
+
ts.factory.createBlock([
|
|
32
|
+
StatementFactory.constant(
|
|
33
|
+
"validate",
|
|
34
|
+
ValidateProgrammer.generate(
|
|
35
|
+
{
|
|
36
|
+
...project,
|
|
37
|
+
options: {
|
|
38
|
+
...project.options,
|
|
39
|
+
functional: false,
|
|
40
|
+
numeric: true,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
modulo,
|
|
44
|
+
)(type, name),
|
|
45
|
+
),
|
|
46
|
+
StatementFactory.constant(
|
|
47
|
+
"clone",
|
|
48
|
+
CloneProgrammer.generate(
|
|
49
|
+
{
|
|
50
|
+
...project,
|
|
51
|
+
options: {
|
|
52
|
+
...project.options,
|
|
53
|
+
functional: false,
|
|
54
|
+
numeric: false,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
modulo,
|
|
58
|
+
)(type, name),
|
|
59
|
+
),
|
|
60
|
+
StatementFactory.constant(
|
|
61
|
+
"output",
|
|
62
|
+
ts.factory.createAsExpression(
|
|
63
|
+
ts.factory.createCallExpression(
|
|
64
|
+
ts.factory.createIdentifier("validate"),
|
|
65
|
+
undefined,
|
|
66
|
+
[ts.factory.createIdentifier("input")],
|
|
67
|
+
),
|
|
68
|
+
TypeFactory.keyword("any"),
|
|
69
|
+
),
|
|
70
|
+
),
|
|
71
|
+
ts.factory.createIfStatement(
|
|
72
|
+
ts.factory.createIdentifier("output.success"),
|
|
73
|
+
ts.factory.createExpressionStatement(
|
|
74
|
+
ts.factory.createBinaryExpression(
|
|
75
|
+
ts.factory.createIdentifier("output.data"),
|
|
76
|
+
ts.SyntaxKind.EqualsToken,
|
|
77
|
+
ts.factory.createCallExpression(
|
|
78
|
+
ts.factory.createIdentifier("clone"),
|
|
79
|
+
undefined,
|
|
80
|
+
[ts.factory.createIdentifier("input")],
|
|
81
|
+
),
|
|
82
|
+
),
|
|
83
|
+
),
|
|
84
|
+
),
|
|
85
|
+
ts.factory.createReturnStatement(
|
|
86
|
+
ts.factory.createIdentifier("output"),
|
|
87
|
+
),
|
|
88
|
+
]),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
|
|
3
|
-
import { IdentifierFactory } from "../factories/IdentifierFactory";
|
|
4
|
-
import { StatementFactory } from "../factories/StatementFactory";
|
|
5
|
-
import { TypeFactory } from "../factories/TypeFactory";
|
|
6
|
-
|
|
7
|
-
import { IProject } from "../transformers/IProject";
|
|
8
|
-
|
|
9
|
-
import { ValidateProgrammer } from "./ValidateProgrammer";
|
|
10
|
-
|
|
11
|
-
export namespace ValidateParseProgrammer {
|
|
12
|
-
export const generate =
|
|
13
|
-
(project: IProject, modulo: ts.LeftHandSideExpression) =>
|
|
14
|
-
(type: ts.Type, name?: string) =>
|
|
15
|
-
ts.factory.createArrowFunction(
|
|
16
|
-
undefined,
|
|
17
|
-
undefined,
|
|
18
|
-
[
|
|
19
|
-
IdentifierFactory.parameter(
|
|
20
|
-
"input",
|
|
21
|
-
TypeFactory.keyword("string"),
|
|
22
|
-
),
|
|
23
|
-
],
|
|
24
|
-
ts.factory.createTypeReferenceNode(
|
|
25
|
-
`typia.IValidation<typia.Primitive<${
|
|
26
|
-
name ?? TypeFactory.getFullName(project.checker, type)
|
|
27
|
-
}>>`,
|
|
28
|
-
),
|
|
29
|
-
undefined,
|
|
30
|
-
ts.factory.createBlock([
|
|
31
|
-
StatementFactory.constant(
|
|
32
|
-
"validate",
|
|
33
|
-
ValidateProgrammer.generate(
|
|
34
|
-
{
|
|
35
|
-
...project,
|
|
36
|
-
options: {
|
|
37
|
-
...project.options,
|
|
38
|
-
functional: false,
|
|
39
|
-
numeric: false,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
modulo,
|
|
43
|
-
)(type, name),
|
|
44
|
-
),
|
|
45
|
-
ts.factory.createExpressionStatement(
|
|
46
|
-
ts.factory.createBinaryExpression(
|
|
47
|
-
ts.factory.createIdentifier("input"),
|
|
48
|
-
ts.SyntaxKind.EqualsToken,
|
|
49
|
-
ts.factory.createCallExpression(
|
|
50
|
-
ts.factory.createIdentifier("JSON.parse"),
|
|
51
|
-
undefined,
|
|
52
|
-
[ts.factory.createIdentifier("input")],
|
|
53
|
-
),
|
|
54
|
-
),
|
|
55
|
-
),
|
|
56
|
-
StatementFactory.constant(
|
|
57
|
-
"output",
|
|
58
|
-
ts.factory.createCallExpression(
|
|
59
|
-
ts.factory.createIdentifier("validate"),
|
|
60
|
-
undefined,
|
|
61
|
-
[ts.factory.createIdentifier("input")],
|
|
62
|
-
),
|
|
63
|
-
),
|
|
64
|
-
ts.factory.createReturnStatement(
|
|
65
|
-
ts.factory.createIdentifier("output"),
|
|
66
|
-
),
|
|
67
|
-
]),
|
|
68
|
-
);
|
|
69
|
-
}
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
|
|
3
|
+
import { IdentifierFactory } from "../factories/IdentifierFactory";
|
|
4
|
+
import { StatementFactory } from "../factories/StatementFactory";
|
|
5
|
+
import { TypeFactory } from "../factories/TypeFactory";
|
|
6
|
+
|
|
7
|
+
import { IProject } from "../transformers/IProject";
|
|
8
|
+
|
|
9
|
+
import { ValidateProgrammer } from "./ValidateProgrammer";
|
|
10
|
+
|
|
11
|
+
export namespace ValidateParseProgrammer {
|
|
12
|
+
export const generate =
|
|
13
|
+
(project: IProject, modulo: ts.LeftHandSideExpression) =>
|
|
14
|
+
(type: ts.Type, name?: string) =>
|
|
15
|
+
ts.factory.createArrowFunction(
|
|
16
|
+
undefined,
|
|
17
|
+
undefined,
|
|
18
|
+
[
|
|
19
|
+
IdentifierFactory.parameter(
|
|
20
|
+
"input",
|
|
21
|
+
TypeFactory.keyword("string"),
|
|
22
|
+
),
|
|
23
|
+
],
|
|
24
|
+
ts.factory.createTypeReferenceNode(
|
|
25
|
+
`typia.IValidation<typia.Primitive<${
|
|
26
|
+
name ?? TypeFactory.getFullName(project.checker, type)
|
|
27
|
+
}>>`,
|
|
28
|
+
),
|
|
29
|
+
undefined,
|
|
30
|
+
ts.factory.createBlock([
|
|
31
|
+
StatementFactory.constant(
|
|
32
|
+
"validate",
|
|
33
|
+
ValidateProgrammer.generate(
|
|
34
|
+
{
|
|
35
|
+
...project,
|
|
36
|
+
options: {
|
|
37
|
+
...project.options,
|
|
38
|
+
functional: false,
|
|
39
|
+
numeric: false,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
modulo,
|
|
43
|
+
)(type, name),
|
|
44
|
+
),
|
|
45
|
+
ts.factory.createExpressionStatement(
|
|
46
|
+
ts.factory.createBinaryExpression(
|
|
47
|
+
ts.factory.createIdentifier("input"),
|
|
48
|
+
ts.SyntaxKind.EqualsToken,
|
|
49
|
+
ts.factory.createCallExpression(
|
|
50
|
+
ts.factory.createIdentifier("JSON.parse"),
|
|
51
|
+
undefined,
|
|
52
|
+
[ts.factory.createIdentifier("input")],
|
|
53
|
+
),
|
|
54
|
+
),
|
|
55
|
+
),
|
|
56
|
+
StatementFactory.constant(
|
|
57
|
+
"output",
|
|
58
|
+
ts.factory.createCallExpression(
|
|
59
|
+
ts.factory.createIdentifier("validate"),
|
|
60
|
+
undefined,
|
|
61
|
+
[ts.factory.createIdentifier("input")],
|
|
62
|
+
),
|
|
63
|
+
),
|
|
64
|
+
ts.factory.createReturnStatement(
|
|
65
|
+
ts.factory.createIdentifier("output"),
|
|
66
|
+
),
|
|
67
|
+
]),
|
|
68
|
+
);
|
|
69
|
+
}
|