+3889
-20
lines changedFilter options
+3889
-20
lines changed Original file line number Diff line number Diff line change
@@ -243,6 +243,12 @@
243
243
/npm-pick-manifest/node_modules/*
244
244
!/npm-pick-manifest/node_modules/npm-normalize-package-bin
245
245
!/npm-profile
246
+
!/npm-profile/node_modules/
247
+
/npm-profile/node_modules/*
248
+
!/npm-profile/node_modules/minipass-fetch
249
+
!/npm-profile/node_modules/minizlib
250
+
!/npm-profile/node_modules/npm-registry-fetch
251
+
!/npm-profile/node_modules/proc-log
246
252
!/npm-registry-fetch
247
253
!/npm-registry-fetch/node_modules/
248
254
/npm-registry-fetch/node_modules/*
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ const webAuthCheckLogin = async (doneUrl, opts, { signal } = {}) => {
119
119
if (res.status === 202) {
120
120
const retry = +res.headers.get('retry-after') * 1000
121
121
if (retry > 0) {
122
-
await timers.setTimeout(retry, null, { ref: false, signal })
122
+
await timers.setTimeout(retry, null, { signal })
123
123
}
124
124
return webAuthCheckLogin(doneUrl, opts, { signal })
125
125
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
1
+
The MIT License (MIT)
2
+
3
+
Copyright (c) Isaac Z. Schlueter and Contributors
4
+
Copyright (c) 2016 David Frank
5
+
6
+
Permission is hereby granted, free of charge, to any person obtaining a copy
7
+
of this software and associated documentation files (the "Software"), to deal
8
+
in the Software without restriction, including without limitation the rights
9
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+
copies of the Software, and to permit persons to whom the Software is
11
+
furnished to do so, subject to the following conditions:
12
+
13
+
The above copyright notice and this permission notice shall be included in all
14
+
copies or substantial portions of the Software.
15
+
16
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+
SOFTWARE.
23
+
24
+
---
25
+
26
+
Note: This is a derivative work based on "node-fetch" by David Frank,
27
+
modified and distributed under the terms of the MIT license above.
28
+
https://github.com/bitinn/node-fetch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
1
+
'use strict'
2
+
class AbortError extends Error {
3
+
constructor (message) {
4
+
super(message)
5
+
this.code = 'FETCH_ABORTED'
6
+
this.type = 'aborted'
7
+
Error.captureStackTrace(this, this.constructor)
8
+
}
9
+
10
+
get name () {
11
+
return 'AbortError'
12
+
}
13
+
14
+
// don't allow name to be overridden, but don't throw either
15
+
set name (s) {}
16
+
}
17
+
module.exports = AbortError
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
1
+
'use strict'
2
+
const { Minipass } = require('minipass')
3
+
const TYPE = Symbol('type')
4
+
const BUFFER = Symbol('buffer')
5
+
6
+
class Blob {
7
+
constructor (blobParts, options) {
8
+
this[TYPE] = ''
9
+
10
+
const buffers = []
11
+
let size = 0
12
+
13
+
if (blobParts) {
14
+
const a = blobParts
15
+
const length = Number(a.length)
16
+
for (let i = 0; i < length; i++) {
17
+
const element = a[i]
18
+
const buffer = element instanceof Buffer ? element
19
+
: ArrayBuffer.isView(element)
20
+
? Buffer.from(element.buffer, element.byteOffset, element.byteLength)
21
+
: element instanceof ArrayBuffer ? Buffer.from(element)
22
+
: element instanceof Blob ? element[BUFFER]
23
+
: typeof element === 'string' ? Buffer.from(element)
24
+
: Buffer.from(String(element))
25
+
size += buffer.length
26
+
buffers.push(buffer)
27
+
}
28
+
}
29
+
30
+
this[BUFFER] = Buffer.concat(buffers, size)
31
+
32
+
const type = options && options.type !== undefined
33
+
&& String(options.type).toLowerCase()
34
+
if (type && !/[^\u0020-\u007E]/.test(type)) {
35
+
this[TYPE] = type
36
+
}
37
+
}
38
+
39
+
get size () {
40
+
return this[BUFFER].length
41
+
}
42
+
43
+
get type () {
44
+
return this[TYPE]
45
+
}
46
+
47
+
text () {
48
+
return Promise.resolve(this[BUFFER].toString())
49
+
}
50
+
51
+
arrayBuffer () {
52
+
const buf = this[BUFFER]
53
+
const off = buf.byteOffset
54
+
const len = buf.byteLength
55
+
const ab = buf.buffer.slice(off, off + len)
56
+
return Promise.resolve(ab)
57
+
}
58
+
59
+
stream () {
60
+
return new Minipass().end(this[BUFFER])
61
+
}
62
+
63
+
slice (start, end, type) {
64
+
const size = this.size
65
+
const relativeStart = start === undefined ? 0
66
+
: start < 0 ? Math.max(size + start, 0)
67
+
: Math.min(start, size)
68
+
const relativeEnd = end === undefined ? size
69
+
: end < 0 ? Math.max(size + end, 0)
70
+
: Math.min(end, size)
71
+
const span = Math.max(relativeEnd - relativeStart, 0)
72
+
73
+
const buffer = this[BUFFER]
74
+
const slicedBuffer = buffer.slice(
75
+
relativeStart,
76
+
relativeStart + span
77
+
)
78
+
const blob = new Blob([], { type })
79
+
blob[BUFFER] = slicedBuffer
80
+
return blob
81
+
}
82
+
83
+
get [Symbol.toStringTag] () {
84
+
return 'Blob'
85
+
}
86
+
87
+
static get BUFFER () {
88
+
return BUFFER
89
+
}
90
+
}
91
+
92
+
Object.defineProperties(Blob.prototype, {
93
+
size: { enumerable: true },
94
+
type: { enumerable: true },
95
+
})
96
+
97
+
module.exports = Blob
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4