Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultNpmRc ¶
type DefaultNpmRc struct {
Path, URL, Token string
}
func GetDefaultNpmRC ¶
func GetDefaultNpmRC() (*DefaultNpmRc, error)
type Integrity ¶
type NpmRC ¶
type NpmRC struct { FilePath string DefaultURL string Tokens []NpmRCToken }
func GetNpmRC ¶
GetNpmRC find the .npmrc file in system and parse it will find from `pwd`, then $HOME folder
func ParseNpmRc ¶
ParseNpmRc parse main reg url and token npmrc declares in ini format https://docs.npmjs.com/cli/v10/configuring-npm/npmrc we only get default registry and all the tokens auth scoped settings and other auth method is not yet implemented
type NpmRCToken ¶
type NpmRCToken struct {
URL, Token string
}
type PackageInfo ¶
type PackageInfo struct { model.PackageJSON // contains filtered or unexported fields }
func ParsePackageInfo ¶
func ParsePackageInfo(packageJSON json.RawMessage) (*PackageInfo, error)
type PublishAttachments ¶
type PublishInfo ¶
type PublishInfo struct { Name string `json:"name"` Description string `json:"description"` DistTags struct { Latest string `json:"latest"` } `json:"dist-tags"` Versions map[string]rawMessage `json:"versions"` // key is version Attachments map[string]PublishAttachments `json:"_attachments"` // key is tar name }
type VersionDist ¶
Click to show internal directories.
Click to hide internal directories.