Home > @microsoft/rush-lib > ApprovedPackagesConfiguration
ApprovedPackagesConfiguration class
This represents the JSON file specified via the "approvedPackagesFile" option in rush.json.
Signature:
export declare class ApprovedPackagesConfiguration
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(jsonFilename) | Constructs a new instance of the ApprovedPackagesConfiguration class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| items | ApprovedPackagesItem[] |
Methods
| Method | Modifiers | Description |
|---|---|---|
| addOrUpdatePackage(packageName, reviewCategory) | ||
| clear() | Clears all the settings, returning to an empty state. | |
| getItemByName(packageName) | ||
| loadFromFile() | Loads the configuration data from the filename that was passed to the constructor. | |
| saveToFile() | Loads the configuration data to the filename that was passed to the constructor. | |
| tryLoadFromFile(approvedPackagesPolicyEnabled) | If the file exists, calls loadFromFile(). |