Upload 94 files
Browse files- .dockerignore +8 -0
- .gitignore +132 -0
- .markdownlint.yaml +9 -0
- .npmrc +3 -0
- .prettierignore +8 -0
- .prettierrc.json +5 -0
- apps/.DS_Store +0 -0
- apps/server/.DS_Store +0 -0
- apps/server/package.json +1 -1
- apps/server/src/.DS_Store +0 -0
- apps/server/src/feeds/feeds.service.ts +16 -4
- apps/server/src/trpc/trpc.service.ts +1 -0
- apps/web/.DS_Store +0 -0
- apps/web/package.json +1 -1
- apps/web/src/.DS_Store +0 -0
- apps/web/src/pages/.DS_Store +0 -0
- apps/web/src/pages/feeds/index.tsx +1 -1
- package.json +1 -1
.dockerignore
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
node_modules
|
2 |
+
.git
|
3 |
+
.gitignore
|
4 |
+
*.md
|
5 |
+
dist
|
6 |
+
.env
|
7 |
+
.next
|
8 |
+
.DS_Store
|
.gitignore
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Logs
|
2 |
+
logs
|
3 |
+
*.log
|
4 |
+
npm-debug.log*
|
5 |
+
yarn-debug.log*
|
6 |
+
yarn-error.log*
|
7 |
+
lerna-debug.log*
|
8 |
+
.pnpm-debug.log*
|
9 |
+
|
10 |
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
11 |
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
12 |
+
|
13 |
+
# Runtime data
|
14 |
+
pids
|
15 |
+
*.pid
|
16 |
+
*.seed
|
17 |
+
*.pid.lock
|
18 |
+
|
19 |
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
20 |
+
lib-cov
|
21 |
+
|
22 |
+
# Coverage directory used by tools like istanbul
|
23 |
+
coverage
|
24 |
+
*.lcov
|
25 |
+
|
26 |
+
# nyc test coverage
|
27 |
+
.nyc_output
|
28 |
+
|
29 |
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
30 |
+
.grunt
|
31 |
+
|
32 |
+
# Bower dependency directory (https://bower.io/)
|
33 |
+
bower_components
|
34 |
+
|
35 |
+
# node-waf configuration
|
36 |
+
.lock-wscript
|
37 |
+
|
38 |
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
39 |
+
build/Release
|
40 |
+
|
41 |
+
# Dependency directories
|
42 |
+
node_modules/
|
43 |
+
jspm_packages/
|
44 |
+
|
45 |
+
# Snowpack dependency directory (https://snowpack.dev/)
|
46 |
+
web_modules/
|
47 |
+
|
48 |
+
# TypeScript cache
|
49 |
+
*.tsbuildinfo
|
50 |
+
|
51 |
+
# Optional npm cache directory
|
52 |
+
.npm
|
53 |
+
|
54 |
+
# Optional eslint cache
|
55 |
+
.eslintcache
|
56 |
+
|
57 |
+
# Optional stylelint cache
|
58 |
+
.stylelintcache
|
59 |
+
|
60 |
+
# Microbundle cache
|
61 |
+
.rpt2_cache/
|
62 |
+
.rts2_cache_cjs/
|
63 |
+
.rts2_cache_es/
|
64 |
+
.rts2_cache_umd/
|
65 |
+
|
66 |
+
# Optional REPL history
|
67 |
+
.node_repl_history
|
68 |
+
|
69 |
+
# Output of 'npm pack'
|
70 |
+
*.tgz
|
71 |
+
|
72 |
+
# Yarn Integrity file
|
73 |
+
.yarn-integrity
|
74 |
+
|
75 |
+
# dotenv environment variable files
|
76 |
+
.env
|
77 |
+
.env.development.local
|
78 |
+
.env.test.local
|
79 |
+
.env.production.local
|
80 |
+
.env.local
|
81 |
+
|
82 |
+
# parcel-bundler cache (https://parceljs.org/)
|
83 |
+
.cache
|
84 |
+
.parcel-cache
|
85 |
+
|
86 |
+
# Next.js build output
|
87 |
+
.next
|
88 |
+
out
|
89 |
+
|
90 |
+
# Nuxt.js build / generate output
|
91 |
+
.nuxt
|
92 |
+
dist
|
93 |
+
|
94 |
+
# Gatsby files
|
95 |
+
.cache/
|
96 |
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
97 |
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
98 |
+
# public
|
99 |
+
|
100 |
+
# vuepress build output
|
101 |
+
.vuepress/dist
|
102 |
+
|
103 |
+
# vuepress v2.x temp and cache directory
|
104 |
+
.temp
|
105 |
+
.cache
|
106 |
+
|
107 |
+
# Docusaurus cache and generated files
|
108 |
+
.docusaurus
|
109 |
+
|
110 |
+
# Serverless directories
|
111 |
+
.serverless/
|
112 |
+
|
113 |
+
# FuseBox cache
|
114 |
+
.fusebox/
|
115 |
+
|
116 |
+
# DynamoDB Local files
|
117 |
+
.dynamodb/
|
118 |
+
|
119 |
+
# TernJS port file
|
120 |
+
.tern-port
|
121 |
+
|
122 |
+
# Stores VSCode versions used for testing VSCode extensions
|
123 |
+
.vscode-test
|
124 |
+
|
125 |
+
# yarn v2
|
126 |
+
.yarn/cache
|
127 |
+
.yarn/unplugged
|
128 |
+
.yarn/build-state.yml
|
129 |
+
.yarn/install-state.gz
|
130 |
+
.pnp.*
|
131 |
+
|
132 |
+
.DS_Store
|
.markdownlint.yaml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Default state for all rules
|
2 |
+
default: true
|
3 |
+
|
4 |
+
line-length: false
|
5 |
+
|
6 |
+
# MD033/no-inline-html - Inline HTML
|
7 |
+
MD033:
|
8 |
+
# Allowed elements
|
9 |
+
allowed_elements: ["style"]
|
.npmrc
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
public-hoist-pattern[]=*@nextui-org/*
|
2 |
+
engine-strict=true
|
3 |
+
deploy-all-files=true
|
.prettierignore
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
**/*.log
|
2 |
+
**/.DS_Store
|
3 |
+
*.
|
4 |
+
*.json
|
5 |
+
apps/web/.next
|
6 |
+
dist
|
7 |
+
node_modules
|
8 |
+
pnpm-lock.yaml
|
.prettierrc.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"tabWidth": 2,
|
3 |
+
"singleQuote": true,
|
4 |
+
"trailingComma": "all"
|
5 |
+
}
|
apps/.DS_Store
CHANGED
Binary files a/apps/.DS_Store and b/apps/.DS_Store differ
|
|
apps/server/.DS_Store
CHANGED
Binary files a/apps/server/.DS_Store and b/apps/server/.DS_Store differ
|
|
apps/server/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "server",
|
3 |
-
"version": "1.7.
|
4 |
"description": "",
|
5 |
"author": "",
|
6 |
"private": true,
|
|
|
1 |
{
|
2 |
"name": "server",
|
3 |
+
"version": "1.7.1",
|
4 |
"description": "",
|
5 |
"author": "",
|
6 |
"private": true,
|
apps/server/src/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
apps/server/src/feeds/feeds.service.ts
CHANGED
@@ -34,6 +34,7 @@ export class FeedsService {
|
|
34 |
limit: 3,
|
35 |
methods: ['GET'],
|
36 |
},
|
|
|
37 |
headers: {
|
38 |
accept:
|
39 |
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
|
@@ -52,6 +53,16 @@ export class FeedsService {
|
|
52 |
'user-agent':
|
53 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36',
|
54 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
});
|
56 |
}
|
57 |
|
@@ -110,8 +121,9 @@ export class FeedsService {
|
|
110 |
}
|
111 |
const url = `https://mp.weixin.qq.com/s/${id}`;
|
112 |
content = await this.getHtmlByUrl(url).catch((e) => {
|
113 |
-
this.logger.error(
|
114 |
-
|
|
|
115 |
});
|
116 |
mpCache.set(id, content);
|
117 |
return content;
|
@@ -223,8 +235,8 @@ export class FeedsService {
|
|
223 |
|
224 |
feedInfo = {
|
225 |
id: 'all',
|
226 |
-
mpName: 'WeWe-RSS
|
227 |
-
mpIntro: 'WeWe-RSS',
|
228 |
mpCover: 'https://r2-assets.111965.xyz/wewe-rss.png',
|
229 |
status: 1,
|
230 |
syncTime: 0,
|
|
|
34 |
limit: 3,
|
35 |
methods: ['GET'],
|
36 |
},
|
37 |
+
timeout: 8 * 1e3,
|
38 |
headers: {
|
39 |
accept:
|
40 |
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
|
|
|
53 |
'user-agent':
|
54 |
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36',
|
55 |
},
|
56 |
+
hooks: {
|
57 |
+
beforeRetry: [
|
58 |
+
async (options, error, retryCount) => {
|
59 |
+
this.logger.warn(`retrying ${options.url}...`);
|
60 |
+
return new Promise((resolve) =>
|
61 |
+
setTimeout(resolve, 2e3 * (retryCount || 1)),
|
62 |
+
);
|
63 |
+
},
|
64 |
+
],
|
65 |
+
},
|
66 |
});
|
67 |
}
|
68 |
|
|
|
121 |
}
|
122 |
const url = `https://mp.weixin.qq.com/s/${id}`;
|
123 |
content = await this.getHtmlByUrl(url).catch((e) => {
|
124 |
+
this.logger.error(`getHtmlByUrl(${url}) error: ${e.message}`);
|
125 |
+
|
126 |
+
return '获取全文失败,请重试~';
|
127 |
});
|
128 |
mpCache.set(id, content);
|
129 |
return content;
|
|
|
235 |
|
236 |
feedInfo = {
|
237 |
id: 'all',
|
238 |
+
mpName: 'WeWe-RSS All',
|
239 |
+
mpIntro: 'WeWe-RSS 全部文章',
|
240 |
mpCover: 'https://r2-assets.111965.xyz/wewe-rss.png',
|
241 |
status: 1,
|
242 |
syncTime: 0,
|
apps/server/src/trpc/trpc.service.ts
CHANGED
@@ -185,6 +185,7 @@ export class TrpcService {
|
|
185 |
}
|
186 |
|
187 |
async getMpInfo(url: string) {
|
|
|
188 |
const account = await this.getAvailableAccount();
|
189 |
|
190 |
return this.request
|
|
|
185 |
}
|
186 |
|
187 |
async getMpInfo(url: string) {
|
188 |
+
url = url.trim();
|
189 |
const account = await this.getAvailableAccount();
|
190 |
|
191 |
return this.request
|
apps/web/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
apps/web/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"name": "web",
|
3 |
"private": true,
|
4 |
-
"version": "1.7.
|
5 |
"type": "module",
|
6 |
"scripts": {
|
7 |
"dev": "vite",
|
|
|
1 |
{
|
2 |
"name": "web",
|
3 |
"private": true,
|
4 |
+
"version": "1.7.1",
|
5 |
"type": "module",
|
6 |
"scripts": {
|
7 |
"dev": "vite",
|
apps/web/src/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
apps/web/src/pages/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
apps/web/src/pages/feeds/index.tsx
CHANGED
@@ -230,7 +230,7 @@ const Feeds = () => {
|
|
230 |
size="sm"
|
231 |
showAnchorIcon
|
232 |
target="_blank"
|
233 |
-
href={`${serverOriginUrl}/feeds/${currentMpInfo.id}`}
|
234 |
color="foreground"
|
235 |
>
|
236 |
RSS
|
|
|
230 |
size="sm"
|
231 |
showAnchorIcon
|
232 |
target="_blank"
|
233 |
+
href={`${serverOriginUrl}/feeds/${currentMpInfo.id}.atom`}
|
234 |
color="foreground"
|
235 |
>
|
236 |
RSS
|
package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "wewe-rss",
|
3 |
-
"version": "1.7.
|
4 |
"private": true,
|
5 |
"author": "cooderl <[email protected]>",
|
6 |
"description": "",
|
|
|
1 |
{
|
2 |
"name": "wewe-rss",
|
3 |
+
"version": "1.7.1",
|
4 |
"private": true,
|
5 |
"author": "cooderl <[email protected]>",
|
6 |
"description": "",
|