feat: export games and protocols besides GameDig (#411)

* feat: export games and protocols besides GameDig

* fix: revert ProtocolResolver rename

* fix: imports on the attempt tools

* docs: update changelog to note exports
This commit is contained in:
CosminPerRam 2023-11-20 11:35:31 +02:00 committed by GitHub
parent f472d8b0e4
commit 8192ed07e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 28 deletions

23
lib/gamedig.js Normal file
View file

@ -0,0 +1,23 @@
import QueryRunner from './QueryRunner.js'
let singleton = null
export class GameDig {
constructor (runnerOpts) {
this.queryRunner = new QueryRunner(runnerOpts)
}
async query (userOptions) {
return await this.queryRunner.run(userOptions)
}
static getInstance () {
if (!singleton) { singleton = new GameDig() }
return singleton
}
static async query (...args) {
return await GameDig.getInstance().query(...args)
}
}