typia 5.1.3 → 5.1.4-dev.20230929
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/lib/executable/TypiaSetupWizard.js +1 -19
- package/lib/executable/TypiaSetupWizard.js.map +1 -1
- package/package.json +1 -1
- package/src/executable/TypiaSetupWizard.ts +1 -16
- package/src/factories/MetadataCollection.ts +277 -277
- package/src/factories/MetadataFactory.ts +238 -238
- package/src/factories/MetadataTypeTagFactory.ts +325 -325
- package/src/factories/internal/metadata/emend_metadata_atomics.ts +41 -41
- package/src/factories/internal/metadata/iterate_metadata_intersection.ts +259 -259
- package/src/functional/$HeadersReader.ts +28 -28
- package/src/functional/$ParameterReader.ts +31 -31
- package/src/functional/$QueryReader.ts +56 -56
- package/src/functional/Namespace.ts +142 -142
- package/src/http.ts +1149 -1149
- package/src/json.ts +648 -648
- package/src/misc.ts +651 -651
- package/src/module.ts +657 -657
- package/src/programmers/helpers/HttpMetadataUtil.ts +21 -21
- package/src/programmers/http/HttpAssertHeadersProgrammer.ts +77 -77
- package/src/programmers/http/HttpAssertQueryProgrammer.ts +77 -77
- package/src/programmers/http/HttpHeadersProgrammer.ts +339 -339
- package/src/programmers/http/HttpIsHeadersProgrammer.ts +87 -87
- package/src/programmers/http/HttpIsQueryProgrammer.ts +87 -87
- package/src/programmers/http/HttpParameterProgrammer.ts +104 -104
- package/src/programmers/http/HttpQueryProgrammer.ts +273 -273
- package/src/programmers/http/HttpValidateHeadersProgrammer.ts +77 -77
- package/src/programmers/http/HttpValidateQueryProgrammer.ts +77 -77
- package/src/programmers/internal/application_boolean.ts +30 -30
- package/src/programmers/internal/application_number.ts +90 -90
- package/src/programmers/internal/application_schema.ts +180 -180
- package/src/programmers/internal/application_string.ts +54 -54
- package/src/programmers/internal/check_array_length.ts +44 -44
- package/src/programmers/internal/check_bigint.ts +48 -48
- package/src/programmers/internal/check_number.ts +108 -108
- package/src/programmers/internal/check_string.ts +48 -48
- package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +882 -882
- package/src/protobuf.ts +887 -887
- package/src/schemas/json/IJsonComponents.ts +34 -34
- package/src/schemas/json/IJsonSchema.ts +112 -112
- package/src/schemas/metadata/IMetadataConstant.ts +25 -25
- package/src/schemas/metadata/IMetadataTypeTag.ts +8 -8
- package/src/schemas/metadata/Metadata.ts +686 -686
- package/src/tags/Default.ts +15 -15
- package/src/tags/Format.ts +30 -30
- package/src/tags/Pattern.ts +9 -9
- package/src/tags/TagBase.ts +68 -68
- package/src/tags/index.ts +14 -14
- package/src/transformers/CallExpressionTransformer.ts +289 -289
- package/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts +12 -12
- package/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts +12 -12
- package/src/transformers/features/http/CreateHttpHeadersTransformer.ts +9 -9
- package/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts +9 -9
- package/src/transformers/features/http/CreateHttpIsQueryTransformer.ts +9 -9
- package/src/transformers/features/http/CreateHttpParameterTransformer.ts +9 -9
- package/src/transformers/features/http/CreateHttpQueryTransformer.ts +9 -9
- package/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts +12 -12
- package/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts +12 -12
- package/src/transformers/features/http/HttpAssertHeadersTransformer.ts +10 -10
- package/src/transformers/features/http/HttpAssertQueryTransformer.ts +10 -10
- package/src/transformers/features/http/HttpHeadersTransformer.ts +9 -9
- package/src/transformers/features/http/HttpIsHeadersTransformer.ts +9 -9
- package/src/transformers/features/http/HttpIsQueryTransformer.ts +9 -9
- package/src/transformers/features/http/HttpParameterTransformer.ts +9 -9
- package/src/transformers/features/http/HttpQueryTransformer.ts +9 -9
- package/src/transformers/features/http/HttpValidateHeadersTransformer.ts +10 -10
- package/src/transformers/features/http/HttpValidateQueryTransformer.ts +10 -10
|
@@ -1,289 +1,289 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import ts from "typescript";
|
|
3
|
-
|
|
4
|
-
import { IProject } from "./IProject";
|
|
5
|
-
import { AssertTransformer } from "./features/AssertTransformer";
|
|
6
|
-
import { CreateAssertTransformer } from "./features/CreateAssertTransformer";
|
|
7
|
-
import { CreateIsTransformer } from "./features/CreateIsTransformer";
|
|
8
|
-
import { CreateRandomTransformer } from "./features/CreateRandomTransformer";
|
|
9
|
-
import { CreateValidateTransformer } from "./features/CreateValidateTransformer";
|
|
10
|
-
import { IsTransformer } from "./features/IsTransformer";
|
|
11
|
-
import { RandomTransformer } from "./features/RandomTransformer";
|
|
12
|
-
import { ValidateTransformer } from "./features/ValidateTransformer";
|
|
13
|
-
import { CreateHttpAssertHeadersTransformer } from "./features/http/CreateHttpAssertHeadersTransformer";
|
|
14
|
-
import { CreateHttpAssertQueryTransformer } from "./features/http/CreateHttpAssertQueryTransformer";
|
|
15
|
-
import { CreateHttpHeadersTransformer } from "./features/http/CreateHttpHeadersTransformer";
|
|
16
|
-
import { CreateHttpIsHeadersTransformer } from "./features/http/CreateHttpIsHeadersTransformer";
|
|
17
|
-
import { CreateHttpIsQueryTransformer } from "./features/http/CreateHttpIsQueryTransformer";
|
|
18
|
-
import { CreateHttpParameterTransformer } from "./features/http/CreateHttpParameterTransformer";
|
|
19
|
-
import { CreateHttpQueryTransformer } from "./features/http/CreateHttpQueryTransformer";
|
|
20
|
-
import { CreateHttpValidateHeadersTransformer } from "./features/http/CreateHttpValidateHeadersTransformer";
|
|
21
|
-
import { CreateHttpValidateQueryTransformer } from "./features/http/CreateHttpValidateQueryTransformer";
|
|
22
|
-
import { HttpAssertHeadersTransformer } from "./features/http/HttpAssertHeadersTransformer";
|
|
23
|
-
import { HttpAssertQueryTransformer } from "./features/http/HttpAssertQueryTransformer";
|
|
24
|
-
import { HttpHeadersTransformer } from "./features/http/HttpHeadersTransformer";
|
|
25
|
-
import { HttpIsHeadersTransformer } from "./features/http/HttpIsHeadersTransformer";
|
|
26
|
-
import { HttpIsQueryTransformer } from "./features/http/HttpIsQueryTransformer";
|
|
27
|
-
import { HttpParameterTransformer } from "./features/http/HttpParameterTransformer";
|
|
28
|
-
import { HttpQueryTransformer } from "./features/http/HttpQueryTransformer";
|
|
29
|
-
import { HttpValidateHeadersTransformer } from "./features/http/HttpValidateHeadersTransformer";
|
|
30
|
-
import { HttpValidateQueryTransformer } from "./features/http/HttpValidateQueryTransformer";
|
|
31
|
-
import { JsonApplicationTransformer } from "./features/json/JsonApplicationTransformer";
|
|
32
|
-
import { JsonAssertParseTransformer } from "./features/json/JsonAssertParseTransformer";
|
|
33
|
-
import { JsonAssertStringifyTransformer } from "./features/json/JsonAssertStringifyTransformer";
|
|
34
|
-
import { JsonCreateAssertParseTransformer } from "./features/json/JsonCreateAssertParseTransformer";
|
|
35
|
-
import { JsonCreateAssertStringifyTransformer } from "./features/json/JsonCreateAssertStringifyTransformer";
|
|
36
|
-
import { JsonCreateIsParseTransformer } from "./features/json/JsonCreateIsParseTransformer";
|
|
37
|
-
import { JsonCreateIsStringifyTransformer } from "./features/json/JsonCreateIsStringifyTransformer";
|
|
38
|
-
import { JsonCreateStringifyTransformer } from "./features/json/JsonCreateStringifyTransformer";
|
|
39
|
-
import { JsonCreateValidateParseTransformer } from "./features/json/JsonCreateValidateParseTransformer";
|
|
40
|
-
import { JsonCreateValidateStringifyTransformer } from "./features/json/JsonCreateValidateStringifyProgrammer";
|
|
41
|
-
import { JsonIsParseTransformer } from "./features/json/JsonIsParseTransformer";
|
|
42
|
-
import { JsonIsStringifyTransformer } from "./features/json/JsonIsStringifyTransformer";
|
|
43
|
-
import { JsonStringifyTransformer } from "./features/json/JsonStringifyTransformer";
|
|
44
|
-
import { JsonValidateParseTransformer } from "./features/json/JsonValidateParseTransformer";
|
|
45
|
-
import { JsonValidateStringifyTransformer } from "./features/json/JsonValidateStringifyTransformer";
|
|
46
|
-
import { MetadataTransformer } from "./features/misc/MetadataTransformer";
|
|
47
|
-
import { MiscAssertCloneTransformer } from "./features/misc/MiscAssertCloneTransformer";
|
|
48
|
-
import { MiscAssertPruneTransformer } from "./features/misc/MiscAssertPruneTransformer";
|
|
49
|
-
import { MiscCloneTransformer } from "./features/misc/MiscCloneTransformer";
|
|
50
|
-
import { MiscCreateAssertCloneTransformer } from "./features/misc/MiscCreateAssertCloneTransformer";
|
|
51
|
-
import { MiscCreateAssertPruneTransformer } from "./features/misc/MiscCreateAssertPruneTransformer";
|
|
52
|
-
import { MiscCreateCloneTransformer } from "./features/misc/MiscCreateCloneTransformer";
|
|
53
|
-
import { MiscCreateIsCloneTransformer } from "./features/misc/MiscCreateIsCloneTransformer";
|
|
54
|
-
import { MiscCreateIsPruneTransformer } from "./features/misc/MiscCreateIsPruneTransformer";
|
|
55
|
-
import { MiscCreatePruneTransformer } from "./features/misc/MiscCreatePruneTransformer";
|
|
56
|
-
import { MiscCreateValidateCloneTransformer } from "./features/misc/MiscCreateValidateCloneTransformer";
|
|
57
|
-
import { MiscCreateValidatePruneTransformer } from "./features/misc/MiscCreateValidatePruneTransformer";
|
|
58
|
-
import { MiscIsCloneTransformer } from "./features/misc/MiscIsCloneTransformer";
|
|
59
|
-
import { MiscIsPruneTransformer } from "./features/misc/MiscIsPruneTransformer";
|
|
60
|
-
import { MiscLiteralsTransformer } from "./features/misc/MiscLiteralsTransformer";
|
|
61
|
-
import { MiscPruneTransformer } from "./features/misc/MiscPruneTransformer";
|
|
62
|
-
import { MiscValidateCloneTransformer } from "./features/misc/MiscValidateCloneTransformer";
|
|
63
|
-
import { MiscValidatePruneTransformer } from "./features/misc/MiscValidatePruneTransformer";
|
|
64
|
-
import { CreateProtobufAssertDecodeTransformer } from "./features/protobuf/CreateProtobufAssertDecodeTransformer";
|
|
65
|
-
import { CreateProtobufAssertEncodeTransformer } from "./features/protobuf/CreateProtobufAssertEncodeTransformer";
|
|
66
|
-
import { CreateProtobufDecodeTransformer } from "./features/protobuf/CreateProtobufDecodeTransformer";
|
|
67
|
-
import { CreateProtobufEncodeTransformer } from "./features/protobuf/CreateProtobufEncodeTransformer";
|
|
68
|
-
import { CreateProtobufIsDecodeTransformer } from "./features/protobuf/CreateProtobufIsDecodeTransformer";
|
|
69
|
-
import { CreateProtobufIsEncodeTransformer } from "./features/protobuf/CreateProtobufIsEncodeTransformer";
|
|
70
|
-
import { CreateProtobufValidateDecodeTransformer } from "./features/protobuf/CreateProtobufValidateDecodeTransformer";
|
|
71
|
-
import { CreateProtobufValidateEncodeTransformer } from "./features/protobuf/CreateProtobufValidateEncodeTransformer";
|
|
72
|
-
import { ProtobufAssertDecodeTransformer } from "./features/protobuf/ProtobufAssertDecodeTransformer";
|
|
73
|
-
import { ProtobufAssertEncodeTransformer } from "./features/protobuf/ProtobufAssertEncodeTransformer";
|
|
74
|
-
import { ProtobufDecodeTransformer } from "./features/protobuf/ProtobufDecodeTransformer";
|
|
75
|
-
import { ProtobufEncodeTransformer } from "./features/protobuf/ProtobufEncodeTransformer";
|
|
76
|
-
import { ProtobufIsDecodeTransformer } from "./features/protobuf/ProtobufIsDecodeTransformer";
|
|
77
|
-
import { ProtobufIsEncodeTransformer } from "./features/protobuf/ProtobufIsEncodeTransformer";
|
|
78
|
-
import { ProtobufMessageTransformer } from "./features/protobuf/ProtobufMessageTransformer";
|
|
79
|
-
import { ProtobufValidateDecodeTransformer } from "./features/protobuf/ProtobufValidateDecodeTransformer";
|
|
80
|
-
import { ProtobufValidateEncodeTransformer } from "./features/protobuf/ProtobufValidateEncodeTransformer";
|
|
81
|
-
|
|
82
|
-
export namespace CallExpressionTransformer {
|
|
83
|
-
export const transform =
|
|
84
|
-
(project: IProject) =>
|
|
85
|
-
(expression: ts.CallExpression): ts.Expression | null => {
|
|
86
|
-
//----
|
|
87
|
-
// VALIDATIONS
|
|
88
|
-
//----
|
|
89
|
-
// SIGNATURE DECLARATION
|
|
90
|
-
const declaration: ts.Declaration | undefined =
|
|
91
|
-
project.checker.getResolvedSignature(expression)?.declaration;
|
|
92
|
-
if (!declaration) return expression;
|
|
93
|
-
|
|
94
|
-
// FILE PATH
|
|
95
|
-
const location: string = path.resolve(
|
|
96
|
-
declaration.getSourceFile().fileName,
|
|
97
|
-
);
|
|
98
|
-
if (isTarget(location) === false) return expression;
|
|
99
|
-
|
|
100
|
-
//----
|
|
101
|
-
// TRANSFORMATION
|
|
102
|
-
//----
|
|
103
|
-
// FUNCTION NAME
|
|
104
|
-
const module: string = location
|
|
105
|
-
.split(path.sep)
|
|
106
|
-
.at(-1)!
|
|
107
|
-
.split(".")[0]!;
|
|
108
|
-
const { name } =
|
|
109
|
-
project.checker.getTypeAtLocation(declaration).symbol;
|
|
110
|
-
|
|
111
|
-
// FIND TRANSFORMER
|
|
112
|
-
const functor: (() => Task) | undefined = FUNCTORS[module]?.[name];
|
|
113
|
-
if (functor === undefined) return expression;
|
|
114
|
-
|
|
115
|
-
// RETURNS WITH TRANSFORMATION
|
|
116
|
-
const result: ts.Expression | null = functor()(project)(
|
|
117
|
-
expression.expression,
|
|
118
|
-
)(expression);
|
|
119
|
-
return result ?? expression;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const isTarget = (location: string): boolean => {
|
|
123
|
-
const files: string[] = Object.keys(FUNCTORS);
|
|
124
|
-
return files.some(
|
|
125
|
-
(f) =>
|
|
126
|
-
location.includes(
|
|
127
|
-
path.join("node_modules", "typia", "lib", `${f}.d.ts`),
|
|
128
|
-
) ||
|
|
129
|
-
location ===
|
|
130
|
-
path.resolve(path.join(__dirname, "..", `${f}.ts`)) ||
|
|
131
|
-
location ===
|
|
132
|
-
path.resolve(
|
|
133
|
-
path.join(
|
|
134
|
-
__dirname,
|
|
135
|
-
"..",
|
|
136
|
-
"..",
|
|
137
|
-
"..",
|
|
138
|
-
"src",
|
|
139
|
-
`${f}.ts`,
|
|
140
|
-
),
|
|
141
|
-
),
|
|
142
|
-
);
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
type Task = (
|
|
147
|
-
project: IProject,
|
|
148
|
-
) => (
|
|
149
|
-
modulo: ts.LeftHandSideExpression,
|
|
150
|
-
) => (expression: ts.CallExpression) => ts.Expression | null;
|
|
151
|
-
|
|
152
|
-
const FUNCTORS: Record<string, Record<string, () => Task>> = {
|
|
153
|
-
module: {
|
|
154
|
-
// BASIC
|
|
155
|
-
assert: () => AssertTransformer.transform(false),
|
|
156
|
-
assertType: () => AssertTransformer.transform(false),
|
|
157
|
-
is: () => IsTransformer.transform(false),
|
|
158
|
-
validate: () => ValidateTransformer.transform(false),
|
|
159
|
-
|
|
160
|
-
// STRICT
|
|
161
|
-
assertEquals: () => AssertTransformer.transform(true),
|
|
162
|
-
equals: () => IsTransformer.transform(true),
|
|
163
|
-
validateEquals: () => ValidateTransformer.transform(true),
|
|
164
|
-
|
|
165
|
-
// RANDOM + INTERNAL
|
|
166
|
-
random: () => RandomTransformer.transform,
|
|
167
|
-
metadata: () => (P) => () => MetadataTransformer.transform(P),
|
|
168
|
-
|
|
169
|
-
// FACTORIES
|
|
170
|
-
createAssert: () => CreateAssertTransformer.transform(false),
|
|
171
|
-
createAssertType: () => CreateAssertTransformer.transform(false),
|
|
172
|
-
createIs: () => CreateIsTransformer.transform(false),
|
|
173
|
-
createValidate: () => CreateValidateTransformer.transform(false),
|
|
174
|
-
createAssertEquals: () => CreateAssertTransformer.transform(true),
|
|
175
|
-
createEquals: () => CreateIsTransformer.transform(true),
|
|
176
|
-
createValidateEquals: () => CreateValidateTransformer.transform(true),
|
|
177
|
-
createRandom: () => CreateRandomTransformer.transform,
|
|
178
|
-
},
|
|
179
|
-
http: {
|
|
180
|
-
// HEADERS
|
|
181
|
-
headers: () => HttpHeadersTransformer.transform,
|
|
182
|
-
isHeaders: () => HttpIsHeadersTransformer.transform,
|
|
183
|
-
assertHeaders: () => HttpAssertHeadersTransformer.transform,
|
|
184
|
-
validateHeaders: () => HttpValidateHeadersTransformer.transform,
|
|
185
|
-
|
|
186
|
-
// PARAMETER
|
|
187
|
-
parameter: () => HttpParameterTransformer.transform,
|
|
188
|
-
|
|
189
|
-
// QUERY
|
|
190
|
-
query: () => HttpQueryTransformer.transform,
|
|
191
|
-
isQuery: () => HttpIsQueryTransformer.transform,
|
|
192
|
-
assertQuery: () => HttpAssertQueryTransformer.transform,
|
|
193
|
-
validateQuery: () => HttpValidateQueryTransformer.transform,
|
|
194
|
-
|
|
195
|
-
// FACTORIES
|
|
196
|
-
createHeaders: () => CreateHttpHeadersTransformer.transform,
|
|
197
|
-
createIsHeaders: () => CreateHttpIsHeadersTransformer.transform,
|
|
198
|
-
createAssertHeaders: () => CreateHttpAssertHeadersTransformer.transform,
|
|
199
|
-
createValidateHeaders: () =>
|
|
200
|
-
CreateHttpValidateHeadersTransformer.transform,
|
|
201
|
-
createParameter: () => CreateHttpParameterTransformer.transform,
|
|
202
|
-
createQuery: () => CreateHttpQueryTransformer.transform,
|
|
203
|
-
createIsQuery: () => CreateHttpIsQueryTransformer.transform,
|
|
204
|
-
createAssertQuery: () => CreateHttpAssertQueryTransformer.transform,
|
|
205
|
-
createValidateQuery: () => CreateHttpValidateQueryTransformer.transform,
|
|
206
|
-
},
|
|
207
|
-
json: {
|
|
208
|
-
// SCHEMA
|
|
209
|
-
application: () => (P) => () => JsonApplicationTransformer.transform(P),
|
|
210
|
-
|
|
211
|
-
// PARSER
|
|
212
|
-
isParse: () => JsonIsParseTransformer.transform,
|
|
213
|
-
assertParse: () => JsonAssertParseTransformer.transform,
|
|
214
|
-
validateParse: () => JsonValidateParseTransformer.transform,
|
|
215
|
-
|
|
216
|
-
// STRINGIFY
|
|
217
|
-
stringify: () => JsonStringifyTransformer.transform,
|
|
218
|
-
assertStringify: () => JsonAssertStringifyTransformer.transform,
|
|
219
|
-
isStringify: () => JsonIsStringifyTransformer.transform,
|
|
220
|
-
validateStringify: () => JsonValidateStringifyTransformer.transform,
|
|
221
|
-
|
|
222
|
-
// FACTORIES
|
|
223
|
-
createIsParse: () => JsonCreateIsParseTransformer.transform,
|
|
224
|
-
createAssertParse: () => JsonCreateAssertParseTransformer.transform,
|
|
225
|
-
createValidateParse: () => JsonCreateValidateParseTransformer.transform,
|
|
226
|
-
createStringify: () => JsonCreateStringifyTransformer.transform,
|
|
227
|
-
createAssertStringify: () =>
|
|
228
|
-
JsonCreateAssertStringifyTransformer.transform,
|
|
229
|
-
createIsStringify: () => JsonCreateIsStringifyTransformer.transform,
|
|
230
|
-
createValidateStringify: () =>
|
|
231
|
-
JsonCreateValidateStringifyTransformer.transform,
|
|
232
|
-
},
|
|
233
|
-
protobuf: {
|
|
234
|
-
// SCHEMA
|
|
235
|
-
message: () => ProtobufMessageTransformer.transform,
|
|
236
|
-
|
|
237
|
-
// ENCODE
|
|
238
|
-
encode: () => ProtobufEncodeTransformer.transform,
|
|
239
|
-
assertEncode: () => ProtobufAssertEncodeTransformer.transform,
|
|
240
|
-
isEncode: () => ProtobufIsEncodeTransformer.transform,
|
|
241
|
-
validateEncode: () => ProtobufValidateEncodeTransformer.transform,
|
|
242
|
-
|
|
243
|
-
// DECODE
|
|
244
|
-
decode: () => ProtobufDecodeTransformer.transform,
|
|
245
|
-
assertDecode: () => ProtobufAssertDecodeTransformer.transform,
|
|
246
|
-
isDecode: () => ProtobufIsDecodeTransformer.transform,
|
|
247
|
-
validateDecode: () => ProtobufValidateDecodeTransformer.transform,
|
|
248
|
-
|
|
249
|
-
// FACTORIES
|
|
250
|
-
createEncode: () => CreateProtobufEncodeTransformer.transform,
|
|
251
|
-
createAssertEncode: () =>
|
|
252
|
-
CreateProtobufAssertEncodeTransformer.transform,
|
|
253
|
-
createIsEncode: () => CreateProtobufIsEncodeTransformer.transform,
|
|
254
|
-
createValidateEncode: () =>
|
|
255
|
-
CreateProtobufValidateEncodeTransformer.transform,
|
|
256
|
-
createDecode: () => CreateProtobufDecodeTransformer.transform,
|
|
257
|
-
createAssertDecode: () =>
|
|
258
|
-
CreateProtobufAssertDecodeTransformer.transform,
|
|
259
|
-
createIsDecode: () => CreateProtobufIsDecodeTransformer.transform,
|
|
260
|
-
createValidateDecode: () =>
|
|
261
|
-
CreateProtobufValidateDecodeTransformer.transform,
|
|
262
|
-
},
|
|
263
|
-
misc: {
|
|
264
|
-
literals: () => (project) => () =>
|
|
265
|
-
MiscLiteralsTransformer.transform(project),
|
|
266
|
-
|
|
267
|
-
// CLONE
|
|
268
|
-
clone: () => MiscCloneTransformer.transform,
|
|
269
|
-
assertClone: () => MiscAssertCloneTransformer.transform,
|
|
270
|
-
isClone: () => MiscIsCloneTransformer.transform,
|
|
271
|
-
validateClone: () => MiscValidateCloneTransformer.transform,
|
|
272
|
-
|
|
273
|
-
// PRUNE
|
|
274
|
-
prune: () => MiscPruneTransformer.transform,
|
|
275
|
-
assertPrune: () => MiscAssertPruneTransformer.transform,
|
|
276
|
-
isPrune: () => MiscIsPruneTransformer.transform,
|
|
277
|
-
validatePrune: () => MiscValidatePruneTransformer.transform,
|
|
278
|
-
|
|
279
|
-
// FACTORIES
|
|
280
|
-
createClone: () => MiscCreateCloneTransformer.transform,
|
|
281
|
-
createAssertClone: () => MiscCreateAssertCloneTransformer.transform,
|
|
282
|
-
createIsClone: () => MiscCreateIsCloneTransformer.transform,
|
|
283
|
-
createValidateClone: () => MiscCreateValidateCloneTransformer.transform,
|
|
284
|
-
createPrune: () => MiscCreatePruneTransformer.transform,
|
|
285
|
-
createAssertPrune: () => MiscCreateAssertPruneTransformer.transform,
|
|
286
|
-
createIsPrune: () => MiscCreateIsPruneTransformer.transform,
|
|
287
|
-
createValidatePrune: () => MiscCreateValidatePruneTransformer.transform,
|
|
288
|
-
},
|
|
289
|
-
};
|
|
1
|
+
import path from "path";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
|
|
4
|
+
import { IProject } from "./IProject";
|
|
5
|
+
import { AssertTransformer } from "./features/AssertTransformer";
|
|
6
|
+
import { CreateAssertTransformer } from "./features/CreateAssertTransformer";
|
|
7
|
+
import { CreateIsTransformer } from "./features/CreateIsTransformer";
|
|
8
|
+
import { CreateRandomTransformer } from "./features/CreateRandomTransformer";
|
|
9
|
+
import { CreateValidateTransformer } from "./features/CreateValidateTransformer";
|
|
10
|
+
import { IsTransformer } from "./features/IsTransformer";
|
|
11
|
+
import { RandomTransformer } from "./features/RandomTransformer";
|
|
12
|
+
import { ValidateTransformer } from "./features/ValidateTransformer";
|
|
13
|
+
import { CreateHttpAssertHeadersTransformer } from "./features/http/CreateHttpAssertHeadersTransformer";
|
|
14
|
+
import { CreateHttpAssertQueryTransformer } from "./features/http/CreateHttpAssertQueryTransformer";
|
|
15
|
+
import { CreateHttpHeadersTransformer } from "./features/http/CreateHttpHeadersTransformer";
|
|
16
|
+
import { CreateHttpIsHeadersTransformer } from "./features/http/CreateHttpIsHeadersTransformer";
|
|
17
|
+
import { CreateHttpIsQueryTransformer } from "./features/http/CreateHttpIsQueryTransformer";
|
|
18
|
+
import { CreateHttpParameterTransformer } from "./features/http/CreateHttpParameterTransformer";
|
|
19
|
+
import { CreateHttpQueryTransformer } from "./features/http/CreateHttpQueryTransformer";
|
|
20
|
+
import { CreateHttpValidateHeadersTransformer } from "./features/http/CreateHttpValidateHeadersTransformer";
|
|
21
|
+
import { CreateHttpValidateQueryTransformer } from "./features/http/CreateHttpValidateQueryTransformer";
|
|
22
|
+
import { HttpAssertHeadersTransformer } from "./features/http/HttpAssertHeadersTransformer";
|
|
23
|
+
import { HttpAssertQueryTransformer } from "./features/http/HttpAssertQueryTransformer";
|
|
24
|
+
import { HttpHeadersTransformer } from "./features/http/HttpHeadersTransformer";
|
|
25
|
+
import { HttpIsHeadersTransformer } from "./features/http/HttpIsHeadersTransformer";
|
|
26
|
+
import { HttpIsQueryTransformer } from "./features/http/HttpIsQueryTransformer";
|
|
27
|
+
import { HttpParameterTransformer } from "./features/http/HttpParameterTransformer";
|
|
28
|
+
import { HttpQueryTransformer } from "./features/http/HttpQueryTransformer";
|
|
29
|
+
import { HttpValidateHeadersTransformer } from "./features/http/HttpValidateHeadersTransformer";
|
|
30
|
+
import { HttpValidateQueryTransformer } from "./features/http/HttpValidateQueryTransformer";
|
|
31
|
+
import { JsonApplicationTransformer } from "./features/json/JsonApplicationTransformer";
|
|
32
|
+
import { JsonAssertParseTransformer } from "./features/json/JsonAssertParseTransformer";
|
|
33
|
+
import { JsonAssertStringifyTransformer } from "./features/json/JsonAssertStringifyTransformer";
|
|
34
|
+
import { JsonCreateAssertParseTransformer } from "./features/json/JsonCreateAssertParseTransformer";
|
|
35
|
+
import { JsonCreateAssertStringifyTransformer } from "./features/json/JsonCreateAssertStringifyTransformer";
|
|
36
|
+
import { JsonCreateIsParseTransformer } from "./features/json/JsonCreateIsParseTransformer";
|
|
37
|
+
import { JsonCreateIsStringifyTransformer } from "./features/json/JsonCreateIsStringifyTransformer";
|
|
38
|
+
import { JsonCreateStringifyTransformer } from "./features/json/JsonCreateStringifyTransformer";
|
|
39
|
+
import { JsonCreateValidateParseTransformer } from "./features/json/JsonCreateValidateParseTransformer";
|
|
40
|
+
import { JsonCreateValidateStringifyTransformer } from "./features/json/JsonCreateValidateStringifyProgrammer";
|
|
41
|
+
import { JsonIsParseTransformer } from "./features/json/JsonIsParseTransformer";
|
|
42
|
+
import { JsonIsStringifyTransformer } from "./features/json/JsonIsStringifyTransformer";
|
|
43
|
+
import { JsonStringifyTransformer } from "./features/json/JsonStringifyTransformer";
|
|
44
|
+
import { JsonValidateParseTransformer } from "./features/json/JsonValidateParseTransformer";
|
|
45
|
+
import { JsonValidateStringifyTransformer } from "./features/json/JsonValidateStringifyTransformer";
|
|
46
|
+
import { MetadataTransformer } from "./features/misc/MetadataTransformer";
|
|
47
|
+
import { MiscAssertCloneTransformer } from "./features/misc/MiscAssertCloneTransformer";
|
|
48
|
+
import { MiscAssertPruneTransformer } from "./features/misc/MiscAssertPruneTransformer";
|
|
49
|
+
import { MiscCloneTransformer } from "./features/misc/MiscCloneTransformer";
|
|
50
|
+
import { MiscCreateAssertCloneTransformer } from "./features/misc/MiscCreateAssertCloneTransformer";
|
|
51
|
+
import { MiscCreateAssertPruneTransformer } from "./features/misc/MiscCreateAssertPruneTransformer";
|
|
52
|
+
import { MiscCreateCloneTransformer } from "./features/misc/MiscCreateCloneTransformer";
|
|
53
|
+
import { MiscCreateIsCloneTransformer } from "./features/misc/MiscCreateIsCloneTransformer";
|
|
54
|
+
import { MiscCreateIsPruneTransformer } from "./features/misc/MiscCreateIsPruneTransformer";
|
|
55
|
+
import { MiscCreatePruneTransformer } from "./features/misc/MiscCreatePruneTransformer";
|
|
56
|
+
import { MiscCreateValidateCloneTransformer } from "./features/misc/MiscCreateValidateCloneTransformer";
|
|
57
|
+
import { MiscCreateValidatePruneTransformer } from "./features/misc/MiscCreateValidatePruneTransformer";
|
|
58
|
+
import { MiscIsCloneTransformer } from "./features/misc/MiscIsCloneTransformer";
|
|
59
|
+
import { MiscIsPruneTransformer } from "./features/misc/MiscIsPruneTransformer";
|
|
60
|
+
import { MiscLiteralsTransformer } from "./features/misc/MiscLiteralsTransformer";
|
|
61
|
+
import { MiscPruneTransformer } from "./features/misc/MiscPruneTransformer";
|
|
62
|
+
import { MiscValidateCloneTransformer } from "./features/misc/MiscValidateCloneTransformer";
|
|
63
|
+
import { MiscValidatePruneTransformer } from "./features/misc/MiscValidatePruneTransformer";
|
|
64
|
+
import { CreateProtobufAssertDecodeTransformer } from "./features/protobuf/CreateProtobufAssertDecodeTransformer";
|
|
65
|
+
import { CreateProtobufAssertEncodeTransformer } from "./features/protobuf/CreateProtobufAssertEncodeTransformer";
|
|
66
|
+
import { CreateProtobufDecodeTransformer } from "./features/protobuf/CreateProtobufDecodeTransformer";
|
|
67
|
+
import { CreateProtobufEncodeTransformer } from "./features/protobuf/CreateProtobufEncodeTransformer";
|
|
68
|
+
import { CreateProtobufIsDecodeTransformer } from "./features/protobuf/CreateProtobufIsDecodeTransformer";
|
|
69
|
+
import { CreateProtobufIsEncodeTransformer } from "./features/protobuf/CreateProtobufIsEncodeTransformer";
|
|
70
|
+
import { CreateProtobufValidateDecodeTransformer } from "./features/protobuf/CreateProtobufValidateDecodeTransformer";
|
|
71
|
+
import { CreateProtobufValidateEncodeTransformer } from "./features/protobuf/CreateProtobufValidateEncodeTransformer";
|
|
72
|
+
import { ProtobufAssertDecodeTransformer } from "./features/protobuf/ProtobufAssertDecodeTransformer";
|
|
73
|
+
import { ProtobufAssertEncodeTransformer } from "./features/protobuf/ProtobufAssertEncodeTransformer";
|
|
74
|
+
import { ProtobufDecodeTransformer } from "./features/protobuf/ProtobufDecodeTransformer";
|
|
75
|
+
import { ProtobufEncodeTransformer } from "./features/protobuf/ProtobufEncodeTransformer";
|
|
76
|
+
import { ProtobufIsDecodeTransformer } from "./features/protobuf/ProtobufIsDecodeTransformer";
|
|
77
|
+
import { ProtobufIsEncodeTransformer } from "./features/protobuf/ProtobufIsEncodeTransformer";
|
|
78
|
+
import { ProtobufMessageTransformer } from "./features/protobuf/ProtobufMessageTransformer";
|
|
79
|
+
import { ProtobufValidateDecodeTransformer } from "./features/protobuf/ProtobufValidateDecodeTransformer";
|
|
80
|
+
import { ProtobufValidateEncodeTransformer } from "./features/protobuf/ProtobufValidateEncodeTransformer";
|
|
81
|
+
|
|
82
|
+
export namespace CallExpressionTransformer {
|
|
83
|
+
export const transform =
|
|
84
|
+
(project: IProject) =>
|
|
85
|
+
(expression: ts.CallExpression): ts.Expression | null => {
|
|
86
|
+
//----
|
|
87
|
+
// VALIDATIONS
|
|
88
|
+
//----
|
|
89
|
+
// SIGNATURE DECLARATION
|
|
90
|
+
const declaration: ts.Declaration | undefined =
|
|
91
|
+
project.checker.getResolvedSignature(expression)?.declaration;
|
|
92
|
+
if (!declaration) return expression;
|
|
93
|
+
|
|
94
|
+
// FILE PATH
|
|
95
|
+
const location: string = path.resolve(
|
|
96
|
+
declaration.getSourceFile().fileName,
|
|
97
|
+
);
|
|
98
|
+
if (isTarget(location) === false) return expression;
|
|
99
|
+
|
|
100
|
+
//----
|
|
101
|
+
// TRANSFORMATION
|
|
102
|
+
//----
|
|
103
|
+
// FUNCTION NAME
|
|
104
|
+
const module: string = location
|
|
105
|
+
.split(path.sep)
|
|
106
|
+
.at(-1)!
|
|
107
|
+
.split(".")[0]!;
|
|
108
|
+
const { name } =
|
|
109
|
+
project.checker.getTypeAtLocation(declaration).symbol;
|
|
110
|
+
|
|
111
|
+
// FIND TRANSFORMER
|
|
112
|
+
const functor: (() => Task) | undefined = FUNCTORS[module]?.[name];
|
|
113
|
+
if (functor === undefined) return expression;
|
|
114
|
+
|
|
115
|
+
// RETURNS WITH TRANSFORMATION
|
|
116
|
+
const result: ts.Expression | null = functor()(project)(
|
|
117
|
+
expression.expression,
|
|
118
|
+
)(expression);
|
|
119
|
+
return result ?? expression;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const isTarget = (location: string): boolean => {
|
|
123
|
+
const files: string[] = Object.keys(FUNCTORS);
|
|
124
|
+
return files.some(
|
|
125
|
+
(f) =>
|
|
126
|
+
location.includes(
|
|
127
|
+
path.join("node_modules", "typia", "lib", `${f}.d.ts`),
|
|
128
|
+
) ||
|
|
129
|
+
location ===
|
|
130
|
+
path.resolve(path.join(__dirname, "..", `${f}.ts`)) ||
|
|
131
|
+
location ===
|
|
132
|
+
path.resolve(
|
|
133
|
+
path.join(
|
|
134
|
+
__dirname,
|
|
135
|
+
"..",
|
|
136
|
+
"..",
|
|
137
|
+
"..",
|
|
138
|
+
"src",
|
|
139
|
+
`${f}.ts`,
|
|
140
|
+
),
|
|
141
|
+
),
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
type Task = (
|
|
147
|
+
project: IProject,
|
|
148
|
+
) => (
|
|
149
|
+
modulo: ts.LeftHandSideExpression,
|
|
150
|
+
) => (expression: ts.CallExpression) => ts.Expression | null;
|
|
151
|
+
|
|
152
|
+
const FUNCTORS: Record<string, Record<string, () => Task>> = {
|
|
153
|
+
module: {
|
|
154
|
+
// BASIC
|
|
155
|
+
assert: () => AssertTransformer.transform(false),
|
|
156
|
+
assertType: () => AssertTransformer.transform(false),
|
|
157
|
+
is: () => IsTransformer.transform(false),
|
|
158
|
+
validate: () => ValidateTransformer.transform(false),
|
|
159
|
+
|
|
160
|
+
// STRICT
|
|
161
|
+
assertEquals: () => AssertTransformer.transform(true),
|
|
162
|
+
equals: () => IsTransformer.transform(true),
|
|
163
|
+
validateEquals: () => ValidateTransformer.transform(true),
|
|
164
|
+
|
|
165
|
+
// RANDOM + INTERNAL
|
|
166
|
+
random: () => RandomTransformer.transform,
|
|
167
|
+
metadata: () => (P) => () => MetadataTransformer.transform(P),
|
|
168
|
+
|
|
169
|
+
// FACTORIES
|
|
170
|
+
createAssert: () => CreateAssertTransformer.transform(false),
|
|
171
|
+
createAssertType: () => CreateAssertTransformer.transform(false),
|
|
172
|
+
createIs: () => CreateIsTransformer.transform(false),
|
|
173
|
+
createValidate: () => CreateValidateTransformer.transform(false),
|
|
174
|
+
createAssertEquals: () => CreateAssertTransformer.transform(true),
|
|
175
|
+
createEquals: () => CreateIsTransformer.transform(true),
|
|
176
|
+
createValidateEquals: () => CreateValidateTransformer.transform(true),
|
|
177
|
+
createRandom: () => CreateRandomTransformer.transform,
|
|
178
|
+
},
|
|
179
|
+
http: {
|
|
180
|
+
// HEADERS
|
|
181
|
+
headers: () => HttpHeadersTransformer.transform,
|
|
182
|
+
isHeaders: () => HttpIsHeadersTransformer.transform,
|
|
183
|
+
assertHeaders: () => HttpAssertHeadersTransformer.transform,
|
|
184
|
+
validateHeaders: () => HttpValidateHeadersTransformer.transform,
|
|
185
|
+
|
|
186
|
+
// PARAMETER
|
|
187
|
+
parameter: () => HttpParameterTransformer.transform,
|
|
188
|
+
|
|
189
|
+
// QUERY
|
|
190
|
+
query: () => HttpQueryTransformer.transform,
|
|
191
|
+
isQuery: () => HttpIsQueryTransformer.transform,
|
|
192
|
+
assertQuery: () => HttpAssertQueryTransformer.transform,
|
|
193
|
+
validateQuery: () => HttpValidateQueryTransformer.transform,
|
|
194
|
+
|
|
195
|
+
// FACTORIES
|
|
196
|
+
createHeaders: () => CreateHttpHeadersTransformer.transform,
|
|
197
|
+
createIsHeaders: () => CreateHttpIsHeadersTransformer.transform,
|
|
198
|
+
createAssertHeaders: () => CreateHttpAssertHeadersTransformer.transform,
|
|
199
|
+
createValidateHeaders: () =>
|
|
200
|
+
CreateHttpValidateHeadersTransformer.transform,
|
|
201
|
+
createParameter: () => CreateHttpParameterTransformer.transform,
|
|
202
|
+
createQuery: () => CreateHttpQueryTransformer.transform,
|
|
203
|
+
createIsQuery: () => CreateHttpIsQueryTransformer.transform,
|
|
204
|
+
createAssertQuery: () => CreateHttpAssertQueryTransformer.transform,
|
|
205
|
+
createValidateQuery: () => CreateHttpValidateQueryTransformer.transform,
|
|
206
|
+
},
|
|
207
|
+
json: {
|
|
208
|
+
// SCHEMA
|
|
209
|
+
application: () => (P) => () => JsonApplicationTransformer.transform(P),
|
|
210
|
+
|
|
211
|
+
// PARSER
|
|
212
|
+
isParse: () => JsonIsParseTransformer.transform,
|
|
213
|
+
assertParse: () => JsonAssertParseTransformer.transform,
|
|
214
|
+
validateParse: () => JsonValidateParseTransformer.transform,
|
|
215
|
+
|
|
216
|
+
// STRINGIFY
|
|
217
|
+
stringify: () => JsonStringifyTransformer.transform,
|
|
218
|
+
assertStringify: () => JsonAssertStringifyTransformer.transform,
|
|
219
|
+
isStringify: () => JsonIsStringifyTransformer.transform,
|
|
220
|
+
validateStringify: () => JsonValidateStringifyTransformer.transform,
|
|
221
|
+
|
|
222
|
+
// FACTORIES
|
|
223
|
+
createIsParse: () => JsonCreateIsParseTransformer.transform,
|
|
224
|
+
createAssertParse: () => JsonCreateAssertParseTransformer.transform,
|
|
225
|
+
createValidateParse: () => JsonCreateValidateParseTransformer.transform,
|
|
226
|
+
createStringify: () => JsonCreateStringifyTransformer.transform,
|
|
227
|
+
createAssertStringify: () =>
|
|
228
|
+
JsonCreateAssertStringifyTransformer.transform,
|
|
229
|
+
createIsStringify: () => JsonCreateIsStringifyTransformer.transform,
|
|
230
|
+
createValidateStringify: () =>
|
|
231
|
+
JsonCreateValidateStringifyTransformer.transform,
|
|
232
|
+
},
|
|
233
|
+
protobuf: {
|
|
234
|
+
// SCHEMA
|
|
235
|
+
message: () => ProtobufMessageTransformer.transform,
|
|
236
|
+
|
|
237
|
+
// ENCODE
|
|
238
|
+
encode: () => ProtobufEncodeTransformer.transform,
|
|
239
|
+
assertEncode: () => ProtobufAssertEncodeTransformer.transform,
|
|
240
|
+
isEncode: () => ProtobufIsEncodeTransformer.transform,
|
|
241
|
+
validateEncode: () => ProtobufValidateEncodeTransformer.transform,
|
|
242
|
+
|
|
243
|
+
// DECODE
|
|
244
|
+
decode: () => ProtobufDecodeTransformer.transform,
|
|
245
|
+
assertDecode: () => ProtobufAssertDecodeTransformer.transform,
|
|
246
|
+
isDecode: () => ProtobufIsDecodeTransformer.transform,
|
|
247
|
+
validateDecode: () => ProtobufValidateDecodeTransformer.transform,
|
|
248
|
+
|
|
249
|
+
// FACTORIES
|
|
250
|
+
createEncode: () => CreateProtobufEncodeTransformer.transform,
|
|
251
|
+
createAssertEncode: () =>
|
|
252
|
+
CreateProtobufAssertEncodeTransformer.transform,
|
|
253
|
+
createIsEncode: () => CreateProtobufIsEncodeTransformer.transform,
|
|
254
|
+
createValidateEncode: () =>
|
|
255
|
+
CreateProtobufValidateEncodeTransformer.transform,
|
|
256
|
+
createDecode: () => CreateProtobufDecodeTransformer.transform,
|
|
257
|
+
createAssertDecode: () =>
|
|
258
|
+
CreateProtobufAssertDecodeTransformer.transform,
|
|
259
|
+
createIsDecode: () => CreateProtobufIsDecodeTransformer.transform,
|
|
260
|
+
createValidateDecode: () =>
|
|
261
|
+
CreateProtobufValidateDecodeTransformer.transform,
|
|
262
|
+
},
|
|
263
|
+
misc: {
|
|
264
|
+
literals: () => (project) => () =>
|
|
265
|
+
MiscLiteralsTransformer.transform(project),
|
|
266
|
+
|
|
267
|
+
// CLONE
|
|
268
|
+
clone: () => MiscCloneTransformer.transform,
|
|
269
|
+
assertClone: () => MiscAssertCloneTransformer.transform,
|
|
270
|
+
isClone: () => MiscIsCloneTransformer.transform,
|
|
271
|
+
validateClone: () => MiscValidateCloneTransformer.transform,
|
|
272
|
+
|
|
273
|
+
// PRUNE
|
|
274
|
+
prune: () => MiscPruneTransformer.transform,
|
|
275
|
+
assertPrune: () => MiscAssertPruneTransformer.transform,
|
|
276
|
+
isPrune: () => MiscIsPruneTransformer.transform,
|
|
277
|
+
validatePrune: () => MiscValidatePruneTransformer.transform,
|
|
278
|
+
|
|
279
|
+
// FACTORIES
|
|
280
|
+
createClone: () => MiscCreateCloneTransformer.transform,
|
|
281
|
+
createAssertClone: () => MiscCreateAssertCloneTransformer.transform,
|
|
282
|
+
createIsClone: () => MiscCreateIsCloneTransformer.transform,
|
|
283
|
+
createValidateClone: () => MiscCreateValidateCloneTransformer.transform,
|
|
284
|
+
createPrune: () => MiscCreatePruneTransformer.transform,
|
|
285
|
+
createAssertPrune: () => MiscCreateAssertPruneTransformer.transform,
|
|
286
|
+
createIsPrune: () => MiscCreateIsPruneTransformer.transform,
|
|
287
|
+
createValidatePrune: () => MiscCreateValidatePruneTransformer.transform,
|
|
288
|
+
},
|
|
289
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { HttpAssertHeadersProgrammer } from "../../../programmers/http/HttpAssertHeadersProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace CreateHttpAssertHeadersTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
7
|
-
"http.createAssertHeaders",
|
|
8
|
-
)(
|
|
9
|
-
(project) => (modulo) =>
|
|
10
|
-
HttpAssertHeadersProgrammer.write(project)(modulo),
|
|
11
|
-
);
|
|
12
|
-
}
|
|
1
|
+
import { HttpAssertHeadersProgrammer } from "../../../programmers/http/HttpAssertHeadersProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateHttpAssertHeadersTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"http.createAssertHeaders",
|
|
8
|
+
)(
|
|
9
|
+
(project) => (modulo) =>
|
|
10
|
+
HttpAssertHeadersProgrammer.write(project)(modulo),
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { HttpAssertQueryProgrammer } from "../../../programmers/http/HttpAssertQueryProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace CreateHttpAssertQueryTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory(
|
|
7
|
-
"http.createAssertQuery",
|
|
8
|
-
)(
|
|
9
|
-
(project) => (modulo) =>
|
|
10
|
-
HttpAssertQueryProgrammer.write(project)(modulo),
|
|
11
|
-
);
|
|
12
|
-
}
|
|
1
|
+
import { HttpAssertQueryProgrammer } from "../../../programmers/http/HttpAssertQueryProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateHttpAssertQueryTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory(
|
|
7
|
+
"http.createAssertQuery",
|
|
8
|
+
)(
|
|
9
|
+
(project) => (modulo) =>
|
|
10
|
+
HttpAssertQueryProgrammer.write(project)(modulo),
|
|
11
|
+
);
|
|
12
|
+
}
|