typia 12.1.0 → 12.2.0

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.
Files changed (138) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +153 -153
  3. package/lib/executable/setup/PluginConfigurator.js +3 -3
  4. package/lib/executable/setup/PluginConfigurator.mjs +3 -3
  5. package/lib/executable/setup/PluginConfigurator.mjs.map +1 -1
  6. package/lib/executable/typia.js +15 -15
  7. package/lib/executable/typia.mjs +15 -15
  8. package/lib/transform.d.ts +1 -0
  9. package/lib/transform.js.map +1 -1
  10. package/package.json +5 -5
  11. package/src/TypeGuardError.ts +145 -145
  12. package/src/executable/TypiaGenerateWizard.ts +82 -82
  13. package/src/executable/TypiaPatchWizard.ts +45 -45
  14. package/src/executable/TypiaSetupWizard.ts +171 -171
  15. package/src/executable/setup/ArgumentParser.ts +42 -42
  16. package/src/executable/setup/CommandExecutor.ts +8 -8
  17. package/src/executable/setup/FileRetriever.ts +19 -19
  18. package/src/executable/setup/PackageManager.ts +87 -87
  19. package/src/executable/setup/PluginConfigurator.ts +74 -74
  20. package/src/executable/typia.ts +55 -55
  21. package/src/functional.ts +600 -600
  22. package/src/http.ts +843 -843
  23. package/src/index.ts +4 -4
  24. package/src/internal/_IProtobufWriter.ts +18 -18
  25. package/src/internal/_ProtobufReader.ts +187 -187
  26. package/src/internal/_ProtobufSizer.ts +137 -137
  27. package/src/internal/_ProtobufWriter.ts +135 -135
  28. package/src/internal/_accessExpressionAsString.ts +46 -46
  29. package/src/internal/_assertGuard.ts +13 -13
  30. package/src/internal/_coerceLlmArguments.ts +7 -7
  31. package/src/internal/_createStandardSchema.ts +133 -133
  32. package/src/internal/_functionalTypeGuardErrorFactory.ts +4 -4
  33. package/src/internal/_httpFormDataReadArray.ts +4 -4
  34. package/src/internal/_httpFormDataReadBigint.ts +18 -18
  35. package/src/internal/_httpFormDataReadBlob.ts +10 -10
  36. package/src/internal/_httpFormDataReadBoolean.ts +16 -16
  37. package/src/internal/_httpFormDataReadFile.ts +10 -10
  38. package/src/internal/_httpFormDataReadNumber.ts +15 -15
  39. package/src/internal/_httpFormDataReadString.ts +10 -10
  40. package/src/internal/_httpHeaderReadBigint.ts +10 -10
  41. package/src/internal/_httpHeaderReadBoolean.ts +8 -8
  42. package/src/internal/_httpHeaderReadNumber.ts +7 -7
  43. package/src/internal/_httpParameterReadBigint.ts +10 -10
  44. package/src/internal/_httpParameterReadBoolean.ts +8 -8
  45. package/src/internal/_httpParameterReadNumber.ts +7 -7
  46. package/src/internal/_httpParameterReadString.ts +2 -2
  47. package/src/internal/_httpQueryParseURLSearchParams.ts +12 -12
  48. package/src/internal/_httpQueryReadArray.ts +4 -4
  49. package/src/internal/_httpQueryReadBigint.ts +12 -12
  50. package/src/internal/_httpQueryReadBoolean.ts +14 -14
  51. package/src/internal/_httpQueryReadNumber.ts +9 -9
  52. package/src/internal/_httpQueryReadString.ts +4 -4
  53. package/src/internal/_isBetween.ts +2 -2
  54. package/src/internal/_isBigintString.ts +8 -8
  55. package/src/internal/_isFormatByte.ts +7 -7
  56. package/src/internal/_isFormatDate.ts +3 -3
  57. package/src/internal/_isFormatDateTime.ts +4 -4
  58. package/src/internal/_isFormatDuration.ts +4 -4
  59. package/src/internal/_isFormatEmail.ts +4 -4
  60. package/src/internal/_isFormatHostname.ts +4 -4
  61. package/src/internal/_isFormatIdnEmail.ts +4 -4
  62. package/src/internal/_isFormatIdnHostname.ts +4 -4
  63. package/src/internal/_isFormatIpv4.ts +4 -4
  64. package/src/internal/_isFormatIpv6.ts +4 -4
  65. package/src/internal/_isFormatIri.ts +3 -3
  66. package/src/internal/_isFormatIriReference.ts +4 -4
  67. package/src/internal/_isFormatJsonPointer.ts +3 -3
  68. package/src/internal/_isFormatPassword.ts +1 -1
  69. package/src/internal/_isFormatRegex.ts +8 -8
  70. package/src/internal/_isFormatRelativeJsonPointer.ts +4 -4
  71. package/src/internal/_isFormatTime.ts +4 -4
  72. package/src/internal/_isFormatUri.ts +6 -6
  73. package/src/internal/_isFormatUriReference.ts +5 -5
  74. package/src/internal/_isFormatUriTemplate.ts +4 -4
  75. package/src/internal/_isFormatUrl.ts +4 -4
  76. package/src/internal/_isFormatUuid.ts +3 -3
  77. package/src/internal/_isTypeFloat.ts +5 -5
  78. package/src/internal/_isTypeInt32.ts +5 -5
  79. package/src/internal/_isTypeInt64.ts +5 -5
  80. package/src/internal/_isTypeUint32.ts +5 -5
  81. package/src/internal/_isTypeUint64.ts +5 -5
  82. package/src/internal/_isUniqueItems.ts +159 -159
  83. package/src/internal/_jsonStringifyNumber.ts +2 -2
  84. package/src/internal/_jsonStringifyRest.ts +3 -3
  85. package/src/internal/_jsonStringifyString.ts +42 -42
  86. package/src/internal/_jsonStringifyTail.ts +2 -2
  87. package/src/internal/_llmApplicationFinalize.ts +20 -20
  88. package/src/internal/_miscCloneAny.ts +46 -46
  89. package/src/internal/_notationAny.ts +37 -37
  90. package/src/internal/_notationCamel.ts +13 -13
  91. package/src/internal/_notationPascal.ts +8 -8
  92. package/src/internal/_notationSnake.ts +43 -43
  93. package/src/internal/_parseLlmArguments.ts +7 -7
  94. package/src/internal/_randomArray.ts +21 -21
  95. package/src/internal/_randomBigint.ts +6 -6
  96. package/src/internal/_randomBoolean.ts +1 -1
  97. package/src/internal/_randomFormatByte.ts +3 -3
  98. package/src/internal/_randomFormatDate.ts +18 -18
  99. package/src/internal/_randomFormatDatetime.ts +16 -16
  100. package/src/internal/_randomFormatDuration.ts +27 -27
  101. package/src/internal/_randomFormatEmail.ts +11 -11
  102. package/src/internal/_randomFormatHostname.ts +6 -6
  103. package/src/internal/_randomFormatIdnEmail.ts +3 -3
  104. package/src/internal/_randomFormatIdnHostname.ts +3 -3
  105. package/src/internal/_randomFormatIpv4.ts +11 -11
  106. package/src/internal/_randomFormatIpv6.ts +11 -11
  107. package/src/internal/_randomFormatIri.ts +3 -3
  108. package/src/internal/_randomFormatIriReference.ts +3 -3
  109. package/src/internal/_randomFormatJsonPointer.ts +7 -7
  110. package/src/internal/_randomFormatPassword.ts +8 -8
  111. package/src/internal/_randomFormatRegex.ts +4 -4
  112. package/src/internal/_randomFormatRelativeJsonPointer.ts +8 -8
  113. package/src/internal/_randomFormatTime.ts +14 -14
  114. package/src/internal/_randomFormatUri.ts +3 -3
  115. package/src/internal/_randomFormatUriReference.ts +3 -3
  116. package/src/internal/_randomFormatUriTemplate.ts +3 -3
  117. package/src/internal/_randomFormatUrl.ts +11 -11
  118. package/src/internal/_randomFormatUuid.ts +6 -6
  119. package/src/internal/_randomInteger.ts +53 -53
  120. package/src/internal/_randomNumber.ts +80 -80
  121. package/src/internal/_randomPattern.ts +10 -10
  122. package/src/internal/_randomPick.ts +9 -9
  123. package/src/internal/_randomString.ts +24 -24
  124. package/src/internal/_throwTypeGuardError.ts +5 -5
  125. package/src/internal/_validateReport.ts +21 -21
  126. package/src/internal/private/__notationCapitalize.ts +2 -2
  127. package/src/internal/private/__notationUnsnake.ts +24 -24
  128. package/src/json.ts +553 -553
  129. package/src/llm.ts +480 -480
  130. package/src/misc.ts +448 -448
  131. package/src/module.ts +811 -811
  132. package/src/notations.ts +624 -624
  133. package/src/programmers/TypiaProgrammer.ts +8 -8
  134. package/src/protobuf.ts +499 -499
  135. package/src/re-exports.ts +34 -34
  136. package/src/reflect.ts +75 -75
  137. package/src/transform.ts +6 -5
  138. package/src/transformers/NoTransformConfigurationError.ts +16 -16
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Jeongho Nam
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Jeongho Nam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,153 +1,153 @@
1
- # Typia
2
- ![Typia Logo](https://typia.io/logo.png)
3
-
4
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/typia/blob/master/LICENSE)
5
- [![NPM Version](https://img.shields.io/npm/v/typia.svg)](https://www.npmjs.com/package/typia)
6
- [![NPM Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia)
7
- [![Build Status](https://github.com/samchon/typia/workflows/test/badge.svg?branch=master)](https://github.com/samchon/typia/actions?query=workflow%3Atest+branch%3Amaster)
8
- [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://typia.io/docs/)
9
- [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/typia)
10
- [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
-
12
- ```typescript
13
- // RUNTIME VALIDATORS
14
- export function is<T>(input: unknown): input is T; // returns boolean
15
- export function assert<T>(input: unknown): T; // throws TypeGuardError
16
- export function assertGuard<T>(input: unknown): asserts input is T;
17
- export function validate<T>(input: unknown): IValidation<T>; // detailed
18
-
19
- // JSON FUNCTIONS
20
- export namespace json {
21
- export function schema<T>(): IJsonSchemaUnit<T>; // JSON schema
22
- export function assertParse<T>(input: string): T; // type safe parser
23
- export function assertStringify<T>(input: T): string; // safe and faster
24
- }
25
-
26
- // AI FUNCTION CALLING HARNESS
27
- export namespace llm {
28
- // collection of function calling schemas + validators/parsers
29
- export function application<Class>(): ILlmApplication<Class>;
30
- export function structuredOutput<P>(): ILlmStructuredOutput;
31
- // lenient json parser + type coercion
32
- export function parse<T>(str: string): T;
33
- }
34
-
35
- // PROTOCOL BUFFER
36
- export namespace protobuf {
37
- export function message<T>(): string; // Protocol Buffer message
38
- export function assertDecode<T>(buffer: Uint8Array): T; // safe decoder
39
- export function assertEncode<T>(input: T): Uint8Array; // safe encoder
40
- }
41
-
42
- // RANDOM GENERATOR
43
- export function random<T>(g?: Partial<IRandomGenerator>): T;
44
- ```
45
-
46
- `typia` is a transformer library supporting below features:
47
-
48
- - Super-fast Runtime Validators
49
- - Enhanced JSON schema and serde functions
50
- - LLM function calling harness
51
- - Protocol Buffer encoder and decoder
52
- - Random data generator
53
-
54
- > [!NOTE]
55
- >
56
- > - **Only one line** required, with pure TypeScript type
57
- > - Runtime validator is **20,000x faster** than `class-validator`
58
- > - JSON serialization is **200x faster** than `class-transformer`
59
- > - LLM function calling harness turns **6.75% → 100%** accuracy
60
-
61
- ## Transformation
62
- If you call `typia` function, it would be compiled like below.
63
-
64
- This is the key concept of `typia`, transforming TypeScript type to a runtime function. The `typia.is<T>()` function is transformed to a dedicated type checker by analyzing the target type `T` in the compilation level.
65
-
66
- This feature enables developers to ensure type safety in their applications, leveraging TypeScript's static typing while also providing runtime validation. Instead of defining additional schemas, you can simply utilize the pure TypeScript type itself.
67
-
68
- ```typescript
69
- //----
70
- // examples/checkString.ts
71
- //----
72
- import typia, { tags } from "typia";
73
- export const checkString = typia.createIs<string>();
74
-
75
- //----
76
- // examples/checkString.js
77
- //----
78
- import typia from "typia";
79
- export const checkString = (() => {
80
- return (input) => "string" === typeof input;
81
- })();
82
- ```
83
-
84
-
85
-
86
- ## Sponsors
87
- Thanks for your support.
88
-
89
- Your donation encourages `typia` development.
90
-
91
- Also, `typia` is re-distributing quarter of donations to [`nonara/ts-patch`](https://github.com/nonara/ts-patch).
92
-
93
- [![Sponsors](https://opencollective.com/typia/badge.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
94
-
95
-
96
-
97
-
98
- ## Playground
99
- You can experience how typia works by [playground website](https://typia.io/playground):
100
-
101
- - 💻 https://typia.io/playground
102
-
103
-
104
-
105
-
106
- ## Guide Documents
107
- Check out the document in the [website](https://typia.io/docs/):
108
-
109
- ### 🏠 Home
110
- - [Introduction](https://typia.io/docs/)
111
- - [Setup](https://typia.io/docs/setup/)
112
- - [Pure TypeScript](https://typia.io/docs/pure/)
113
-
114
- ### 📖 Features
115
- - Runtime Validators
116
- - [`assert()` function](https://typia.io/docs/validators/assert/)
117
- - [`is()` function](https://typia.io/docs/validators/is/)
118
- - [`validate()` function](https://typia.io/docs/validators/validate/)
119
- - [Functional Module](https://typia.io/docs/validators/functional)
120
- - [Special Tags](https://typia.io/docs/validators/tags/)
121
- - Enhanced JSON
122
- - [JSON Schema](https://typia.io/docs/json/schema/)
123
- - [`stringify()` functions](https://typia.io/docs/json/stringify/)
124
- - [`parse()` functions](https://typia.io/docs/json/parse/)
125
- - LLM Function Calling Harness
126
- - [`application()` function](https://typia.io/docs/llm/application/)
127
- - [`structuredOutput()` function](https://typia.io/docs/llm/structuredOutput/)
128
- - [`HttpLlm` module](https://typia.io/docs/llm/http/)
129
- - [`LlmJson` module](https://typia.io/docs/llm/json/)
130
- - Protocol Buffer
131
- - [Message Schema](https://typia.io/docs/protobuf/message)
132
- - [`decode()` functions](https://typia.io/docs/protobuf/decode/)
133
- - [`encode()` functions](https://typia.io/docs/protobuf/encode/)
134
- - [Random Generator](https://typia.io/docs/random/)
135
- - [Miscellaneous](https://typia.io/docs/misc/)
136
-
137
- ### 🔗 Appendix
138
- - [API Documents](https://typia.io/api)
139
- - Utilization Cases
140
- - [MCP](https://typia.io/docs/utilization/mcp/)
141
- - [Vercel AI SDK](https://typia.io/docs/utilization/vercel/)
142
- - [LangChain](https://typia.io/docs/utilization/langchain/)
143
- - [NestJS](https://typia.io/docs/utilization/nestjs/)
144
- - [tRPC](https://typia.io/docs/utilization/trpc/)
145
- - [⇲ Benchmark Result](https://github.com/samchon/typia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
146
- - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22474)
147
-
148
-
149
-
150
-
151
- ## References
152
- - inspired by [`typescript-is`](https://github.com/woutervh-/typescript-is)
153
- - inspired by [`ts-patch`](https://github.com/nonara/ts-patch)
1
+ # Typia
2
+ ![Typia Logo](https://typia.io/logo.png)
3
+
4
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/typia/blob/master/LICENSE)
5
+ [![NPM Version](https://img.shields.io/npm/v/typia.svg)](https://www.npmjs.com/package/typia)
6
+ [![NPM Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/typia)
7
+ [![Build Status](https://github.com/samchon/typia/workflows/test/badge.svg?branch=master)](https://github.com/samchon/typia/actions?query=workflow%3Atest+branch%3Amaster)
8
+ [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://typia.io/docs/)
9
+ [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/typia)
10
+ [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
+
12
+ ```typescript
13
+ // RUNTIME VALIDATORS
14
+ export function is<T>(input: unknown): input is T; // returns boolean
15
+ export function assert<T>(input: unknown): T; // throws TypeGuardError
16
+ export function assertGuard<T>(input: unknown): asserts input is T;
17
+ export function validate<T>(input: unknown): IValidation<T>; // detailed
18
+
19
+ // JSON FUNCTIONS
20
+ export namespace json {
21
+ export function schema<T>(): IJsonSchemaUnit<T>; // JSON schema
22
+ export function assertParse<T>(input: string): T; // type safe parser
23
+ export function assertStringify<T>(input: T): string; // safe and faster
24
+ }
25
+
26
+ // AI FUNCTION CALLING HARNESS
27
+ export namespace llm {
28
+ // collection of function calling schemas + validators/parsers
29
+ export function application<Class>(): ILlmApplication<Class>;
30
+ export function structuredOutput<P>(): ILlmStructuredOutput;
31
+ // lenient json parser + type coercion
32
+ export function parse<T>(str: string): T;
33
+ }
34
+
35
+ // PROTOCOL BUFFER
36
+ export namespace protobuf {
37
+ export function message<T>(): string; // Protocol Buffer message
38
+ export function assertDecode<T>(buffer: Uint8Array): T; // safe decoder
39
+ export function assertEncode<T>(input: T): Uint8Array; // safe encoder
40
+ }
41
+
42
+ // RANDOM GENERATOR
43
+ export function random<T>(g?: Partial<IRandomGenerator>): T;
44
+ ```
45
+
46
+ `typia` is a transformer library supporting below features:
47
+
48
+ - Super-fast Runtime Validators
49
+ - Enhanced JSON schema and serde functions
50
+ - LLM function calling harness
51
+ - Protocol Buffer encoder and decoder
52
+ - Random data generator
53
+
54
+ > [!NOTE]
55
+ >
56
+ > - **Only one line** required, with pure TypeScript type
57
+ > - Runtime validator is **20,000x faster** than `class-validator`
58
+ > - JSON serialization is **200x faster** than `class-transformer`
59
+ > - LLM function calling harness turns **6.75% → 100%** accuracy
60
+
61
+ ## Transformation
62
+ If you call `typia` function, it would be compiled like below.
63
+
64
+ This is the key concept of `typia`, transforming TypeScript type to a runtime function. The `typia.is<T>()` function is transformed to a dedicated type checker by analyzing the target type `T` in the compilation level.
65
+
66
+ This feature enables developers to ensure type safety in their applications, leveraging TypeScript's static typing while also providing runtime validation. Instead of defining additional schemas, you can simply utilize the pure TypeScript type itself.
67
+
68
+ ```typescript
69
+ //----
70
+ // examples/checkString.ts
71
+ //----
72
+ import typia, { tags } from "typia";
73
+ export const checkString = typia.createIs<string>();
74
+
75
+ //----
76
+ // examples/checkString.js
77
+ //----
78
+ import typia from "typia";
79
+ export const checkString = (() => {
80
+ return (input) => "string" === typeof input;
81
+ })();
82
+ ```
83
+
84
+
85
+
86
+ ## Sponsors
87
+ Thanks for your support.
88
+
89
+ Your donation encourages `typia` development.
90
+
91
+ Also, `typia` is re-distributing quarter of donations to [`nonara/ts-patch`](https://github.com/nonara/ts-patch).
92
+
93
+ [![Sponsors](https://opencollective.com/typia/badge.svg?avatarHeight=75&width=600)](https://opencollective.com/typia)
94
+
95
+
96
+
97
+
98
+ ## Playground
99
+ You can experience how typia works by [playground website](https://typia.io/playground):
100
+
101
+ - 💻 https://typia.io/playground
102
+
103
+
104
+
105
+
106
+ ## Guide Documents
107
+ Check out the document in the [website](https://typia.io/docs/):
108
+
109
+ ### 🏠 Home
110
+ - [Introduction](https://typia.io/docs/)
111
+ - [Setup](https://typia.io/docs/setup/)
112
+ - [Pure TypeScript](https://typia.io/docs/pure/)
113
+
114
+ ### 📖 Features
115
+ - Runtime Validators
116
+ - [`assert()` function](https://typia.io/docs/validators/assert/)
117
+ - [`is()` function](https://typia.io/docs/validators/is/)
118
+ - [`validate()` function](https://typia.io/docs/validators/validate/)
119
+ - [Functional Module](https://typia.io/docs/validators/functional)
120
+ - [Special Tags](https://typia.io/docs/validators/tags/)
121
+ - Enhanced JSON
122
+ - [JSON Schema](https://typia.io/docs/json/schema/)
123
+ - [`stringify()` functions](https://typia.io/docs/json/stringify/)
124
+ - [`parse()` functions](https://typia.io/docs/json/parse/)
125
+ - LLM Function Calling Harness
126
+ - [`application()` function](https://typia.io/docs/llm/application/)
127
+ - [`structuredOutput()` function](https://typia.io/docs/llm/structuredOutput/)
128
+ - [`HttpLlm` module](https://typia.io/docs/llm/http/)
129
+ - [`LlmJson` module](https://typia.io/docs/llm/json/)
130
+ - Protocol Buffer
131
+ - [Message Schema](https://typia.io/docs/protobuf/message)
132
+ - [`decode()` functions](https://typia.io/docs/protobuf/decode/)
133
+ - [`encode()` functions](https://typia.io/docs/protobuf/encode/)
134
+ - [Random Generator](https://typia.io/docs/random/)
135
+ - [Miscellaneous](https://typia.io/docs/misc/)
136
+
137
+ ### 🔗 Appendix
138
+ - [API Documents](https://typia.io/api)
139
+ - Utilization Cases
140
+ - [MCP](https://typia.io/docs/utilization/mcp/)
141
+ - [Vercel AI SDK](https://typia.io/docs/utilization/vercel/)
142
+ - [LangChain](https://typia.io/docs/utilization/langchain/)
143
+ - [NestJS](https://typia.io/docs/utilization/nestjs/)
144
+ - [tRPC](https://typia.io/docs/utilization/trpc/)
145
+ - [⇲ Benchmark Result](https://github.com/samchon/typia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
146
+ - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22474)
147
+
148
+
149
+
150
+
151
+ ## References
152
+ - inspired by [`typescript-is`](https://github.com/woutervh-/typescript-is)
153
+ - inspired by [`ts-patch`](https://github.com/nonara/ts-patch)
@@ -50,9 +50,9 @@ var PluginConfigurator;
50
50
  if (strict === undefined && strictNullChecks === undefined)
51
51
  compilerOptions.strict = true;
52
52
  if (oldbie === undefined)
53
- plugins.push(comment_json_1.default.parse(`
54
- {
55
- "transform": "typia/lib/transform"
53
+ plugins.push(comment_json_1.default.parse(`
54
+ {
55
+ "transform": "typia/lib/transform"
56
56
  }`));
57
57
  yield fs_1.default.promises.writeFile(args.project, comment_json_1.default.stringify(config, null, 2));
58
58
  });
@@ -35,9 +35,9 @@ var PluginConfigurator;
35
35
  if (strict === undefined && strictNullChecks === undefined)
36
36
  compilerOptions.strict = true;
37
37
  if (oldbie === undefined)
38
- plugins.push(comments.parse(`
39
- {
40
- "transform": "typia/lib/transform"
38
+ plugins.push(comments.parse(`
39
+ {
40
+ "transform": "typia/lib/transform"
41
41
  }`));
42
42
  await fs.promises.writeFile(args.project, comments.stringify(config, null, 2));
43
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PluginConfigurator.mjs","sources":["../../../src/executable/setup/PluginConfigurator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAKM,IAAW;AAAjB,CAAA,UAAiB,kBAAkB,EAAA;IAC1B,eAAe,SAAS,CAC7B,IAAiC,EAAA;;QAGjC,MAAM,MAAM,GAA2B,QAAQ,CAAC,KAAK,CACnD,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAQ,EAAE,MAAM,CAAC,CACxB;AAC3B,QAAA,MAAM,eAAe,GAAG,MAAM,CAAC,eAElB;QACb,IAAI,eAAe,KAAK,SAAS;YAC/B,MAAM,IAAI,cAAc,CACtB,CAAA,EAAG,IAAI,CAAC,OAAO,CAAA,+CAAA,CAAiD,CACjE;;AAGH,QAAA,MAAM,OAAO,GAAkD,CAAC,MAAK;AACnE,YAAA,MAAM,OAAO,GAAG,eAAe,CAAC,OA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QAAQ;AACrB,YAAA,CAAC,KAAK,IAAI;AACV,YAAA,CAAC,CAAC,SAAS,KAAK,qBAAqB,CACxC;QACD,IACE,gBAAgB,KAAK,KAAK;AAC1B,aAAC,MAAM,KAAK,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC;AAC9C,YAAA,MAAM,KAAK,SAAS;AACpB,YAAA,YAAY,KAAK,IAAI;YAErB;;AAGF,QAAA,eAAe,CAAC,YAAY,GAAG,IAAI;AACnC,QAAA,eAAe,CAAC,gBAAgB,GAAG,IAAI;AACvC,QAAA,IAAI,MAAM,KAAK,SAAS,IAAI,gBAAgB,KAAK,SAAS;AACxD,YAAA,eAAe,CAAC,MAAM,GAAG,IAAI;QAC/B,IAAI,MAAM,KAAK,SAAS;AACtB,YAAA,OAAO,CAAC,IAAI,CACV,QAAQ,CAAC,KAAK,CAAC,CAAA;;;AAGG,yBAAA,CAAA,CAA2B,CAC9C;QACH,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CACzB,IAAI,CAAC,OAAQ,EACb,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CACpC;IACH;AAlEsB,IAAA,kBAAA,CAAA,SAAS,YAkE9B;AACH,CAAC,EApEgB,kBAAkB,KAAlB,kBAAkB,GAAA,EAAA,CAAA,CAAA;;;;"}
@@ -10,21 +10,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  });
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- const USAGE = `Wrong command has been detected. Use like below:
14
-
15
- npx typia setup \\
16
- --manager (npm|pnpm|yarn) \\
17
- --project {tsconfig.json file path}
18
-
19
- - npx typia setup
20
- - npx typia setup --manager pnpm
21
- - npx typia setup --project tsconfig.test.json
22
-
23
- npx typia generate
24
- --input {directory} \\
25
- --output {directory}
26
-
27
- --npx typia generate --input src/templates --output src/functional
13
+ const USAGE = `Wrong command has been detected. Use like below:
14
+
15
+ npx typia setup \\
16
+ --manager (npm|pnpm|yarn) \\
17
+ --project {tsconfig.json file path}
18
+
19
+ - npx typia setup
20
+ - npx typia setup --manager pnpm
21
+ - npx typia setup --project tsconfig.test.json
22
+
23
+ npx typia generate
24
+ --input {directory} \\
25
+ --output {directory}
26
+
27
+ --npx typia generate --input src/templates --output src/functional
28
28
  `;
29
29
  const halt = (desc) => {
30
30
  console.error(desc);
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
- const USAGE = `Wrong command has been detected. Use like below:
3
-
4
- npx typia setup \\
5
- --manager (npm|pnpm|yarn) \\
6
- --project {tsconfig.json file path}
7
-
8
- - npx typia setup
9
- - npx typia setup --manager pnpm
10
- - npx typia setup --project tsconfig.test.json
11
-
12
- npx typia generate
13
- --input {directory} \\
14
- --output {directory}
15
-
16
- --npx typia generate --input src/templates --output src/functional
2
+ const USAGE = `Wrong command has been detected. Use like below:
3
+
4
+ npx typia setup \\
5
+ --manager (npm|pnpm|yarn) \\
6
+ --project {tsconfig.json file path}
7
+
8
+ - npx typia setup
9
+ - npx typia setup --manager pnpm
10
+ - npx typia setup --project tsconfig.test.json
11
+
12
+ npx typia generate
13
+ --input {directory} \\
14
+ --output {directory}
15
+
16
+ --npx typia generate --input src/templates --output src/functional
17
17
  `;
18
18
  const halt = (desc) => {
19
19
  console.error(desc);
@@ -1,3 +1,4 @@
1
1
  import transform from "@typia/transform";
2
+ export { ITransformOptions } from "@typia/core";
2
3
  export default transform;
3
4
  export * from "@typia/transform";
@@ -1 +1 @@
1
- {"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,iEAAyC;AAEzC,kBAAe,mBAAS,CAAC;AAEzB,mDAAiC"}
1
+ {"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,iEAAyC;AAIzC,kBAAe,mBAAS,CAAC;AACzB,mDAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typia",
3
- "version": "12.1.0",
3
+ "version": "12.2.0",
4
4
  "description": "Superfast runtime validators with only one line",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -46,10 +46,10 @@
46
46
  "inquirer": "^8.2.5",
47
47
  "package-manager-detector": "^0.2.0",
48
48
  "randexp": "^0.5.3",
49
- "@typia/core": "^12.1.0",
50
- "@typia/interface": "^12.1.0",
51
- "@typia/transform": "^12.1.0",
52
- "@typia/utils": "^12.1.0"
49
+ "@typia/transform": "^12.2.0",
50
+ "@typia/utils": "^12.2.0",
51
+ "@typia/core": "^12.2.0",
52
+ "@typia/interface": "^12.2.0"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "typescript": ">=4.8.0 <7.0.0"