Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
FlashStore,
FlashStoreSync,
VERSION,
} from 'flash-store'
if (VERSION === '0.0.0') {
throw new Error('version should be set befoer publishing')
}
const store = new FlashStore()
store.destroy()
const storeSync = new FlashStoreSync()
storeSync.destroy()
console.info(`Smoke Testing v${store.version()} PASSED!`)
'.wechaty',
'puppet-macpro-cache',
path.sep,
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFile = new FlashStore(path.join(baseDir, 'file-cache'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${await contactTotal} Contacts, cachedir="${baseDir}"`)
}
path.sep,
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFile = new FlashStore(path.join(baseDir, 'file-cache'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${await contactTotal} Contacts, cachedir="${baseDir}"`)
}
'puppet-macpro-cache',
path.sep,
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFile = new FlashStore(path.join(baseDir, 'file-cache'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${await contactTotal} Contacts, cachedir="${baseDir}"`)
}
path.sep,
'.wechaty',
'puppet-padplus-cache',
path.sep,
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheWXID = new FlashStore(path.join(baseDir, 'accound-wxid'))
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${contactTotal} Contacts, cachedir="${baseDir}"`)
}
path.sep,
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheWXID = new FlashStore(path.join(baseDir, 'accound-wxid'))
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${contactTotal} Contacts, cachedir="${baseDir}"`)
}
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFile = new FlashStore(path.join(baseDir, 'file-cache'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${await contactTotal} Contacts, cachedir="${baseDir}"`)
}
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheWXID = new FlashStore(path.join(baseDir, 'accound-wxid'))
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${contactTotal} Contacts, cachedir="${baseDir}"`)
}
'puppet-padplus-cache',
path.sep,
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheWXID = new FlashStore(path.join(baseDir, 'accound-wxid'))
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${contactTotal} Contacts, cachedir="${baseDir}"`)
}
path.sep,
'.wechaty',
'puppet-macpro-cache',
path.sep,
'flash-store-v0.14',
path.sep,
userId,
)
const baseDirExist = await fs.pathExists(baseDir)
if (!baseDirExist) {
await fs.mkdirp(baseDir)
}
this.cacheContactRawPayload = new FlashStore(path.join(baseDir, 'contact-raw-payload'))
this.cacheRoomMemberRawPayload = new FlashStore(path.join(baseDir, 'room-member-raw-payload'))
this.cacheRoomRawPayload = new FlashStore(path.join(baseDir, 'room-raw-payload'))
this.cacheFile = new FlashStore(path.join(baseDir, 'file-cache'))
this.cacheFriendshipRawPayload = new FlashStore(path.join(baseDir, 'friendship'))
const contactTotal = this.cacheContactRawPayload.size
log.verbose(PRE, `initCache() inited ${await contactTotal} Contacts, cachedir="${baseDir}"`)
}