mirror of
https://github.com/Viren070/stremio-addons-list.git
synced 2025-12-01 23:19:02 +01:00
better support for non netlify deployments
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
TOKEN="github Token"
|
||||
DISCORD_WEBHOOK="discord webhook"
|
||||
REPO="stremio-addons-list"
|
||||
REPO_AUTHOR="danamag"
|
||||
DOMAIN="stremio-addons.com"
|
||||
@@ -2,7 +2,7 @@
|
||||
> [!NOTE]
|
||||
> Due to recent abuse of this repository (malicious addons, spam) by a user called [vancengvn](https://github.com/Vance-ng-vn) we were forced to implement a moderation system. New addon submissions now need explicit approval from a contributor to be published - unless you are on the [trusted publishers](./trusted_publishers.json) list. Please contact a moderator on Discord or Reddit if your addon hasn't been approved after 7 days.
|
||||
|
||||
To see the great list of Stremio Addons go to [the website](https://stremio-addons.netlify.app/).
|
||||
To see the great list of Stremio Addons go to [the website](https://stremio-addons.com/).
|
||||
|
||||
To submit a new addon to the list, use [this link](https://github.com/danamag/stremio-addons-list/issues/new?assignees=&labels=pending+approval&template=submit-addon.yaml&title=Addon+Name).
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ getCached().then(cached => {
|
||||
}, 1)
|
||||
|
||||
queue.drain = () => {
|
||||
if (process.env.DISCORD_WEBHOOK && newAddons.length)
|
||||
if (config.DISCORD_WEBHOOK && newAddons.length)
|
||||
sendDiscordMessage(newAddons)
|
||||
console.log('copying resources (styles, js, images)')
|
||||
fs.readdirSync('./resources').forEach(file => {
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
require('dotenv').config()
|
||||
|
||||
module.exports = {
|
||||
// env vars
|
||||
"DISCORD_WEBHOOK": process.env.DISCORD_WEBHOOK,
|
||||
"GITHUB_TOKEN": process.env.TOKEN,
|
||||
// for repo: danamag/stremio-addons-list
|
||||
"repository": "stremio-addons-list",
|
||||
"author": "danamag",
|
||||
"netlify-domain": "stremio-addons.netlify.app",
|
||||
"repository": process.env.REPO || "stremio-addons-list",
|
||||
"author": process.env.REPO_AUTHOR || "danamag",
|
||||
"netlify-domain": process.env.DOMAIN || "stremio-addons.com",
|
||||
"page-title": "Stremio Community Addons List",
|
||||
// images are located in ./resources/
|
||||
"meta-favicon": "stremio_community_logo.png",
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ const sendDiscordMessage = (addons) => {
|
||||
const needleOpts = Object.assign({}, config.needle)
|
||||
needleOpts.json = true
|
||||
console.log(`sending discord message about ${addons.length} new addons`)
|
||||
needle.post(process.env.DISCORD_WEBHOOK, payload, needleOpts, (err, resp, body) => {
|
||||
needle.post(config.DISCORD_WEBHOOK, payload, needleOpts, (err, resp, body) => {
|
||||
if (!err)
|
||||
console.log(`sent discord message about ${addons.length} new addons`)
|
||||
else {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ const config = require('../config')
|
||||
|
||||
const request = graphql.defaults({
|
||||
headers: {
|
||||
authorization: `token ${process.env.TOKEN}`,
|
||||
authorization: `token ${config.GITHUB_TOKEN}`,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Generated
+21
-1
@@ -9,10 +9,14 @@
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@octokit/graphql": "4.5.2",
|
||||
"@octokit/graphql": "^4.5.2",
|
||||
"async.queue": "0.5.2",
|
||||
"dotenv": "^16.4.7",
|
||||
"needle": "3.1.0",
|
||||
"slug": "8.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "16.18.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/endpoint": {
|
||||
@@ -148,6 +152,17 @@
|
||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.4.7",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
||||
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://dotenvx.com"
|
||||
}
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
@@ -399,6 +414,11 @@
|
||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
||||
},
|
||||
"dotenv": {
|
||||
"version": "16.4.7",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
||||
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ=="
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
|
||||
+2
-1
@@ -8,8 +8,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@octokit/graphql": "^4.5.2",
|
||||
"needle": "3.1.0",
|
||||
"async.queue": "0.5.2",
|
||||
"dotenv": "^16.4.7",
|
||||
"needle": "3.1.0",
|
||||
"slug": "8.2.2"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
Reference in New Issue
Block a user