ipfs-http-response
Advanced tools
Comparing version 4.0.2-dfc43d4e.0 to 5.0.0
{ | ||
"name": "ipfs-http-response", | ||
"version": "4.0.2-dfc43d4e.0", | ||
"version": "5.0.0", | ||
"description": "Creates an HTTP response from an IPFS Hash", | ||
@@ -71,7 +71,6 @@ "author": "Vasco Santos <vasco.santos@moxy.studio>", | ||
"ejs": "^3.1.6", | ||
"file-type": "^17.1.1", | ||
"filesize": "^9.0.11", | ||
"it-buffer": "^0.1.1", | ||
"it-concat": "^2.0.0", | ||
"it-map": "^1.0.6", | ||
"file-type": "^18.0.0", | ||
"filesize": "^10.0.5", | ||
"it-concat": "^3.0.1", | ||
"it-map": "^2.0.0", | ||
"it-reader": "^6.0.1", | ||
@@ -87,6 +86,6 @@ "it-to-stream": "^1.0.0", | ||
"get-stream": "^6.0.0", | ||
"ipfs-core": "^0.16.2-dfc43d4e.0", | ||
"ipfs-core": "^0.17.0", | ||
"ipfsd-ctl": "^12.0.3", | ||
"it-all": "^1.0.4", | ||
"uint8arrays": "^3.0.0" | ||
"it-all": "^2.0.0", | ||
"uint8arrays": "^4.0.2" | ||
}, | ||
@@ -97,3 +96,3 @@ "browser": { | ||
}, | ||
"gitHead": "4eac92ae987d3ba6007c4742456913c865a06857" | ||
"gitHead": "e8b7b66bfa98c2a1c0d0bfc19f698d7d00b6c888" | ||
} |
@@ -1,2 +0,2 @@ | ||
import filesize from 'filesize' | ||
import { filesize } from 'filesize' | ||
import style from './style.js' | ||
@@ -3,0 +3,0 @@ import { cidArray } from '../utils/path.js' |
@@ -6,4 +6,2 @@ /* global Response, Blob */ | ||
import concat from 'it-concat' | ||
// @ts-expect-error no types | ||
import toBuffer from 'it-buffer' | ||
import { logger } from '@libp2p/logger' | ||
@@ -77,3 +75,3 @@ import * as ipfsResolver from './resolver.js' | ||
if (typeof Blob === 'undefined') { | ||
const responseStream = toStream.readable(toBuffer(source)) | ||
const responseStream = toStream.readable(source) | ||
@@ -87,3 +85,3 @@ return contentType | ||
const data = await concat(source) | ||
const blob = new Blob([data.slice()]) | ||
const blob = new Blob([data.subarray()]) | ||
@@ -90,0 +88,0 @@ return contentType |
@@ -42,3 +42,5 @@ import { fileTypeFromBuffer } from 'file-type' | ||
} catch (/** @type {any} */ err) { | ||
if (err.code !== 'ERR_UNDER_READ') throw err | ||
if (err.code !== 'ERR_UNDER_READ') { | ||
throw err | ||
} | ||
@@ -45,0 +47,0 @@ // not enough bytes for sniffing, just yield the data |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10
0
227362
+ Addedfile-type@18.7.0(transitive)
+ Addedfilesize@10.1.2(transitive)
+ Addedit-concat@3.0.3(transitive)
+ Addedit-map@2.0.1(transitive)
- Removedit-buffer@^0.1.1
- Removedbl@5.1.0(transitive)
- Removedfile-type@17.1.6(transitive)
- Removedfilesize@9.0.11(transitive)
- Removedit-buffer@0.1.3(transitive)
- Removedit-concat@2.0.0(transitive)
- Removedit-map@1.0.6(transitive)
Updatedfile-type@^18.0.0
Updatedfilesize@^10.0.5
Updatedit-concat@^3.0.1
Updatedit-map@^2.0.0