@cushin/api-codegen
Advanced tools
+4
-4
@@ -492,7 +492,7 @@ #!/usr/bin/env node | ||
| types.push( | ||
| `export type ${cap}Response = z.infer<typeof apiConfig.endpoints.${name}.response>;` | ||
| `export type ${cap}Response = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.response>>;` | ||
| ); | ||
| if (endpoint.body) { | ||
| types.push( | ||
| `export type ${cap}Input = z.infer<typeof apiConfig.endpoints.${name}.body>;` | ||
| `export type ${cap}Input = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.body>>;` | ||
| ); | ||
@@ -502,3 +502,3 @@ } | ||
| types.push( | ||
| `export type ${cap}Query = z.infer<typeof apiConfig.endpoints.${name}.query>;` | ||
| `export type ${cap}Query = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.query>>;` | ||
| ); | ||
@@ -508,3 +508,3 @@ } | ||
| types.push( | ||
| `export type ${cap}Params = z.infer<typeof apiConfig.endpoints.${name}.params>;` | ||
| `export type ${cap}Params = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.params>>;` | ||
| ); | ||
@@ -511,0 +511,0 @@ } |
+4
-4
@@ -489,7 +489,7 @@ // src/index.ts | ||
| types.push( | ||
| `export type ${cap}Response = z.infer<typeof apiConfig.endpoints.${name}.response>;` | ||
| `export type ${cap}Response = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.response>>;` | ||
| ); | ||
| if (endpoint.body) { | ||
| types.push( | ||
| `export type ${cap}Input = z.infer<typeof apiConfig.endpoints.${name}.body>;` | ||
| `export type ${cap}Input = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.body>>;` | ||
| ); | ||
@@ -499,3 +499,3 @@ } | ||
| types.push( | ||
| `export type ${cap}Query = z.infer<typeof apiConfig.endpoints.${name}.query>;` | ||
| `export type ${cap}Query = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.query>>;` | ||
| ); | ||
@@ -505,3 +505,3 @@ } | ||
| types.push( | ||
| `export type ${cap}Params = z.infer<typeof apiConfig.endpoints.${name}.params>;` | ||
| `export type ${cap}Params = z.infer<NonNullable<typeof apiConfig.endpoints.${name}.params>>;` | ||
| ); | ||
@@ -508,0 +508,0 @@ } |
+1
-1
| { | ||
| "name": "@cushin/api-codegen", | ||
| "version": "5.0.2", | ||
| "version": "5.0.3", | ||
| "description": "Type-safe API client generator for React/Next.js with automatic hooks and server actions generation", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
208876
0.1%