@hestia-earth/data-validation 0.40.0 → 0.40.2

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/package.json CHANGED
@@ -1,14 +1,38 @@
1
1
  {
2
2
  "name": "@hestia-earth/data-validation",
3
- "version": "0.40.0",
3
+ "version": "0.40.2",
4
4
  "description": "HESTIA Data Validation library",
5
- "main": "dist/index.js",
6
- "typings": "dist/index.d.ts",
5
+ "main": "index.js",
6
+ "module": "index.mjs",
7
+ "types": "index.d.ts",
8
+ "typings": "index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./index.d.mts",
13
+ "default": "./index.mjs"
14
+ },
15
+ "require": {
16
+ "types": "./index.d.ts",
17
+ "default": "./index.js"
18
+ }
19
+ },
20
+ "./*.js": "./*.js",
21
+ "./*": "./*"
22
+ },
23
+ "sideEffects": false,
24
+ "files": [
25
+ "index.js",
26
+ "index.mjs",
27
+ "index.d.ts",
28
+ "index.d.mts",
29
+ "validation.json"
30
+ ],
7
31
  "directories": {
8
32
  "test": "tests"
9
33
  },
10
34
  "scripts": {
11
- "build:module": "rm -rf dist && tsc -p tsconfig.dist.json",
35
+ "build:module": "rm -f index.js index.mjs index.d.ts && tsup",
12
36
  "test": "hestia-validate-jsonld tests/fixtures",
13
37
  "lint": "tsc --noEmit && eslint .",
14
38
  "lint:fix": "npm run lint -- --fix",
@@ -36,15 +60,16 @@
36
60
  "@commitlint/cli": "^17.8.1",
37
61
  "@commitlint/config-conventional": "^17.8.1",
38
62
  "@hestia-earth/eslint-config": "^0.1.1",
39
- "@hestia-earth/json-schema": "^37.1.0",
40
- "@hestia-earth/schema": "^37.1.0",
41
- "@hestia-earth/schema-validation": "^37.1.0",
63
+ "@hestia-earth/json-schema": "^37.3.1",
64
+ "@hestia-earth/schema": "^37.3.1",
65
+ "@hestia-earth/schema-validation": "^37.3.1",
42
66
  "@typescript-eslint/eslint-plugin": "^5.62.0",
43
67
  "@typescript-eslint/parser": "^5.62.0",
44
68
  "eslint": "^7.32.0",
45
69
  "eslint-plugin-jsdoc": "^30.7.13",
46
70
  "husky": "~4.3.8",
47
71
  "standard-version": "^9.5.0",
72
+ "tsup": "^8.3.5",
48
73
  "typescript": "^5.9.3"
49
74
  },
50
75
  "standard-version": {
package/validation.json CHANGED
@@ -590,6 +590,11 @@
590
590
  "level": "error",
591
591
  "message": "can not be linked to the same type"
592
592
  },
593
+ {
594
+ "function": "validate_related_impact_product",
595
+ "level": "error",
596
+ "message": "can not be linked to a different term"
597
+ },
593
598
  {
594
599
  "function": "_validate_input_value",
595
600
  "level": "warning",
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './validations';
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./validations"), exports);
@@ -1,10 +0,0 @@
1
- export interface IValidation {
2
- function: string;
3
- level: 'error' | 'warning';
4
- message: string;
5
- }
6
- export interface IValidations {
7
- validations: IValidation[];
8
- }
9
- export declare const validations: IValidations;
10
- export declare const validationsByMessage: Record<string, IValidation[]>;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validationsByMessage = exports.validations = void 0;
4
- var data = require("../validation.json");
5
- exports.validations = data;
6
- exports.validationsByMessage = data.validations.reduce(function (prev, curr) {
7
- prev[curr.message] = prev[curr.message] || [];
8
- prev[curr.message].push(curr);
9
- return prev;
10
- }, {});
@@ -1,387 +0,0 @@
1
- {
2
- "fuel": [
3
- "diesel",
4
- "petrol",
5
- "aviationGasoline",
6
- "diesel1D",
7
- "marineDieselOil",
8
- "diesel4D",
9
- "diesel2D",
10
- "gasolineTypeJetFuel",
11
- "en590Diesel",
12
- "petrolBurntIn2StrokeEngine",
13
- "petrolBurntIn4StrokeEngine"
14
- ],
15
- "cropResidue": [
16
- "discardedCropBurnt",
17
- "aboveGroundCropResidueRemoved",
18
- "discardedCropIncorporated",
19
- "discardedCropLeftOnField",
20
- "discardedCropTotal",
21
- "aboveGroundCropResidueBurnt",
22
- "belowGroundCropResidue",
23
- "aboveGroundCropResidueLeftOnField",
24
- "aboveGroundCropResidueIncorporated",
25
- "aboveGroundCropResidueTotal",
26
- "discardedCropRemoved"
27
- ],
28
- "model": [
29
- "aware",
30
- "ipcc2019",
31
- "dewulfEtAl2007",
32
- "worldMeteorologicalOrganization1999",
33
- "pestlciConsensusModel",
34
- "cnspsModel",
35
- "epa2014",
36
- "ipcc2007",
37
- "edip2003",
38
- "spatial",
39
- "landOccupationCalculationUsedDurationOnly",
40
- "pefcrGuidanceDocument2017",
41
- "agribalyse2016",
42
- "hestiaAggregatedData",
43
- "lcImpactAllEffects100Years",
44
- "recipe2008Individualist",
45
- "landOccupationCalculationIncludingUsedAndUnusedDuration",
46
- "impact2002Model",
47
- "ecoinventV2",
48
- "europeanEnvironmentAgency2013",
49
- "ipcc1996",
50
- "ipcc2001",
51
- "rainsModel",
52
- "frischknechtEtAl2000",
53
- "environmentalFootprintV2-0",
54
- "otherModel",
55
- "aggregatedModels",
56
- "ecoIndicator99",
57
- "ipcc2006",
58
- "webbEtAl2012AndSintermannEtAl2012",
59
- "akagiEtAl2011AndIpcc2006",
60
- "recipe2016Egalitarian",
61
- "cml2001Baseline",
62
- "faostat2018",
63
- "recipe2008Hierarchist",
64
- "akiyamaEtAl2010",
65
- "lcImpactAllEffectsInfinite",
66
- "hyde3-2",
67
- "recipe2008Egalitarian",
68
- "chaudharyBrooks2018",
69
- "fantkeEtAl2016",
70
- "ipcc2013ExcludingFeedbacks",
71
- "ipcc2019CountryAverageFertiliserMix",
72
- "lcImpactCertainEffectsInfinite",
73
- "haversineFormula",
74
- "europeanEnvironmentAgency2016",
75
- "lcImpactCertainEffects100Years",
76
- "ridouttPfister2010",
77
- "cml1992",
78
- "ecoinventV3AndEmberClimate",
79
- "pribyl2010",
80
- "usetoxV2-1",
81
- "mapbiomas",
82
- "poschEtAl2008",
83
- "papatryphonEtAl2004",
84
- "ecoinventV3",
85
- "harmonizedWorldSoilDatabaseV1-2",
86
- "sqcb",
87
- "recipe2016Individualist",
88
- "recipe2016Hierarchist",
89
- "emepEea2019",
90
- "ipcc2021",
91
- "gfliDatabaseV2",
92
- "massBalanceModel",
93
- "cml2001NonBaseline",
94
- "ecoIndicator95",
95
- "globalCropWaterModel2008",
96
- "stehfestBouwman2006",
97
- "sqcbFaistEmmeneggerEtAl2009",
98
- "stehfestBouwman2006GisImplementation",
99
- "chaudharyEtAl2015",
100
- "ipcc2013IncludingFeedbacks",
101
- "emepEea2019CountryAverageFertiliserMix",
102
- "semc2000",
103
- "cumulativeEnergyDemandCedMethod",
104
- "dammgen2009",
105
- "linkedImpactAssessment",
106
- "allenEtAl2018",
107
- "schererPfister2015",
108
- "milaICanalsEtAl2007",
109
- "hestia",
110
- "royEtAl2014",
111
- "emissionNotRelevant",
112
- "riskpollModel",
113
- "ecoalimV9",
114
- "pooreNemecek2018",
115
- "lanca",
116
- "environmentalFootprintV3-1",
117
- "ipcc1995",
118
- "akagiEtAl2011",
119
- "jarvisAndPain1994",
120
- "worldSteel",
121
- "directive200829EcOfTheEuropeanParliament",
122
- "kanEtAl2020",
123
- "resourceUseNotRelevant",
124
- "environmentalFootprintV3-0",
125
- "deRuijterEtAl2010",
126
- "usEpa1993",
127
- "blonkConsultants2016",
128
- "bafu2025",
129
- "aware2-0",
130
- "koble2014",
131
- "schmidt2007",
132
- "salca",
133
- "usEpa1995"
134
- ],
135
- "forage": [
136
- "tamarindFreshForage",
137
- "rapeseedFreshForage",
138
- "lebbekFreshForage",
139
- "carobFreshForage",
140
- "flaxFreshForage",
141
- "sunflowerFreshForage",
142
- "cloverFreshForage",
143
- "chicoryFreshForage",
144
- "maizeFreshForage",
145
- "buckwheatFreshForage",
146
- "calliandraFreshForage",
147
- "cockatooFreshForage",
148
- "jackfruitFreshForage",
149
- "cocksfootFreshForage",
150
- "safflowerFreshForage",
151
- "trefoilFreshForage",
152
- "kikuyuFreshForage",
153
- "arrowrootFreshForage",
154
- "itchgrassFreshForage",
155
- "tanniaFreshForage",
156
- "babulFreshForage",
157
- "agatiFreshForage",
158
- "nigerFreshForage",
159
- "ryeFreshForage",
160
- "peanutFreshForage",
161
- "mulgaFreshForage",
162
- "lupinFreshForage",
163
- "wheatFreshForage",
164
- "taroFreshForage",
165
- "peaFreshForage",
166
- "jaraguaFreshForage",
167
- "fenugreekFreshForage",
168
- "hyparrheniaFreshForage",
169
- "ervilFreshForage",
170
- "amaranthFreshForage",
171
- "horoFreshForage",
172
- "tagasasteFreshForage",
173
- "oliveFreshForage",
174
- "tomatoFreshForage",
175
- "triticaleFreshForage",
176
- "panicFreshForage",
177
- "quinoaFreshForage",
178
- "sorghumFreshForage",
179
- "cottonFreshForage",
180
- "ryegrassFreshForage",
181
- "teosinteFreshForage",
182
- "cerealFreshForage",
183
- "alfalfaFreshForage",
184
- "sesbanFreshForage",
185
- "redtopFreshForage",
186
- "bluegrassFreshForage",
187
- "sugarcaneFreshForage",
188
- "soybeanFreshForage",
189
- "lespedezaFreshForage",
190
- "danthoniaFreshForage",
191
- "pulseFreshForage",
192
- "poroFreshForage",
193
- "oatFreshForage",
194
- "lanillaFreshForage",
195
- "mustardFreshForage",
196
- "sainfoinFreshForage",
197
- "burguFreshForage",
198
- "barleyFreshForage",
199
- "turnipFreshForage",
200
- "ottochloaNodosaFreshForage",
201
- "guarBeanFreshForage",
202
- "espartoGrassFreshForage",
203
- "jobSTearsFreshForage",
204
- "foxtailMilletFreshForage",
205
- "hondurasGrassFreshForage",
206
- "cynodonPlectostachyusFreshForage",
207
- "greenleafDesmodiumFreshForage",
208
- "gooseGrassFreshForage",
209
- "starGrassFreshForage",
210
- "yellowIndiangrassFreshForage",
211
- "antelopeGrassFreshForage",
212
- "whiteCloverFreshForage",
213
- "sweetPotatoFreshForage",
214
- "pennisetumTrachyphyllumFreshForage",
215
- "dalGrassFreshForage",
216
- "uradBeanFreshForage",
217
- "wildCaneFreshForage",
218
- "goldenMilletFreshForage",
219
- "ischaemumMuticumFreshForage",
220
- "buffaloGrassFreshForage",
221
- "armgrassMilletFreshForage",
222
- "indianCoralFreshForage",
223
- "germanGrassFreshForage",
224
- "wildScrobicFreshForage",
225
- "koroniviaGrassFreshForage",
226
- "musalGrassFreshForage",
227
- "gliricidiaSepiumFreshForage",
228
- "chrysopogonLatifoliusFreshForage",
229
- "cratyliaArgenteaFreshForage",
230
- "creepingBluegrassFreshForage",
231
- "smutGrassFreshForage",
232
- "giantSetariaFreshForage",
233
- "sunnHempFreshForage",
234
- "signalGrassFreshForage",
235
- "columbusGrassFreshForage",
236
- "fingerMilletFreshForage",
237
- "marvelGrassFreshForage",
238
- "jungleRiceFreshForage",
239
- "tallFescueFreshForage",
240
- "hedgeLucerneFreshForage",
241
- "guineaGrassFreshForage",
242
- "riverTamarindFreshForage",
243
- "hookGrassFreshForage",
244
- "anthephoraNigritanaFreshForage",
245
- "limpoGrassFreshForage",
246
- "echinochloaHaplocladaFreshForage",
247
- "winterThornFreshForage",
248
- "intermediateWheatgrassFreshForage",
249
- "aleppoGrassFreshForage",
250
- "pearlMilletFreshForage",
251
- "mountainRedtopFreshForage",
252
- "kachiGrassFreshForage",
253
- "indianSanburFreshForage",
254
- "caribGrassFreshForage",
255
- "sewanGrassFreshForage",
256
- "buffelGrassFreshForage",
257
- "commonVetchFreshForage",
258
- "landGrassFreshForage",
259
- "whiteMulberryFreshForage",
260
- "sabiGrassFreshForage",
261
- "tocoGrassFreshForage",
262
- "congoGrassFreshForage",
263
- "indianBluegrassFreshForage",
264
- "mnesitheaRottboellioidesFreshForage",
265
- "sporobolusNervosusFreshForage",
266
- "spottedBrachiariaFreshForage",
267
- "pennisetumOrientaleFreshForage",
268
- "timothyGrassFreshForage",
269
- "eriochloaNubicaFreshForage",
270
- "carpetGrassFreshForage",
271
- "sporobolusHelvolusFreshForage",
272
- "missionGrassFreshForage",
273
- "rainTreeFreshForage",
274
- "sudanGrassFreshForage",
275
- "cockspurGrassFreshForage",
276
- "swaziGrassFreshForage",
277
- "polypogonSchimperianusFreshForage",
278
- "coelachyrumYemenicumFreshForage",
279
- "genericGrassFreshForage",
280
- "donkeyGrassFreshForage",
281
- "blackOatFreshForage",
282
- "prosoMilletFreshForage",
283
- "giantReedFreshForage",
284
- "nigeriaGrassFreshForage",
285
- "mungBeanFreshForage",
286
- "umbrellaThornFreshForage",
287
- "breadGrassFreshForage",
288
- "chineseAlbiziaFreshForage",
289
- "fodderBeetFreshForage",
290
- "natalGrassFreshForage",
291
- "pennisetumSquamulatumFreshForage",
292
- "desertGrassFreshForage",
293
- "blanketGrassFreshForage",
294
- "ubaCaneFreshForage",
295
- "slenderGramaFreshForage",
296
- "sporobolusMarginatusFreshForage",
297
- "ravennaGrassFreshForage",
298
- "leptochloaOptusifloraFreshForage",
299
- "chrysopogonFallaxFreshForage",
300
- "mnesitheaSelloanaFreshForage",
301
- "slenderBluestemFreshForage",
302
- "dubiGrassFreshForage",
303
- "paspalidiumDesertorumFreshForage",
304
- "pennisetumStramineumFreshForage",
305
- "trachypogonVestitusFreshForage",
306
- "rhodesGrassFreshForage",
307
- "bungomaGrassFreshForage",
308
- "spearGrassFreshForage",
309
- "jerusalemArtichokeFreshForage",
310
- "chlorisRoxburghianaFreshForage",
311
- "pangolaGrassFreshForage",
312
- "slenderChlorisFreshForage",
313
- "liverseedGrassFreshForage",
314
- "molassesGrassFreshForage",
315
- "birdwoodGrassFreshForage",
316
- "gambaGrassFreshForage",
317
- "andropogonFastigiatusFreshForage",
318
- "arizonaCottontopFreshForage",
319
- "andropogonCanaliculatusFreshForage",
320
- "pigeonPeaFreshForage",
321
- "guriaGrassFreshForage",
322
- "durumWheatFreshForage",
323
- "paraGrassFreshForage",
324
- "torpedoGrassFreshForage",
325
- "sainGrassFreshForage",
326
- "bluePanicFreshForage",
327
- "tripsacumLatifoliumFreshForage",
328
- "bermudaGrassFreshForage",
329
- "setariaLachneaFreshForage",
330
- "hyacinthBeanFreshForage",
331
- "nileGrassFreshForage",
332
- "alangAlangFreshForage",
333
- "elephantGrassFreshForage",
334
- "chlorisPrieuriiFreshForage",
335
- "blackseedGrassFreshForage",
336
- "surinameGrassFreshForage",
337
- "redCloverFreshForage",
338
- "guatemalaGrassFreshForage",
339
- "centipedeGrassFreshForage",
340
- "dallisGrassFreshForage",
341
- "bahiaGrassFreshForage",
342
- "colouredHoodGrassFreshForage",
343
- "falseRhodesGrassFreshForage",
344
- "stAugustineGrassFreshForage",
345
- "commonNeedleGrassFreshForage",
346
- "yellowThatchingGrassFreshForage",
347
- "africanLocustBeanFreshForage",
348
- "whiteSpearGrassFreshForage",
349
- "queenslandBlueGrassFreshForage",
350
- "bulbousCanaryGrassFreshForage",
351
- "grassCloverMixtureFreshForage",
352
- "hairyHerringboneGrassFreshForage",
353
- "milanjeFingerGrassFreshForage",
354
- "africanCouchGrassFreshForage",
355
- "colouredGuineaGrassFreshForage",
356
- "grassAlfalfaMixtureFreshForage",
357
- "smallCanaryGrassFreshForage",
358
- "wildSudanGrassFreshForage",
359
- "woollyFingerGrassFreshForage",
360
- "commonThatchingGrassFreshForage",
361
- "greyLoveGrassFreshForage",
362
- "cushionLoveGrassFreshForage",
363
- "wireLemonGrassFreshForage",
364
- "largeLeafFlemingiaFreshForage",
365
- "weepingLoveGrassFreshForage",
366
- "redRhodesGrassFreshForage",
367
- "lehmannLoveGrassFreshForage",
368
- "stylosanthesCampoGrandeFreshForage",
369
- "giantStarGrassFreshForage",
370
- "blueSignalGrassFreshForage",
371
- "chineseRyeGrassFreshForage",
372
- "masaiLoveGrassFreshForage",
373
- "redOatGrassFreshForage",
374
- "egyptianCrowfootGrassFreshForage",
375
- "swampRiceGrassFreshForage",
376
- "genericLeguminousGrassFreshForage",
377
- "fineThatchingGrassFreshForage",
378
- "nadiBlueGrassFreshForage",
379
- "bigLeafBristleGrassFreshForage"
380
- ],
381
- "rice": [
382
- "riceStraw",
383
- "jungleRiceHay",
384
- "riceGrainInHuskUpland",
385
- "riceGrainInHuskFlooded"
386
- ]
387
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './validations';
@@ -1,22 +0,0 @@
1
- import * as data from '../validation.json';
2
-
3
- export interface IValidation {
4
- function: string;
5
- level: 'error' | 'warning';
6
- message: string;
7
- }
8
-
9
- export interface IValidations {
10
- validations: IValidation[];
11
- }
12
-
13
- export const validations = data as IValidations;
14
-
15
- export const validationsByMessage = data.validations.reduce(
16
- (prev, curr: IValidation) => {
17
- prev[curr.message] = prev[curr.message] || [];
18
- prev[curr.message].push(curr);
19
- return prev;
20
- },
21
- {} as Record<string, IValidation[]>
22
- );
package/src/version.ts DELETED
@@ -1 +0,0 @@
1
- export const DATA_VALIDATION_VERSION = '0.40.0';