@rexeus/typeweaver-types 0.11.0 → 0.12.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.
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/templates/RequestValidator.ejs +2 -4
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -57,7 +57,7 @@ function writeRequestType(templateFilePath, resourceName, operation, context) {
|
|
|
57
57
|
headerTsType: header ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(header)) : void 0,
|
|
58
58
|
queryTsType: query ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(query)) : void 0,
|
|
59
59
|
paramTsType: param ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(param)) : void 0,
|
|
60
|
-
bodyTsType: body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(body)) : void 0
|
|
60
|
+
bodyTsType: body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(body.schema)) : void 0
|
|
61
61
|
});
|
|
62
62
|
const relativePath = node_path.default.relative(context.outputDir, outputPaths.requestFile);
|
|
63
63
|
context.writeFile(relativePath, content);
|
|
@@ -12922,7 +12922,7 @@ function createOwnResponseTemplateData(response, responseFactoryTemplateFile, co
|
|
|
12922
12922
|
};
|
|
12923
12923
|
return {
|
|
12924
12924
|
...factoryData,
|
|
12925
|
-
body: response.body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.body)) : void 0,
|
|
12925
|
+
body: response.body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.body.schema)) : void 0,
|
|
12926
12926
|
header: response.header ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.header)) : void 0,
|
|
12927
12927
|
statusCode: response.statusCode,
|
|
12928
12928
|
factory: renderResponseFactory(responseFactoryTemplateFile, factoryData, context, " ")
|
|
@@ -12931,7 +12931,7 @@ function createOwnResponseTemplateData(response, responseFactoryTemplateFile, co
|
|
|
12931
12931
|
function writeCanonicalResponseType(templateFile, responseFactoryTemplateFile, response, context) {
|
|
12932
12932
|
const pascalCaseName = (0, polycase.pascalCase)(response.name);
|
|
12933
12933
|
const headerTsType = response.header ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.header)) : void 0;
|
|
12934
|
-
const bodyTsType = response.body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.body)) : void 0;
|
|
12934
|
+
const bodyTsType = response.body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.body.schema)) : void 0;
|
|
12935
12935
|
const factoryData = {
|
|
12936
12936
|
identifierName: pascalCaseName,
|
|
12937
12937
|
typeValue: response.name,
|
package/dist/index.mjs
CHANGED
|
@@ -36,7 +36,7 @@ function writeRequestType(templateFilePath, resourceName, operation, context) {
|
|
|
36
36
|
headerTsType: header ? print(fromZod(header)) : void 0,
|
|
37
37
|
queryTsType: query ? print(fromZod(query)) : void 0,
|
|
38
38
|
paramTsType: param ? print(fromZod(param)) : void 0,
|
|
39
|
-
bodyTsType: body ? print(fromZod(body)) : void 0
|
|
39
|
+
bodyTsType: body ? print(fromZod(body.schema)) : void 0
|
|
40
40
|
});
|
|
41
41
|
const relativePath = path.relative(context.outputDir, outputPaths.requestFile);
|
|
42
42
|
context.writeFile(relativePath, content);
|
|
@@ -12901,7 +12901,7 @@ function createOwnResponseTemplateData(response, responseFactoryTemplateFile, co
|
|
|
12901
12901
|
};
|
|
12902
12902
|
return {
|
|
12903
12903
|
...factoryData,
|
|
12904
|
-
body: response.body ? print(fromZod(response.body)) : void 0,
|
|
12904
|
+
body: response.body ? print(fromZod(response.body.schema)) : void 0,
|
|
12905
12905
|
header: response.header ? print(fromZod(response.header)) : void 0,
|
|
12906
12906
|
statusCode: response.statusCode,
|
|
12907
12907
|
factory: renderResponseFactory(responseFactoryTemplateFile, factoryData, context, " ")
|
|
@@ -12910,7 +12910,7 @@ function createOwnResponseTemplateData(response, responseFactoryTemplateFile, co
|
|
|
12910
12910
|
function writeCanonicalResponseType(templateFile, responseFactoryTemplateFile, response, context) {
|
|
12911
12911
|
const pascalCaseName = pascalCase(response.name);
|
|
12912
12912
|
const headerTsType = response.header ? print(fromZod(response.header)) : void 0;
|
|
12913
|
-
const bodyTsType = response.body ? print(fromZod(response.body)) : void 0;
|
|
12913
|
+
const bodyTsType = response.body ? print(fromZod(response.body.schema)) : void 0;
|
|
12914
12914
|
const factoryData = {
|
|
12915
12915
|
identifierName: pascalCaseName,
|
|
12916
12916
|
typeValue: response.name,
|