vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • browser
    • index
    • Reference
    • update-expired
  • Classes
  • SecurityArchive
  • Variables
  • npmRegistryURL
  • Functions
  • usesNpmRegistry()
  • References
  • asPackageReportData
  • asSecurityArchiveLike
  • isPackageReportData
  • isSecurityArchiveLike
  • PackageAlert
  • PackageAlertProps
  • PackageReportData
  • PackageScore
  • SecurityArchiveLike
  • SecurityArchiveRefreshOptions
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/security-archive
  6. /
  7. browser

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

  • SecurityArchiveLike

Constructors

new SecurityArchive()
TypeScript
new SecurityArchive(entries?): SecurityArchive

Defined in: node_modules/.vlt/npmtypescript@5.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:50

Parameters
ParameterType
entries?| null | readonly readonly [DepID, PackageReportData][]
Returns

SecurityArchive

Inherited from
TypeScript
Map<DepID, PackageReportData>.constructor
new SecurityArchive()
TypeScript
new SecurityArchive(iterable?): SecurityArchive

Defined in: node_modules/.vlt/npmtypescript@5.7.3/node_modules/typescript/lib/lib.es2015.collection.d.ts:49

Parameters
ParameterType
iterable?| null | Iterable<readonly [DepID, PackageReportData], any, any>
Returns

SecurityArchive

Inherited from
TypeScript
Map<DepID, PackageReportData>.constructor

Properties

PropertyTypeDefault valueDescription
okbooleanfalseWhether the security archive is valid.

Methods

delete()
TypeScript
delete(depId): boolean

Defined in: src/security-archive/src/browser.ts:101

Delete the report data stored under the base DepID.

Parameters
ParameterType
depIdDepID
Returns

boolean

Implementation of

SecurityArchiveLike.delete

Overrides
TypeScript
Map.delete
get()
TypeScript
get(depId): undefined | PackageReportData

Defined in: src/security-archive/src/browser.ts:79

Get the report data for a node, keyed by its base DepID.

Parameters
ParameterType
depIdDepID
Returns

undefined | PackageReportData

Implementation of

SecurityArchiveLike.get

Overrides
TypeScript
Map.get
has()
TypeScript
has(depId): boolean

Defined in: src/security-archive/src/browser.ts:86

Check for report data, keyed by the base DepID.

Parameters
ParameterType
depIdDepID
Returns

boolean

Implementation of

SecurityArchiveLike.has

Overrides
TypeScript
Map.has
set()
TypeScript
set(depId, data): this

Defined 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
ParameterType
depIdDepID
dataPackageReportData
Returns

this

Implementation of

SecurityArchiveLike.set

Overrides
TypeScript
Map.set
load()
TypeScript
static load(dump): undefined | SecurityArchive

Defined in: src/security-archive/src/browser.ts:108

Loads a security archive from a valid JSON dump.

Parameters
ParameterType
dumpunknown
Returns

undefined | SecurityArchive

Variables

npmRegistryURL

TypeScript
const npmRegistryURL: "https://registry.npmjs.org/" = 'https://registry.npmjs.org/';

Defined in: src/security-archive/src/browser.ts:18

Functions

usesNpmRegistry()

TypeScript
function usesNpmRegistry(node): boolean

Defined 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

ParameterType
nodeNodeLike

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


Previous@vltpkg/security-archiveNextindex

On this page

  • Classes
  • SecurityArchive
  • Variables
  • npmRegistryURL
  • Functions
  • usesNpmRegistry()
  • References
  • asPackageReportData
  • asSecurityArchiveLike
  • isPackageReportData
  • isSecurityArchiveLike
  • PackageAlert
  • PackageAlertProps
  • PackageReportData
  • PackageScore
  • SecurityArchiveLike
  • SecurityArchiveRefreshOptions

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now