@helia/verified-fetch 0.0.0 → 1.0.1
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/README.md +353 -56
- package/dist/index.min.js +7 -29
- package/dist/src/index.d.ts +384 -69
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +345 -77
- package/dist/src/index.js.map +1 -1
- package/dist/src/singleton.d.ts +3 -0
- package/dist/src/singleton.d.ts.map +1 -0
- package/dist/src/singleton.js +15 -0
- package/dist/src/singleton.js.map +1 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/dag-cbor-to-safe-json.d.ts +7 -0
- package/dist/src/utils/dag-cbor-to-safe-json.d.ts.map +1 -0
- package/dist/src/utils/dag-cbor-to-safe-json.js +25 -0
- package/dist/src/utils/dag-cbor-to-safe-json.js.map +1 -0
- package/dist/src/utils/get-content-disposition-filename.d.ts +6 -0
- package/dist/src/utils/get-content-disposition-filename.d.ts.map +1 -0
- package/dist/src/utils/get-content-disposition-filename.js +16 -0
- package/dist/src/utils/get-content-disposition-filename.js.map +1 -0
- package/dist/src/utils/get-e-tag.d.ts +28 -0
- package/dist/src/utils/get-e-tag.d.ts.map +1 -0
- package/dist/src/utils/get-e-tag.js +18 -0
- package/dist/src/utils/get-e-tag.js.map +1 -0
- package/dist/src/utils/get-stream-from-async-iterable.d.ts +10 -0
- package/dist/src/utils/get-stream-from-async-iterable.d.ts.map +1 -0
- package/dist/src/utils/{get-stream-and-content-type.js → get-stream-from-async-iterable.js} +11 -11
- package/dist/src/utils/get-stream-from-async-iterable.js.map +1 -0
- package/dist/src/utils/get-tar-stream.d.ts +4 -0
- package/dist/src/utils/get-tar-stream.d.ts.map +1 -0
- package/dist/src/utils/get-tar-stream.js +46 -0
- package/dist/src/utils/get-tar-stream.js.map +1 -0
- package/dist/src/utils/parse-resource.d.ts +6 -1
- package/dist/src/utils/parse-resource.d.ts.map +1 -1
- package/dist/src/utils/parse-resource.js +2 -2
- package/dist/src/utils/parse-resource.js.map +1 -1
- package/dist/src/utils/parse-url-string.d.ts +10 -3
- package/dist/src/utils/parse-url-string.d.ts.map +1 -1
- package/dist/src/utils/parse-url-string.js +8 -4
- package/dist/src/utils/parse-url-string.js.map +1 -1
- package/dist/src/utils/responses.d.ts +5 -0
- package/dist/src/utils/responses.d.ts.map +1 -0
- package/dist/src/utils/responses.js +27 -0
- package/dist/src/utils/responses.js.map +1 -0
- package/dist/src/utils/select-output-type.d.ts +12 -0
- package/dist/src/utils/select-output-type.d.ts.map +1 -0
- package/dist/src/utils/select-output-type.js +148 -0
- package/dist/src/utils/select-output-type.js.map +1 -0
- package/dist/src/utils/walk-path.d.ts +2 -1
- package/dist/src/utils/walk-path.d.ts.map +1 -1
- package/dist/src/utils/walk-path.js +1 -3
- package/dist/src/utils/walk-path.js.map +1 -1
- package/dist/src/verified-fetch.d.ts +24 -27
- package/dist/src/verified-fetch.d.ts.map +1 -1
- package/dist/src/verified-fetch.js +297 -150
- package/dist/src/verified-fetch.js.map +1 -1
- package/dist/typedoc-urls.json +25 -18
- package/package.json +58 -116
- package/src/index.ts +391 -72
- package/src/singleton.ts +20 -0
- package/src/types.ts +1 -0
- package/src/utils/dag-cbor-to-safe-json.ts +27 -0
- package/src/utils/get-content-disposition-filename.ts +18 -0
- package/src/utils/get-e-tag.ts +36 -0
- package/src/utils/{get-stream-and-content-type.ts → get-stream-from-async-iterable.ts} +10 -9
- package/src/utils/get-tar-stream.ts +68 -0
- package/src/utils/parse-url-string.ts +17 -3
- package/src/utils/responses.ts +29 -0
- package/src/utils/select-output-type.ts +167 -0
- package/src/utils/walk-path.ts +4 -5
- package/src/verified-fetch.ts +340 -153
- package/dist/src/utils/get-content-type.d.ts +0 -11
- package/dist/src/utils/get-content-type.d.ts.map +0 -1
- package/dist/src/utils/get-content-type.js +0 -43
- package/dist/src/utils/get-content-type.js.map +0 -1
- package/dist/src/utils/get-stream-and-content-type.d.ts +0 -9
- package/dist/src/utils/get-stream-and-content-type.d.ts.map +0 -1
- package/dist/src/utils/get-stream-and-content-type.js.map +0 -1
- package/src/utils/get-content-type.ts +0 -55
package/dist/typedoc-urls.json
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
"CIDDetail": "https://ipfs.github.io/helia/interfaces/
|
|
3
|
-
".:CIDDetail": "https://ipfs.github.io/helia/interfaces/
|
|
4
|
-
"CIDDetailError": "https://ipfs.github.io/helia/interfaces/
|
|
5
|
-
".:CIDDetailError": "https://ipfs.github.io/helia/interfaces/
|
|
6
|
-
"
|
|
7
|
-
".:
|
|
8
|
-
"
|
|
9
|
-
".:
|
|
10
|
-
"
|
|
11
|
-
".:
|
|
12
|
-
"
|
|
13
|
-
".:
|
|
14
|
-
"
|
|
15
|
-
".:
|
|
16
|
-
"
|
|
17
|
-
".:
|
|
18
|
-
"
|
|
19
|
-
".:
|
|
2
|
+
"CIDDetail": "https://ipfs.github.io/helia-verified-fetch/interfaces/CIDDetail.html",
|
|
3
|
+
".:CIDDetail": "https://ipfs.github.io/helia-verified-fetch/interfaces/CIDDetail.html",
|
|
4
|
+
"CIDDetailError": "https://ipfs.github.io/helia-verified-fetch/interfaces/CIDDetailError.html",
|
|
5
|
+
".:CIDDetailError": "https://ipfs.github.io/helia-verified-fetch/interfaces/CIDDetailError.html",
|
|
6
|
+
"ContentTypeParser": "https://ipfs.github.io/helia-verified-fetch/interfaces/ContentTypeParser.html",
|
|
7
|
+
".:ContentTypeParser": "https://ipfs.github.io/helia-verified-fetch/interfaces/ContentTypeParser.html",
|
|
8
|
+
"CreateVerifiedFetchInit": "https://ipfs.github.io/helia-verified-fetch/interfaces/CreateVerifiedFetchInit.html",
|
|
9
|
+
".:CreateVerifiedFetchInit": "https://ipfs.github.io/helia-verified-fetch/interfaces/CreateVerifiedFetchInit.html",
|
|
10
|
+
"CreateVerifiedFetchOptions": "https://ipfs.github.io/helia-verified-fetch/interfaces/CreateVerifiedFetchOptions.html",
|
|
11
|
+
".:CreateVerifiedFetchOptions": "https://ipfs.github.io/helia-verified-fetch/interfaces/CreateVerifiedFetchOptions.html",
|
|
12
|
+
"ResourceDetail": "https://ipfs.github.io/helia-verified-fetch/interfaces/ResourceDetail.html",
|
|
13
|
+
".:ResourceDetail": "https://ipfs.github.io/helia-verified-fetch/interfaces/ResourceDetail.html",
|
|
14
|
+
"VerifiedFetch": "https://ipfs.github.io/helia-verified-fetch/interfaces/VerifiedFetch.html",
|
|
15
|
+
".:VerifiedFetch": "https://ipfs.github.io/helia-verified-fetch/interfaces/VerifiedFetch.html",
|
|
16
|
+
"VerifiedFetchInit": "https://ipfs.github.io/helia-verified-fetch/interfaces/VerifiedFetchInit.html",
|
|
17
|
+
".:VerifiedFetchInit": "https://ipfs.github.io/helia-verified-fetch/interfaces/VerifiedFetchInit.html",
|
|
18
|
+
"BubbledProgressEvents": "https://ipfs.github.io/helia-verified-fetch/types/BubbledProgressEvents.html",
|
|
19
|
+
".:BubbledProgressEvents": "https://ipfs.github.io/helia-verified-fetch/types/BubbledProgressEvents.html",
|
|
20
|
+
"Resource": "https://ipfs.github.io/helia-verified-fetch/types/Resource.html",
|
|
21
|
+
".:Resource": "https://ipfs.github.io/helia-verified-fetch/types/Resource.html",
|
|
22
|
+
"VerifiedFetchProgressEvents": "https://ipfs.github.io/helia-verified-fetch/types/VerifiedFetchProgressEvents.html",
|
|
23
|
+
".:VerifiedFetchProgressEvents": "https://ipfs.github.io/helia-verified-fetch/types/VerifiedFetchProgressEvents.html",
|
|
24
|
+
"createVerifiedFetch": "https://ipfs.github.io/helia-verified-fetch/functions/createVerifiedFetch.html",
|
|
25
|
+
".:createVerifiedFetch": "https://ipfs.github.io/helia-verified-fetch/functions/createVerifiedFetch.html",
|
|
26
|
+
"verifiedFetch": "https://ipfs.github.io/helia-verified-fetch/functions/verifiedFetch-1.html"
|
|
20
27
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/verified-fetch",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A fetch-like API for obtaining verified & trustless IPFS content on the web
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A fetch-like API for obtaining verified & trustless IPFS content on the web",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
|
-
"homepage": "https://github.com/ipfs/helia/tree/main/packages/verified-fetch#readme",
|
|
6
|
+
"homepage": "https://github.com/ipfs/helia-verified-fetch/tree/main/packages/verified-fetch#readme",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/ipfs/helia.git"
|
|
9
|
+
"url": "git+https://github.com/ipfs/helia-verified-fetch.git"
|
|
10
10
|
},
|
|
11
11
|
"bugs": {
|
|
12
|
-
"url": "https://github.com/ipfs/helia/issues"
|
|
12
|
+
"url": "https://github.com/ipfs/helia-verified-fetch/issues"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public",
|
|
16
|
+
"provenance": true
|
|
13
17
|
},
|
|
14
18
|
"keywords": [
|
|
15
19
|
"IPFS",
|
|
@@ -37,95 +41,11 @@
|
|
|
37
41
|
"sourceType": "module"
|
|
38
42
|
}
|
|
39
43
|
},
|
|
40
|
-
"release": {
|
|
41
|
-
"branches": [
|
|
42
|
-
"main"
|
|
43
|
-
],
|
|
44
|
-
"plugins": [
|
|
45
|
-
[
|
|
46
|
-
"@semantic-release/commit-analyzer",
|
|
47
|
-
{
|
|
48
|
-
"preset": "conventionalcommits",
|
|
49
|
-
"releaseRules": [
|
|
50
|
-
{
|
|
51
|
-
"breaking": true,
|
|
52
|
-
"release": "major"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"revert": true,
|
|
56
|
-
"release": "patch"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"type": "feat",
|
|
60
|
-
"release": "minor"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"type": "fix",
|
|
64
|
-
"release": "patch"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"type": "docs",
|
|
68
|
-
"release": "patch"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"type": "test",
|
|
72
|
-
"release": "patch"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"type": "deps",
|
|
76
|
-
"release": "patch"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"scope": "no-release",
|
|
80
|
-
"release": false
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
[
|
|
86
|
-
"@semantic-release/release-notes-generator",
|
|
87
|
-
{
|
|
88
|
-
"preset": "conventionalcommits",
|
|
89
|
-
"presetConfig": {
|
|
90
|
-
"types": [
|
|
91
|
-
{
|
|
92
|
-
"type": "feat",
|
|
93
|
-
"section": "Features"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"type": "fix",
|
|
97
|
-
"section": "Bug Fixes"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"type": "chore",
|
|
101
|
-
"section": "Trivial Changes"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"type": "docs",
|
|
105
|
-
"section": "Documentation"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"type": "deps",
|
|
109
|
-
"section": "Dependencies"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"type": "test",
|
|
113
|
-
"section": "Tests"
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
],
|
|
119
|
-
"@semantic-release/changelog",
|
|
120
|
-
"@semantic-release/npm",
|
|
121
|
-
"@semantic-release/github",
|
|
122
|
-
"@semantic-release/git"
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
44
|
"scripts": {
|
|
126
45
|
"clean": "aegir clean",
|
|
127
46
|
"lint": "aegir lint",
|
|
128
47
|
"dep-check": "aegir dep-check",
|
|
48
|
+
"doc-check": "aegir doc-check",
|
|
129
49
|
"build": "aegir build",
|
|
130
50
|
"test": "aegir test",
|
|
131
51
|
"test:chrome": "aegir test -t browser --cov",
|
|
@@ -137,35 +57,57 @@
|
|
|
137
57
|
"release": "aegir release"
|
|
138
58
|
},
|
|
139
59
|
"dependencies": {
|
|
140
|
-
"@helia/block-brokers": "^2.0.
|
|
141
|
-
"@helia/
|
|
142
|
-
"@helia/
|
|
143
|
-
"@helia/
|
|
144
|
-
"@helia/
|
|
145
|
-
"@helia/
|
|
146
|
-
"@helia/
|
|
147
|
-
"@
|
|
148
|
-
"@
|
|
149
|
-
"@ipld/dag-
|
|
150
|
-
"@
|
|
151
|
-
"@
|
|
152
|
-
"@libp2p/
|
|
153
|
-
"
|
|
60
|
+
"@helia/block-brokers": "^2.0.2",
|
|
61
|
+
"@helia/car": "^3.1.0",
|
|
62
|
+
"@helia/http": "^1.0.2",
|
|
63
|
+
"@helia/interface": "^4.0.1",
|
|
64
|
+
"@helia/ipns": "^6.0.1",
|
|
65
|
+
"@helia/routers": "^1.0.1",
|
|
66
|
+
"@helia/unixfs": "^3.0.1",
|
|
67
|
+
"@ipld/dag-cbor": "^9.2.0",
|
|
68
|
+
"@ipld/dag-json": "^10.2.0",
|
|
69
|
+
"@ipld/dag-pb": "^4.1.0",
|
|
70
|
+
"@libp2p/interface": "^1.1.4",
|
|
71
|
+
"@libp2p/kad-dht": "^12.0.8",
|
|
72
|
+
"@libp2p/peer-id": "^4.0.7",
|
|
73
|
+
"cborg": "^4.0.9",
|
|
154
74
|
"hashlru": "^2.3.0",
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
75
|
+
"interface-blockstore": "^5.2.10",
|
|
76
|
+
"interface-datastore": "^8.2.11",
|
|
77
|
+
"ipfs-unixfs-exporter": "^13.5.0",
|
|
78
|
+
"it-map": "^3.0.5",
|
|
79
|
+
"it-pipe": "^3.0.1",
|
|
80
|
+
"it-tar": "^6.0.5",
|
|
81
|
+
"it-to-browser-readablestream": "^2.0.6",
|
|
82
|
+
"multiformats": "^13.1.0",
|
|
83
|
+
"progress-events": "^1.0.0",
|
|
84
|
+
"uint8arrays": "^5.0.2"
|
|
159
85
|
},
|
|
160
86
|
"devDependencies": {
|
|
161
|
-
"@
|
|
162
|
-
"@
|
|
163
|
-
"@
|
|
164
|
-
"@
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"
|
|
87
|
+
"@helia/car": "^3.1.0",
|
|
88
|
+
"@helia/dag-cbor": "^3.0.1",
|
|
89
|
+
"@helia/dag-json": "^3.0.1",
|
|
90
|
+
"@helia/json": "^3.0.1",
|
|
91
|
+
"@helia/utils": "^0.0.2",
|
|
92
|
+
"@ipld/car": "^5.3.0",
|
|
93
|
+
"@libp2p/logger": "^4.0.7",
|
|
94
|
+
"@libp2p/peer-id-factory": "^4.0.7",
|
|
95
|
+
"@sgtpooki/file-type": "^1.0.1",
|
|
96
|
+
"@types/sinon": "^17.0.3",
|
|
97
|
+
"aegir": "^42.2.5",
|
|
98
|
+
"blockstore-core": "^4.4.0",
|
|
99
|
+
"browser-readablestream-to-it": "^2.0.5",
|
|
100
|
+
"datastore-core": "^9.2.9",
|
|
101
|
+
"helia": "^4.0.2",
|
|
102
|
+
"ipfs-unixfs-importer": "^15.2.4",
|
|
103
|
+
"ipns": "^9.0.0",
|
|
104
|
+
"it-all": "^3.0.4",
|
|
105
|
+
"it-last": "^3.0.4",
|
|
106
|
+
"it-to-buffer": "^4.0.5",
|
|
107
|
+
"magic-bytes.js": "^1.8.0",
|
|
108
|
+
"p-defer": "^4.0.0",
|
|
168
109
|
"sinon": "^17.0.1",
|
|
169
110
|
"sinon-ts": "^2.0.0"
|
|
170
|
-
}
|
|
111
|
+
},
|
|
112
|
+
"sideEffects": false
|
|
171
113
|
}
|