Skip to content

Commit

Permalink
Merge pull request #22 from liquidnya/12-reduce-risk-of-currupting-data
Browse files Browse the repository at this point in the history
Add new save file handling
  • Loading branch information
ToransuShoujo authored Jun 16, 2022
2 parents 8c8420a + 08f08e6 commit 5a49916
Show file tree
Hide file tree
Showing 52 changed files with 1,447 additions and 432 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
/userWaitTime.txt
/waitingUsers.txt
/customCodes.json
/userOnlineTime.txt
/data/

# Secrets
settings.json
settings.json
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const quesoqueue = require("./queue.js").quesoqueue();
const twitch = require("./twitch.js").twitch();
const timer = require("./timer.js");
const fs = require("fs");
var gracefulFs = require("graceful-fs")
// patch fs to use the graceful-fs, to retry a file rename under windows
gracefulFs.gracefulify(fs)

quesoqueue.load();

Expand Down
80 changes: 50 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
"license": "GPL-3.0",
"main": "index.js",
"dependencies": {
"set-interval-async": "^2.0.3",
"graceful-fs": "^4.2.10",
"node-fetch": "^2.6.1",
"tmi.js": "^1.8.5"
"set-interval-async": "^2.0.3",
"tmi.js": "^1.8.5",
"write-file-atomic": "^4.0.1"
},
"scripts": {
"test": "jest --verbose",
Expand Down
Loading

0 comments on commit 5a49916

Please sign in to comment.