Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "nestia", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Automatic SDK and Document generator for the NestJS", | ||
@@ -5,0 +5,0 @@ "main": "src/index.ts", |
@@ -36,3 +36,5 @@ import type * as tsc from "typescript"; | ||
"connection", | ||
JSON.stringify(config), | ||
JSON.stringify(config, null, 4) | ||
.split('"').join("") | ||
.split("\n").join("\n" + " ".repeat(8)), | ||
`"${route.method}"`, | ||
@@ -119,3 +121,6 @@ path | ||
// REFORM PARAMETERS TEXT | ||
const parameters: string = route.parameters.map(param => | ||
const parameters: string[] = | ||
[ | ||
"connection: IConnection", | ||
...route.parameters.map(param => | ||
{ | ||
@@ -126,3 +131,4 @@ const type: string = (param === query || param === input) | ||
return `${param.name}: ${type}`; | ||
}).join(", "); | ||
}) | ||
]; | ||
@@ -139,3 +145,6 @@ // OUTPUT TYPE | ||
+ " */\n" | ||
+ `export function ${route.name}(connection: IConnection, ${parameters}): Promise<${output}>\n` | ||
+ `export function ${route.name}\n` | ||
+ ` (\n` | ||
+ `${parameters.map(str => ` ${str}`).join(",\n")}\n` | ||
+ ` ): Promise<${output}>\n` | ||
+ "{"; | ||
@@ -142,0 +151,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65930
1467