add browser dist
This commit is contained in:
@@ -38,19 +38,4 @@ declare enum CID_ALGORITHM {
|
||||
sha3_384 = "sha3-384"
|
||||
}
|
||||
|
||||
interface SimpleHash {
|
||||
update(data: Buffer): any;
|
||||
digest(): Buffer;
|
||||
}
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
declare function computeCIDs({ filePath, algorithms }: {
|
||||
filePath: string;
|
||||
algorithms: CID_ALGORITHM_NAMES[];
|
||||
}): Promise<string[]>;
|
||||
|
||||
export { CID_ALGORITHM_NAMES as C, type MultiHashData as M, type SimpleHash as S, type ComputeInterface as a, CID_ALGORITHM_CODES as b, CID_ALGORITHM as c, computeCIDs as d };
|
||||
export { CID_ALGORITHM_NAMES as C, type MultiHashData as M, type ComputeInterface as a, CID_ALGORITHM_CODES as b, CID_ALGORITHM as c };
|
||||
@@ -38,19 +38,4 @@ declare enum CID_ALGORITHM {
|
||||
sha3_384 = "sha3-384"
|
||||
}
|
||||
|
||||
interface SimpleHash {
|
||||
update(data: Buffer): any;
|
||||
digest(): Buffer;
|
||||
}
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
declare function computeCIDs({ filePath, algorithms }: {
|
||||
filePath: string;
|
||||
algorithms: CID_ALGORITHM_NAMES[];
|
||||
}): Promise<string[]>;
|
||||
|
||||
export { CID_ALGORITHM_NAMES as C, type MultiHashData as M, type SimpleHash as S, type ComputeInterface as a, CID_ALGORITHM_CODES as b, CID_ALGORITHM as c, computeCIDs as d };
|
||||
export { CID_ALGORITHM_NAMES as C, type MultiHashData as M, type ComputeInterface as a, CID_ALGORITHM_CODES as b, CID_ALGORITHM as c };
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
var chunkPAKJNZBJ_cjs = require('./chunk-PAKJNZBJ.cjs');
|
||||
var stream = require('stream');
|
||||
var digest = require('multiformats/hashes/digest');
|
||||
var cid = require('multiformats/cid');
|
||||
var crypto = require('crypto');
|
||||
var u = require('crc-32');
|
||||
|
||||
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
||||
|
||||
var u__default = /*#__PURE__*/_interopDefault(u);
|
||||
|
||||
var c=class{_crc=void 0;update(e){return this._crc=u__default.default.buf(e,this._crc),this}digest(){let e=Buffer.alloc(4);return e.writeInt32BE(this._crc,0),e}};var i={cid_crc32:306,cid_md5:213,cid_sha1:17,"cid_sha2-256":18,"cid_sha3-256":22,"cid_sha3-384":21};function m(r){switch(r){case"cid_sha2-256":return crypto.createHash("sha256");case"cid_sha1":return crypto.createHash("sha1");case"cid_md5":return crypto.createHash("md5");case"cid_sha3-256":return crypto.createHash("sha3-256");case"cid_sha3-384":return crypto.createHash("sha3-384");case"cid_crc32":return new c;default:throw new Error(`Unsupported algorithm: ${r}`)}}async function L({stream:r,algorithms:e}){let a=_(e);if(r instanceof stream.Readable)for await(let t of r)a.forEach(s=>s.hasher.update(t));else {let t=r.getReader();for(;;){let{done:s,value:n}=await t.read();if(s)break;a.forEach(f=>f.hasher.update(Buffer.from(n)));}}return H(a)}function _(r){return r.filter(a=>Object.values(chunkPAKJNZBJ_cjs.b).includes(a)).map(a=>({hasher:m(a),code:i[a]}))}async function H(r){return await Promise.all(r.map(async({code:e,hasher:a})=>{let t=a.digest(),s=digest.create(e,t);return cid.CID.createV1(e,s).toString()}))}
|
||||
|
||||
exports.a = L;
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-33LRP2HS.cjs.map
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
import { createReadStream } from 'fs';
|
||||
import { createHash } from 'crypto';
|
||||
import { CID } from 'multiformats/cid';
|
||||
import { create } from 'multiformats/hashes/digest';
|
||||
import x from 'crc-32';
|
||||
|
||||
var o=(s=>(s[s.crc32=306]="crc32",s[s.md5=213]="md5",s[s.sha1=17]="sha1",s[s.sha256=18]="sha256",s[s.sha3_256=22]="sha3_256",s[s.sha3_384=21]="sha3_384",s))(o||{}),d=(s=>(s.crc32="cid_crc32",s.md5="cid_md5",s.sha1="cid_sha1",s.sha256="cid_sha2-256",s.sha3_256="cid_sha3-256",s.sha3_384="cid_sha3-384",s))(d||{}),u=(s=>(s.crc32="crc32",s.md5="md5",s.sha1="sha1",s.sha256="sha2-256",s.sha3_256="sha3-256",s.sha3_384="sha3-384",s))(u||{});var t=class{_crc=void 0;update(a){return this._crc=x.buf(a,this._crc),this}digest(){let a=Buffer.alloc(4);return a.writeInt32BE(this._crc,0),a}};async function B({filePath:h,algorithms:a}){let c={"cid_sha2-256":{code:18,hasher:createHash("sha256")},cid_sha1:{code:17,hasher:createHash("sha1")},cid_md5:{code:213,hasher:createHash("md5")},"cid_sha3-256":{code:22,hasher:createHash("sha3-256")},"cid_sha3-384":{code:21,hasher:createHash("sha3-384")},cid_crc32:{code:306,hasher:new t}},i=a.map(s=>({hasher:c[s].hasher,code:c[s].code})),n=createReadStream(h);for await(let s of n)for(let r of i)r.hasher.update(s);return await Promise.all(i.map(async({code:s,hasher:r})=>{let m=r.digest(),f=create(s,m);return CID.createV1(s,f).toString()}))}
|
||||
|
||||
export { o as a, d as b, u as c, B as d };
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-4EZ47WAR.js.map
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import { a } from './chunk-A6J5HDTV.js';
|
||||
import m from 'fs';
|
||||
|
||||
async function s({filePath:r,algorithms:e}){let o=m.createReadStream(r);return a({stream:o,algorithms:e})}
|
||||
|
||||
export { s as a };
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-6UBSWOQL.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/lib/file-id/ShaComputeWorker.ts"],"names":["fs","computeCIDs","filePath","algorithms","stream"],"mappings":"wCACA,OAAOA,MAAQ,KASf,eAAOC,EAAmC,CAAC,SAAAC,EAAU,WAAAC,CAAU,EAGzC,CAClB,IAAMC,EAASJ,EAAG,iBAAiBE,CAAQ,EAC3C,OAAOD,EAAoB,CAAC,OAAAG,EAAQ,WAAAD,CAAU,CAAC,CACnD","sourcesContent":["import {CID_ALGORITHM_NAMES} from \"@root/hash-compute/MultiHashData\";\nimport fs from \"fs\";\nimport {computeCIDs as computeCIDsInternal} from \"./ComputeHash\";\n\n/**\n * Compute the CIDs of a file using specific algorithms\n * @param filePath The path to the file\n * @param algorithms Array of algorithms ('sha256', 'sha1')\n * @returns Array of CIDs (in the order of the algorithms)\n */\nexport default async function computeCIDs({filePath, algorithms}: {\n filePath: string;\n algorithms: CID_ALGORITHM_NAMES[]\n}): Promise<string[]> {\n const stream = fs.createReadStream(filePath);\n return computeCIDsInternal({stream, algorithms});\n}\n"]}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
import { b } from './chunk-YCFZVUZC.js';
|
||||
import { Readable } from 'stream';
|
||||
import { create } from 'multiformats/hashes/digest';
|
||||
import { CID } from 'multiformats/cid';
|
||||
import { createHash } from 'crypto';
|
||||
import u from 'crc-32';
|
||||
|
||||
var c=class{_crc=void 0;update(e){return this._crc=u.buf(e,this._crc),this}digest(){let e=Buffer.alloc(4);return e.writeInt32BE(this._crc,0),e}};var i={cid_crc32:306,cid_md5:213,cid_sha1:17,"cid_sha2-256":18,"cid_sha3-256":22,"cid_sha3-384":21};function m(r){switch(r){case"cid_sha2-256":return createHash("sha256");case"cid_sha1":return createHash("sha1");case"cid_md5":return createHash("md5");case"cid_sha3-256":return createHash("sha3-256");case"cid_sha3-384":return createHash("sha3-384");case"cid_crc32":return new c;default:throw new Error(`Unsupported algorithm: ${r}`)}}async function L({stream:r,algorithms:e}){let a=_(e);if(r instanceof Readable)for await(let t of r)a.forEach(s=>s.hasher.update(t));else {let t=r.getReader();for(;;){let{done:s,value:n}=await t.read();if(s)break;a.forEach(f=>f.hasher.update(Buffer.from(n)));}}return H(a)}function _(r){return r.filter(a=>Object.values(b).includes(a)).map(a=>({hasher:m(a),code:i[a]}))}async function H(r){return await Promise.all(r.map(async({code:e,hasher:a})=>{let t=a.digest(),s=create(e,t);return CID.createV1(e,s).toString()}))}
|
||||
|
||||
export { L as a };
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-A6J5HDTV.js.map
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
-20
@@ -1,20 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var crypto = require('crypto');
|
||||
var cid = require('multiformats/cid');
|
||||
var digest = require('multiformats/hashes/digest');
|
||||
var x = require('crc-32');
|
||||
|
||||
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
||||
|
||||
var x__default = /*#__PURE__*/_interopDefault(x);
|
||||
|
||||
var o=(s=>(s[s.crc32=306]="crc32",s[s.md5=213]="md5",s[s.sha1=17]="sha1",s[s.sha256=18]="sha256",s[s.sha3_256=22]="sha3_256",s[s.sha3_384=21]="sha3_384",s))(o||{}),d=(s=>(s.crc32="cid_crc32",s.md5="cid_md5",s.sha1="cid_sha1",s.sha256="cid_sha2-256",s.sha3_256="cid_sha3-256",s.sha3_384="cid_sha3-384",s))(d||{}),u=(s=>(s.crc32="crc32",s.md5="md5",s.sha1="sha1",s.sha256="sha2-256",s.sha3_256="sha3-256",s.sha3_384="sha3-384",s))(u||{});var t=class{_crc=void 0;update(a){return this._crc=x__default.default.buf(a,this._crc),this}digest(){let a=Buffer.alloc(4);return a.writeInt32BE(this._crc,0),a}};async function B({filePath:h,algorithms:a}){let c={"cid_sha2-256":{code:18,hasher:crypto.createHash("sha256")},cid_sha1:{code:17,hasher:crypto.createHash("sha1")},cid_md5:{code:213,hasher:crypto.createHash("md5")},"cid_sha3-256":{code:22,hasher:crypto.createHash("sha3-256")},"cid_sha3-384":{code:21,hasher:crypto.createHash("sha3-384")},cid_crc32:{code:306,hasher:new t}},i=a.map(s=>({hasher:c[s].hasher,code:c[s].code})),n=fs.createReadStream(h);for await(let s of n)for(let r of i)r.hasher.update(s);return await Promise.all(i.map(async({code:s,hasher:r})=>{let m=r.digest(),f=digest.create(s,m);return cid.CID.createV1(s,f).toString()}))}
|
||||
|
||||
exports.a = o;
|
||||
exports.b = d;
|
||||
exports.c = u;
|
||||
exports.d = B;
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-ASEKTFOG.cjs.map
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-KWYLOVWT.cjs.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":""}
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
var chunk33LRP2HS_cjs = require('./chunk-33LRP2HS.cjs');
|
||||
var m = require('fs');
|
||||
|
||||
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
||||
|
||||
var m__default = /*#__PURE__*/_interopDefault(m);
|
||||
|
||||
async function s({filePath:r,algorithms:e}){let o=m__default.default.createReadStream(r);return chunk33LRP2HS_cjs.a({stream:o,algorithms:e})}
|
||||
|
||||
exports.a = s;
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-KZVIGNTH.cjs.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/lib/file-id/ShaComputeWorker.ts"],"names":["fs","computeCIDs","filePath","algorithms","stream"],"mappings":"yCACA,OAAOA,MAAQ,KASf,eAAOC,EAAmC,CAAC,SAAAC,EAAU,WAAAC,CAAU,EAGzC,CAClB,IAAMC,EAASJ,EAAG,iBAAiBE,CAAQ,EAC3C,OAAOD,EAAoB,CAAC,OAAAG,EAAQ,WAAAD,CAAU,CAAC,CACnD","sourcesContent":["import {CID_ALGORITHM_NAMES} from \"@root/hash-compute/MultiHashData\";\nimport fs from \"fs\";\nimport {computeCIDs as computeCIDsInternal} from \"./ComputeHash\";\n\n/**\n * Compute the CIDs of a file using specific algorithms\n * @param filePath The path to the file\n * @param algorithms Array of algorithms ('sha256', 'sha1')\n * @returns Array of CIDs (in the order of the algorithms)\n */\nexport default async function computeCIDs({filePath, algorithms}: {\n filePath: string;\n algorithms: CID_ALGORITHM_NAMES[]\n}): Promise<string[]> {\n const stream = fs.createReadStream(filePath);\n return computeCIDsInternal({stream, algorithms});\n}\n"]}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
var s=(a=>(a[a.crc32=306]="crc32",a[a.md5=213]="md5",a[a.sha1=17]="sha1",a[a.sha256=18]="sha256",a[a.sha3_256=22]="sha3_256",a[a.sha3_384=21]="sha3_384",a))(s||{}),c=(a=>(a.crc32="cid_crc32",a.md5="cid_md5",a.sha1="cid_sha1",a.sha256="cid_sha2-256",a.sha3_256="cid_sha3-256",a.sha3_384="cid_sha3-384",a))(c||{}),h=(a=>(a.crc32="crc32",a.md5="md5",a.sha1="sha1",a.sha256="sha2-256",a.sha3_256="sha3-256",a.sha3_384="sha3-384",a))(h||{});
|
||||
|
||||
exports.a = s;
|
||||
exports.b = c;
|
||||
exports.c = h;
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-PAKJNZBJ.cjs.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/lib/hash-compute/MultiHashData.ts"],"names":["CID_ALGORITHM_CODES","CID_ALGORITHM_NAMES","CID_ALGORITHM"],"mappings":"AAiBO,IAAKA,OACRA,IAAA,MAAQ,KAAR,QACAA,IAAA,IAAM,KAAN,MACAA,IAAA,KAAO,IAAP,OACAA,IAAA,OAAS,IAAT,SACAA,IAAA,SAAW,IAAX,WACAA,IAAA,SAAW,IAAX,WANQA,OAAA,IASAC,OACRA,EAAA,MAAQ,YACRA,EAAA,IAAM,UACNA,EAAA,KAAO,WACPA,EAAA,OAAS,eACTA,EAAA,SAAW,eACXA,EAAA,SAAW,eANHA,OAAA,IASAC,OACRA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,KAAO,OACPA,EAAA,OAAS,WACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WANHA,OAAA","sourcesContent":["export interface MultiHashData {\n cid_crc32?: string; //0x0132 CRC32 (SFV)\n cid_md5?: string; // 0xd5 md5\n cid_sha1?: string; // 0x11 sha1\n \"cid_sha2-256\"?: string;//0x12 sha2-256\n \"cid_sha3-256\"?: string; // 0x16 sha3-256\n \"cid_sha3_384\"?: string; // 0x16 sha3-256\n}\n\nexport interface ComputeInterface {\n computeMissingHash(filePath: string, metadata: MultiHashData): Promise<void>;\n}\n\n/**\n * according to\n * https://ipfs.io/ipfs/QmXec1jjwzxWJoNbxQF5KffL8q6hFXm9QwUGaa3wKGk6dT/#title=Multicodecs&src=https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv\n */\nexport enum CID_ALGORITHM_CODES {\n crc32 = 0x0132,\n md5 = 0xd5,\n sha1 = 0x11,\n sha256 = 0x12,\n sha3_256 = 0x16,\n sha3_384 = 0x15,\n}\n\nexport enum CID_ALGORITHM_NAMES {\n crc32 = 'cid_crc32',\n md5 = 'cid_md5',\n sha1 = 'cid_sha1',\n sha256 = 'cid_sha2-256',\n sha3_256 = 'cid_sha3-256',\n sha3_384 = 'cid_sha3-384',\n}\n\nexport enum CID_ALGORITHM {\n crc32 = 'crc32',\n md5 = 'md5',\n sha1 = 'sha1',\n sha256 = 'sha2-256',\n sha3_256 = 'sha3-256',\n sha3_384 = 'sha3-384',\n}"]}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-XCJZALP2.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":""}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
var s=(a=>(a[a.crc32=306]="crc32",a[a.md5=213]="md5",a[a.sha1=17]="sha1",a[a.sha256=18]="sha256",a[a.sha3_256=22]="sha3_256",a[a.sha3_384=21]="sha3_384",a))(s||{}),c=(a=>(a.crc32="cid_crc32",a.md5="cid_md5",a.sha1="cid_sha1",a.sha256="cid_sha2-256",a.sha3_256="cid_sha3-256",a.sha3_384="cid_sha3-384",a))(c||{}),h=(a=>(a.crc32="crc32",a.md5="md5",a.sha1="sha1",a.sha256="sha2-256",a.sha3_256="sha3-256",a.sha3_384="sha3-384",a))(h||{});
|
||||
|
||||
export { s as a, c as b, h as c };
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=chunk-YCFZVUZC.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/lib/hash-compute/MultiHashData.ts"],"names":["CID_ALGORITHM_CODES","CID_ALGORITHM_NAMES","CID_ALGORITHM"],"mappings":"AAiBO,IAAKA,OACRA,IAAA,MAAQ,KAAR,QACAA,IAAA,IAAM,KAAN,MACAA,IAAA,KAAO,IAAP,OACAA,IAAA,OAAS,IAAT,SACAA,IAAA,SAAW,IAAX,WACAA,IAAA,SAAW,IAAX,WANQA,OAAA,IASAC,OACRA,EAAA,MAAQ,YACRA,EAAA,IAAM,UACNA,EAAA,KAAO,WACPA,EAAA,OAAS,eACTA,EAAA,SAAW,eACXA,EAAA,SAAW,eANHA,OAAA,IASAC,OACRA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,KAAO,OACPA,EAAA,OAAS,WACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WANHA,OAAA","sourcesContent":["export interface MultiHashData {\n cid_crc32?: string; //0x0132 CRC32 (SFV)\n cid_md5?: string; // 0xd5 md5\n cid_sha1?: string; // 0x11 sha1\n \"cid_sha2-256\"?: string;//0x12 sha2-256\n \"cid_sha3-256\"?: string; // 0x16 sha3-256\n \"cid_sha3_384\"?: string; // 0x16 sha3-256\n}\n\nexport interface ComputeInterface {\n computeMissingHash(filePath: string, metadata: MultiHashData): Promise<void>;\n}\n\n/**\n * according to\n * https://ipfs.io/ipfs/QmXec1jjwzxWJoNbxQF5KffL8q6hFXm9QwUGaa3wKGk6dT/#title=Multicodecs&src=https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv\n */\nexport enum CID_ALGORITHM_CODES {\n crc32 = 0x0132,\n md5 = 0xd5,\n sha1 = 0x11,\n sha256 = 0x12,\n sha3_256 = 0x16,\n sha3_384 = 0x15,\n}\n\nexport enum CID_ALGORITHM_NAMES {\n crc32 = 'cid_crc32',\n md5 = 'cid_md5',\n sha1 = 'cid_sha1',\n sha256 = 'cid_sha2-256',\n sha3_256 = 'cid_sha3-256',\n sha3_384 = 'cid_sha3-384',\n}\n\nexport enum CID_ALGORITHM {\n crc32 = 'crc32',\n md5 = 'md5',\n sha1 = 'sha1',\n sha256 = 'sha2-256',\n sha3_256 = 'sha3-256',\n sha3_384 = 'sha3-384',\n}"]}
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
require('./chunk-KWYLOVWT.cjs');
|
||||
var chunk33LRP2HS_cjs = require('./chunk-33LRP2HS.cjs');
|
||||
var chunkPAKJNZBJ_cjs = require('./chunk-PAKJNZBJ.cjs');
|
||||
|
||||
var a=class{constructor(r){this.targetHash=r;}async computeMissingHash(r,e){let t=this.targetHash.filter(o=>!e[o]);if(t.length===0)return;let i=await chunk33LRP2HS_cjs.a({stream:r,algorithms:t});for(let[o,c]of i.entries()){let n=t[o];e[n]=c;}}};
|
||||
|
||||
Object.defineProperty(exports, "computeCIDs", {
|
||||
enumerable: true,
|
||||
get: function () { return chunk33LRP2HS_cjs.a; }
|
||||
});
|
||||
Object.defineProperty(exports, "CID_ALGORITHM", {
|
||||
enumerable: true,
|
||||
get: function () { return chunkPAKJNZBJ_cjs.c; }
|
||||
});
|
||||
Object.defineProperty(exports, "CID_ALGORITHM_CODES", {
|
||||
enumerable: true,
|
||||
get: function () { return chunkPAKJNZBJ_cjs.a; }
|
||||
});
|
||||
Object.defineProperty(exports, "CID_ALGORITHM_NAMES", {
|
||||
enumerable: true,
|
||||
get: function () { return chunkPAKJNZBJ_cjs.b; }
|
||||
});
|
||||
exports.HashComputer = a;
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=index-browser.cjs.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/lib/hash-compute/HashComputer.ts"],"names":["HashComputer","targetHash","stream","metadata","neededHashes","hashName","cids","computeCIDs","index","cid","hashType"],"mappings":"6HAKO,IAAMA,EAAN,KAAkB,CAErB,YAAoBC,EAAmC,CAAnC,gBAAAA,CACpB,CAEA,MAAM,mBAAmBC,EAAkBC,EAAwC,CAE/E,IAAMC,EAAe,KAAK,WAAW,OAAOC,GAAY,CAACF,EAASE,CAAQ,CAAC,EAG3E,GAAID,EAAa,SAAW,EACxB,OAIJ,IAAME,EAAO,MAAMC,EAAY,CAAC,OAAAL,EAAQ,WAAWE,CAAY,CAAC,EAGhE,OAAW,CAACI,EAAOC,CAAG,IAAKH,EAAK,QAAQ,EAAG,CACvC,IAAMI,EAAWN,EAAaI,CAAK,EACnCL,EAASO,CAAQ,EAAID,CACzB,CACJ,CACJ","sourcesContent":["import {CID_ALGORITHM_NAMES, MultiHashData} from \"./MultiHashData\";\nimport {Readable} from \"stream\";\n\nimport {computeCIDs} from \"@root/file-id/ComputeHash\";\n\nexport class HashComputer{\n\n constructor(private targetHash: CID_ALGORITHM_NAMES[]) {\n }\n\n async computeMissingHash(stream: Readable, metadata: MultiHashData): Promise<void> {\n // Dynamically determine which hashes are needed\n const neededHashes = this.targetHash.filter(hashName => !metadata[hashName]);\n\n // If all hashes are already computed, skip the processing\n if (neededHashes.length === 0) {\n return;\n }\n\n // Compute only the needed CIDs\n const cids = await computeCIDs({stream, algorithms:neededHashes});\n\n // Map the computed CIDs back to their respective metadata properties\n for (const [index, cid] of cids.entries()) {\n const hashType = neededHashes[index];\n metadata[hashType] = cid;\n }\n }\n}\n"]}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
import { C as CID_ALGORITHM_NAMES, M as MultiHashData } from './MultiHashData-B-scpa5G.cjs';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES, a as ComputeInterface } from './MultiHashData-B-scpa5G.cjs';
|
||||
export { FileIDComputerInterface, FileProcessorInterface } from './index-interface.cjs';
|
||||
import { Readable } from 'stream';
|
||||
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param stream The Readable stream of the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1', etc.)
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
declare function computeCIDs({ stream, algorithms }: {
|
||||
stream: Readable | ReadableStream;
|
||||
algorithms: CID_ALGORITHM_NAMES[];
|
||||
}): Promise<string[]>;
|
||||
|
||||
declare class HashComputer {
|
||||
private targetHash;
|
||||
constructor(targetHash: CID_ALGORITHM_NAMES[]);
|
||||
computeMissingHash(stream: Readable, metadata: MultiHashData): Promise<void>;
|
||||
}
|
||||
|
||||
export { CID_ALGORITHM_NAMES, HashComputer, MultiHashData, computeCIDs };
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
import { C as CID_ALGORITHM_NAMES, M as MultiHashData } from './MultiHashData-B-scpa5G.js';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES, a as ComputeInterface } from './MultiHashData-B-scpa5G.js';
|
||||
export { FileIDComputerInterface, FileProcessorInterface } from './index-interface.js';
|
||||
import { Readable } from 'stream';
|
||||
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param stream The Readable stream of the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1', etc.)
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
declare function computeCIDs({ stream, algorithms }: {
|
||||
stream: Readable | ReadableStream;
|
||||
algorithms: CID_ALGORITHM_NAMES[];
|
||||
}): Promise<string[]>;
|
||||
|
||||
declare class HashComputer {
|
||||
private targetHash;
|
||||
constructor(targetHash: CID_ALGORITHM_NAMES[]);
|
||||
computeMissingHash(stream: Readable, metadata: MultiHashData): Promise<void>;
|
||||
}
|
||||
|
||||
export { CID_ALGORITHM_NAMES, HashComputer, MultiHashData, computeCIDs };
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import './chunk-XCJZALP2.js';
|
||||
import { a as a$1 } from './chunk-A6J5HDTV.js';
|
||||
export { a as computeCIDs } from './chunk-A6J5HDTV.js';
|
||||
export { c as CID_ALGORITHM, a as CID_ALGORITHM_CODES, b as CID_ALGORITHM_NAMES } from './chunk-YCFZVUZC.js';
|
||||
|
||||
var a=class{constructor(r){this.targetHash=r;}async computeMissingHash(r,e){let t=this.targetHash.filter(o=>!e[o]);if(t.length===0)return;let i=await a$1({stream:r,algorithms:t});for(let[o,c]of i.entries()){let n=t[o];e[n]=c;}}};
|
||||
|
||||
export { a as HashComputer };
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=index-browser.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../src/lib/hash-compute/HashComputer.ts"],"names":["HashComputer","targetHash","stream","metadata","neededHashes","hashName","cids","computeCIDs","index","cid","hashType"],"mappings":"0HAKO,IAAMA,EAAN,KAAkB,CAErB,YAAoBC,EAAmC,CAAnC,gBAAAA,CACpB,CAEA,MAAM,mBAAmBC,EAAkBC,EAAwC,CAE/E,IAAMC,EAAe,KAAK,WAAW,OAAOC,GAAY,CAACF,EAASE,CAAQ,CAAC,EAG3E,GAAID,EAAa,SAAW,EACxB,OAIJ,IAAME,EAAO,MAAMC,EAAY,CAAC,OAAAL,EAAQ,WAAWE,CAAY,CAAC,EAGhE,OAAW,CAACI,EAAOC,CAAG,IAAKH,EAAK,QAAQ,EAAG,CACvC,IAAMI,EAAWN,EAAaI,CAAK,EACnCL,EAASO,CAAQ,EAAID,CACzB,CACJ,CACJ","sourcesContent":["import {CID_ALGORITHM_NAMES, MultiHashData} from \"./MultiHashData\";\nimport {Readable} from \"stream\";\n\nimport {computeCIDs} from \"@root/file-id/ComputeHash\";\n\nexport class HashComputer{\n\n constructor(private targetHash: CID_ALGORITHM_NAMES[]) {\n }\n\n async computeMissingHash(stream: Readable, metadata: MultiHashData): Promise<void> {\n // Dynamically determine which hashes are needed\n const neededHashes = this.targetHash.filter(hashName => !metadata[hashName]);\n\n // If all hashes are already computed, skip the processing\n if (neededHashes.length === 0) {\n return;\n }\n\n // Compute only the needed CIDs\n const cids = await computeCIDs({stream, algorithms:neededHashes});\n\n // Map the computed CIDs back to their respective metadata properties\n for (const [index, cid] of cids.entries()) {\n const hashType = neededHashes[index];\n metadata[hashType] = cid;\n }\n }\n}\n"]}
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
require('./chunk-KWYLOVWT.cjs');
|
||||
var chunkPAKJNZBJ_cjs = require('./chunk-PAKJNZBJ.cjs');
|
||||
|
||||
|
||||
|
||||
Object.defineProperty(exports, "CID_ALGORITHM", {
|
||||
enumerable: true,
|
||||
get: function () { return chunkPAKJNZBJ_cjs.c; }
|
||||
});
|
||||
Object.defineProperty(exports, "CID_ALGORITHM_CODES", {
|
||||
enumerable: true,
|
||||
get: function () { return chunkPAKJNZBJ_cjs.a; }
|
||||
});
|
||||
Object.defineProperty(exports, "CID_ALGORITHM_NAMES", {
|
||||
enumerable: true,
|
||||
get: function () { return chunkPAKJNZBJ_cjs.b; }
|
||||
});
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=index-interface.cjs.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":""}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
import { C as CID_ALGORITHM_NAMES } from './MultiHashData-B-scpa5G.cjs';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES, a as ComputeInterface, M as MultiHashData } from './MultiHashData-B-scpa5G.cjs';
|
||||
import * as Stream from 'stream';
|
||||
|
||||
interface FileProcessorInterface {
|
||||
processFile(current: number, queueSize: number, nfoFilePath: string): Promise<void>;
|
||||
canProcessFile(filePath: string): Promise<boolean>;
|
||||
deleteFile(filePath: string): Promise<void>;
|
||||
}
|
||||
|
||||
interface FileIDComputerInterface {
|
||||
computeCIDs(filePath: Stream, algorithms: CID_ALGORITHM_NAMES[]): Promise<string[]>;
|
||||
}
|
||||
|
||||
export { CID_ALGORITHM_NAMES, type FileIDComputerInterface, type FileProcessorInterface };
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
import { C as CID_ALGORITHM_NAMES } from './MultiHashData-B-scpa5G.js';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES, a as ComputeInterface, M as MultiHashData } from './MultiHashData-B-scpa5G.js';
|
||||
import * as Stream from 'stream';
|
||||
|
||||
interface FileProcessorInterface {
|
||||
processFile(current: number, queueSize: number, nfoFilePath: string): Promise<void>;
|
||||
canProcessFile(filePath: string): Promise<boolean>;
|
||||
deleteFile(filePath: string): Promise<void>;
|
||||
}
|
||||
|
||||
interface FileIDComputerInterface {
|
||||
computeCIDs(filePath: Stream, algorithms: CID_ALGORITHM_NAMES[]): Promise<string[]>;
|
||||
}
|
||||
|
||||
export { CID_ALGORITHM_NAMES, type FileIDComputerInterface, type FileProcessorInterface };
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import './chunk-XCJZALP2.js';
|
||||
export { c as CID_ALGORITHM, a as CID_ALGORITHM_CODES, b as CID_ALGORITHM_NAMES } from './chunk-YCFZVUZC.js';
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=index-interface.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":""}
|
||||
Vendored
+11
-9
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+20
-30
@@ -1,8 +1,23 @@
|
||||
import { C as CID_ALGORITHM_NAMES, a as ComputeInterface, M as MultiHashData } from './ShaComputeWorker-CNdGUbtT.cjs';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES, S as SimpleHash } from './ShaComputeWorker-CNdGUbtT.cjs';
|
||||
import { C as CID_ALGORITHM_NAMES, a as ComputeInterface, M as MultiHashData } from './MultiHashData-B-scpa5G.cjs';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES } from './MultiHashData-B-scpa5G.cjs';
|
||||
import * as PQueue from 'p-queue';
|
||||
import PQueue__default from 'p-queue';
|
||||
import * as p_queue_dist_priority_queue_js from 'p-queue/dist/priority-queue.js';
|
||||
import { FileProcessorInterface } from './index-interface.cjs';
|
||||
export { FileIDComputerInterface } from './index-interface.cjs';
|
||||
import 'stream';
|
||||
|
||||
declare class FileIDComputerWorker {
|
||||
private piscina;
|
||||
constructor(workerPath?: string);
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
computeCIDs(filePath: string, algorithms: CID_ALGORITHM_NAMES[]): Promise<string[]>;
|
||||
}
|
||||
|
||||
interface IndexLine extends Partial<Record<CID_ALGORITHM_NAMES, string>> {
|
||||
path: string;
|
||||
@@ -41,7 +56,7 @@ declare class HashIndexManager {
|
||||
addFileCid(filePath: string, fileSize: number, mtime: string, hashs: Partial<Record<CID_ALGORITHM_NAMES, string>>): void;
|
||||
}
|
||||
|
||||
declare class ComputeHashIndexCache implements ComputeInterface {
|
||||
declare class HashComputerIndexCache implements ComputeInterface {
|
||||
private targetHash;
|
||||
private hashIndexManager;
|
||||
private hashComputer;
|
||||
@@ -50,38 +65,13 @@ declare class ComputeHashIndexCache implements ComputeInterface {
|
||||
getHashIndexManager(): Promise<HashIndexManager>;
|
||||
}
|
||||
|
||||
declare function existsAsync(filePath: string): Promise<boolean>;
|
||||
|
||||
declare class FileIDComputer {
|
||||
private piscina;
|
||||
constructor(workerPath?: string);
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
computeCIDs(filePath: string, algorithms: CID_ALGORITHM_NAMES[]): Promise<string[]>;
|
||||
}
|
||||
|
||||
declare class HashComputer implements ComputeInterface {
|
||||
declare class HashComputerWorker implements ComputeInterface {
|
||||
private targetHash;
|
||||
private fileIDComputer;
|
||||
constructor(targetHash: CID_ALGORITHM_NAMES[], workerPath?: string);
|
||||
computeMissingHash(filePath: string, metadata: MultiHashData): Promise<void>;
|
||||
}
|
||||
|
||||
interface Properties {
|
||||
TARGET_HASHES: string;
|
||||
INDEX_FILE_PATH: string;
|
||||
}
|
||||
|
||||
interface FileProcessorInterface {
|
||||
processFile(current: number, queueSize: number, nfoFilePath: string): Promise<void>;
|
||||
canProcessFile(filePath: string): Promise<boolean>;
|
||||
deleteFile(filePath: string): Promise<void>;
|
||||
}
|
||||
|
||||
declare class FolderWatcher {
|
||||
private WATCH_FOLDER_LIST;
|
||||
private config;
|
||||
@@ -115,4 +105,4 @@ declare class FolderWatcher {
|
||||
watch(): Promise<void>;
|
||||
}
|
||||
|
||||
export { CID_ALGORITHM_NAMES, ComputeHashIndexCache, ComputeInterface, FileIDComputer, type FileProcessorInterface, FolderWatcher, HashComputer, HashIndexManager, INDEX_HEADERS, MultiHashData, type Properties, existsAsync };
|
||||
export { CID_ALGORITHM_NAMES, ComputeInterface, FileIDComputerWorker, FileProcessorInterface, FolderWatcher, HashComputerIndexCache, HashComputerWorker, HashIndexManager, INDEX_HEADERS, MultiHashData };
|
||||
|
||||
Vendored
+20
-30
@@ -1,8 +1,23 @@
|
||||
import { C as CID_ALGORITHM_NAMES, a as ComputeInterface, M as MultiHashData } from './ShaComputeWorker-CNdGUbtT.js';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES, S as SimpleHash } from './ShaComputeWorker-CNdGUbtT.js';
|
||||
import { C as CID_ALGORITHM_NAMES, a as ComputeInterface, M as MultiHashData } from './MultiHashData-B-scpa5G.js';
|
||||
export { c as CID_ALGORITHM, b as CID_ALGORITHM_CODES } from './MultiHashData-B-scpa5G.js';
|
||||
import * as PQueue from 'p-queue';
|
||||
import PQueue__default from 'p-queue';
|
||||
import * as p_queue_dist_priority_queue_js from 'p-queue/dist/priority-queue.js';
|
||||
import { FileProcessorInterface } from './index-interface.js';
|
||||
export { FileIDComputerInterface } from './index-interface.js';
|
||||
import 'stream';
|
||||
|
||||
declare class FileIDComputerWorker {
|
||||
private piscina;
|
||||
constructor(workerPath?: string);
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
computeCIDs(filePath: string, algorithms: CID_ALGORITHM_NAMES[]): Promise<string[]>;
|
||||
}
|
||||
|
||||
interface IndexLine extends Partial<Record<CID_ALGORITHM_NAMES, string>> {
|
||||
path: string;
|
||||
@@ -41,7 +56,7 @@ declare class HashIndexManager {
|
||||
addFileCid(filePath: string, fileSize: number, mtime: string, hashs: Partial<Record<CID_ALGORITHM_NAMES, string>>): void;
|
||||
}
|
||||
|
||||
declare class ComputeHashIndexCache implements ComputeInterface {
|
||||
declare class HashComputerIndexCache implements ComputeInterface {
|
||||
private targetHash;
|
||||
private hashIndexManager;
|
||||
private hashComputer;
|
||||
@@ -50,38 +65,13 @@ declare class ComputeHashIndexCache implements ComputeInterface {
|
||||
getHashIndexManager(): Promise<HashIndexManager>;
|
||||
}
|
||||
|
||||
declare function existsAsync(filePath: string): Promise<boolean>;
|
||||
|
||||
declare class FileIDComputer {
|
||||
private piscina;
|
||||
constructor(workerPath?: string);
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
computeCIDs(filePath: string, algorithms: CID_ALGORITHM_NAMES[]): Promise<string[]>;
|
||||
}
|
||||
|
||||
declare class HashComputer implements ComputeInterface {
|
||||
declare class HashComputerWorker implements ComputeInterface {
|
||||
private targetHash;
|
||||
private fileIDComputer;
|
||||
constructor(targetHash: CID_ALGORITHM_NAMES[], workerPath?: string);
|
||||
computeMissingHash(filePath: string, metadata: MultiHashData): Promise<void>;
|
||||
}
|
||||
|
||||
interface Properties {
|
||||
TARGET_HASHES: string;
|
||||
INDEX_FILE_PATH: string;
|
||||
}
|
||||
|
||||
interface FileProcessorInterface {
|
||||
processFile(current: number, queueSize: number, nfoFilePath: string): Promise<void>;
|
||||
canProcessFile(filePath: string): Promise<boolean>;
|
||||
deleteFile(filePath: string): Promise<void>;
|
||||
}
|
||||
|
||||
declare class FolderWatcher {
|
||||
private WATCH_FOLDER_LIST;
|
||||
private config;
|
||||
@@ -115,4 +105,4 @@ declare class FolderWatcher {
|
||||
watch(): Promise<void>;
|
||||
}
|
||||
|
||||
export { CID_ALGORITHM_NAMES, ComputeHashIndexCache, ComputeInterface, FileIDComputer, type FileProcessorInterface, FolderWatcher, HashComputer, HashIndexManager, INDEX_HEADERS, MultiHashData, type Properties, existsAsync };
|
||||
export { CID_ALGORITHM_NAMES, ComputeInterface, FileIDComputerWorker, FileProcessorInterface, FolderWatcher, HashComputerIndexCache, HashComputerWorker, HashIndexManager, INDEX_HEADERS, MultiHashData };
|
||||
|
||||
Vendored
+7
-4
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+4
-2
@@ -1,9 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var chunkASEKTFOG_cjs = require('./chunk-ASEKTFOG.cjs');
|
||||
var chunkKZVIGNTH_cjs = require('./chunk-KZVIGNTH.cjs');
|
||||
require('./chunk-33LRP2HS.cjs');
|
||||
require('./chunk-PAKJNZBJ.cjs');
|
||||
|
||||
|
||||
|
||||
module.exports = chunkASEKTFOG_cjs.d;
|
||||
module.exports = chunkKZVIGNTH_cjs.a;
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=worker.cjs.map
|
||||
Vendored
+14
-1
@@ -1 +1,14 @@
|
||||
export { S as SimpleHash, d as default } from './ShaComputeWorker-CNdGUbtT.cjs';
|
||||
import { C as CID_ALGORITHM_NAMES } from './MultiHashData-B-scpa5G.cjs';
|
||||
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
declare function computeCIDs({ filePath, algorithms }: {
|
||||
filePath: string;
|
||||
algorithms: CID_ALGORITHM_NAMES[];
|
||||
}): Promise<string[]>;
|
||||
|
||||
export { computeCIDs as default };
|
||||
|
||||
Vendored
+14
-1
@@ -1 +1,14 @@
|
||||
export { S as SimpleHash, d as default } from './ShaComputeWorker-CNdGUbtT.js';
|
||||
import { C as CID_ALGORITHM_NAMES } from './MultiHashData-B-scpa5G.js';
|
||||
|
||||
/**
|
||||
* Compute the CIDs of a file using specific algorithms
|
||||
* @param filePath The path to the file
|
||||
* @param algorithms Array of algorithms ('sha256', 'sha1')
|
||||
* @returns Array of CIDs (in the order of the algorithms)
|
||||
*/
|
||||
declare function computeCIDs({ filePath, algorithms }: {
|
||||
filePath: string;
|
||||
algorithms: CID_ALGORITHM_NAMES[];
|
||||
}): Promise<string[]>;
|
||||
|
||||
export { computeCIDs as default };
|
||||
|
||||
Vendored
+3
-1
@@ -1,3 +1,5 @@
|
||||
export { d as default } from './chunk-4EZ47WAR.js';
|
||||
export { a as default } from './chunk-6UBSWOQL.js';
|
||||
import './chunk-A6J5HDTV.js';
|
||||
import './chunk-YCFZVUZC.js';
|
||||
//# sourceMappingURL=out.js.map
|
||||
//# sourceMappingURL=worker.js.map
|
||||
Reference in New Issue
Block a user