Comparing version 2.0.0 to 2.0.1
/** @typedef { 'Complete' | 'Partial' | 'Unknown' } DagStructure */ | ||
/** | ||
* @typedef {Object} Report | ||
* @property {DagStructure} structure - Are there any Linked CIDs that are not present in the set of blocks | ||
* @property {number} blocksIndexed - How many blocks were indexed | ||
* @property {number} uniqueCids - How many unique CIDs | ||
* @property {number} undecodeable - How many blocks/CIDs failed to decode | ||
*/ | ||
/** | ||
* @param {AsyncIterable<Uint8Array>} carStream | ||
@@ -64,24 +71,30 @@ */ | ||
* Provide a value for the `structure` metadata for the CAR. | ||
* @returns DagStructure | ||
* @returns {DagStructure} | ||
*/ | ||
getDagStructureLabel(): "Complete" | "Partial" | "Unknown"; | ||
getDagStructureLabel(): DagStructure; | ||
/** | ||
* @typedef {Object} Report | ||
* @property {DagStructure} structure - Are there any Linked CIDs that are not present in the set of blocks | ||
* @property {number} blocksIndexed - How many blocks were indexed | ||
* @property {number} uniqueCids - How many unique CIDs | ||
* @property {number} undecodeable - How many blocks/CIDs failed to decode | ||
*/ | ||
/** | ||
* Get the results after all blocks are indexed. | ||
* @returns Report | ||
* @returns {Report} | ||
*/ | ||
report(): { | ||
structure: string; | ||
blocksIndexed: number; | ||
uniqueCids: number; | ||
undecodeable: number; | ||
}; | ||
report(): Report; | ||
} | ||
export type DagStructure = 'Complete' | 'Partial' | 'Unknown'; | ||
export type Report = { | ||
/** | ||
* - Are there any Linked CIDs that are not present in the set of blocks | ||
*/ | ||
structure: DagStructure; | ||
/** | ||
* - How many blocks were indexed | ||
*/ | ||
blocksIndexed: number; | ||
/** | ||
* - How many unique CIDs | ||
*/ | ||
uniqueCids: number; | ||
/** | ||
* - How many blocks/CIDs failed to decode | ||
*/ | ||
undecodeable: number; | ||
}; | ||
//# sourceMappingURL=index.d.ts.map |
20
index.js
@@ -7,2 +7,10 @@ import { CarBlockIterator } from '@ipld/car/iterator' | ||
/** | ||
* @typedef {Object} Report | ||
* @property {DagStructure} structure - Are there any Linked CIDs that are not present in the set of blocks | ||
* @property {number} blocksIndexed - How many blocks were indexed | ||
* @property {number} uniqueCids - How many unique CIDs | ||
* @property {number} undecodeable - How many blocks/CIDs failed to decode | ||
*/ | ||
/** | ||
* @param {AsyncIterable<Uint8Array>} carStream | ||
@@ -132,3 +140,3 @@ */ | ||
* Provide a value for the `structure` metadata for the CAR. | ||
* @returns DagStructure | ||
* @returns {DagStructure} | ||
*/ | ||
@@ -146,12 +154,4 @@ getDagStructureLabel () { | ||
/** | ||
* @typedef {Object} Report | ||
* @property {DagStructure} structure - Are there any Linked CIDs that are not present in the set of blocks | ||
* @property {number} blocksIndexed - How many blocks were indexed | ||
* @property {number} uniqueCids - How many unique CIDs | ||
* @property {number} undecodeable - How many blocks/CIDs failed to decode | ||
*/ | ||
/** | ||
* Get the results after all blocks are indexed. | ||
* @returns Report | ||
* @returns {Report} | ||
*/ | ||
@@ -158,0 +158,0 @@ report () { |
{ | ||
"name": "linkdex", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "An index mapping block CID to linked block CID.", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18482
381