@hestia-earth/data-validation 0.41.1 → 0.41.3
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.d.mts +237 -0
- package/file-errors/public-api.d.ts +237 -0
- package/file-errors/public-api.js +2281 -0
- package/file-errors/public-api.mjs +2260 -0
- package/index.js +12 -2
- package/index.mjs +12 -2
- package/package.json +26 -8
- package/validation.json +12 -2
package/index.js
CHANGED
|
@@ -149,9 +149,9 @@ var validations = [
|
|
|
149
149
|
message: "the value provided is not consistent with the model result"
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
|
-
function: "
|
|
152
|
+
function: "validate_duplicated_terms",
|
|
153
153
|
level: "warning",
|
|
154
|
-
message: "should not use
|
|
154
|
+
message: "should not use several terms describing the same product"
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
function: "validate_other_model",
|
|
@@ -583,6 +583,11 @@ var validations = [
|
|
|
583
583
|
level: "error",
|
|
584
584
|
message: "is not an allowed excreta product"
|
|
585
585
|
},
|
|
586
|
+
{
|
|
587
|
+
function: "validate_requires_water_salinity",
|
|
588
|
+
level: "error",
|
|
589
|
+
message: "requires a water salinity measurement"
|
|
590
|
+
},
|
|
586
591
|
{
|
|
587
592
|
function: "validate_has_animals",
|
|
588
593
|
level: "warning",
|
|
@@ -633,6 +638,11 @@ var validations = [
|
|
|
633
638
|
level: "error",
|
|
634
639
|
message: "saplings cannot be used as an input here"
|
|
635
640
|
},
|
|
641
|
+
{
|
|
642
|
+
function: "validate_material_depreciated",
|
|
643
|
+
level: "error",
|
|
644
|
+
message: "must use the depreciated term"
|
|
645
|
+
},
|
|
636
646
|
{
|
|
637
647
|
function: "validate_input_is_product",
|
|
638
648
|
level: "error",
|
package/index.mjs
CHANGED
|
@@ -147,9 +147,9 @@ var validations = [
|
|
|
147
147
|
message: "the value provided is not consistent with the model result"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
|
-
function: "
|
|
150
|
+
function: "validate_duplicated_terms",
|
|
151
151
|
level: "warning",
|
|
152
|
-
message: "should not use
|
|
152
|
+
message: "should not use several terms describing the same product"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
function: "validate_other_model",
|
|
@@ -581,6 +581,11 @@ var validations = [
|
|
|
581
581
|
level: "error",
|
|
582
582
|
message: "is not an allowed excreta product"
|
|
583
583
|
},
|
|
584
|
+
{
|
|
585
|
+
function: "validate_requires_water_salinity",
|
|
586
|
+
level: "error",
|
|
587
|
+
message: "requires a water salinity measurement"
|
|
588
|
+
},
|
|
584
589
|
{
|
|
585
590
|
function: "validate_has_animals",
|
|
586
591
|
level: "warning",
|
|
@@ -631,6 +636,11 @@ var validations = [
|
|
|
631
636
|
level: "error",
|
|
632
637
|
message: "saplings cannot be used as an input here"
|
|
633
638
|
},
|
|
639
|
+
{
|
|
640
|
+
function: "validate_material_depreciated",
|
|
641
|
+
level: "error",
|
|
642
|
+
message: "must use the depreciated term"
|
|
643
|
+
},
|
|
634
644
|
{
|
|
635
645
|
function: "validate_input_is_product",
|
|
636
646
|
level: "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/data-validation",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.3",
|
|
4
4
|
"description": "HESTIA Data Validation library",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
"default": "./index.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
+
"./file-errors": {
|
|
21
|
+
"import": {
|
|
22
|
+
"types": "./file-errors/public-api.d.mts",
|
|
23
|
+
"default": "./file-errors/public-api.mjs"
|
|
24
|
+
},
|
|
25
|
+
"require": {
|
|
26
|
+
"types": "./file-errors/public-api.d.ts",
|
|
27
|
+
"default": "./file-errors/public-api.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
20
30
|
"./*.js": "./*.js",
|
|
21
31
|
"./*": "./*"
|
|
22
32
|
},
|
|
@@ -26,18 +36,20 @@
|
|
|
26
36
|
"index.mjs",
|
|
27
37
|
"index.d.ts",
|
|
28
38
|
"index.d.mts",
|
|
29
|
-
"validation.json"
|
|
39
|
+
"validation.json",
|
|
40
|
+
"file-errors"
|
|
30
41
|
],
|
|
31
42
|
"directories": {
|
|
32
43
|
"test": "tests"
|
|
33
44
|
},
|
|
34
45
|
"scripts": {
|
|
35
|
-
"build:module": "rm -
|
|
46
|
+
"build:module": "rm -rf index.js index.mjs index.d.ts index.d.mts file-errors && tsup",
|
|
36
47
|
"test": "hestia-validate-jsonld tests/fixtures",
|
|
37
48
|
"lint": "tsc --noEmit && eslint .",
|
|
38
49
|
"lint:fix": "npm run lint -- --fix",
|
|
39
50
|
"release": "standard-version -a",
|
|
40
|
-
"postrelease": "git push origin master --follow-tags"
|
|
51
|
+
"postrelease": "git push origin master --follow-tags",
|
|
52
|
+
"test:module": "vitest run"
|
|
41
53
|
},
|
|
42
54
|
"repository": {
|
|
43
55
|
"type": "git",
|
|
@@ -60,9 +72,10 @@
|
|
|
60
72
|
"@commitlint/cli": "^17.8.1",
|
|
61
73
|
"@commitlint/config-conventional": "^17.8.1",
|
|
62
74
|
"@hestia-earth/eslint-config": "^0.1.1",
|
|
63
|
-
"@hestia-earth/json-schema": "^39.0.
|
|
64
|
-
"@hestia-earth/schema": "^39.0.
|
|
65
|
-
"@hestia-earth/schema-validation": "^39.0.
|
|
75
|
+
"@hestia-earth/json-schema": "^39.0.1",
|
|
76
|
+
"@hestia-earth/schema": "^39.0.1",
|
|
77
|
+
"@hestia-earth/schema-validation": "^39.0.1",
|
|
78
|
+
"@hestia-earth/utils": "^0.17.17",
|
|
66
79
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
67
80
|
"@typescript-eslint/parser": "^5.62.0",
|
|
68
81
|
"eslint": "^7.32.0",
|
|
@@ -70,7 +83,8 @@
|
|
|
70
83
|
"husky": "~4.3.8",
|
|
71
84
|
"standard-version": "^9.5.0",
|
|
72
85
|
"tsup": "^8.3.5",
|
|
73
|
-
"typescript": "^5.9.3"
|
|
86
|
+
"typescript": "^5.9.3",
|
|
87
|
+
"vitest": "^3.2.4"
|
|
74
88
|
},
|
|
75
89
|
"standard-version": {
|
|
76
90
|
"scripts": {
|
|
@@ -81,5 +95,9 @@
|
|
|
81
95
|
"hooks": {
|
|
82
96
|
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
83
97
|
}
|
|
98
|
+
},
|
|
99
|
+
"peerDependencies": {
|
|
100
|
+
"@hestia-earth/schema": ">=37.0.0",
|
|
101
|
+
"@hestia-earth/utils": "^0.17.17"
|
|
84
102
|
}
|
|
85
103
|
}
|
package/validation.json
CHANGED
|
@@ -136,9 +136,9 @@
|
|
|
136
136
|
"message": "the value provided is not consistent with the model result"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
"function": "
|
|
139
|
+
"function": "validate_duplicated_terms",
|
|
140
140
|
"level": "warning",
|
|
141
|
-
"message": "should not use
|
|
141
|
+
"message": "should not use several terms describing the same product"
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
"function": "validate_other_model",
|
|
@@ -570,6 +570,11 @@
|
|
|
570
570
|
"level": "error",
|
|
571
571
|
"message": "is not an allowed excreta product"
|
|
572
572
|
},
|
|
573
|
+
{
|
|
574
|
+
"function": "validate_requires_water_salinity",
|
|
575
|
+
"level": "error",
|
|
576
|
+
"message": "requires a water salinity measurement"
|
|
577
|
+
},
|
|
573
578
|
{
|
|
574
579
|
"function": "validate_has_animals",
|
|
575
580
|
"level": "warning",
|
|
@@ -620,6 +625,11 @@
|
|
|
620
625
|
"level": "error",
|
|
621
626
|
"message": "saplings cannot be used as an input here"
|
|
622
627
|
},
|
|
628
|
+
{
|
|
629
|
+
"function": "validate_material_depreciated",
|
|
630
|
+
"level": "error",
|
|
631
|
+
"message": "must use the depreciated term"
|
|
632
|
+
},
|
|
623
633
|
{
|
|
624
634
|
"function": "validate_input_is_product",
|
|
625
635
|
"level": "error",
|