Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 2fe96d2

Browse files
authored
fix: 🐛 修复登陆二维码依赖第三方网站被墙的问题 (#269)
Closes: #267
2 parents 9d0ff47 + 4d70b0f commit 2fe96d2

File tree

10 files changed

+2653
-1937
lines changed

10 files changed

+2653
-1937
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ loginSession.memory-card.json
44
generated
55
log
66
tsconfig.tmp.json
7-
packages/cli/lib/bot.js
7+
packages/cli/lib/bot.js
8+
packages/cli/static

main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const app = new Hono()
1313
registerRoute({ app, bot })
1414

1515
serve({
16+
hostname: '0.0.0.0',
1617
fetch: app.fetch,
1718
port: Number(PORT)
1819
})

packages/cli/scripts/build.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ fs.copyFileSync(
77
path.join(__dirname, '../.env.example')
88
)
99

10+
function copyDirSync(src, dest) {
11+
fs.mkdirSync(dest, { recursive: true });
12+
fs.readdirSync(src).forEach(file => {
13+
const srcPath = path.join(src, file);
14+
const destPath = path.join(dest, file);
15+
if (fs.lstatSync(srcPath).isDirectory()) {
16+
copyDirSync(srcPath, destPath);
17+
} else {
18+
fs.copyFileSync(srcPath, destPath);
19+
}
20+
});
21+
}
22+
23+
copyDirSync(
24+
path.join(__dirname, '../../../static'),
25+
path.join(__dirname, '../static')
26+
)
27+
1028
esbuild
1129
.build({
1230
entryPoints: ['../../main.js'], // 入口文件

0 commit comments

Comments
 (0)