@capacitor/android
Advanced tools
Comparing version 6.1.1-nightly-20240709T150500.0 to 6.1.1-nightly-20240710T150540.0
@@ -68,18 +68,25 @@ | ||
const convertBody = async (body, contentType) => { | ||
if (body instanceof ReadableStream) { | ||
const reader = body.getReader(); | ||
const chunks = []; | ||
while (true) { | ||
const { done, value } = await reader.read(); | ||
if (done) | ||
break; | ||
chunks.push(value); | ||
if (body instanceof ReadableStream || body instanceof Uint8Array) { | ||
let encodedData; | ||
if (body instanceof ReadableStream) { | ||
const reader = body.getReader(); | ||
const chunks = []; | ||
while (true) { | ||
const { done, value } = await reader.read(); | ||
if (done) | ||
break; | ||
chunks.push(value); | ||
} | ||
const concatenated = new Uint8Array(chunks.reduce((acc, chunk) => acc + chunk.length, 0)); | ||
let position = 0; | ||
for (const chunk of chunks) { | ||
concatenated.set(chunk, position); | ||
position += chunk.length; | ||
} | ||
encodedData = concatenated; | ||
} | ||
const concatenated = new Uint8Array(chunks.reduce((acc, chunk) => acc + chunk.length, 0)); | ||
let position = 0; | ||
for (const chunk of chunks) { | ||
concatenated.set(chunk, position); | ||
position += chunk.length; | ||
else { | ||
encodedData = body; | ||
} | ||
let data = new TextDecoder().decode(concatenated); | ||
let data = new TextDecoder().decode(encodedData); | ||
let type; | ||
@@ -86,0 +93,0 @@ if (contentType === 'application/json') { |
{ | ||
"name": "@capacitor/android", | ||
"version": "6.1.1-nightly-20240709T150500.0", | ||
"version": "6.1.1-nightly-20240710T150540.0", | ||
"description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
@@ -26,3 +26,3 @@ "homepage": "https://capacitorjs.com", | ||
"peerDependencies": { | ||
"@capacitor/core": "^6.1.0-nightly-20240709T150500.0" | ||
"@capacitor/core": "^6.1.0-nightly-20240710T150540.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
429238
1021