@reactionary/feeds 0.10.55 → 0.10.56
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/cli.cjs +24 -0
- package/package.json +9 -9
package/cli.cjs
CHANGED
|
@@ -37222,6 +37222,9 @@ var init_product_model = __esm({
|
|
|
37222
37222
|
weee_symbol: boolean2().default(false).meta({ description: "Indicates whether the WEEE symbol can be shown on the product" }),
|
|
37223
37223
|
energy_class: string2().optional().meta({ description: "The energy class of the product, as required by EU regulations. A,B,C,D,E,F,G, etc" }),
|
|
37224
37224
|
garan_duration: number2().optional().meta({ description: "The duration of the guarantee in months as by the EU Garan scheme. Only set if above 24." }),
|
|
37225
|
+
energy_class_range: string2().optional().meta({ description: 'The scale the energy class belongs to, e.g. "A-G", "A++-G" or "A+++-D". Needed to render the EU class arrow, because the same class letter is drawn differently on different scales.' }),
|
|
37226
|
+
eprel_registration_number: string2().optional().meta({ description: "The EPREL registration number of the product model (digits only, up to 19). Together with eprel_product_group it identifies the official EU energy label and class arrow." }),
|
|
37227
|
+
eprel_product_group: string2().optional().meta({ description: 'The EPREL product group URL code the model is registered under, e.g. "spaceheaters" or "localspaceheaters".' }),
|
|
37225
37228
|
safety_warnings: string2().optional().meta({ description: "Any safety warnings associated with the product as required by EU regulations." }),
|
|
37226
37229
|
composition: string2().optional().meta({ description: "The composition of the product as required by EU regulations." }),
|
|
37227
37230
|
additional_disclosures: string2().optional().meta({ description: "Any additional disclosures associated with the product as required by EU regulations." }),
|
|
@@ -37314,6 +37317,9 @@ var init_product_search_model = __esm({
|
|
|
37314
37317
|
weee_symbol: boolean2().default(false).meta({ description: "Indicates whether the WEEE symbol can be shown on the product" }),
|
|
37315
37318
|
energy_class: string2().optional().meta({ description: "The energy class of the product, as required by EU regulations. A,B,C,D,E,F,G, etc" }),
|
|
37316
37319
|
garan_duration: number2().optional().meta({ description: "The duration of the guarantee in months as by the EU Garan scheme. Only set if above 24." }),
|
|
37320
|
+
energy_class_range: string2().optional().meta({ description: 'The scale the energy class belongs to, e.g. "A-G", "A++-G" or "A+++-D". Needed to render the EU class arrow, because the same class letter is drawn differently on different scales.' }),
|
|
37321
|
+
eprel_registration_number: string2().optional().meta({ description: "The EPREL registration number of the product model (digits only, up to 19). Together with eprel_product_group it identifies the official EU energy label and class arrow." }),
|
|
37322
|
+
eprel_product_group: string2().optional().meta({ description: 'The EPREL product group URL code the model is registered under, e.g. "spaceheaters" or "localspaceheaters".' }),
|
|
37317
37323
|
is_organic: boolean2().optional().meta({ description: "Indicates whether the product is organic" }),
|
|
37318
37324
|
organic_certification_type: string2().optional().meta({ description: "The type of organic certification, e.g., EU_ORGANIC_LEAF, GOTS, ECOCERT." })
|
|
37319
37325
|
});
|
|
@@ -161442,6 +161448,18 @@ var init_product_search_capability6 = __esm({
|
|
|
161442
161448
|
});
|
|
161443
161449
|
|
|
161444
161450
|
// packages/medusa/src/utils/product-compliance.ts
|
|
161451
|
+
function parseEnergyClassRange(value) {
|
|
161452
|
+
const text2 = safeStringConvert(value)?.trim();
|
|
161453
|
+
return text2 && /^[A-Za-z0-9+\-–_ ]{1,20}$/.test(text2) ? text2 : void 0;
|
|
161454
|
+
}
|
|
161455
|
+
function parseEprelRegistrationNumber(value) {
|
|
161456
|
+
const text2 = safeStringConvert(value)?.trim();
|
|
161457
|
+
return text2 && /^\d{1,19}$/.test(text2) ? text2 : void 0;
|
|
161458
|
+
}
|
|
161459
|
+
function parseEprelProductGroup(value) {
|
|
161460
|
+
const text2 = safeStringConvert(value)?.trim().toLowerCase();
|
|
161461
|
+
return text2 && /^[a-z0-9]{1,64}$/.test(text2) ? text2 : void 0;
|
|
161462
|
+
}
|
|
161445
161463
|
function parseProductSearchComplianceData(product) {
|
|
161446
161464
|
if (!product.metadata) {
|
|
161447
161465
|
return ProductSearchResultItemComplianceDataSchema.parse({});
|
|
@@ -161452,7 +161470,10 @@ function parseProductSearchComplianceData(product) {
|
|
|
161452
161470
|
ce_marking: safeBoolConvert(metadata["compliance_data_ce_marking"]),
|
|
161453
161471
|
weee_symbol: safeBoolConvert(metadata["compliance_data_weee_symbol"]),
|
|
161454
161472
|
energy_class: safeStringConvert(metadata["compliance_data_energy_class"]),
|
|
161473
|
+
energy_class_range: parseEnergyClassRange(metadata["compliance_data_energy_class_range"]),
|
|
161455
161474
|
garan_duration: duration3 === void 0 || !Number.isFinite(Number(duration3)) ? void 0 : Number(duration3),
|
|
161475
|
+
eprel_registration_number: parseEprelRegistrationNumber(metadata["compliance_data_eprel_registration_number"]),
|
|
161476
|
+
eprel_product_group: parseEprelProductGroup(metadata["compliance_data_eprel_product_group"]),
|
|
161456
161477
|
is_organic: safeBoolConvert(metadata["compliance_data_organic_is_organic"]),
|
|
161457
161478
|
organic_certification_type: safeStringConvert(metadata["compliance_data_organic_certification_type"])
|
|
161458
161479
|
});
|
|
@@ -163635,7 +163656,10 @@ var init_product_factory5 = __esm({
|
|
|
163635
163656
|
ce_marking: shared.ce_marking,
|
|
163636
163657
|
weee_symbol: shared.weee_symbol,
|
|
163637
163658
|
energy_class: shared.energy_class,
|
|
163659
|
+
energy_class_range: shared.energy_class_range,
|
|
163638
163660
|
garan_duration: shared.garan_duration,
|
|
163661
|
+
eprel_registration_number: shared.eprel_registration_number,
|
|
163662
|
+
eprel_product_group: shared.eprel_product_group,
|
|
163639
163663
|
safety_warnings: safeStringConvert(body.metadata?.["compliance_data_safety_warnings"]),
|
|
163640
163664
|
composition: safeStringConvert(body.metadata?.["compliance_data_composition"]),
|
|
163641
163665
|
additional_disclosures: safeStringConvert(body.metadata?.["compliance_data_additional_disclosures"]),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactionary/feeds",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"url": "git+https://github.com/Solteq/reactionary.git"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@reactionary/algolia": "0.10.
|
|
16
|
-
"@reactionary/commercetools": "0.10.
|
|
17
|
-
"@reactionary/core": "0.10.
|
|
18
|
-
"@reactionary/fake": "0.10.
|
|
19
|
-
"@reactionary/magento": "0.10.
|
|
20
|
-
"@reactionary/medusa": "0.10.
|
|
21
|
-
"@reactionary/meilisearch": "0.10.
|
|
22
|
-
"@reactionary/unomi": "0.10.
|
|
15
|
+
"@reactionary/algolia": "0.10.56",
|
|
16
|
+
"@reactionary/commercetools": "0.10.56",
|
|
17
|
+
"@reactionary/core": "0.10.56",
|
|
18
|
+
"@reactionary/fake": "0.10.56",
|
|
19
|
+
"@reactionary/magento": "0.10.56",
|
|
20
|
+
"@reactionary/medusa": "0.10.56",
|
|
21
|
+
"@reactionary/meilisearch": "0.10.56",
|
|
22
|
+
"@reactionary/unomi": "0.10.56",
|
|
23
23
|
"commander": "^15.0.0",
|
|
24
24
|
"dotenv": "^17.2.2",
|
|
25
25
|
"sitemap": "^9.0.1",
|