Documentation
¶
Overview ¶
Package js contains the functions to update the JS mirror
Index ¶
- func Follow(db *bun.DB, db_config *bun.DB) error
- func ImportList(db *bun.DB, topPackages []string) error
- func ImportListWithBatching(db *bun.DB, topPackages []string) error
- func ImportTop10000(db *bun.DB, db_config *bun.DB) error
- func UpdatePackage(db *bun.DB, name string) error
- func UpdatePackagesBatch(db *bun.DB, packageNames []string) error
- type Config
- type NpmChanges
- type NpmResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Follow ¶
Follow is a function that imports JavaScript packages into a graph database. It takes a collection, a graph, and a graphLicenses as input parameters. It returns an error if there is any issue during the import process.
func ImportListWithBatching ¶
ImportListWithBatching imports a list of JavaScript packages using batch processing for improved performance
func UpdatePackage ¶
UpdatePackage updates a package in the graph database with the given name. It downloads the package information, creates package and link information, adds licenses for each package and version, and updates the package and link information in the graph database.
Parameters: - graph: The graph database to update the package in. - graphLicenses: The graph database to update the link licenses in. - name: The name of the package to update.
Returns: - An error if any occurred during the update process, or nil if the update was successful.