dsh-line-bot 0.10.6 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/host.mjs +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/host.mjs
CHANGED
|
@@ -51,7 +51,7 @@ const { createVision } = visionMod
|
|
|
51
51
|
const { createTts } = ttsMod
|
|
52
52
|
const { chunkText, clip, inQuietWindow, jsonFail, jsonOk, maskSecret, readJsonBody, safeArray, sleep, readJsonSafe } = utilMod
|
|
53
53
|
|
|
54
|
-
export const VERSION = '0.10.
|
|
54
|
+
export const VERSION = '0.10.7'
|
|
55
55
|
|
|
56
56
|
// 環境變數提供的 Cloudflare API Token(方便用 shell 注入、不用把 token 寫進設定檔)。
|
|
57
57
|
// 設定檔裡的 token 優先;兩者都沒有時才用環境變數。
|
|
@@ -3179,7 +3179,8 @@ export async function create({ ctx, config: pluginConfig, logger: upstream }) {
|
|
|
3179
3179
|
return
|
|
3180
3180
|
}
|
|
3181
3181
|
if (req.method === 'POST' && sub === '/action') {
|
|
3182
|
-
|
|
3182
|
+
// 參考音以 data URL 上傳,20MB 音檔轉成 base64 後約 27MB;預設 2MB 會讓上傳直接失敗。
|
|
3183
|
+
const body = await readJsonBody(req, 32 * 1024 * 1024)
|
|
3183
3184
|
const result = await runAction(String(body.action || ''), body.payload || {})
|
|
3184
3185
|
jsonOk(res, { action: body.action, result, status: await buildStatus() })
|
|
3185
3186
|
return
|