diff --git a/amazon/amazon-playwright.js b/amazon/amazon-playwright.js index 4e958b3..8dd4af7 100644 --- a/amazon/amazon-playwright.js +++ b/amazon/amazon-playwright.js @@ -15,7 +15,6 @@ const state = { profile: null, orders: [], - isComplete: false, }; // ─── Login Detection ────────────────────────────────────── @@ -304,7 +303,7 @@ const fetchOrderPrices = async (orderId) => { }; // Enrich a batch of orders with per-item prices from their detail pages -const enrichOrdersWithPrices = async (orders, progressPrefix) => { +const enrichOrdersWithPrices = async (orders) => { for (let i = 0; i < orders.length; i++) { const order = orders[i]; if (!order.orderId) continue; @@ -475,14 +474,13 @@ const extractOrdersForYear = async (year, stepLabel) => { exportSummary: { count: allOrders.length, label: allOrders.length === 1 ? 'order' : 'orders', - details: `${allOrders.length} orders (${totalItems} items) across ${yearSpan} years`, + details: `${allOrders.length} orders (${totalItems} items) across ${yearSpan} ${yearSpan === 1 ? 'year' : 'years'}`, }, timestamp: new Date().toISOString(), version: '1.0.0-playwright', platform: 'amazon', }; - state.isComplete = true; await page.setData('result', result); await page.setData('status', `Complete! ${allOrders.length} orders (${totalItems} items) collected${state.profile?.name ? ' for ' + state.profile.name : ''}.` diff --git a/icons/amazon.svg b/icons/amazon.svg new file mode 100644 index 0000000..656f28c --- /dev/null +++ b/icons/amazon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/registry.json b/registry.json index cd8504b..c87dfae 100644 --- a/registry.json +++ b/registry.json @@ -134,7 +134,7 @@ "metadata": "amazon/amazon-playwright.json" }, "checksums": { - "script": "sha256:4a318b3c3884661929d8625ec04fac57b9fcd0d7508b699a8a3c9eba758c8f0a", + "script": "sha256:100c67c03ae09bcafe4ff21f59ec67c5960536d9dabcf3ee92c3a990eaf7b634", "metadata": "sha256:8427eb8dd0a8bd588b3f579923c6294e6897aef9d45f83bc6fd9bdce96499f77" } } diff --git a/schemas/amazon.orders.json b/schemas/amazon.orders.json index 19aca0e..fd85f2c 100644 --- a/schemas/amazon.orders.json +++ b/schemas/amazon.orders.json @@ -30,7 +30,7 @@ } } }, - "required": ["orderId", "items"], + "required": ["items"], "additionalProperties": false } },