@tracepass/dpp-schemas 1.6.1 → 1.7.1
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/README.md +20 -8
- package/index.json +8 -8
- package/package.json +6 -4
- package/templates/battery.json +250 -9
- package/templates/construction.json +97 -1
- package/templates/detergents.json +474 -13
- package/templates/electronics.json +409 -156
- package/templates/fmcg.json +84 -0
- package/templates/furniture.json +159 -1
- package/templates/jewelry.json +104 -0
- package/templates/packaging.json +132 -0
- package/templates/paints-coatings.json +454 -122
- package/templates/steel.json +242 -27
- package/templates/textile.json +120 -0
- package/templates/toys.json +28 -0
- package/templates/tyres.json +190 -109
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
[](./LICENSE)
|
|
12
12
|
[](https://www.npmjs.com/package/@tracepass/dpp-schemas)
|
|
13
|
-
[](#whats-in-here)
|
|
14
14
|
[](#whats-in-here)
|
|
15
15
|
[](#no-build-step)
|
|
16
16
|
[](./schema.json)
|
|
@@ -39,24 +39,24 @@ this repository contains.
|
|
|
39
39
|
|
|
40
40
|
## What's in here
|
|
41
41
|
|
|
42
|
-
Thirteen JSON files, one per product category. **
|
|
43
|
-
an instrument in force;
|
|
42
|
+
Thirteen JSON files, one per product category. **987 fields in total. 152 are required by
|
|
43
|
+
an instrument in force; 229 are anticipated under a rule that has not yet been adopted.**
|
|
44
44
|
|
|
45
45
|
| Category | Fields | Required | Instrument |
|
|
46
46
|
|---|---:|---:|---|
|
|
47
47
|
| `battery` | 120 | 50 | Regulation (EU) 2023/1542 |
|
|
48
48
|
| `construction` | 49 | 4 | CPR (EU) 2024/3110 |
|
|
49
49
|
| `detergents` | 83 | 18 | Regulation (EU) 2026/405 |
|
|
50
|
-
| `electronics` |
|
|
50
|
+
| `electronics` | 161 | 4 | ESPR (EU) 2024/1781 |
|
|
51
51
|
| `fmcg` | 42 | 9 | ESPR (EU) 2024/1781 |
|
|
52
52
|
| `furniture` | 79 | 4 | ESPR (EU) 2024/1781 |
|
|
53
53
|
| `jewelry` | 53 | 3 | ESPR (EU) 2024/1781 |
|
|
54
54
|
| `packaging` | 66 | 8 | PPWR (EU) 2025/40 |
|
|
55
|
-
| `paints-coatings` |
|
|
56
|
-
| `steel` | 84 |
|
|
55
|
+
| `paints-coatings` | 69 | 15 | Directive 2004/42/EC |
|
|
56
|
+
| `steel` | 84 | 16 | ESPR (EU) 2024/1781 |
|
|
57
57
|
| `textile` | 60 | 5 | ESPR (EU) 2024/1781 |
|
|
58
58
|
| `toys` | 28 | 14 | Regulation (EU) 2025/2509 |
|
|
59
|
-
| `tyres` |
|
|
59
|
+
| `tyres` | 93 | 2 | ESPR (EU) 2024/1781 |
|
|
60
60
|
|
|
61
61
|
Battery carries the most required fields because Regulation (EU) 2023/1542 Art. 77 sets a
|
|
62
62
|
real statutory date — 18 February 2027 — rather than awaiting a delegated act. The only
|
|
@@ -259,6 +259,18 @@ Two conventions the schema pins down, both of which will bite you otherwise:
|
|
|
259
259
|
Treat `null` as *no constraint*, and be careful not to coerce it to `0`.
|
|
260
260
|
- **Dates are ISO 8601 strings** (`"2027-02-18"`), not timestamps.
|
|
261
261
|
|
|
262
|
+
The schema checks shape only. `npm run check` adds the gates it cannot express, and CI
|
|
263
|
+
runs it on every push:
|
|
264
|
+
|
|
265
|
+
- **Locales** (`scripts/check-locales.mjs`): every label carries all 24 EU languages;
|
|
266
|
+
every description and option label carries at least English, Bulgarian, German and
|
|
267
|
+
Italian. Strings still below 24 languages are listed in `scripts/locale-gaps.json`,
|
|
268
|
+
which may only shrink.
|
|
269
|
+
- **Citations** (`audit/`): whether each field's citation supports the obligation it
|
|
270
|
+
claims. It catches a field required under an act that mandates nothing, an article
|
|
271
|
+
missing from the act it cites, duplicate fields, and one key with two units. See
|
|
272
|
+
[`audit/README.md`](./audit/README.md).
|
|
273
|
+
|
|
262
274
|
## Related
|
|
263
275
|
|
|
264
276
|
- **[tracepass-open](https://github.com/malinoto/tracepass-open)** — the compliance
|
|
@@ -282,7 +294,7 @@ market-placement decision. Corrections are welcome — open an issue.
|
|
|
282
294
|
|
|
283
295
|
Corrections to a field's regulatory citation, datatype, or translation are the most
|
|
284
296
|
valuable contributions. Open an issue with the article you're citing, or a pull request
|
|
285
|
-
that keeps `
|
|
297
|
+
that keeps `npm run check` passing.
|
|
286
298
|
|
|
287
299
|
## License
|
|
288
300
|
|
package/index.json
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
},
|
|
8
8
|
"totals": {
|
|
9
9
|
"categories": 13,
|
|
10
|
-
"fields":
|
|
11
|
-
"requiredFields":
|
|
12
|
-
"anticipatedFields":
|
|
10
|
+
"fields": 987,
|
|
11
|
+
"requiredFields": 152,
|
|
12
|
+
"anticipatedFields": 229
|
|
13
13
|
},
|
|
14
14
|
"categories": [
|
|
15
15
|
{
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"label": "Electronics",
|
|
68
68
|
"file": "templates/electronics.json",
|
|
69
69
|
"version": 2,
|
|
70
|
-
"fieldCount":
|
|
70
|
+
"fieldCount": 161,
|
|
71
71
|
"requiredFieldCount": 4,
|
|
72
72
|
"anticipatedFieldCount": 19,
|
|
73
73
|
"regulation": {
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"label": "Paints & Coatings",
|
|
158
158
|
"file": "templates/paints-coatings.json",
|
|
159
159
|
"version": 1,
|
|
160
|
-
"fieldCount":
|
|
160
|
+
"fieldCount": 69,
|
|
161
161
|
"requiredFieldCount": 15,
|
|
162
162
|
"anticipatedFieldCount": 12,
|
|
163
163
|
"regulation": {
|
|
@@ -174,8 +174,8 @@
|
|
|
174
174
|
"file": "templates/steel.json",
|
|
175
175
|
"version": 2,
|
|
176
176
|
"fieldCount": 84,
|
|
177
|
-
"requiredFieldCount":
|
|
178
|
-
"anticipatedFieldCount":
|
|
177
|
+
"requiredFieldCount": 16,
|
|
178
|
+
"anticipatedFieldCount": 27,
|
|
179
179
|
"regulation": {
|
|
180
180
|
"name": "EU ESPR - Iron, Steel & Aluminium",
|
|
181
181
|
"number": "(EU) 2024/1781",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"label": "Tyres",
|
|
226
226
|
"file": "templates/tyres.json",
|
|
227
227
|
"version": 2,
|
|
228
|
-
"fieldCount":
|
|
228
|
+
"fieldCount": 93,
|
|
229
229
|
"requiredFieldCount": 2,
|
|
230
230
|
"anticipatedFieldCount": 26,
|
|
231
231
|
"regulation": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tracepass/dpp-schemas",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Machine-readable field specifications for EU Digital Product Passports (ESPR) — 13 product categories,
|
|
3
|
+
"version": "1.7.1",
|
|
4
|
+
"description": "Machine-readable field specifications for EU Digital Product Passports (ESPR) — 13 product categories, 987 fields, each traced to the article of EU law that mandates it. Pure JSON, no dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"digital-product-passport",
|
|
7
7
|
"dpp",
|
|
@@ -46,7 +46,9 @@
|
|
|
46
46
|
"validate": "python3 -c \"import json,glob,sys;from jsonschema import Draft202012Validator as V;v=V(json.load(open('schema.json')));bad=0\nfor p in sorted(glob.glob('templates/*.json')):\n e=list(v.iter_errors(json.load(open(p))));bad+=bool(e);print(('FAIL' if e else 'ok '),p)\n [print(' ',str(x.absolute_path),x.message[:120]) for x in e[:3]]\nsys.exit(1 if bad else 0)\"",
|
|
47
47
|
"build:index": "node scripts/build-index.mjs",
|
|
48
48
|
"check:index": "node scripts/build-index.mjs --check",
|
|
49
|
-
"check": "npm run validate && npm run check:index && npm run check:standards",
|
|
50
|
-
"check:standards": "node scripts/check-standards.mjs"
|
|
49
|
+
"check": "npm run validate && npm run check:index && npm run check:standards && npm run check:locales && npm run check:audit",
|
|
50
|
+
"check:standards": "node scripts/check-standards.mjs",
|
|
51
|
+
"check:locales": "node scripts/check-locales.mjs",
|
|
52
|
+
"check:audit": "node audit/audit.mjs"
|
|
51
53
|
}
|
|
52
54
|
}
|