@vltpkg/security-archive/browser
Classes
SecurityArchive
Defined in: src/security-archive/src/browser.ts:67
A database of security information for given packages in a graph.
Extends
Map<DepID,PackageReportData>
Implements
Constructors
new SecurityArchive()
new SecurityArchive(entries?): SecurityArchiveDefined in:
node_modules/.vlt/npmtypescript@5.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:50
Parameters
entries?
null | readonly readonly
[DepID,
PackageReportData][]
Returns
Inherited from
Map<DepID, PackageReportData>.constructornew SecurityArchive()
new SecurityArchive(iterable?): SecurityArchiveDefined in:
node_modules/.vlt/npmtypescript@5.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:49
Parameters
iterable?
null | Iterable<readonly
[DepID,
PackageReportData],
any, any>
Returns
Inherited from
Map<DepID, PackageReportData>.constructorProperties
ok
ok: boolean = falseDefined in: src/security-archive/src/browser.ts:74
Whether the security archive is valid.
Implementation of
Methods
delete()
delete(depId): booleanDefined in: src/security-archive/src/browser.ts:101
Delete the report data stored under the base DepID.
Parameters
depId
Returns
boolean
Implementation of
Overrides
Map.deleteget()
get(depId): undefined | PackageReportDataDefined in: src/security-archive/src/browser.ts:79
Get the report data for a node, keyed by its base DepID.
Parameters
depId
Returns
undefined |
PackageReportData
Implementation of
Overrides
Map.gethas()
has(depId): booleanDefined in: src/security-archive/src/browser.ts:86
Check for report data, keyed by the base DepID.
Parameters
depId
Returns
boolean
Implementation of
Overrides
Map.hasset()
set(depId, data): thisDefined in: src/security-archive/src/browser.ts:94
Store report data for a node, keyed by its base DepID so peer-suffixed copies of the same package share one entry.
Parameters
depId
data
Returns
this
Implementation of
Overrides
Map.setload()
static load(dump): undefined | SecurityArchiveDefined in: src/security-archive/src/browser.ts:108
Loads a security archive from a valid JSON dump.
Parameters
dump
unknown
Returns
undefined | SecurityArchive
Variables
npmRegistryURL
const npmRegistryURL: 'https://registry.npmjs.org/' = 'https://registry.npmjs.org/'Defined in: src/security-archive/src/browser.ts:18
Functions
usesNpmRegistry()
function usesNpmRegistry(node): booleanDefined in: src/security-archive/src/browser.ts:36
Socket.dev only has reports for the public npm ecosystem. Eligible
when the node’s origin is https://registry.npmjs.org/ or the URL
configured as registries.npm.
Parameters
node
Returns
boolean
References
asPackageReportData
Re-exports asPackageReportData
asSecurityArchiveLike
Re-exports asSecurityArchiveLike
isPackageReportData
Re-exports isPackageReportData
isSecurityArchiveLike
Re-exports isSecurityArchiveLike
PackageAlert
Re-exports PackageAlert
PackageAlertProps
Re-exports PackageAlertProps
PackageReportData
Re-exports PackageReportData
PackageScore
Re-exports PackageScore
SecurityArchiveLike
Re-exports SecurityArchiveLike
SecurityArchiveRefreshOptions
Re-exports SecurityArchiveRefreshOptions