diff options
Diffstat (limited to 'updater')
-rwxr-xr-x | updater/main.js | 18 | ||||
-rwxr-xr-x | updater/package-lock.json | 25 | ||||
-rwxr-xr-x | updater/package.json | 2 |
3 files changed, 27 insertions, 18 deletions
diff --git a/updater/main.js b/updater/main.js index 15ca4dc..e3d59e6 100755 --- a/updater/main.js +++ b/updater/main.js @@ -4,19 +4,19 @@ require('os').setPriority(19); const { app, Tray, Menu, shell } = require('electron'); const fs = require('fs'); -const libprisbeam = require('libprisbeam'); +const libfaunerie = require('libfaunerie'); const execCb = require('child_process').exec; let tray = null; app.whenReady().then(() => { const config = app.getPath("userData"); - if (!fs.existsSync(config + "/database.txt")) fs.writeFileSync(config + "/database.txt", "# Insert the full path to your Prisbeam database below:\n\n# Insert your Derpibooru username below:\n\n# (if you have not registered for Prisbeam Cloud, please contact Equestria.dev)"); + if (!fs.existsSync(config + "/database.txt")) fs.writeFileSync(config + "/database.txt", "# Insert the full path to your Faunerie database below:\n\n# Insert your Derpibooru username below:\n\n# (if you have not registered for Faunerie Cloud, please contact Equestria.dev)"); if (!fs.existsSync(config + "/last.txt")) fs.writeFileSync(config + "/last.txt", "0"); if (process.platform === "darwin") app.dock.hide(); tray = new Tray(__dirname + "/tray/16x16Template@2x.png"); - tray.setToolTip("Prisbeam Updater"); + tray.setToolTip("Faunerie Updater"); let update = null; @@ -100,7 +100,7 @@ app.whenReady().then(() => { fs.writeFileSync(databasePath + "/updater.pbmk", process.pid.toString()); - let database = new libprisbeam.Prisbeam({ + let database = new libfaunerie.Faunerie({ database: databasePath, cachePath: config + "/temp", sqlitePath: process.platform === "darwin" ? "../../../sql/mac" : "../../../sql/win", @@ -110,7 +110,7 @@ app.whenReady().then(() => { }); await database.initialize(true); - let updater = new libprisbeam.PrisbeamUpdater(database); + let updater = new libfaunerie.FaunerieUpdater(database); await updater.updateFromPreprocessed(config + "/temp/preprocessed.db", config + "/temp/tags.db", (status) => { update = status; updateTray(); @@ -132,7 +132,7 @@ app.whenReady().then(() => { function updateTray() { let template = [ - { label: "Prisbeam Updater", type: 'normal', enabled: false, icon: __dirname + "/menu/16x16@2x.png" }, + { label: "Faunerie Updater", type: 'normal', enabled: false, icon: __dirname + "/menu/16x16@2x.png" }, { type: 'separator' }, ]; @@ -149,7 +149,7 @@ app.whenReady().then(() => { { type: 'separator' }, - { label: "Open Prisbeam", enabled: false }, + { label: "Open Faunerie", enabled: false }, ]); } else { template.push(...[ @@ -164,7 +164,7 @@ app.whenReady().then(() => { { type: 'separator' }, - { label: "Open Prisbeam", enabled: false, }, + { label: "Open Faunerie", enabled: false, }, ]); } } else { @@ -179,7 +179,7 @@ app.whenReady().then(() => { { type: 'separator' }, - { label: "Open Prisbeam", enabled: false }, + { label: "Open Faunerie", enabled: false }, ]); } diff --git a/updater/package-lock.json b/updater/package-lock.json index e1098d5..99658cf 100755 --- a/updater/package-lock.json +++ b/updater/package-lock.json @@ -7,7 +7,7 @@ "": { "version": "1.0.0", "dependencies": { - "libprisbeam": "git+https://github.com/equestria-dev/libprisbeam.git/", + "libfaunerie": "github:equestria-dev/libfaunerie", "sqlite3": "^5.1.7" }, "devDependencies": { @@ -333,7 +333,6 @@ "version": "20.12.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", - "dev": true, "dependencies": { "undici-types": "~5.26.4" } @@ -347,6 +346,14 @@ "@types/node": "*" } }, + "node_modules/@types/sqlite3": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/@types/sqlite3/-/sqlite3-3.1.11.tgz", + "integrity": "sha512-KYF+QgxAnnAh7DWPdNDroxkDI3/MspH1NMx6m/N/6fT1G6+jvsw4/ZePt8R8cr7ta58aboeTfYFBDxTJ5yv15w==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", @@ -2224,10 +2231,13 @@ "json-buffer": "3.0.1" } }, - "node_modules/libprisbeam": { - "version": "2.3.3", - "resolved": "git+ssh://git@github.com/equestria-dev/libprisbeam.git#7bf016d82110d45de4287ee91b5b1a1a2e75d45d", - "hasInstallScript": true + "node_modules/libfaunerie": { + "version": "2.4.0", + "resolved": "git+ssh://git@github.com/equestria-dev/libfaunerie.git#e2dc982e0530f11c5afd673b08ccab2e7d1341ad", + "hasInstallScript": true, + "dependencies": { + "@types/sqlite3": "^3.1.11" + } }, "node_modules/load-json-file": { "version": "2.0.0", @@ -3507,8 +3517,7 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" }, "node_modules/unique-filename": { "version": "1.1.1", diff --git a/updater/package.json b/updater/package.json index 0e53ee8..34f86f2 100755 --- a/updater/package.json +++ b/updater/package.json @@ -2,7 +2,7 @@ "main": "main.js", "version": "1.0.0", "dependencies": { - "libprisbeam": "git+https://github.com/equestria-dev/libprisbeam.git/", + "libfaunerie": "github:equestria-dev/libfaunerie", "sqlite3": "^5.1.7" }, "devDependencies": { |