feat: define validators and use normalize-products step (#12473)
Fixes: FRMW-2965 In this PR we replace/remove the existing step to normalize a CSV file with the newly written CSV normalizer and also we validate the file contents further using a Zod schema. I have duplicated the schema for now. But it is makes sense to re-use the schema for CSV validating and `/admin/products/batch`, then I can keep one source of truth under utils and re-export it. WDYT? **Screenshots of some errors after validating the file strictly**  
This commit is contained in:
1 parent
2affc0d7d9
commit
e149a99886
23 files changed
+1124
-862
No files matched your search
@@ -23530,6 +23530,7 @@ __metadata:
|
||||
"@swc/jest": ^0.2.36
|
||||
form-data: ^4.0.0
|
||||
jest: ^29.7.0
|
||||
json-2-csv: ^5.5.9
|
||||
jsonwebtoken: ^9.0.2
|
||||
pg: ^8.11.3
|
||||
typescript: ^5.6.2
|
||||
@@ -25062,6 +25063,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"json-2-csv@npm:^5.5.9":
|
||||
version: 5.5.9
|
||||
resolution: "json-2-csv@npm:5.5.9"
|
||||
dependencies:
|
||||
deeks: 3.1.0
|
||||
doc-path: 4.1.1
|
||||
checksum: 109b7636ba3ef9b8c53580f89280568e1ecd106b6328f44636869a62eac1f9f2db7a52de0eee04832fa20d4bd9c592ad3fe1a4cf06af0eee3ee612b85f29ed75
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"json-buffer@npm:3.0.1":
|
||||
version: 3.0.1
|
||||
resolution: "json-buffer@npm:3.0.1"
|
||||
|
||||
Reference in new issue
Block a user