libraries.io 3.4.7 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # libraries.io [![npm version](https://img.shields.io/npm/v/libraries.io.svg)](https://www.npmjs.com/package/libraries.io)
2
2
 
3
- A [libraries.io](https://libraries.io) API client. For a documentation on the API see https://libraries.io/api/.
3
+ A [libraries.io](https://libraries.io) API client. For a documentation on the API see [the libraries.io API reference](https://libraries.io/api/).
4
4
 
5
5
  ### Installation
6
6
 
@@ -5,7 +5,6 @@ export declare class GitHubRepositoryAPI extends APIBase {
5
5
  constructor(apiClient: APIClient, options: ClientOptions);
6
6
  /**
7
7
  * Get a list of packages referencing the given repository.
8
- * @see https://libraries.io/api#repository-projects
9
8
  * @param repositoryOwner The repository owner
10
9
  * @param repositoryName The repository name
11
10
  * @param options Pagination Options
@@ -13,14 +12,12 @@ export declare class GitHubRepositoryAPI extends APIBase {
13
12
  getProjects(repositoryOwner: string, repositoryName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
14
13
  /**
15
14
  * Get a info for a repository. Currently only works for open source repositories.
16
- * @see https://libraries.io/api#repository
17
15
  * @param repositoryOwner The repository owner
18
16
  * @param repositoryName The repository name
19
17
  */
20
18
  getRepository(repositoryOwner: string, repositoryName: string): Promise<LibrariesIOResult<RepositoryWithDependencies>>;
21
19
  /**
22
20
  * Get a list of dependencies for a repositories. Currently only works for open source repositories.
23
- * @see https://libraries.io/api#repository-dependencies
24
21
  * @param repositoryOwner The repository owner
25
22
  * @param repositoryName The repository name
26
23
  */
@@ -18,7 +18,6 @@ class GitHubRepositoryAPI extends APIBase_1.APIBase {
18
18
  }
19
19
  /**
20
20
  * Get a list of packages referencing the given repository.
21
- * @see https://libraries.io/api#repository-projects
22
21
  * @param repositoryOwner The repository owner
23
22
  * @param repositoryName The repository name
24
23
  * @param options Pagination Options
@@ -32,7 +31,6 @@ class GitHubRepositoryAPI extends APIBase_1.APIBase {
32
31
  }
33
32
  /**
34
33
  * Get a info for a repository. Currently only works for open source repositories.
35
- * @see https://libraries.io/api#repository
36
34
  * @param repositoryOwner The repository owner
37
35
  * @param repositoryName The repository name
38
36
  */
@@ -45,7 +43,6 @@ class GitHubRepositoryAPI extends APIBase_1.APIBase {
45
43
  }
46
44
  /**
47
45
  * Get a list of dependencies for a repositories. Currently only works for open source repositories.
48
- * @see https://libraries.io/api#repository-dependencies
49
46
  * @param repositoryOwner The repository owner
50
47
  * @param repositoryName The repository name
51
48
  */
@@ -5,14 +5,12 @@ export declare class GitHubUserAPI extends APIBase {
5
5
  constructor(apiClient: APIClient, options: ClientOptions);
6
6
  /**
7
7
  * Get a list of packages that the given user has contributed to.
8
- * @see https://libraries.io/api#user-project-contributions
9
8
  * @param userName The username
10
9
  * @param options Pagination options
11
10
  */
12
11
  getContributedProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
13
12
  /**
14
13
  * Get a list of repositories that the given user has contributed to.
15
- * @see https://libraries.io/api#user-repository-contributions
16
14
  * @param userName The username
17
15
  * @param options Pagination options
18
16
  */
@@ -21,21 +19,18 @@ export declare class GitHubUserAPI extends APIBase {
21
19
  getDependencies(userName: string, platform?: PlatformType, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
22
20
  /**
23
21
  * Get a list of packages referencing the given user's repositories.
24
- * @see https://libraries.io/api#user-projects
25
22
  * @param userName The username
26
23
  * @param options Pagination options
27
24
  */
28
25
  getProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
29
26
  /**
30
27
  * Get repositories owned by a user.
31
- * @see https://libraries.io/api#user-repositories
32
28
  * @param userName The username
33
29
  * @param options Pagination options
34
30
  */
35
31
  getRepositories(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>;
36
32
  /**
37
33
  * Get information for a given user or organization.
38
- * @see https://libraries.io/api#user
39
34
  * @param userName The username
40
35
  */
41
36
  getUser(userName: string): Promise<LibrariesIOResult<Contributor>>;
@@ -18,7 +18,6 @@ class GitHubUserAPI extends APIBase_1.APIBase {
18
18
  }
19
19
  /**
20
20
  * Get a list of packages that the given user has contributed to.
21
- * @see https://libraries.io/api#user-project-contributions
22
21
  * @param userName The username
23
22
  * @param options Pagination options
24
23
  */
@@ -31,7 +30,6 @@ class GitHubUserAPI extends APIBase_1.APIBase {
31
30
  }
32
31
  /**
33
32
  * Get a list of repositories that the given user has contributed to.
34
- * @see https://libraries.io/api#user-repository-contributions
35
33
  * @param userName The username
36
34
  * @param options Pagination options
37
35
  */
@@ -44,14 +42,13 @@ class GitHubUserAPI extends APIBase_1.APIBase {
44
42
  }
45
43
  /**
46
44
  * Get a list of unique packages that the given user's repositories list as a dependency. Ordered by frequency of use in those repositories.
47
- * @see https://libraries.io/api#user-dependencies
48
45
  * @param userName The username
49
46
  * @param platform The project platform (e.g. "npm", "cargo", ...)
50
47
  * @param options Pagination options
51
48
  */
52
49
  getDependencies(userName, platformOrOptions, options) {
53
50
  return __awaiter(this, void 0, void 0, function* () {
54
- const endpoint = Endpoints_1.Endpoint.GitHub.User.contributedRepositories(userName);
51
+ const endpoint = Endpoints_1.Endpoint.GitHub.User.dependencies(userName);
55
52
  let parameters = {};
56
53
  if (platformOrOptions) {
57
54
  if (typeof platformOrOptions === 'string') {
@@ -67,20 +64,18 @@ class GitHubUserAPI extends APIBase_1.APIBase {
67
64
  }
68
65
  /**
69
66
  * Get a list of packages referencing the given user's repositories.
70
- * @see https://libraries.io/api#user-projects
71
67
  * @param userName The username
72
68
  * @param options Pagination options
73
69
  */
74
70
  getProjects(userName, options) {
75
71
  return __awaiter(this, void 0, void 0, function* () {
76
- const endpoint = Endpoints_1.Endpoint.GitHub.User.repositories(userName);
72
+ const endpoint = Endpoints_1.Endpoint.GitHub.User.projects(userName);
77
73
  const { data } = yield this.apiClient.get(endpoint, { data: options });
78
74
  return data;
79
75
  });
80
76
  }
81
77
  /**
82
78
  * Get repositories owned by a user.
83
- * @see https://libraries.io/api#user-repositories
84
79
  * @param userName The username
85
80
  * @param options Pagination options
86
81
  */
@@ -93,7 +88,6 @@ class GitHubUserAPI extends APIBase_1.APIBase {
93
88
  }
94
89
  /**
95
90
  * Get information for a given user or organization.
96
- * @see https://libraries.io/api#user
97
91
  * @param userName The username
98
92
  */
99
93
  getUser(userName) {
@@ -5,7 +5,6 @@ export declare class PlatformAPI extends APIBase {
5
5
  constructor(apiClient: APIClient, options: ClientOptions);
6
6
  /**
7
7
  * Get list of supported package managers.
8
- * @see https://libraries.io/api#platforms
9
8
  * @param options Pagination options
10
9
  */
11
10
  getPlatforms(options?: PaginationOptions): Promise<LibrariesIOResult<Platform[]>>;
@@ -18,7 +18,6 @@ class PlatformAPI extends APIBase_1.APIBase {
18
18
  }
19
19
  /**
20
20
  * Get list of supported package managers.
21
- * @see https://libraries.io/api#platforms
22
21
  * @param options Pagination options
23
22
  */
24
23
  getPlatforms(options) {
@@ -5,7 +5,6 @@ export declare class ProjectAPI extends APIBase {
5
5
  constructor(apiClient: APIClient, options: ClientOptions);
6
6
  /**
7
7
  * Get users that have contributed to a given project.
8
- * @see https://libraries.io/api#project-contributors
9
8
  * @param platform The project platform (e.g. "npm", "cargo", ...)
10
9
  * @param projectName The project name
11
10
  * @param options Pagination options
@@ -17,25 +16,22 @@ export declare class ProjectAPI extends APIBase {
17
16
  * @param projectName The project name
18
17
  * @param options Pagination options
19
18
  */
20
- getDependendentRepositories(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>;
19
+ getDependentRepositories(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>;
21
20
  /**
22
21
  * Get packages that have at least one version that depends on a given project.
23
- * @see https://libraries.io/api#project-dependents
24
22
  * @param platform The project platform (e.g. "npm", "cargo", ...)
25
23
  * @param projectName The project name
26
24
  * @param options Pagination options
27
25
  */
28
- getDependendents(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
26
+ getDependents(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
29
27
  /**
30
28
  * Get information about a package and it's versions.
31
- * @see https://libraries.io/api#project
32
29
  * @param platform The project platform (e.g. "npm", "cargo", ...)
33
30
  * @param projectName The project name
34
31
  */
35
32
  getProject(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<Project>>;
36
33
  /**
37
34
  * Get a list of dependencies for a version of a project, pass `latest` as version to get dependency info for the latest available version
38
- * @see https://libraries.io/api#project-dependencies
39
35
  * @param platform The project platform (e.g. "npm", "cargo", ...)
40
36
  * @param projectName The project name
41
37
  * @param projectVersion
@@ -43,7 +39,6 @@ export declare class ProjectAPI extends APIBase {
43
39
  getProjectWithDependencies(platform: PlatformType, projectName: string, projectVersion: string): Promise<LibrariesIOResult<ProjectWithDependencies>>;
44
40
  /**
45
41
  * Get breakdown of SourceRank score for a given project.
46
- * @see https://libraries.io/api#project-sourcerank
47
42
  * @param platform The project platform (e.g. "npm", "cargo", ...)
48
43
  * @param projectName The project name
49
44
  */
@@ -56,7 +51,6 @@ export declare class ProjectAPI extends APIBase {
56
51
  getUsage(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<ProjectUsage>>;
57
52
  /**
58
53
  * Search for projects.
59
- * @see https://libraries.io/api#project-search
60
54
  * @param query The search query
61
55
  * @param options Sorting, filter and pagination options
62
56
  */
@@ -18,14 +18,13 @@ class ProjectAPI extends APIBase_1.APIBase {
18
18
  }
19
19
  /**
20
20
  * Get users that have contributed to a given project.
21
- * @see https://libraries.io/api#project-contributors
22
21
  * @param platform The project platform (e.g. "npm", "cargo", ...)
23
22
  * @param projectName The project name
24
23
  * @param options Pagination options
25
24
  */
26
25
  getContributors(platform, projectName, options) {
27
26
  return __awaiter(this, void 0, void 0, function* () {
28
- const endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName);
27
+ const endpoint = Endpoints_1.Endpoint.Project.contributors(platform, projectName);
29
28
  const { data } = yield this.apiClient.get(endpoint, { data: options });
30
29
  return data;
31
30
  });
@@ -36,21 +35,20 @@ class ProjectAPI extends APIBase_1.APIBase {
36
35
  * @param projectName The project name
37
36
  * @param options Pagination options
38
37
  */
39
- getDependendentRepositories(platform, projectName, options) {
38
+ getDependentRepositories(platform, projectName, options) {
40
39
  return __awaiter(this, void 0, void 0, function* () {
41
- const endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName);
40
+ const endpoint = Endpoints_1.Endpoint.Project.dependentRepositories(platform, projectName);
42
41
  const { data } = yield this.apiClient.get(endpoint, { data: options });
43
42
  return data;
44
43
  });
45
44
  }
46
45
  /**
47
46
  * Get packages that have at least one version that depends on a given project.
48
- * @see https://libraries.io/api#project-dependents
49
47
  * @param platform The project platform (e.g. "npm", "cargo", ...)
50
48
  * @param projectName The project name
51
49
  * @param options Pagination options
52
50
  */
53
- getDependendents(platform, projectName, options) {
51
+ getDependents(platform, projectName, options) {
54
52
  return __awaiter(this, void 0, void 0, function* () {
55
53
  const endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName);
56
54
  const { data } = yield this.apiClient.get(endpoint, { data: options });
@@ -59,7 +57,6 @@ class ProjectAPI extends APIBase_1.APIBase {
59
57
  }
60
58
  /**
61
59
  * Get information about a package and it's versions.
62
- * @see https://libraries.io/api#project
63
60
  * @param platform The project platform (e.g. "npm", "cargo", ...)
64
61
  * @param projectName The project name
65
62
  */
@@ -72,7 +69,6 @@ class ProjectAPI extends APIBase_1.APIBase {
72
69
  }
73
70
  /**
74
71
  * Get a list of dependencies for a version of a project, pass `latest` as version to get dependency info for the latest available version
75
- * @see https://libraries.io/api#project-dependencies
76
72
  * @param platform The project platform (e.g. "npm", "cargo", ...)
77
73
  * @param projectName The project name
78
74
  * @param projectVersion
@@ -86,7 +82,6 @@ class ProjectAPI extends APIBase_1.APIBase {
86
82
  }
87
83
  /**
88
84
  * Get breakdown of SourceRank score for a given project.
89
- * @see https://libraries.io/api#project-sourcerank
90
85
  * @param platform The project platform (e.g. "npm", "cargo", ...)
91
86
  * @param projectName The project name
92
87
  */
@@ -104,14 +99,13 @@ class ProjectAPI extends APIBase_1.APIBase {
104
99
  */
105
100
  getUsage(platform, projectName) {
106
101
  return __awaiter(this, void 0, void 0, function* () {
107
- const endpoint = Endpoints_1.Endpoint.Project.sourceRank(platform, projectName);
102
+ const endpoint = Endpoints_1.Endpoint.Project.usage(platform, projectName);
108
103
  const { data } = yield this.apiClient.get(endpoint);
109
104
  return data;
110
105
  });
111
106
  }
112
107
  /**
113
108
  * Search for projects.
114
- * @see https://libraries.io/api#project-search
115
109
  * @param query The search query
116
110
  * @param options Sorting, filter and pagination options
117
111
  */
@@ -5,20 +5,17 @@ export declare class UserAPI extends APIBase {
5
5
  constructor(apiClient: APIClient, options: ClientOptions);
6
6
  /**
7
7
  * List packages that a user is subscribed to recieved notifications about new releases.
8
- * @see https://libraries.io/api#subscriptions-index
9
8
  * @param options Pagination options
10
9
  */
11
10
  getAllSubscriptions(options?: PaginationOptions): Promise<LibrariesIOResult<Subscription[]>>;
12
11
  /**
13
12
  * Check if a users is subscribed to receive notifications about new releases of a project.
14
- * @see https://libraries.io/api#subscriptions-show
15
13
  * @param platform The project platform (e.g. "npm", "cargo", ...)
16
14
  * @param projectName The project name
17
15
  */
18
16
  getSubscription(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<null | Subscription>>;
19
17
  /**
20
18
  * Subscribe to receive notifications about new releases of a project.
21
- * @see https://libraries.io/api#subscriptions-create
22
19
  * @param platform The project platform (e.g. "npm", "cargo", ...)
23
20
  * @param projectName The project name
24
21
  * @param options Subscription options
@@ -26,14 +23,12 @@ export declare class UserAPI extends APIBase {
26
23
  subscribe(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<LibrariesIOResult<Subscription>>;
27
24
  /**
28
25
  * Stop receiving release notifications from a project.
29
- * @see https://libraries.io/api#subscriptions-destroy
30
26
  * @param platform The project platform (e.g. "npm", "cargo", ...)
31
27
  * @param projectName The project name
32
28
  */
33
29
  unsubscribe(platform: PlatformType, projectName: string): Promise<LibrariesIOHeaders>;
34
30
  /**
35
31
  * Update the options for a subscription.
36
- * @see https://libraries.io/api#subscriptions-update
37
32
  * @param platform The project platform (e.g. "npm", "cargo", ...)
38
33
  * @param projectName The project name
39
34
  * @param options Subscription options
@@ -18,7 +18,6 @@ class UserAPI extends APIBase_1.APIBase {
18
18
  }
19
19
  /**
20
20
  * List packages that a user is subscribed to recieved notifications about new releases.
21
- * @see https://libraries.io/api#subscriptions-index
22
21
  * @param options Pagination options
23
22
  */
24
23
  getAllSubscriptions(options) {
@@ -30,7 +29,6 @@ class UserAPI extends APIBase_1.APIBase {
30
29
  }
31
30
  /**
32
31
  * Check if a users is subscribed to receive notifications about new releases of a project.
33
- * @see https://libraries.io/api#subscriptions-show
34
32
  * @param platform The project platform (e.g. "npm", "cargo", ...)
35
33
  * @param projectName The project name
36
34
  */
@@ -43,7 +41,6 @@ class UserAPI extends APIBase_1.APIBase {
43
41
  }
44
42
  /**
45
43
  * Subscribe to receive notifications about new releases of a project.
46
- * @see https://libraries.io/api#subscriptions-create
47
44
  * @param platform The project platform (e.g. "npm", "cargo", ...)
48
45
  * @param projectName The project name
49
46
  * @param options Subscription options
@@ -57,7 +54,6 @@ class UserAPI extends APIBase_1.APIBase {
57
54
  }
58
55
  /**
59
56
  * Stop receiving release notifications from a project.
60
- * @see https://libraries.io/api#subscriptions-destroy
61
57
  * @param platform The project platform (e.g. "npm", "cargo", ...)
62
58
  * @param projectName The project name
63
59
  */
@@ -70,7 +66,6 @@ class UserAPI extends APIBase_1.APIBase {
70
66
  }
71
67
  /**
72
68
  * Update the options for a subscription.
73
- * @see https://libraries.io/api#subscriptions-update
74
69
  * @param platform The project platform (e.g. "npm", "cargo", ...)
75
70
  * @param projectName The project name
76
71
  * @param options Subscription options
package/package.json CHANGED
@@ -7,9 +7,9 @@
7
7
  "devDependencies": {
8
8
  "@types/node": "~24",
9
9
  "rimraf": "6.1.3",
10
- "typedoc": "0.28.18",
11
- "typescript": "6.0.2",
12
- "vitest": "4.1.2"
10
+ "typedoc": "0.28.19",
11
+ "typescript": "6.0.3",
12
+ "vitest": "4.1.5"
13
13
  },
14
14
  "engines": {
15
15
  "node": ">= 21"
@@ -37,5 +37,5 @@
37
37
  "dist": "yarn clean && yarn build",
38
38
  "test": "vitest"
39
39
  },
40
- "version": "3.4.7"
40
+ "version": "3.6.0"
41
41
  }