Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions amazon/amazon-playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
const state = {
profile: null,
orders: [],
isComplete: false,
};

// ─── Login Detection ──────────────────────────────────────
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 : ''}.`
Expand Down
5 changes: 5 additions & 0 deletions icons/amazon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"metadata": "amazon/amazon-playwright.json"
},
"checksums": {
"script": "sha256:4a318b3c3884661929d8625ec04fac57b9fcd0d7508b699a8a3c9eba758c8f0a",
"script": "sha256:100c67c03ae09bcafe4ff21f59ec67c5960536d9dabcf3ee92c3a990eaf7b634",
"metadata": "sha256:8427eb8dd0a8bd588b3f579923c6294e6897aef9d45f83bc6fd9bdce96499f77"
}
}
Expand Down
2 changes: 1 addition & 1 deletion schemas/amazon.orders.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
}
},
"required": ["orderId", "items"],
"required": ["items"],
"additionalProperties": false
}
},
Expand Down