|
|
@@ -1,6 +1,6 @@
|
|
|
import { refresh as refreshAirbnb } from '../airbnb/refresh-cookies';
|
|
|
import { refresh as refreshBooking } from '../booking/refresh-cookies';
|
|
|
-import { refresh as refreshHomestay } from '../homestay/refresh-cookies';
|
|
|
+// import { refresh as refreshHomestay } from '../homestay/refresh-cookies'; // disabled
|
|
|
import { handleOutput } from '../shared/api-client';
|
|
|
import { parseOutputMode } from '../shared/cookie-utils';
|
|
|
import * as path from 'path';
|
|
|
@@ -10,15 +10,13 @@ const DATA_HOME = process.env.ROOM_CAL_DATA_HOME ?? path.join(os.homedir(), '.lo
|
|
|
const mode = parseOutputMode(process.argv);
|
|
|
|
|
|
async function main(): Promise<void> {
|
|
|
- const [airbnbCreds, bookingCreds, homestayCreds] = await Promise.all([
|
|
|
+ const [airbnbCreds, bookingCreds] = await Promise.all([
|
|
|
refreshAirbnb(mode),
|
|
|
refreshBooking(mode),
|
|
|
- refreshHomestay(mode),
|
|
|
]);
|
|
|
await Promise.all([
|
|
|
handleOutput('airbnb', airbnbCreds, mode, path.join(DATA_HOME, 'airbnb.env')),
|
|
|
handleOutput('booking', bookingCreds, mode, path.join(DATA_HOME, 'booking.env')),
|
|
|
- handleOutput('homestay', homestayCreds, mode, path.join(DATA_HOME, 'homestay.env')),
|
|
|
]);
|
|
|
if (mode !== 'stdout') console.error('\nAll credentials refreshed.');
|
|
|
}
|