@hestia-earth/schema-convert
Advanced tools
Comparing version 23.3.0 to 23.4.0
@@ -1,3 +0,4 @@ | ||
import { SchemaType } from '@hestia-earth/schema'; | ||
import { NodeType, SchemaType } from '@hestia-earth/schema'; | ||
import { definitions } from '@hestia-earth/json-schema/types'; | ||
export declare const acceptedNodeTypes: NodeType[]; | ||
export interface INode { | ||
@@ -4,0 +5,0 @@ type: SchemaType; |
@@ -87,3 +87,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.toJson = exports.filterEmptyNode = exports.formatNode = exports.cleanStringValue = exports.throwCSVError = void 0; | ||
exports.toJson = exports.filterEmptyNode = exports.formatNode = exports.cleanStringValue = exports.throwCSVError = exports.acceptedNodeTypes = void 0; | ||
var csvtojson = require("csvtojson"); | ||
@@ -96,2 +96,3 @@ var levenshtein = require("fast-levenshtein"); | ||
var default_values_1 = require("./default-values"); | ||
exports.acceptedNodeTypes = Object.values(schema_1.NodeType).filter(function (val) { return val !== schema_1.NodeType.Term; }); | ||
var IGNORE_FIELD_KEY = '-'; | ||
@@ -507,3 +508,3 @@ var VALUE_TYPE_KEY = 'valueType'; | ||
if (top === void 0) { top = false; } | ||
var schema = type in schemas ? schemas[type] : schemaNotFoundError(type); | ||
var schema = type in schemas && exports.acceptedNodeTypes.includes(type) ? schemas[type] : schemaNotFoundError(type); | ||
var content = mapContent(schemas, schema, ignoreInternal)(data); | ||
@@ -510,0 +511,0 @@ return (0, utils_1.reduceUndefinedValues)(__assign({ id: isEmptyCell(data.id) ? undefined : data.id }, extendDataFromSchema(content, schema, type, ignoreInternal, top)), true); |
{ | ||
"name": "@hestia-earth/schema-convert", | ||
"version": "23.3.0", | ||
"version": "23.4.0", | ||
"description": "Hestia Schema Converters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
67613
1400