-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0667319
commit 9bfa8cc
Showing
81 changed files
with
96,622 additions
and
26,406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
name: NPM Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- run: npm ci | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | ||
name: NPM Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- run: npm ci | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
hehe, my eyes burn now :D | ||
hehe, my eyes burn now :D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,68 @@ | ||
const colors = require('colors'); | ||
const npmUpdater = require('./utils/updater/npm'); | ||
const fileUpdater = require('./utils/updater/files'); | ||
const consolePrefix = `${"[".blue}${"dbd-soft-ui".yellow}${"]".blue} `; | ||
const Keyv = require('keyv'); | ||
const path = require('path') | ||
const colors = require("colors") | ||
const npmUpdater = require("./utils/updater/npm") | ||
const fileUpdater = require("./utils/updater/files") | ||
const consolePrefix = `${"[".blue}${"dbd-soft-ui".yellow}${"]".blue} ` | ||
const Keyv = require("keyv") | ||
const path = require("path") | ||
|
||
module.exports = (themeConfig = {}) => { | ||
return { | ||
themeCodename: 'softui', | ||
viewsPath: path.join(__dirname, '/views'), | ||
staticPath: path.join(__dirname, '/views/src'), | ||
themeCodename: "softui", | ||
viewsPath: path.join(__dirname, "/views"), | ||
staticPath: path.join(__dirname, "/views/src"), | ||
themeConfig: { | ||
...themeConfig, | ||
defaultLocales: require('./locales.js'), | ||
defaultLocales: require("./locales.js"), | ||
}, | ||
messages: { | ||
error: { | ||
addonLicense: `${consolePrefix}${"Failed to initialise {{ADDON}}.\nThe license this addon was installed with does not match your current discord-dashboard license.".cyan}`, | ||
addonLicense: `${consolePrefix}${ | ||
"Failed to initialise {{ADDON}}.\nThe license this addon was installed with does not match your current discord-dashboard license." | ||
.cyan | ||
}`, | ||
}, | ||
success: { | ||
addonLoaded: `${consolePrefix}${"Successfully loaded {{ADDON}}.".cyan}` | ||
} | ||
addonLoaded: `${consolePrefix}${ | ||
"Successfully loaded {{ADDON}}.".cyan | ||
}`, | ||
}, | ||
}, | ||
embedBuilderComponent: require('fs').readFileSync(path.join(__dirname, '/embedBuilderComponent.txt'), 'utf8'), | ||
embedBuilderComponent: require("fs").readFileSync( | ||
path.join(__dirname, "/embedBuilderComponent.txt"), | ||
"utf8" | ||
), | ||
init: async (app, config) => { | ||
let outdated = false; | ||
(async () => { | ||
let check = await npmUpdater.update(); | ||
await fileUpdater.update(); | ||
if (!check) outdated = true; | ||
})(); | ||
let outdated = false | ||
;(async () => { | ||
let check = await npmUpdater.update() | ||
await fileUpdater.update() | ||
if (!check) outdated = true | ||
})() | ||
|
||
const db = new Keyv(themeConfig.dbdriver || "sqlite://"+path.join(__dirname, '/database.sqlite')); | ||
const db = new Keyv( | ||
themeConfig.dbdriver || | ||
"sqlite://" + path.join(__dirname, "/database.sqlite") | ||
) | ||
|
||
db.on('error', err => { console.log('Connection Error', err);process.exit() }); | ||
db.on("error", (err) => { | ||
console.log("Connection Error", err) | ||
process.exit() | ||
}) | ||
|
||
themeConfig = { | ||
...themeConfig, | ||
defaultLocales: require('./locales.js'), | ||
defaultLocales: require("./locales.js"), | ||
} | ||
|
||
require('./utils/functions/errorHandler')(config, themeConfig, db) | ||
require('./utils/functions/settingsPage')(config, themeConfig, db) | ||
require("./utils/functions/errorHandler")(config, themeConfig, db) | ||
require("./utils/functions/settingsPage")(config, themeConfig, db) | ||
// await require('./utils/addonManager').execute(themeConfig, config, app, module.exports.messages); | ||
require('./utils/initPages').init(config, themeConfig, app, db); | ||
} | ||
require("./utils/initPages").init(config, themeConfig, app, db) | ||
}, | ||
} | ||
} | ||
|
||
module.exports.partials = __dirname + '/views/partials'; | ||
module.exports.formTypes = require('./utils/formtypes'); | ||
module.exports.Feed = require('./utils/feedHandler'); | ||
module.exports.cmdHandler = require('./utils/cmdHandler'); | ||
module.exports.partials = __dirname + "/views/partials" | ||
module.exports.formTypes = require("./utils/formtypes") | ||
module.exports.Feed = require("./utils/feedHandler") | ||
module.exports.cmdHandler = require("./utils/cmdHandler") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.