@hestia-earth/schema-convert
Advanced tools
Comparing version 29.1.0 to 30.0.0
@@ -5,2 +5,3 @@ import { SchemaType, JSON as HestiaJson, Cycle, Product, Site, Organisation, Term, ImpactAssessment } from '@hestia-earth/schema'; | ||
export declare const cycleDefaultName: ({ endDate, treatment, description }: Cycle, site?: Site, product?: Product) => string; | ||
export declare const defaultSiteArea: (cycle: Cycle) => Partial<Partial<Cycle>>; | ||
export declare const extendCycle: (nodes: HestiaJson<SchemaType>[], cycle: Cycle) => Cycle; | ||
@@ -7,0 +8,0 @@ export declare const impactAssessmentDefaultName: ({ product, country, region, endDate }: Partial<ImpactAssessment>) => string; |
@@ -15,3 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.setDefaultValues = exports.extendSite = exports.siteDefaultName = exports.extendImpactAssessment = exports.impactAssessmentDefaultName = exports.extendCycle = exports.cycleDefaultName = exports.primaryProduct = exports.siteLocationName = void 0; | ||
exports.setDefaultValues = exports.extendSite = exports.siteDefaultName = exports.extendImpactAssessment = exports.impactAssessmentDefaultName = exports.extendCycle = exports.defaultSiteArea = exports.cycleDefaultName = exports.primaryProduct = exports.siteLocationName = void 0; | ||
var schema_1 = require("@hestia-earth/schema"); | ||
@@ -62,6 +62,7 @@ var utils_1 = require("./utils"); | ||
}; | ||
exports.defaultSiteArea = defaultSiteArea; | ||
var extendCycle = function (nodes, cycle) { | ||
var product = (0, exports.primaryProduct)(cycle.products); | ||
var site = findLinkedNode(nodes, schema_1.SchemaType.Site, cycle.site); | ||
return __assign(__assign(__assign({}, cycle), { name: (0, exports.cycleDefaultName)(cycle, site, product) }), defaultSiteArea(cycle)); | ||
return __assign(__assign(__assign({}, cycle), { name: (0, exports.cycleDefaultName)(cycle, site, product) }), (0, exports.defaultSiteArea)(cycle)); | ||
}; | ||
@@ -68,0 +69,0 @@ exports.extendCycle = extendCycle; |
{ | ||
"name": "@hestia-earth/schema-convert", | ||
"version": "29.1.0", | ||
"version": "30.0.0", | ||
"description": "HESTIA Schema Converters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
71803
1532