From d069ff0bc75ecb0b4ecf3060625caf3648ac297b Mon Sep 17 00:00:00 2001 From: Joshua Glemza Date: Thu, 9 Feb 2023 21:34:10 +0000 Subject: [PATCH] Initial commit --- CloudronManifest.json | 7 ++ Dockerfile | 14 ++++ package.json | 190 ++++++++++++++++++++++++++++++++++++++++++ start.sh | 4 + 4 files changed, 215 insertions(+) create mode 100644 CloudronManifest.json create mode 100644 Dockerfile create mode 100644 package.json create mode 100755 start.sh diff --git a/CloudronManifest.json b/CloudronManifest.json new file mode 100644 index 0000000..038c379 --- /dev/null +++ b/CloudronManifest.json @@ -0,0 +1,7 @@ +{ + "version": "0.1.0", + "healthCheckPath": "/", + "httpPort": 1200, + "runtimeDirs": [ "/root/.npm" ], + "manifestVersion": 2 +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ffa1f30 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM cloudron/base:4.0.0@sha256:31b195ed0662bdb06a6e8a5ddbedb6f191ce92e8bee04c03fb02dd4e9d0286df + +RUN mkdir -p /app/code +WORKDIR /app/code + +RUN git clone https://github.com/DIYgod/RSSHub.git /app/code/rsshub +RUN cd /app/code/rsshub +RUN npm install /app/code/rsshub +RUN npm ci --production + +COPY start.sh /app/pkg/ + +CMD [ "/app/pkg/start.sh" ] + diff --git a/package.json b/package.json new file mode 100644 index 0000000..4cc8b1e --- /dev/null +++ b/package.json @@ -0,0 +1,190 @@ +{ + "name": "rsshub", + "version": "1.0.0", + "description": "Make RSS Great Again!", + "main": "lib/pkg.js", + "files": [ + "lib" + ], + "scripts": { + "start": "node lib/index.js", + "dev": "cross-env NODE_ENV=dev nodemon --inspect lib/index.js", + "profiling": "NODE_ENV=production node --prof lib/index.js", + "docs:dev": "vuepress dev docs", + "docs:build": "vuepress build docs", + "build:all": "npm run build:radar && npm run build:maintainer", + "build:radar": "node scripts/workflow/build-radar.js", + "build:maintainer": "node scripts/workflow/build-maintainer.js", + "lint": "eslint .", + "format": "eslint \"**/*.{js,yml}\" --fix && node docs/.format/format.js && prettier \"**/*.{js,json}\" --write", + "format:staged": "eslint \"**/*.{js,yml}\" --fix && node docs/.format/format.js --staged && pretty-quick --staged --verbose --pattern \"**/*.{js,json}\"", + "format:check": "eslint \"**/*.{js,yml}\" && prettier-check \"**/*.{js,json}\"", + "jest": "cross-env NODE_ENV=test jest --runInBand --forceExit --detectOpenHandles", + "jest:coverage": "cross-env NODE_ENV=test jest --coverage --reporters=default --reporters=jest-junit --runInBand --forceExit --detectOpenHandles", + "jest:watch": "cross-env NODE_ENV=test jest --watch", + "test": "npm run format:check && npm run jest:coverage" + }, + "reporters": [ + "default", + "jest-junit" + ], + "jest-junit": { + "outputDirectory": "coverage" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/DIYgod/RSSHub.git" + }, + "keywords": [ + "RSS" + ], + "gitHooks": { + "pre-commit": "npm run format:staged" + }, + "author": "DIYgod", + "license": "MIT", + "bugs": { + "url": "https://github.com/DIYgod/RSSHub/issues" + }, + "homepage": "https://github.com/DIYgod/RSSHub#readme", + "devDependencies": { + "@napi-rs/pinyin": "1.7.1", + "@types/koa": "2.13.5", + "@vercel/nft": "0.22.6", + "@vuepress/plugin-back-to-top": "1.9.8", + "@vuepress/plugin-google-analytics": "1.9.8", + "@vuepress/plugin-pwa": "1.9.8", + "@vuepress/shared-utils": "1.9.8", + "cross-env": "7.0.3", + "eslint": "8.33.0", + "eslint-config-prettier": "8.6.0", + "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-yml": "1.4.0", + "fs-extra": "11.1.0", + "jest": "29.4.2", + "jest-junit": "15.0.0", + "meilisearch": "0.31.1", + "mockdate": "3.0.5", + "nock": "13.3.0", + "nodemon": "2.0.20", + "prettier": "2.8.4", + "prettier-check": "2.0.0", + "pretty-quick": "3.1.3", + "remark": "13.0.0", + "remark-frontmatter": "3.0.0", + "remark-gfm": "1.0.0", + "remark-pangu": "2.2.0", + "remark-parse": "9.0.0", + "remark-preset-prettier": "0.5.1", + "remark-stringify": "9.0.1", + "request-promise-native": "1.0.9", + "staged-git-files": "1.3.0", + "string-width": "4.2.3", + "supertest": "6.3.3", + "tosource": "2.0.0-alpha.3", + "unified": "9.2.2", + "vuepress": "1.9.8", + "vuepress-plugin-meilisearch": "0.13.0", + "vuepress-plugin-sitemap": "2.3.1", + "yorkie": "2.0.0" + }, + "dependencies": { + "@koa/router": "12.0.0", + "@postlight/parser": "2.2.3", + "@sentry/node": "7.36.0", + "aes-js": "3.1.2", + "art-template": "4.13.2", + "bbcodejs": "0.0.4", + "cheerio": "1.0.0-rc.12", + "chrono-node": "2.5.0", + "city-timezones": "1.2.1", + "crypto-js": "4.1.1", + "currency-symbol-map": "5.1.0", + "dayjs": "1.11.7", + "dotenv": "16.0.3", + "emailjs-imap-client": "3.1.0", + "entities": "3.0.1", + "etag": "1.8.1", + "fanfou-sdk": "4.2.0", + "git-rev-sync": "3.0.2", + "googleapis": "110.0.0", + "got": "11.8.6", + "https-proxy-agent": "5.0.1", + "iconv-lite": "0.6.3", + "instagram-private-api": "1.45.3", + "ioredis": "5.3.0", + "ip-regex": "4.3.0", + "is-localhost-ip": "2.0.0", + "jsdom": "21.1.0", + "json-bigint": "1.0.0", + "json5": "2.2.3", + "koa": "2.14.1", + "koa-basic-auth": "4.0.0", + "koa-favicon": "2.1.0", + "koa-mount": "4.0.0", + "lru-cache": "7.14.1", + "lz-string": "1.4.4", + "mailparser": "3.6.3", + "markdown-it": "13.0.1", + "module-alias": "2.2.2", + "parse-torrent": "9.1.5", + "pidusage": "3.0.2", + "plist": "3.0.6", + "proxy-chain": "2.2.0", + "puppeteer": "19.6.3", + "puppeteer-extra": "3.3.4", + "puppeteer-extra-plugin-stealth": "2.11.1", + "query-string": "7.1.3", + "rand-user-agent": "1.0.104", + "re2": "1.18.0", + "require-all": "3.0.0", + "rss-parser": "3.12.0", + "showdown": "2.1.0", + "simplecc-wasm": "0.1.5", + "socks-proxy-agent": "7.0.0", + "string-similarity": "4.0.4", + "tiny-async-pool": "2.1.0", + "torrent-search-api": "2.1.4", + "tough-cookie": "4.1.2", + "twitter-api-v2": "1.14.1", + "winston": "3.8.2", + "xml2js": "0.4.23" + }, + "jest": { + "testMatch": [ + "**/test/**/*.js" + ], + "testPathIgnorePatterns": [ + "/node_modules/", + "/lib/" + ], + "coverageReporters": [ + "text-summary", + "lcov" + ], + "collectCoverageFrom": [ + "lib/**/*.js", + "!lib/routes/**/*.js", + "!lib/v2/**/*.js", + "!lib/radar-rules.js", + "!lib/router.js" + ], + "bail": true, + "testEnvironment": "node", + "moduleNameMapper": { + "@/(.*)": "/lib/$1" + } + }, + "nodemonConfig": { + "watch": [ + ".env", + "lib", + "test" + ], + "ext": "art,js,mjs,json" + }, + "engines": { + "node": ">=14" + } +} + diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..4e29840 --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd /app/code/rsshub +npm start