mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-30 05:46:09 +01:00
46addc1f93
Close #23444 Add `Repository` to npm package `Metadata` struct so the `repository` in `package.json` can be stored and be returned in the endpoint. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
26 lines
1.3 KiB
Go
26 lines
1.3 KiB
Go
// Copyright 2021 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package npm
|
|
|
|
// TagProperty is the name of the property for tag management
|
|
const TagProperty = "npm.tag"
|
|
|
|
// Metadata represents the metadata of a npm package
|
|
type Metadata struct {
|
|
Scope string `json:"scope,omitempty"`
|
|
Name string `json:"name,omitempty"`
|
|
Description string `json:"description,omitempty"`
|
|
Author string `json:"author,omitempty"`
|
|
License string `json:"license,omitempty"`
|
|
ProjectURL string `json:"project_url,omitempty"`
|
|
Keywords []string `json:"keywords,omitempty"`
|
|
Dependencies map[string]string `json:"dependencies,omitempty"`
|
|
DevelopmentDependencies map[string]string `json:"development_dependencies,omitempty"`
|
|
PeerDependencies map[string]string `json:"peer_dependencies,omitempty"`
|
|
OptionalDependencies map[string]string `json:"optional_dependencies,omitempty"`
|
|
Bin map[string]string `json:"bin,omitempty"`
|
|
Readme string `json:"readme,omitempty"`
|
|
Repository Repository `json:"repository,omitempty"`
|
|
}
|