@hestia-earth/data-validation 0.41.5 → 0.41.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/file-errors/public-api.js +19 -1
- package/file-errors/public-api.mjs +19 -1
- package/index.js +5 -0
- package/index.mjs +5 -0
- package/package.json +1 -1
- package/validation.json +5 -0
|
@@ -632,6 +632,11 @@ var validations = [
|
|
|
632
632
|
level: "error",
|
|
633
633
|
message: "saplings cannot be used as an input here"
|
|
634
634
|
},
|
|
635
|
+
{
|
|
636
|
+
function: "validate_seed",
|
|
637
|
+
level: "error",
|
|
638
|
+
message: "seed cannot be used as an input here"
|
|
639
|
+
},
|
|
635
640
|
{
|
|
636
641
|
function: "validate_material_depreciated",
|
|
637
642
|
level: "error",
|
|
@@ -1984,7 +1989,7 @@ var createErrorFormatter = ({ renderer: r, urls }) => {
|
|
|
1984
1989
|
`Alternatively, do not set these ${code(schema.TermTermType.landCover)} practices, and they will be gap filled automatically from products.`
|
|
1985
1990
|
])}`,
|
|
1986
1991
|
"should match the site management node value": ({ params }) => `The data you have uploaded in the Management node are not consistent with the data provided in the Cycles.
|
|
1987
|
-
The ${code("value")} of a ${code("Management")} node must be the total of every Practice using the same ${code("term")} between the same ${code("startDate")} and ${code("endDate")} \u2014 your Cycles add up to ${code(params == null ? void 0 : params.current)}, but the ${code("Management")} node has ${code(params == null ? void 0 : params.expected)}
|
|
1992
|
+
${typeof (params == null ? void 0 : params.current) === "boolean" ? `A ${code("Management")} node must have the same ${code("value")} as every Practice using the same ${code("term")} between the same ${code("startDate")} and ${code("endDate")} \u2014 your Cycles say ${code(params == null ? void 0 : params.current)}, but the ${code("Management")} node has ${code(params == null ? void 0 : params.expected)}.` : `The ${code("value")} of a ${code("Management")} node must be the total of every Practice using the same ${code("term")} between the same ${code("startDate")} and ${code("endDate")} \u2014 your Cycles add up to ${code(params == null ? void 0 : params.current)}, but the ${code("Management")} node has ${code(params == null ? void 0 : params.expected)}.`}
|
|
1988
1993
|
Please check your upload and ensure that the data is consistent throughout.`,
|
|
1989
1994
|
"saplings cannot be used as an input here": () => `To input ${code("Saplings")} into a plantation crop Cycle, you must use ${externalNodeLink({
|
|
1990
1995
|
"@type": schema.NodeType.Term,
|
|
@@ -1997,6 +2002,19 @@ var createErrorFormatter = ({ renderer: r, urls }) => {
|
|
|
1997
2002
|
"Saplings"
|
|
1998
2003
|
)} used divided by the number of possible Cycles in the plantation's lifespan.
|
|
1999
2004
|
See the ${guideLink("guide-file-upload-special-cases", "special upload case")} for more details.`,
|
|
2005
|
+
"seed cannot be used as an input here": ({ params }) => `A plantation crop is established from saplings rather than sown, so a plantation Cycle records ${externalNodeLink(
|
|
2006
|
+
{
|
|
2007
|
+
"@type": schema.NodeType.Term,
|
|
2008
|
+
"@id": String(params.expected),
|
|
2009
|
+
name: "Saplings, depreciated amount per Cycle"
|
|
2010
|
+
}
|
|
2011
|
+
)} and not ${code(params.current)}.
|
|
2012
|
+
Remove the ${code(
|
|
2013
|
+
params.current
|
|
2014
|
+
)} Input, or, if it was sown as a cover crop under the plantation, add the ${termLink({
|
|
2015
|
+
id: "coverCrop",
|
|
2016
|
+
name: "Cover crop"
|
|
2017
|
+
})} Practice to the Cycle.`,
|
|
2000
2018
|
"must use the depreciated term": ({ params }) => {
|
|
2001
2019
|
var _a, _b;
|
|
2002
2020
|
return `${code(
|
|
@@ -630,6 +630,11 @@ var validations = [
|
|
|
630
630
|
level: "error",
|
|
631
631
|
message: "saplings cannot be used as an input here"
|
|
632
632
|
},
|
|
633
|
+
{
|
|
634
|
+
function: "validate_seed",
|
|
635
|
+
level: "error",
|
|
636
|
+
message: "seed cannot be used as an input here"
|
|
637
|
+
},
|
|
633
638
|
{
|
|
634
639
|
function: "validate_material_depreciated",
|
|
635
640
|
level: "error",
|
|
@@ -1982,7 +1987,7 @@ var createErrorFormatter = ({ renderer: r, urls }) => {
|
|
|
1982
1987
|
`Alternatively, do not set these ${code(TermTermType.landCover)} practices, and they will be gap filled automatically from products.`
|
|
1983
1988
|
])}`,
|
|
1984
1989
|
"should match the site management node value": ({ params }) => `The data you have uploaded in the Management node are not consistent with the data provided in the Cycles.
|
|
1985
|
-
The ${code("value")} of a ${code("Management")} node must be the total of every Practice using the same ${code("term")} between the same ${code("startDate")} and ${code("endDate")} \u2014 your Cycles add up to ${code(params == null ? void 0 : params.current)}, but the ${code("Management")} node has ${code(params == null ? void 0 : params.expected)}
|
|
1990
|
+
${typeof (params == null ? void 0 : params.current) === "boolean" ? `A ${code("Management")} node must have the same ${code("value")} as every Practice using the same ${code("term")} between the same ${code("startDate")} and ${code("endDate")} \u2014 your Cycles say ${code(params == null ? void 0 : params.current)}, but the ${code("Management")} node has ${code(params == null ? void 0 : params.expected)}.` : `The ${code("value")} of a ${code("Management")} node must be the total of every Practice using the same ${code("term")} between the same ${code("startDate")} and ${code("endDate")} \u2014 your Cycles add up to ${code(params == null ? void 0 : params.current)}, but the ${code("Management")} node has ${code(params == null ? void 0 : params.expected)}.`}
|
|
1986
1991
|
Please check your upload and ensure that the data is consistent throughout.`,
|
|
1987
1992
|
"saplings cannot be used as an input here": () => `To input ${code("Saplings")} into a plantation crop Cycle, you must use ${externalNodeLink({
|
|
1988
1993
|
"@type": NodeType.Term,
|
|
@@ -1995,6 +2000,19 @@ var createErrorFormatter = ({ renderer: r, urls }) => {
|
|
|
1995
2000
|
"Saplings"
|
|
1996
2001
|
)} used divided by the number of possible Cycles in the plantation's lifespan.
|
|
1997
2002
|
See the ${guideLink("guide-file-upload-special-cases", "special upload case")} for more details.`,
|
|
2003
|
+
"seed cannot be used as an input here": ({ params }) => `A plantation crop is established from saplings rather than sown, so a plantation Cycle records ${externalNodeLink(
|
|
2004
|
+
{
|
|
2005
|
+
"@type": NodeType.Term,
|
|
2006
|
+
"@id": String(params.expected),
|
|
2007
|
+
name: "Saplings, depreciated amount per Cycle"
|
|
2008
|
+
}
|
|
2009
|
+
)} and not ${code(params.current)}.
|
|
2010
|
+
Remove the ${code(
|
|
2011
|
+
params.current
|
|
2012
|
+
)} Input, or, if it was sown as a cover crop under the plantation, add the ${termLink({
|
|
2013
|
+
id: "coverCrop",
|
|
2014
|
+
name: "Cover crop"
|
|
2015
|
+
})} Practice to the Cycle.`,
|
|
1998
2016
|
"must use the depreciated term": ({ params }) => {
|
|
1999
2017
|
var _a, _b;
|
|
2000
2018
|
return `${code(
|
package/index.js
CHANGED
|
@@ -638,6 +638,11 @@ var validations = [
|
|
|
638
638
|
level: "error",
|
|
639
639
|
message: "saplings cannot be used as an input here"
|
|
640
640
|
},
|
|
641
|
+
{
|
|
642
|
+
function: "validate_seed",
|
|
643
|
+
level: "error",
|
|
644
|
+
message: "seed cannot be used as an input here"
|
|
645
|
+
},
|
|
641
646
|
{
|
|
642
647
|
function: "validate_material_depreciated",
|
|
643
648
|
level: "error",
|
package/index.mjs
CHANGED
|
@@ -636,6 +636,11 @@ var validations = [
|
|
|
636
636
|
level: "error",
|
|
637
637
|
message: "saplings cannot be used as an input here"
|
|
638
638
|
},
|
|
639
|
+
{
|
|
640
|
+
function: "validate_seed",
|
|
641
|
+
level: "error",
|
|
642
|
+
message: "seed cannot be used as an input here"
|
|
643
|
+
},
|
|
639
644
|
{
|
|
640
645
|
function: "validate_material_depreciated",
|
|
641
646
|
level: "error",
|
package/package.json
CHANGED
package/validation.json
CHANGED
|
@@ -625,6 +625,11 @@
|
|
|
625
625
|
"level": "error",
|
|
626
626
|
"message": "saplings cannot be used as an input here"
|
|
627
627
|
},
|
|
628
|
+
{
|
|
629
|
+
"function": "validate_seed",
|
|
630
|
+
"level": "error",
|
|
631
|
+
"message": "seed cannot be used as an input here"
|
|
632
|
+
},
|
|
628
633
|
{
|
|
629
634
|
"function": "validate_material_depreciated",
|
|
630
635
|
"level": "error",
|