@sinclair/typebox-codegen
Advanced tools
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -43,6 +43,6 @@ "use strict"; | ||
| if (typeof parameter === 'string') { | ||
| return `${type}(${parameter}, [${constraints.join(', ')}])`; | ||
| return `v.pipe(${type}(${parameter}), ${constraints.join(', ')})`; | ||
| } | ||
| else { | ||
| return `${type}([${constraints.join(', ')}])`; | ||
| return `v.pipe(${type}(), ${constraints.join(', ')})`; | ||
| } | ||
@@ -172,3 +172,3 @@ } | ||
| function Undefined(schema) { | ||
| return Type(`v.undefinedType`, null, []); | ||
| return Type(`v.undefined_`, null, []); | ||
| } | ||
@@ -183,3 +183,3 @@ function Union(schema) { | ||
| function Void(schema) { | ||
| return Type(`v.voidType`, null, []); | ||
| return Type(`v.void_`, null, []); | ||
| } | ||
@@ -261,6 +261,6 @@ function UnsupportedType(schema) { | ||
| output.push(`export ${model_to_typescript_1.ModelToTypeScript.GenerateType(model, schema.$id)}`); | ||
| output.push(`export const ${schema.$id || `T`}: v.Output<${schema.$id}> = v.lazy(() => ${index_1.Formatter.Format(type)})`); | ||
| output.push(`export const ${schema.$id || `T`}: v.InferOutput<${schema.$id}> = v.lazy(() => ${index_1.Formatter.Format(type)})`); | ||
| } | ||
| else { | ||
| output.push(`export type ${schema.$id} = v.Output<typeof ${schema.$id}>`); | ||
| output.push(`export type ${schema.$id} = v.InferOutput<typeof ${schema.$id}>`); | ||
| output.push(`export const ${schema.$id || `T`} = ${index_1.Formatter.Format(type)}`); | ||
@@ -267,0 +267,0 @@ } |
@@ -0,0 +0,0 @@ "use strict"; |
+1
-1
| { | ||
| "name": "@sinclair/typebox-codegen", | ||
| "version": "0.10.2", | ||
| "version": "0.10.3", | ||
| "description": "Code Generation Tools for TypeBox", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances 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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances 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
161681
0.03%