订单提交
This commit is contained in:
@@ -4,6 +4,7 @@ const args = process.argv.slice(2);
|
||||
const command = args[0] || 'sync';
|
||||
const extraArgs = args.slice(1);
|
||||
const billsResume = extraArgs.includes('--resume');
|
||||
const ordersIncremental = extraArgs.includes('--incremental');
|
||||
|
||||
for (const arg of extraArgs) {
|
||||
if (arg.startsWith('--incremental-order-start-date=')) {
|
||||
@@ -11,7 +12,7 @@ for (const arg of extraArgs) {
|
||||
}
|
||||
}
|
||||
|
||||
const { login, scheduleSync, syncAll, syncAllIncremental, syncBillsOnly, syncMessagesOnly } = await import('./sync.js');
|
||||
const { login, scheduleSync, syncAll, syncAllIncremental, syncBillsOnly, syncMessagesOnly, syncOrdersOnly } = await import('./sync.js');
|
||||
|
||||
if (command === 'login') {
|
||||
await login();
|
||||
@@ -36,6 +37,12 @@ if (command === 'bills') {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (command === 'orders') {
|
||||
const summary = await syncOrdersOnly({ resume: billsResume, incremental: ordersIncremental });
|
||||
console.log(JSON.stringify(summary, null, 2));
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (command === 'messages') {
|
||||
const summary = await syncMessagesOnly({ incremental: config.scheduleMode === 'incremental' });
|
||||
console.log(JSON.stringify(summary, null, 2));
|
||||
|
||||
Reference in New Issue
Block a user