@ovotech/avro-ts
Advanced tools
Comparing version 6.1.0 to 6.2.0
@@ -28,2 +28,3 @@ "use strict"; | ||
const value = `${namespace}.${schema.name}`; | ||
const schemaValue = (name) => ts_compose_1.Node.Const({ name, isExport: true, value: JSON.stringify(schema) }); | ||
const contextWithRef = namespace | ||
@@ -36,4 +37,4 @@ ? /** | ||
context.refs && schemaName in context.refs | ||
? ts_compose_1.withIdentifier(context, ts_compose_1.Node.Const({ name: `${namespaceName}${fieldName}`, isExport: true, value }), namespaceName) | ||
: ts_compose_1.withIdentifier(context, ts_compose_1.Node.Const({ name: fieldName, isExport: true, value }), namespaceName) | ||
? ts_compose_1.withIdentifier(ts_compose_1.withIdentifier(context, schemaValue(`${namespaceName}${name}Schema`), namespaceName), ts_compose_1.Node.Const({ name: `${namespaceName}${fieldName}`, isExport: true, value }), namespaceName) | ||
: ts_compose_1.withIdentifier(ts_compose_1.withIdentifier(context, schemaValue(`${name}Schema`), namespaceName), ts_compose_1.Node.Const({ name: fieldName, isExport: true, value }), namespaceName) | ||
: context; | ||
@@ -40,0 +41,0 @@ return ts_compose_1.document(ts_compose_1.withIdentifier(contextWithRef, type, namespaceName), ts_compose_1.Type.Referance(fullName)); |
{ | ||
"name": "@ovotech/avro-ts", | ||
"description": "Convert avro schemas into typescript interfaces", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"main": "dist/index.js", | ||
@@ -40,3 +40,3 @@ "source": "src/index.ts", | ||
}, | ||
"gitHead": "1d98485e4f00a99d22e0ef0c49414668e0c7c486" | ||
"gitHead": "72f282c972026b3b9aac7fc41392a79bedaad77a" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
34202
482
1