github-actions[bot] commited on
Commit
82cb77d
·
1 Parent(s): 3b20996

Update from GitHub Actions

Browse files
Files changed (7) hide show
  1. .coding-ci.yml +10 -0
  2. Dockerfile +54 -0
  3. index.html +67 -0
  4. package-lock.json +883 -0
  5. package.json +20 -0
  6. src/index.ts +318 -0
  7. tsconfig.json +22 -0
.coding-ci.yml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ main:
2
+ push:
3
+ - docker:
4
+ image: node:18
5
+ imports: https://godgodgame.coding.net/p/tools/d/oci-private-key/git/tree/master/envs.yml
6
+ stages:
7
+ - name: 环境检查
8
+ script: echo $GITHUB_TOKEN_GK && echo $GITHUB_TOKEN && node -v && npm -v
9
+ - name: 将master分支同步更新到github的master分支
10
+ script: git push https://$GITHUB_TOKEN_GK:$GITHUB_TOKEN@github.com/zhezzma/playwright-proxy.git HEAD:main
Dockerfile ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 基础镜像:使用 Node.js 20 的 Alpine Linux 版本
2
+ FROM node:20-alpine
3
+
4
+ # 设置工作目录
5
+ WORKDIR /app
6
+
7
+ # 安装系统依赖
8
+ RUN apk add --no-cache \
9
+ # 基本构建工具
10
+ python3 \
11
+ make \
12
+ g++ \
13
+ # Playwright 依赖
14
+ chromium \
15
+ nss \
16
+ freetype \
17
+ freetype-dev \
18
+ harfbuzz \
19
+ ca-certificates \
20
+ ttf-freefont \
21
+ # 其他依赖
22
+ gcompat
23
+
24
+ # 设置 Playwright 的环境变量
25
+ ENV PLAYWRIGHT_BROWSERS_PATH=/usr/bin
26
+ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
27
+ ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser
28
+ ENV PLAYWRIGHT_SKIP_BROWSER_VALIDATION=1
29
+
30
+ # 复制依赖文件并安装
31
+ COPY package*.json tsconfig.json ./
32
+ RUN npm install
33
+
34
+ # 复制源代码和静态文件
35
+ COPY src/ ./src/
36
+ COPY index.html ./index.html
37
+ RUN npm run build
38
+
39
+ # 创建非 root 用户和用户组
40
+ RUN addgroup -S -g 1001 nodejs && \
41
+ adduser -S -D -H -u 1001 -G nodejs hono
42
+
43
+ # 设置应用文件的所有权
44
+ RUN chown -R hono:nodejs /app
45
+
46
+ # 切换到非 root 用户
47
+ USER hono
48
+
49
+ # 声明容器要暴露的端口
50
+ EXPOSE 7860
51
+ ENV PORT=7860
52
+
53
+ # 启动应用
54
+ CMD ["node", "dist/index.js"]
index.html ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Playwright 代理服务使用说明</title>
8
+ <style>
9
+ body {
10
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
11
+ line-height: 1.6;
12
+ max-width: 800px;
13
+ margin: 0 auto;
14
+ padding: 20px;
15
+ }
16
+
17
+ pre {
18
+ background-color: #f5f5f5;
19
+ padding: 15px;
20
+ border-radius: 5px;
21
+ overflow-x: auto;
22
+ }
23
+
24
+ code {
25
+ font-family: 'Courier New', Courier, monospace;
26
+ }
27
+ </style>
28
+ </head>
29
+
30
+ <body>
31
+ <h1>Playwright 代理服务</h1>
32
+
33
+ <h2>简介</h2>
34
+ <p>这是一个基于 Playwright 的代理服务,可以帮助你访问需要浏览器环境的网页。它使用真实的 Chromium 浏览器来渲染页面,支持 JavaScript 执行。</p>
35
+
36
+ <h2>使用方法</h2>
37
+ <h3>基本用法</h3>
38
+ <p>通过在 URL 参数中指定目标网址来使用代理服务:</p>
39
+ <pre><code>http://localhost:7860/?url=https://example.com</code></pre>
40
+
41
+ <h3>支持的 HTTP 方法</h3>
42
+ <ul>
43
+ <li>GET - 获取页面内容</li>
44
+ <li>POST - 发送表单数据或 JSON</li>
45
+ <li>PUT - 更新资源</li>
46
+ <li>DELETE - 删除资源</li>
47
+ <li>其他标准 HTTP 方法</li>
48
+ </ul>
49
+
50
+ <h3>示例</h3>
51
+ <p>1. 使用 curl 发送 GET 请求:</p>
52
+ <pre><code>curl "http://localhost:7860/?url=https://example.com"</code></pre>
53
+
54
+ <p>2. 发送 POST 请求:</p>
55
+ <pre><code>curl -X POST "http://localhost:7860/?url=https://example.com/api" \
56
+ -H "Content-Type: application/json" \
57
+ -d '{"key": "value"}'</code></pre>
58
+
59
+ <h2>注意事项</h2>
60
+ <ul>
61
+ <li>所有请求都会通过真实的浏览器执行,包括 JavaScript</li>
62
+ <li>服务会保持原始响应的状态码和大部分响应头</li>
63
+ <li>为了性能考虑,每个请求的超时时间默认为 30 秒</li>
64
+ </ul>
65
+ </body>
66
+
67
+ </html>
package-lock.json ADDED
@@ -0,0 +1,883 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "playwright-proxy",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "name": "playwright-proxy",
8
+ "dependencies": {
9
+ "@hono/node-server": "^1.13.7",
10
+ "hono": "^4.6.14",
11
+ "playwright": "^1.49.1"
12
+ },
13
+ "devDependencies": {
14
+ "@types/node": "^20.17.23",
15
+ "shx": "^0.3.4",
16
+ "tsx": "^4.7.1",
17
+ "typescript": "^5.7.2"
18
+ }
19
+ },
20
+ "node_modules/@esbuild/aix-ppc64": {
21
+ "version": "0.23.1",
22
+ "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz",
23
+ "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==",
24
+ "cpu": [
25
+ "ppc64"
26
+ ],
27
+ "dev": true,
28
+ "license": "MIT",
29
+ "optional": true,
30
+ "os": [
31
+ "aix"
32
+ ],
33
+ "engines": {
34
+ "node": ">=18"
35
+ }
36
+ },
37
+ "node_modules/@esbuild/android-arm": {
38
+ "version": "0.23.1",
39
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz",
40
+ "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==",
41
+ "cpu": [
42
+ "arm"
43
+ ],
44
+ "dev": true,
45
+ "license": "MIT",
46
+ "optional": true,
47
+ "os": [
48
+ "android"
49
+ ],
50
+ "engines": {
51
+ "node": ">=18"
52
+ }
53
+ },
54
+ "node_modules/@esbuild/android-arm64": {
55
+ "version": "0.23.1",
56
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz",
57
+ "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==",
58
+ "cpu": [
59
+ "arm64"
60
+ ],
61
+ "dev": true,
62
+ "license": "MIT",
63
+ "optional": true,
64
+ "os": [
65
+ "android"
66
+ ],
67
+ "engines": {
68
+ "node": ">=18"
69
+ }
70
+ },
71
+ "node_modules/@esbuild/android-x64": {
72
+ "version": "0.23.1",
73
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz",
74
+ "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==",
75
+ "cpu": [
76
+ "x64"
77
+ ],
78
+ "dev": true,
79
+ "license": "MIT",
80
+ "optional": true,
81
+ "os": [
82
+ "android"
83
+ ],
84
+ "engines": {
85
+ "node": ">=18"
86
+ }
87
+ },
88
+ "node_modules/@esbuild/darwin-arm64": {
89
+ "version": "0.23.1",
90
+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz",
91
+ "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==",
92
+ "cpu": [
93
+ "arm64"
94
+ ],
95
+ "dev": true,
96
+ "license": "MIT",
97
+ "optional": true,
98
+ "os": [
99
+ "darwin"
100
+ ],
101
+ "engines": {
102
+ "node": ">=18"
103
+ }
104
+ },
105
+ "node_modules/@esbuild/darwin-x64": {
106
+ "version": "0.23.1",
107
+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz",
108
+ "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==",
109
+ "cpu": [
110
+ "x64"
111
+ ],
112
+ "dev": true,
113
+ "license": "MIT",
114
+ "optional": true,
115
+ "os": [
116
+ "darwin"
117
+ ],
118
+ "engines": {
119
+ "node": ">=18"
120
+ }
121
+ },
122
+ "node_modules/@esbuild/freebsd-arm64": {
123
+ "version": "0.23.1",
124
+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz",
125
+ "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==",
126
+ "cpu": [
127
+ "arm64"
128
+ ],
129
+ "dev": true,
130
+ "license": "MIT",
131
+ "optional": true,
132
+ "os": [
133
+ "freebsd"
134
+ ],
135
+ "engines": {
136
+ "node": ">=18"
137
+ }
138
+ },
139
+ "node_modules/@esbuild/freebsd-x64": {
140
+ "version": "0.23.1",
141
+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz",
142
+ "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==",
143
+ "cpu": [
144
+ "x64"
145
+ ],
146
+ "dev": true,
147
+ "license": "MIT",
148
+ "optional": true,
149
+ "os": [
150
+ "freebsd"
151
+ ],
152
+ "engines": {
153
+ "node": ">=18"
154
+ }
155
+ },
156
+ "node_modules/@esbuild/linux-arm": {
157
+ "version": "0.23.1",
158
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz",
159
+ "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==",
160
+ "cpu": [
161
+ "arm"
162
+ ],
163
+ "dev": true,
164
+ "license": "MIT",
165
+ "optional": true,
166
+ "os": [
167
+ "linux"
168
+ ],
169
+ "engines": {
170
+ "node": ">=18"
171
+ }
172
+ },
173
+ "node_modules/@esbuild/linux-arm64": {
174
+ "version": "0.23.1",
175
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz",
176
+ "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==",
177
+ "cpu": [
178
+ "arm64"
179
+ ],
180
+ "dev": true,
181
+ "license": "MIT",
182
+ "optional": true,
183
+ "os": [
184
+ "linux"
185
+ ],
186
+ "engines": {
187
+ "node": ">=18"
188
+ }
189
+ },
190
+ "node_modules/@esbuild/linux-ia32": {
191
+ "version": "0.23.1",
192
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz",
193
+ "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==",
194
+ "cpu": [
195
+ "ia32"
196
+ ],
197
+ "dev": true,
198
+ "license": "MIT",
199
+ "optional": true,
200
+ "os": [
201
+ "linux"
202
+ ],
203
+ "engines": {
204
+ "node": ">=18"
205
+ }
206
+ },
207
+ "node_modules/@esbuild/linux-loong64": {
208
+ "version": "0.23.1",
209
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz",
210
+ "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==",
211
+ "cpu": [
212
+ "loong64"
213
+ ],
214
+ "dev": true,
215
+ "license": "MIT",
216
+ "optional": true,
217
+ "os": [
218
+ "linux"
219
+ ],
220
+ "engines": {
221
+ "node": ">=18"
222
+ }
223
+ },
224
+ "node_modules/@esbuild/linux-mips64el": {
225
+ "version": "0.23.1",
226
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz",
227
+ "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==",
228
+ "cpu": [
229
+ "mips64el"
230
+ ],
231
+ "dev": true,
232
+ "license": "MIT",
233
+ "optional": true,
234
+ "os": [
235
+ "linux"
236
+ ],
237
+ "engines": {
238
+ "node": ">=18"
239
+ }
240
+ },
241
+ "node_modules/@esbuild/linux-ppc64": {
242
+ "version": "0.23.1",
243
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz",
244
+ "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==",
245
+ "cpu": [
246
+ "ppc64"
247
+ ],
248
+ "dev": true,
249
+ "license": "MIT",
250
+ "optional": true,
251
+ "os": [
252
+ "linux"
253
+ ],
254
+ "engines": {
255
+ "node": ">=18"
256
+ }
257
+ },
258
+ "node_modules/@esbuild/linux-riscv64": {
259
+ "version": "0.23.1",
260
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz",
261
+ "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==",
262
+ "cpu": [
263
+ "riscv64"
264
+ ],
265
+ "dev": true,
266
+ "license": "MIT",
267
+ "optional": true,
268
+ "os": [
269
+ "linux"
270
+ ],
271
+ "engines": {
272
+ "node": ">=18"
273
+ }
274
+ },
275
+ "node_modules/@esbuild/linux-s390x": {
276
+ "version": "0.23.1",
277
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz",
278
+ "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==",
279
+ "cpu": [
280
+ "s390x"
281
+ ],
282
+ "dev": true,
283
+ "license": "MIT",
284
+ "optional": true,
285
+ "os": [
286
+ "linux"
287
+ ],
288
+ "engines": {
289
+ "node": ">=18"
290
+ }
291
+ },
292
+ "node_modules/@esbuild/linux-x64": {
293
+ "version": "0.23.1",
294
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz",
295
+ "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==",
296
+ "cpu": [
297
+ "x64"
298
+ ],
299
+ "dev": true,
300
+ "license": "MIT",
301
+ "optional": true,
302
+ "os": [
303
+ "linux"
304
+ ],
305
+ "engines": {
306
+ "node": ">=18"
307
+ }
308
+ },
309
+ "node_modules/@esbuild/netbsd-x64": {
310
+ "version": "0.23.1",
311
+ "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz",
312
+ "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==",
313
+ "cpu": [
314
+ "x64"
315
+ ],
316
+ "dev": true,
317
+ "license": "MIT",
318
+ "optional": true,
319
+ "os": [
320
+ "netbsd"
321
+ ],
322
+ "engines": {
323
+ "node": ">=18"
324
+ }
325
+ },
326
+ "node_modules/@esbuild/openbsd-arm64": {
327
+ "version": "0.23.1",
328
+ "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz",
329
+ "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==",
330
+ "cpu": [
331
+ "arm64"
332
+ ],
333
+ "dev": true,
334
+ "license": "MIT",
335
+ "optional": true,
336
+ "os": [
337
+ "openbsd"
338
+ ],
339
+ "engines": {
340
+ "node": ">=18"
341
+ }
342
+ },
343
+ "node_modules/@esbuild/openbsd-x64": {
344
+ "version": "0.23.1",
345
+ "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz",
346
+ "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==",
347
+ "cpu": [
348
+ "x64"
349
+ ],
350
+ "dev": true,
351
+ "license": "MIT",
352
+ "optional": true,
353
+ "os": [
354
+ "openbsd"
355
+ ],
356
+ "engines": {
357
+ "node": ">=18"
358
+ }
359
+ },
360
+ "node_modules/@esbuild/sunos-x64": {
361
+ "version": "0.23.1",
362
+ "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz",
363
+ "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==",
364
+ "cpu": [
365
+ "x64"
366
+ ],
367
+ "dev": true,
368
+ "license": "MIT",
369
+ "optional": true,
370
+ "os": [
371
+ "sunos"
372
+ ],
373
+ "engines": {
374
+ "node": ">=18"
375
+ }
376
+ },
377
+ "node_modules/@esbuild/win32-arm64": {
378
+ "version": "0.23.1",
379
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz",
380
+ "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==",
381
+ "cpu": [
382
+ "arm64"
383
+ ],
384
+ "dev": true,
385
+ "license": "MIT",
386
+ "optional": true,
387
+ "os": [
388
+ "win32"
389
+ ],
390
+ "engines": {
391
+ "node": ">=18"
392
+ }
393
+ },
394
+ "node_modules/@esbuild/win32-ia32": {
395
+ "version": "0.23.1",
396
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz",
397
+ "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==",
398
+ "cpu": [
399
+ "ia32"
400
+ ],
401
+ "dev": true,
402
+ "license": "MIT",
403
+ "optional": true,
404
+ "os": [
405
+ "win32"
406
+ ],
407
+ "engines": {
408
+ "node": ">=18"
409
+ }
410
+ },
411
+ "node_modules/@esbuild/win32-x64": {
412
+ "version": "0.23.1",
413
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz",
414
+ "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==",
415
+ "cpu": [
416
+ "x64"
417
+ ],
418
+ "dev": true,
419
+ "license": "MIT",
420
+ "optional": true,
421
+ "os": [
422
+ "win32"
423
+ ],
424
+ "engines": {
425
+ "node": ">=18"
426
+ }
427
+ },
428
+ "node_modules/@hono/node-server": {
429
+ "version": "1.13.7",
430
+ "resolved": "https://registry.npmmirror.com/@hono/node-server/-/node-server-1.13.7.tgz",
431
+ "integrity": "sha512-kTfUMsoloVKtRA2fLiGSd9qBddmru9KadNyhJCwgKBxTiNkaAJEwkVN9KV/rS4HtmmNRtUh6P+YpmjRMl0d9vQ==",
432
+ "license": "MIT",
433
+ "engines": {
434
+ "node": ">=18.14.1"
435
+ },
436
+ "peerDependencies": {
437
+ "hono": "^4"
438
+ }
439
+ },
440
+ "node_modules/@types/node": {
441
+ "version": "20.17.23",
442
+ "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.17.23.tgz",
443
+ "integrity": "sha512-8PCGZ1ZJbEZuYNTMqywO+Sj4vSKjSjT6Ua+6RFOYlEvIvKQABPtrNkoVSLSKDb4obYcMhspVKmsw8Cm10NFRUg==",
444
+ "dev": true,
445
+ "license": "MIT",
446
+ "dependencies": {
447
+ "undici-types": "~6.19.2"
448
+ }
449
+ },
450
+ "node_modules/balanced-match": {
451
+ "version": "1.0.2",
452
+ "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
453
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
454
+ "dev": true,
455
+ "license": "MIT"
456
+ },
457
+ "node_modules/brace-expansion": {
458
+ "version": "1.1.11",
459
+ "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
460
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
461
+ "dev": true,
462
+ "license": "MIT",
463
+ "dependencies": {
464
+ "balanced-match": "^1.0.0",
465
+ "concat-map": "0.0.1"
466
+ }
467
+ },
468
+ "node_modules/concat-map": {
469
+ "version": "0.0.1",
470
+ "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
471
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
472
+ "dev": true,
473
+ "license": "MIT"
474
+ },
475
+ "node_modules/esbuild": {
476
+ "version": "0.23.1",
477
+ "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.23.1.tgz",
478
+ "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==",
479
+ "dev": true,
480
+ "hasInstallScript": true,
481
+ "license": "MIT",
482
+ "bin": {
483
+ "esbuild": "bin/esbuild"
484
+ },
485
+ "engines": {
486
+ "node": ">=18"
487
+ },
488
+ "optionalDependencies": {
489
+ "@esbuild/aix-ppc64": "0.23.1",
490
+ "@esbuild/android-arm": "0.23.1",
491
+ "@esbuild/android-arm64": "0.23.1",
492
+ "@esbuild/android-x64": "0.23.1",
493
+ "@esbuild/darwin-arm64": "0.23.1",
494
+ "@esbuild/darwin-x64": "0.23.1",
495
+ "@esbuild/freebsd-arm64": "0.23.1",
496
+ "@esbuild/freebsd-x64": "0.23.1",
497
+ "@esbuild/linux-arm": "0.23.1",
498
+ "@esbuild/linux-arm64": "0.23.1",
499
+ "@esbuild/linux-ia32": "0.23.1",
500
+ "@esbuild/linux-loong64": "0.23.1",
501
+ "@esbuild/linux-mips64el": "0.23.1",
502
+ "@esbuild/linux-ppc64": "0.23.1",
503
+ "@esbuild/linux-riscv64": "0.23.1",
504
+ "@esbuild/linux-s390x": "0.23.1",
505
+ "@esbuild/linux-x64": "0.23.1",
506
+ "@esbuild/netbsd-x64": "0.23.1",
507
+ "@esbuild/openbsd-arm64": "0.23.1",
508
+ "@esbuild/openbsd-x64": "0.23.1",
509
+ "@esbuild/sunos-x64": "0.23.1",
510
+ "@esbuild/win32-arm64": "0.23.1",
511
+ "@esbuild/win32-ia32": "0.23.1",
512
+ "@esbuild/win32-x64": "0.23.1"
513
+ }
514
+ },
515
+ "node_modules/fs.realpath": {
516
+ "version": "1.0.0",
517
+ "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
518
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
519
+ "dev": true,
520
+ "license": "ISC"
521
+ },
522
+ "node_modules/fsevents": {
523
+ "version": "2.3.3",
524
+ "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
525
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
526
+ "dev": true,
527
+ "hasInstallScript": true,
528
+ "license": "MIT",
529
+ "optional": true,
530
+ "os": [
531
+ "darwin"
532
+ ],
533
+ "engines": {
534
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
535
+ }
536
+ },
537
+ "node_modules/function-bind": {
538
+ "version": "1.1.2",
539
+ "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
540
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
541
+ "dev": true,
542
+ "license": "MIT",
543
+ "funding": {
544
+ "url": "https://github.com/sponsors/ljharb"
545
+ }
546
+ },
547
+ "node_modules/get-tsconfig": {
548
+ "version": "4.8.1",
549
+ "resolved": "https://registry.npmmirror.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz",
550
+ "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==",
551
+ "dev": true,
552
+ "license": "MIT",
553
+ "dependencies": {
554
+ "resolve-pkg-maps": "^1.0.0"
555
+ },
556
+ "funding": {
557
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
558
+ }
559
+ },
560
+ "node_modules/glob": {
561
+ "version": "7.2.3",
562
+ "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz",
563
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
564
+ "deprecated": "Glob versions prior to v9 are no longer supported",
565
+ "dev": true,
566
+ "license": "ISC",
567
+ "dependencies": {
568
+ "fs.realpath": "^1.0.0",
569
+ "inflight": "^1.0.4",
570
+ "inherits": "2",
571
+ "minimatch": "^3.1.1",
572
+ "once": "^1.3.0",
573
+ "path-is-absolute": "^1.0.0"
574
+ },
575
+ "engines": {
576
+ "node": "*"
577
+ },
578
+ "funding": {
579
+ "url": "https://github.com/sponsors/isaacs"
580
+ }
581
+ },
582
+ "node_modules/hasown": {
583
+ "version": "2.0.2",
584
+ "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
585
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
586
+ "dev": true,
587
+ "license": "MIT",
588
+ "dependencies": {
589
+ "function-bind": "^1.1.2"
590
+ },
591
+ "engines": {
592
+ "node": ">= 0.4"
593
+ }
594
+ },
595
+ "node_modules/hono": {
596
+ "version": "4.6.14",
597
+ "resolved": "https://registry.npmmirror.com/hono/-/hono-4.6.14.tgz",
598
+ "integrity": "sha512-j4VkyUp2xazGJ8eCCLN1Vm/bxdvm/j5ZuU9AIjLu9vapn2M44p9L3Ktr9Vnb2RN2QtcR/wVjZVMlT5k7GJQgPw==",
599
+ "license": "MIT",
600
+ "engines": {
601
+ "node": ">=16.9.0"
602
+ }
603
+ },
604
+ "node_modules/inflight": {
605
+ "version": "1.0.6",
606
+ "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz",
607
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
608
+ "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
609
+ "dev": true,
610
+ "license": "ISC",
611
+ "dependencies": {
612
+ "once": "^1.3.0",
613
+ "wrappy": "1"
614
+ }
615
+ },
616
+ "node_modules/inherits": {
617
+ "version": "2.0.4",
618
+ "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
619
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
620
+ "dev": true,
621
+ "license": "ISC"
622
+ },
623
+ "node_modules/interpret": {
624
+ "version": "1.4.0",
625
+ "resolved": "https://registry.npmmirror.com/interpret/-/interpret-1.4.0.tgz",
626
+ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
627
+ "dev": true,
628
+ "license": "MIT",
629
+ "engines": {
630
+ "node": ">= 0.10"
631
+ }
632
+ },
633
+ "node_modules/is-core-module": {
634
+ "version": "2.16.1",
635
+ "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.16.1.tgz",
636
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
637
+ "dev": true,
638
+ "license": "MIT",
639
+ "dependencies": {
640
+ "hasown": "^2.0.2"
641
+ },
642
+ "engines": {
643
+ "node": ">= 0.4"
644
+ },
645
+ "funding": {
646
+ "url": "https://github.com/sponsors/ljharb"
647
+ }
648
+ },
649
+ "node_modules/minimatch": {
650
+ "version": "3.1.2",
651
+ "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
652
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
653
+ "dev": true,
654
+ "license": "ISC",
655
+ "dependencies": {
656
+ "brace-expansion": "^1.1.7"
657
+ },
658
+ "engines": {
659
+ "node": "*"
660
+ }
661
+ },
662
+ "node_modules/minimist": {
663
+ "version": "1.2.8",
664
+ "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz",
665
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
666
+ "dev": true,
667
+ "license": "MIT",
668
+ "funding": {
669
+ "url": "https://github.com/sponsors/ljharb"
670
+ }
671
+ },
672
+ "node_modules/once": {
673
+ "version": "1.4.0",
674
+ "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz",
675
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
676
+ "dev": true,
677
+ "license": "ISC",
678
+ "dependencies": {
679
+ "wrappy": "1"
680
+ }
681
+ },
682
+ "node_modules/path-is-absolute": {
683
+ "version": "1.0.1",
684
+ "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
685
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
686
+ "dev": true,
687
+ "license": "MIT",
688
+ "engines": {
689
+ "node": ">=0.10.0"
690
+ }
691
+ },
692
+ "node_modules/path-parse": {
693
+ "version": "1.0.7",
694
+ "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
695
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
696
+ "dev": true,
697
+ "license": "MIT"
698
+ },
699
+ "node_modules/playwright": {
700
+ "version": "1.49.1",
701
+ "resolved": "https://registry.npmmirror.com/playwright/-/playwright-1.49.1.tgz",
702
+ "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==",
703
+ "license": "Apache-2.0",
704
+ "dependencies": {
705
+ "playwright-core": "1.49.1"
706
+ },
707
+ "bin": {
708
+ "playwright": "cli.js"
709
+ },
710
+ "engines": {
711
+ "node": ">=18"
712
+ },
713
+ "optionalDependencies": {
714
+ "fsevents": "2.3.2"
715
+ }
716
+ },
717
+ "node_modules/playwright-core": {
718
+ "version": "1.49.1",
719
+ "resolved": "https://registry.npmmirror.com/playwright-core/-/playwright-core-1.49.1.tgz",
720
+ "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==",
721
+ "license": "Apache-2.0",
722
+ "bin": {
723
+ "playwright-core": "cli.js"
724
+ },
725
+ "engines": {
726
+ "node": ">=18"
727
+ }
728
+ },
729
+ "node_modules/playwright/node_modules/fsevents": {
730
+ "version": "2.3.2",
731
+ "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz",
732
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
733
+ "hasInstallScript": true,
734
+ "license": "MIT",
735
+ "optional": true,
736
+ "os": [
737
+ "darwin"
738
+ ],
739
+ "engines": {
740
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
741
+ }
742
+ },
743
+ "node_modules/rechoir": {
744
+ "version": "0.6.2",
745
+ "resolved": "https://registry.npmmirror.com/rechoir/-/rechoir-0.6.2.tgz",
746
+ "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
747
+ "dev": true,
748
+ "dependencies": {
749
+ "resolve": "^1.1.6"
750
+ },
751
+ "engines": {
752
+ "node": ">= 0.10"
753
+ }
754
+ },
755
+ "node_modules/resolve": {
756
+ "version": "1.22.10",
757
+ "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.10.tgz",
758
+ "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
759
+ "dev": true,
760
+ "license": "MIT",
761
+ "dependencies": {
762
+ "is-core-module": "^2.16.0",
763
+ "path-parse": "^1.0.7",
764
+ "supports-preserve-symlinks-flag": "^1.0.0"
765
+ },
766
+ "bin": {
767
+ "resolve": "bin/resolve"
768
+ },
769
+ "engines": {
770
+ "node": ">= 0.4"
771
+ },
772
+ "funding": {
773
+ "url": "https://github.com/sponsors/ljharb"
774
+ }
775
+ },
776
+ "node_modules/resolve-pkg-maps": {
777
+ "version": "1.0.0",
778
+ "resolved": "https://registry.npmmirror.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
779
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
780
+ "dev": true,
781
+ "license": "MIT",
782
+ "funding": {
783
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
784
+ }
785
+ },
786
+ "node_modules/shelljs": {
787
+ "version": "0.8.5",
788
+ "resolved": "https://registry.npmmirror.com/shelljs/-/shelljs-0.8.5.tgz",
789
+ "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
790
+ "dev": true,
791
+ "license": "BSD-3-Clause",
792
+ "dependencies": {
793
+ "glob": "^7.0.0",
794
+ "interpret": "^1.0.0",
795
+ "rechoir": "^0.6.2"
796
+ },
797
+ "bin": {
798
+ "shjs": "bin/shjs"
799
+ },
800
+ "engines": {
801
+ "node": ">=4"
802
+ }
803
+ },
804
+ "node_modules/shx": {
805
+ "version": "0.3.4",
806
+ "resolved": "https://registry.npmmirror.com/shx/-/shx-0.3.4.tgz",
807
+ "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==",
808
+ "dev": true,
809
+ "license": "MIT",
810
+ "dependencies": {
811
+ "minimist": "^1.2.3",
812
+ "shelljs": "^0.8.5"
813
+ },
814
+ "bin": {
815
+ "shx": "lib/cli.js"
816
+ },
817
+ "engines": {
818
+ "node": ">=6"
819
+ }
820
+ },
821
+ "node_modules/supports-preserve-symlinks-flag": {
822
+ "version": "1.0.0",
823
+ "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
824
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
825
+ "dev": true,
826
+ "license": "MIT",
827
+ "engines": {
828
+ "node": ">= 0.4"
829
+ },
830
+ "funding": {
831
+ "url": "https://github.com/sponsors/ljharb"
832
+ }
833
+ },
834
+ "node_modules/tsx": {
835
+ "version": "4.19.2",
836
+ "resolved": "https://registry.npmmirror.com/tsx/-/tsx-4.19.2.tgz",
837
+ "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==",
838
+ "dev": true,
839
+ "license": "MIT",
840
+ "dependencies": {
841
+ "esbuild": "~0.23.0",
842
+ "get-tsconfig": "^4.7.5"
843
+ },
844
+ "bin": {
845
+ "tsx": "dist/cli.mjs"
846
+ },
847
+ "engines": {
848
+ "node": ">=18.0.0"
849
+ },
850
+ "optionalDependencies": {
851
+ "fsevents": "~2.3.3"
852
+ }
853
+ },
854
+ "node_modules/typescript": {
855
+ "version": "5.8.2",
856
+ "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.8.2.tgz",
857
+ "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
858
+ "dev": true,
859
+ "license": "Apache-2.0",
860
+ "bin": {
861
+ "tsc": "bin/tsc",
862
+ "tsserver": "bin/tsserver"
863
+ },
864
+ "engines": {
865
+ "node": ">=14.17"
866
+ }
867
+ },
868
+ "node_modules/undici-types": {
869
+ "version": "6.19.8",
870
+ "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.19.8.tgz",
871
+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
872
+ "dev": true,
873
+ "license": "MIT"
874
+ },
875
+ "node_modules/wrappy": {
876
+ "version": "1.0.2",
877
+ "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
878
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
879
+ "dev": true,
880
+ "license": "ISC"
881
+ }
882
+ }
883
+ }
package.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "playwright-proxy",
3
+ "type": "module",
4
+ "scripts": {
5
+ "build": "tsc && shx cp index.html dist/index.html",
6
+ "start": "node dist/index.js",
7
+ "dev": "tsx watch src/index.ts"
8
+ },
9
+ "dependencies": {
10
+ "@hono/node-server": "^1.13.7",
11
+ "hono": "^4.6.14",
12
+ "playwright": "^1.49.1"
13
+ },
14
+ "devDependencies": {
15
+ "@types/node": "^20.17.23",
16
+ "shx": "^0.3.4",
17
+ "tsx": "^4.7.1",
18
+ "typescript": "^5.7.2"
19
+ }
20
+ }
src/index.ts ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Hono } from 'hono'
2
+ import { serve } from '@hono/node-server'
3
+ import { serveStatic } from '@hono/node-server/serve-static'
4
+ import { chromium, type Browser, type BrowserContext, type Route, type Page } from 'playwright'
5
+ import process from 'process'
6
+ import fs from 'fs'
7
+
8
+ const app = new Hono()
9
+
10
+ // 浏览器实例
11
+ let browser: Browser | null = null
12
+ let gensparkContext: BrowserContext | null = null
13
+ // 为genspark保存的page实例
14
+ let gensparkPage: Page | null = null
15
+ const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3';
16
+ // 初始化浏览器
17
+ async function initBrowser() {
18
+ if (!browser) {
19
+ browser = await chromium.launch({
20
+ headless: true,
21
+ args: [
22
+ '--no-sandbox',
23
+ '--disable-setuid-sandbox',
24
+ '--disable-dev-shm-usage',
25
+ ],
26
+ executablePath: process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH, // 使用系统 Chromium
27
+ })
28
+ }
29
+ return browser
30
+ }
31
+
32
+ // 初始化genspark页面
33
+ async function initGensparkPage(cookies?: any[]) {
34
+ const browser = await initBrowser()
35
+
36
+ if (!gensparkContext) {
37
+ gensparkContext = await browser.newContext({
38
+ locale: 'zh-CN',
39
+ userAgent: userAgent,
40
+ })
41
+ }
42
+ if (cookies && cookies.length > 0) {
43
+ await gensparkContext.addCookies(cookies);
44
+ }
45
+ if (!gensparkPage) {
46
+ gensparkPage = await gensparkContext.newPage()
47
+ // 首次加载页面
48
+ await gensparkPage.goto('https://www.genspark.ai', {
49
+ waitUntil: 'networkidle',
50
+ timeout: 60000
51
+ })
52
+ console.log('GenSpark页面已初始化')
53
+ }
54
+ return gensparkPage
55
+ }
56
+
57
+ // 验证响应头值是否有效
58
+ function isValidHeaderValue(value: string): boolean {
59
+ // 检查值是否为空或包含无效字符
60
+ if (!value || typeof value !== 'string') return false;
61
+ // 检查是否包含换行符或回车符
62
+ if (/[\r\n]/.test(value)) return false;
63
+ return true;
64
+ }
65
+
66
+ // 处理请求转发
67
+ async function handleRequest(url: string, method: string, headers: any, body?: any) {
68
+ const browser = await initBrowser()
69
+ const page = await browser.newPage()
70
+
71
+ try {
72
+ // 只移除确实需要移除的请求头
73
+ delete headers['host']
74
+ delete headers['connection']
75
+ delete headers['content-length']
76
+ delete headers['accept-encoding']
77
+ // 移除cf相关的头
78
+ delete headers['cdn-loop']
79
+ delete headers['cf-connecting-ip']
80
+ delete headers['cf-connecting-o2o']
81
+ delete headers['cf-ew-via']
82
+ delete headers['cf-ray']
83
+ delete headers['cf-visitor']
84
+ delete headers['cf-worker']
85
+
86
+ //移除其他无效的请求头
87
+ delete headers['x-direct-url']
88
+ delete headers['x-forwarded-for']
89
+ delete headers['x-forwarded-port']
90
+ delete headers['x-forwarded-proto']
91
+
92
+ headers['user-agent'] = userAgent
93
+
94
+ console.log('处理请求:', method, url, headers, body)
95
+ // 设置请求拦截器
96
+ await page.route('**/*', async (route: Route) => {
97
+ const request = route.request()
98
+ if (request.url() === url) {
99
+ await route.continue({
100
+ method: method,
101
+ headers: {
102
+ ...request.headers(),
103
+ ...headers
104
+ },
105
+ postData: body
106
+ })
107
+ } else {
108
+ // 允许其他资源加载
109
+ await route.continue()
110
+ }
111
+ })
112
+
113
+ // 配置页面请求选项
114
+ const response = await page.goto(url, {
115
+ waitUntil: 'domcontentloaded', // 改为更快的加载策略
116
+ timeout: 600000
117
+ })
118
+
119
+ if (!response) {
120
+ throw new Error('未收到响应')
121
+ }
122
+
123
+ // 等待页面加载完成
124
+ await page.waitForLoadState('networkidle', { timeout: 5000 }).catch(() => {
125
+ console.log('等待页面加载超时,继续处理')
126
+ })
127
+
128
+ // 获取响应数据
129
+ const status = response.status()
130
+ const responseHeaders = response.headers()
131
+
132
+ // 确保移除可能导致解码问题的响应头
133
+ delete responseHeaders['content-encoding']
134
+ delete responseHeaders['content-length']
135
+
136
+ // 过滤无效的响应头
137
+ const validHeaders: Record<string, string> = {}
138
+ for (const [key, value] of Object.entries(responseHeaders)) {
139
+ if (isValidHeaderValue(value as string)) {
140
+ validHeaders[key] = value as string
141
+ } else {
142
+ console.warn(`跳过无效的响应头: ${key}: ${value}`)
143
+ }
144
+ }
145
+
146
+ // 直接获取响应体的二进制数据
147
+ const responseBody = await response.body()
148
+
149
+ console.log('请求处理完成:', status, responseBody.toString())
150
+
151
+ await page.close()
152
+
153
+ return {
154
+ status,
155
+ headers: validHeaders,
156
+ body: responseBody
157
+ }
158
+ } catch (error: any) {
159
+ await page.close()
160
+ console.error('请求处理错误:', error)
161
+ throw new Error(`请求失败: ${error.message}`)
162
+ }
163
+ }
164
+
165
+
166
+ // 添加静态文件服务
167
+ app.use('/public/*', serveStatic({ root: './' }))
168
+
169
+ // 修改点 1: 处理根路由直接返回 index.html 内容,而不是重定向
170
+ app.get('/', async (c) => {
171
+ try {
172
+ const htmlContent = fs.readFileSync('./index.html', 'utf-8')
173
+ return c.html(htmlContent)
174
+ } catch (error) {
175
+ console.error('读取index.html失败:', error)
176
+ return c.text('无法读取主页', 500)
177
+ }
178
+ })
179
+
180
+ // 修改点 2: 添加 /genspark 路由来获取reCAPTCHA令牌
181
+ app.get('/genspark', async (c) => {
182
+ try {
183
+ const headers = Object.fromEntries(c.req.raw.headers)
184
+ // Get the cookie string from headers
185
+ const cookieString = headers.cookie || '';
186
+ // Parse cookies into an array of objects with name and value properties
187
+ const cookies = cookieString.split(';').map(cookie => {
188
+ const [name, value] = cookie.trim().split('=');
189
+ return { name, value, domain: 'www.genspark.ai', path: '/' };
190
+ }).filter(cookie => cookie.name && cookie.value);
191
+
192
+ const gensparkPage = await initGensparkPage(cookies)
193
+
194
+ //刷新页面以确保获取新令牌
195
+ await gensparkPage.goto('https://www.genspark.ai/agents?type=moa_chat', {
196
+ waitUntil: 'networkidle',
197
+ timeout: 30000
198
+ })
199
+
200
+ // 执行脚本获取令牌
201
+ const token = await gensparkPage.evaluate(() => {
202
+ return new Promise((resolve, reject) => {
203
+ // @ts-ignore
204
+ window.grecaptcha.ready(function () {
205
+ // @ts-ignore
206
+ grecaptcha.execute(
207
+ "6Leq7KYqAAAAAGdd1NaUBJF9dHTPAKP7DcnaRc66",
208
+ { action: 'copilot' },
209
+ ).then(function (token: string) {
210
+ resolve(token)
211
+ }).catch(function (error: Error) {
212
+ reject(error)
213
+ });
214
+ });
215
+
216
+ // 设置超时
217
+ setTimeout(() => reject(new Error("获取令牌超时")), 10000);
218
+ });
219
+ }).catch(error => {
220
+ return c.json({ code: 500, message: '获取令牌失败' })
221
+ });
222
+
223
+ return c.json({ code: 200, message: '获取令牌成功', token: token })
224
+ }
225
+ catch (error) {
226
+ console.error('获取令牌失败:', error)
227
+ if (gensparkPage) {
228
+ await gensparkPage.close().catch(() => { });
229
+ gensparkPage = null;
230
+ }
231
+
232
+ if (gensparkContext) {
233
+ await gensparkContext.close().catch(() => { });
234
+ gensparkContext = null;
235
+ }
236
+ return c.json({ code: 500, message: '获取令牌失败' })
237
+ }
238
+
239
+ })
240
+
241
+ // 处理所有 HTTP 方法
242
+ app.all('*', async (c) => {
243
+ const url = c.req.query('url')
244
+ if (!url) {
245
+ return c.text('Missing url parameter', 400)
246
+ }
247
+
248
+ try {
249
+ const method = c.req.method
250
+ const headers = Object.fromEntries(c.req.raw.headers)
251
+ const body = method !== 'GET' ? await c.req.text() : undefined
252
+
253
+ const result = await handleRequest(url, method, headers, body)
254
+
255
+ // 创建标准响应
256
+ const response = new Response(result.body, {
257
+ status: result.status,
258
+ headers: new Headers({
259
+ ...result.headers,
260
+ 'content-encoding': 'identity' // 显式设置不使用压缩
261
+ })
262
+ })
263
+
264
+ return response
265
+ } catch (error) {
266
+ console.error('Error:', error)
267
+ return new Response('Internal Server Error', {
268
+ status: 500,
269
+ headers: new Headers({
270
+ 'content-type': 'text/plain'
271
+ })
272
+ })
273
+ }
274
+ })
275
+
276
+ // 清理函数
277
+ async function cleanup() {
278
+ if (gensparkPage) {
279
+ await gensparkPage.close().catch(() => { });
280
+ gensparkPage = null;
281
+ }
282
+
283
+ if (gensparkContext) {
284
+ await gensparkContext.close().catch(() => { });
285
+ gensparkContext = null;
286
+ }
287
+
288
+ if (browser) {
289
+ await browser.close().catch(() => { });
290
+ browser = null;
291
+ }
292
+ process.exit(0)
293
+ }
294
+
295
+ // 监听进程退出信号
296
+ process.on('SIGINT', cleanup)
297
+ process.on('SIGTERM', cleanup)
298
+
299
+ initGensparkPage().catch(async () => {
300
+ if (gensparkPage) {
301
+ await gensparkPage.close().catch(() => { });
302
+ gensparkPage = null;
303
+ }
304
+
305
+ if (gensparkContext) {
306
+ await gensparkContext.close().catch(() => { });
307
+ gensparkContext = null;
308
+ }
309
+ })
310
+
311
+ const port = Number(process.env.PORT || '7860');
312
+ console.log(`Server is running on port http://localhost:${port}`)
313
+
314
+ // 启动服务器
315
+ serve({
316
+ fetch: app.fetch,
317
+ port: port
318
+ })
tsconfig.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "NodeNext",
5
+ "strict": true,
6
+ "verbatimModuleSyntax": true,
7
+ "skipLibCheck": true,
8
+ "types": [
9
+ "node"
10
+ ],
11
+ "jsx": "react-jsx",
12
+ "jsxImportSource": "hono/jsx",
13
+ "outDir": "./dist",
14
+ "rootDir": "./src"
15
+ },
16
+ "include": [
17
+ "src/**/*"
18
+ ],
19
+ "exclude": [
20
+ "node_modules"
21
+ ]
22
+ }