updated itty-router, updated compatibility date, switched to yarn, fixed corruptions

This commit is contained in:
uh wot 2022-03-09 23:56:27 +01:00
parent 84cf6e9e4c
commit 101394e22d
Signed by: uhwot
GPG Key ID: CB2454984587B781
6 changed files with 2700 additions and 8821 deletions

2
dist/worker.js vendored

File diff suppressed because one or more lines are too long

View File

@ -424,12 +424,11 @@ async function pipeDecryptedStream(writer, body, length, cipher, fixed_range_sta
const reader = body.getReader({ mode: 'byob' })
let byte_count = fixed_range_start
let buffer = new Uint8Array(2048)
let end = false
while (!end) {
end = byte_count + 2048 >= length
let chunk = (await reader.readAtLeast(2048, buffer)).value
let chunk = (await reader.readAtLeast(2048, new Uint8Array(2048))).value
if (byte_count % 6144 === 0 && chunk.byteLength == 2048) {
// encrypted chunk
@ -445,11 +444,7 @@ async function pipeDecryptedStream(writer, body, length, cipher, fixed_range_sta
}
writer.write(chunk)
if (!end) {
byte_count += 2048
buffer = new Uint8Array(chunk.buffer);
}
byte_count += 2048
}
writer.close()

8811
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
},
"dependencies": {
"browser-id3-writer": "^4.4.0",
"itty-router": "^2.4.10",
"itty-router": "^2.5.2",
"serverless-cloudflare-workers": "^1.2.0"
}
}

View File

@ -6,7 +6,7 @@ workers_dev = true
kv_namespaces = [
{ binding = "KV", id = "974c0967a84e415daa054bbbcc7f80c6", preview_id = "cfcc6491f3484cbca664913836635113" }
]
compatibility_date = "2022-02-27"
compatibility_date = "2022-03-09"
# [secrets]
# ARL

2695
yarn.lock Normal file

File diff suppressed because it is too large Load Diff