async function initialSetup() {
// Clear previous data sets
const storeKeys = ["categories_store", "details_store"]
for (const storeKey of storeKeys) {
try {
const store = await KeyValueStore.open(storeKey)
await store.drop()
} catch (error) {
console.log(error)
continue
}
}
// Create outputs directory if it doesn't exist
if (!fs.existsSync("outputs")) {
fs.mkdirSync("outputs")
}
}
async function initialSetup() {
// Clear previous data sets
const storeKeys = ["categories_store", "details_store"]
for (const storeKey of storeKeys) {
try {
const store = await KeyValueStore.open(storeKey)
await store.drop()
} catch (error) {
console.log(error)
continue
}
}
// Create outputs directory if it doesn't exist
if (!fs.existsSync("outputs")) {
fs.mkdirSync("outputs")
}
}