Compare commits

..

2 Commits

Author SHA1 Message Date
Derrick Hammer ca22b4e753
*update dist 2023-04-16 20:55:54 -04:00
Derrick Hammer 9bcf4a14b6
*update hash 2023-04-16 20:55:34 -04:00
3 changed files with 16 additions and 3 deletions

2
dist/index.d.ts.map vendored
View File

@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEnE,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,aAAa,CAAC,UAAU,CAAC,CAAC;CAC3C;AAED,qBAAa,UAAW,SAAQ,MAAM;IACvB,KAAK;IAIL,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IAItD,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,kBAAkB;IAIjE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,kBAAkB;IAI7D,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C,OAAO,CAAC,sBAAsB;CA4C/B;AAED,eAAO,MAAM,YAAY,8BAGxB,CAAC"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAW,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEnE,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,aAAa,CAAC,UAAU,CAAC,CAAC;CAC3C;AAED,qBAAa,UAAW,SAAQ,MAAM;IACvB,KAAK;IAIL,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IAItD,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,kBAAkB;IAIjE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,kBAAkB;IAI7D,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAI3C,OAAO,CAAC,sBAAsB;CAmD/B;AAED,eAAO,MAAM,YAAY,8BAGxB,CAAC"}

8
dist/index.js vendored
View File

@ -39,6 +39,12 @@ export class IPFSClient extends Client {
[Symbol.asyncIterator]() {
return {
async next() {
if (done) {
return {
value: undefined,
done,
};
}
const chunk = await pipe.promise;
update("next");
pipe = defer();
@ -54,4 +60,4 @@ export class IPFSClient extends Client {
};
}
}
export const createClient = factory(IPFSClient, "AABQIM9nyK61LFfr5jUAivD6JYRvQsC5XSNE71XXHfn-sg");
export const createClient = factory(IPFSClient, "AAD_sKxIPbN-n7sNpYycq0M6wyix_UMIhqFiUPILfKiuqA");

View File

@ -60,6 +60,13 @@ export class IPFSClient extends Client {
[Symbol.asyncIterator]() {
return {
async next(): Promise<IteratorResult<Uint8Array>> {
if (done) {
return {
value: undefined,
done,
};
}
const chunk = await pipe.promise;
update("next");
@ -80,5 +87,5 @@ export class IPFSClient extends Client {
export const createClient = factory<IPFSClient>(
IPFSClient,
"AABQIM9nyK61LFfr5jUAivD6JYRvQsC5XSNE71XXHfn-sg"
"AAD_sKxIPbN-n7sNpYycq0M6wyix_UMIhqFiUPILfKiuqA"
);