libraries.io 3.4.4 → 3.4.6
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/package.json +6 -7
- package/dist/Endpoints.d.ts +0 -45
- package/dist/Endpoints.js +0 -95
- package/dist/LibrariesIO.d.ts +0 -18
- package/dist/LibrariesIO.js +0 -64
- package/dist/api/APIBase.d.ts +0 -18
- package/dist/api/APIBase.js +0 -30
- package/dist/api/GitHub/GitHubRepositoryAPI.d.ts +0 -28
- package/dist/api/GitHub/GitHubRepositoryAPI.js +0 -60
- package/dist/api/GitHub/GitHubUserAPI.d.ts +0 -42
- package/dist/api/GitHub/GitHubUserAPI.js +0 -107
- package/dist/api/GitHub/index.d.ts +0 -2
- package/dist/api/GitHub/index.js +0 -18
- package/dist/api/PlatformAPI.d.ts +0 -12
- package/dist/api/PlatformAPI.js +0 -32
- package/dist/api/ProjectAPI.d.ts +0 -64
- package/dist/api/ProjectAPI.js +0 -127
- package/dist/api/UserAPI.d.ts +0 -42
- package/dist/api/UserAPI.js +0 -86
- package/dist/api/index.d.ts +0 -4
- package/dist/api/index.js +0 -20
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -18
- package/dist/interfaces/API.d.ts +0 -10
- package/dist/interfaces/API.js +0 -2
- package/dist/interfaces/Contributor.d.ts +0 -19
- package/dist/interfaces/Contributor.js +0 -2
- package/dist/interfaces/LibrariesIOHeaders.d.ts +0 -8
- package/dist/interfaces/LibrariesIOHeaders.js +0 -2
- package/dist/interfaces/Options.d.ts +0 -31
- package/dist/interfaces/Options.js +0 -2
- package/dist/interfaces/Platform.d.ts +0 -7
- package/dist/interfaces/Platform.js +0 -2
- package/dist/interfaces/Project.d.ts +0 -57
- package/dist/interfaces/Project.js +0 -2
- package/dist/interfaces/Repository.d.ts +0 -49
- package/dist/interfaces/Repository.js +0 -2
- package/dist/interfaces/Subscription.d.ts +0 -7
- package/dist/interfaces/Subscription.js +0 -2
- package/dist/interfaces/index.d.ts +0 -8
- package/dist/interfaces/index.js +0 -24
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@ffflorian/api-client": "2.
|
|
4
|
+
"@ffflorian/api-client": "2.5.0"
|
|
5
5
|
},
|
|
6
6
|
"description": "A libraries.io API client",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@types/node": "~24",
|
|
9
|
-
"rimraf": "6.1.
|
|
10
|
-
"typedoc": "0.28.
|
|
11
|
-
"typescript": "
|
|
12
|
-
"vitest": "4.0
|
|
9
|
+
"rimraf": "6.1.3",
|
|
10
|
+
"typedoc": "0.28.18",
|
|
11
|
+
"typescript": "6.0.2",
|
|
12
|
+
"vitest": "4.1.0"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">= 21"
|
|
@@ -36,6 +36,5 @@
|
|
|
36
36
|
"dist": "yarn clean && yarn build:ts",
|
|
37
37
|
"test": "vitest"
|
|
38
38
|
},
|
|
39
|
-
"version": "3.4.
|
|
40
|
-
"gitHead": "12bebfb90528bb894bccb99670373af33c6a5159"
|
|
39
|
+
"version": "3.4.6"
|
|
41
40
|
}
|
package/dist/Endpoints.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const Endpoint: {
|
|
2
|
-
CONTRIBUTORS: string;
|
|
3
|
-
DEPENDENCIES: string;
|
|
4
|
-
DEPENDENT_REPOSITORIES: string;
|
|
5
|
-
DEPENDENTS: string;
|
|
6
|
-
GITHUB: string;
|
|
7
|
-
PLATFORMS: string;
|
|
8
|
-
PROJECT_CONTRIBUTIONS: string;
|
|
9
|
-
PROJECTS: string;
|
|
10
|
-
REPOSITORIES: string;
|
|
11
|
-
REPOSITORY_CONTRIBUTIONS: string;
|
|
12
|
-
SEARCH: string;
|
|
13
|
-
SOURCERANK: string;
|
|
14
|
-
SUBSCRIPTIONS: string;
|
|
15
|
-
USAGE: string;
|
|
16
|
-
Project: {
|
|
17
|
-
contributors(platform: string, name: string): string;
|
|
18
|
-
dependencies(platform: string, name: string, version: string): string;
|
|
19
|
-
dependentRepositories(platform: string, name: string): string;
|
|
20
|
-
dependents(platform: string, name: string): string;
|
|
21
|
-
search(): string;
|
|
22
|
-
sourceRank(platform: string, name: string): string;
|
|
23
|
-
subscriptions(platform: string, name: string): string;
|
|
24
|
-
usage(platform: string, name: string): string;
|
|
25
|
-
project(platform: string, name: string): string;
|
|
26
|
-
};
|
|
27
|
-
GitHub: {
|
|
28
|
-
Repository: {
|
|
29
|
-
dependencies(owner: string, name: string): string;
|
|
30
|
-
projects(owner: string, name: string): string;
|
|
31
|
-
repository(owner: string, name: string): string;
|
|
32
|
-
};
|
|
33
|
-
User: {
|
|
34
|
-
dependencies(login: string): string;
|
|
35
|
-
packages(login: string): string;
|
|
36
|
-
projects(login: string): string;
|
|
37
|
-
contributedProjects(login: string): string;
|
|
38
|
-
repositories(login: string): string;
|
|
39
|
-
contributedRepositories(login: string): string;
|
|
40
|
-
user(login: string): string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
platforms(): string;
|
|
44
|
-
subscriptions(platform?: string, name?: string): string;
|
|
45
|
-
};
|
package/dist/Endpoints.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Endpoint = void 0;
|
|
4
|
-
const encode = encodeURIComponent;
|
|
5
|
-
exports.Endpoint = {
|
|
6
|
-
CONTRIBUTORS: 'contributors',
|
|
7
|
-
DEPENDENCIES: 'dependencies',
|
|
8
|
-
DEPENDENT_REPOSITORIES: 'dependent_repositories',
|
|
9
|
-
DEPENDENTS: 'dependents',
|
|
10
|
-
GITHUB: 'github',
|
|
11
|
-
PLATFORMS: 'platforms',
|
|
12
|
-
PROJECT_CONTRIBUTIONS: 'project-contributions',
|
|
13
|
-
PROJECTS: 'projects',
|
|
14
|
-
REPOSITORIES: 'repositories',
|
|
15
|
-
REPOSITORY_CONTRIBUTIONS: 'repository-contributions',
|
|
16
|
-
SEARCH: 'search',
|
|
17
|
-
SOURCERANK: 'sourcerank',
|
|
18
|
-
SUBSCRIPTIONS: 'subscriptions',
|
|
19
|
-
USAGE: 'usage',
|
|
20
|
-
Project: {
|
|
21
|
-
contributors(platform, name) {
|
|
22
|
-
return `/${encode(platform)}/${encode(name)}/${exports.Endpoint.CONTRIBUTORS}/`;
|
|
23
|
-
},
|
|
24
|
-
dependencies(platform, name, version) {
|
|
25
|
-
return `/${encode(platform)}/${encode(name)}/${encode(version)}/${exports.Endpoint.DEPENDENCIES}/`;
|
|
26
|
-
},
|
|
27
|
-
dependentRepositories(platform, name) {
|
|
28
|
-
return `/${encode(platform)}/${encode(name)}/${exports.Endpoint.DEPENDENT_REPOSITORIES}/`;
|
|
29
|
-
},
|
|
30
|
-
dependents(platform, name) {
|
|
31
|
-
return `/${encode(platform)}/${encode(name)}/${exports.Endpoint.DEPENDENTS}/`;
|
|
32
|
-
},
|
|
33
|
-
search() {
|
|
34
|
-
return `/${exports.Endpoint.SEARCH}/`;
|
|
35
|
-
},
|
|
36
|
-
sourceRank(platform, name) {
|
|
37
|
-
return `/${encode(platform)}/${encode(name)}/${exports.Endpoint.SOURCERANK}/`;
|
|
38
|
-
},
|
|
39
|
-
subscriptions(platform, name) {
|
|
40
|
-
return `/${exports.Endpoint.SUBSCRIPTIONS}/${encode(platform)}/${encode(name)}/`;
|
|
41
|
-
},
|
|
42
|
-
usage(platform, name) {
|
|
43
|
-
return `/${encode(platform)}/${encode(name)}/${exports.Endpoint.USAGE}/`;
|
|
44
|
-
},
|
|
45
|
-
project(platform, name) {
|
|
46
|
-
return `/${encode(platform)}/${encode(name)}/`;
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
GitHub: {
|
|
50
|
-
Repository: {
|
|
51
|
-
dependencies(owner, name) {
|
|
52
|
-
return `/${exports.Endpoint.GITHUB}/${encode(owner)}/${encode(name)}/${exports.Endpoint.DEPENDENCIES}/`;
|
|
53
|
-
},
|
|
54
|
-
projects(owner, name) {
|
|
55
|
-
return `/${exports.Endpoint.GITHUB}/${encode(owner)}/${encode(name)}/${exports.Endpoint.PROJECTS}/`;
|
|
56
|
-
},
|
|
57
|
-
repository(owner, name) {
|
|
58
|
-
return `/${exports.Endpoint.GITHUB}/${encode(owner)}/${encode(name)}/`;
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
User: {
|
|
62
|
-
dependencies(login) {
|
|
63
|
-
return `/${exports.Endpoint.GITHUB}/${encode(login)}/${exports.Endpoint.DEPENDENCIES}/`;
|
|
64
|
-
},
|
|
65
|
-
packages(login) {
|
|
66
|
-
return `/${exports.Endpoint.GITHUB}/${encode(login)}/${exports.Endpoint.PROJECTS}/`;
|
|
67
|
-
},
|
|
68
|
-
projects(login) {
|
|
69
|
-
return `/${exports.Endpoint.GITHUB}/${encode(login)}/${exports.Endpoint.PROJECTS}/`;
|
|
70
|
-
},
|
|
71
|
-
contributedProjects(login) {
|
|
72
|
-
return `/${exports.Endpoint.GITHUB}/${encode(login)}/${exports.Endpoint.PROJECT_CONTRIBUTIONS}/`;
|
|
73
|
-
},
|
|
74
|
-
repositories(login) {
|
|
75
|
-
return `/${exports.Endpoint.GITHUB}/${encode(login)}/${exports.Endpoint.REPOSITORIES}/`;
|
|
76
|
-
},
|
|
77
|
-
contributedRepositories(login) {
|
|
78
|
-
return `/${exports.Endpoint.GITHUB}/${encode(login)}/${exports.Endpoint.REPOSITORY_CONTRIBUTIONS}/`;
|
|
79
|
-
},
|
|
80
|
-
user(login) {
|
|
81
|
-
return `/${exports.Endpoint.GITHUB}/${encode(login)}/`;
|
|
82
|
-
},
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
platforms() {
|
|
86
|
-
return `/${exports.Endpoint.PLATFORMS}/`;
|
|
87
|
-
},
|
|
88
|
-
subscriptions(platform, name) {
|
|
89
|
-
let endpoint = `/${exports.Endpoint.SUBSCRIPTIONS}/`;
|
|
90
|
-
if (platform && name) {
|
|
91
|
-
endpoint += `${encode(platform)}/${encode(name)}/`;
|
|
92
|
-
}
|
|
93
|
-
return endpoint;
|
|
94
|
-
}
|
|
95
|
-
};
|
package/dist/LibrariesIO.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { API, ClientOptions } from './interfaces/';
|
|
2
|
-
export declare class LibrariesIO {
|
|
3
|
-
readonly api: API;
|
|
4
|
-
private readonly apiClient;
|
|
5
|
-
private readonly options;
|
|
6
|
-
constructor(apiKey: string);
|
|
7
|
-
constructor(options: ClientOptions);
|
|
8
|
-
/**
|
|
9
|
-
* Set a new API key.
|
|
10
|
-
* @param apiKey The new API key
|
|
11
|
-
*/
|
|
12
|
-
setApiKey(apiKey: string): void;
|
|
13
|
-
/**
|
|
14
|
-
* Set a new API URL.
|
|
15
|
-
* @param newURL The new API url
|
|
16
|
-
*/
|
|
17
|
-
setApiUrl(newURL: string): void;
|
|
18
|
-
}
|
package/dist/LibrariesIO.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LibrariesIO = void 0;
|
|
4
|
-
const api_client_1 = require("@ffflorian/api-client");
|
|
5
|
-
const api_1 = require("./api");
|
|
6
|
-
class LibrariesIO {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
if (typeof options === 'string') {
|
|
9
|
-
options = { apiKey: options };
|
|
10
|
-
}
|
|
11
|
-
this.options = Object.assign({ apiUrl: 'https://libraries.io/api' }, options);
|
|
12
|
-
this.apiClient = new api_client_1.APIClient(this.options.apiUrl);
|
|
13
|
-
this.apiClient.interceptors.request.push(options => {
|
|
14
|
-
if (options.body) {
|
|
15
|
-
const body = JSON.parse(options.body.toString());
|
|
16
|
-
body.api_key = this.options.apiKey;
|
|
17
|
-
options.body = JSON.stringify(body);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
const body = { api_key: this.options.apiKey };
|
|
21
|
-
options.body = JSON.stringify(body);
|
|
22
|
-
}
|
|
23
|
-
return options;
|
|
24
|
-
});
|
|
25
|
-
this.apiClient.interceptors.response.push(response => {
|
|
26
|
-
const headers = response.headers;
|
|
27
|
-
if (headers.get('total')) {
|
|
28
|
-
return Object.assign(Object.assign({}, response), { totalResults: Number(headers.get('total')) });
|
|
29
|
-
}
|
|
30
|
-
return response;
|
|
31
|
-
});
|
|
32
|
-
this.api = {
|
|
33
|
-
github: {
|
|
34
|
-
repository: new api_1.GitHubRepositoryAPI(this.apiClient, this.options),
|
|
35
|
-
user: new api_1.GitHubUserAPI(this.apiClient, this.options),
|
|
36
|
-
},
|
|
37
|
-
platform: new api_1.PlatformAPI(this.apiClient, this.options),
|
|
38
|
-
project: new api_1.ProjectAPI(this.apiClient, this.options),
|
|
39
|
-
user: new api_1.UserAPI(this.apiClient, this.options),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Set a new API key.
|
|
44
|
-
* @param apiKey The new API key
|
|
45
|
-
*/
|
|
46
|
-
setApiKey(apiKey) {
|
|
47
|
-
this.options.apiKey = apiKey;
|
|
48
|
-
}
|
|
49
|
-
/*
|
|
50
|
-
|
|
51
|
-
const contentType = headers['content-type'] ? String(headers['content-type']) : undefined;
|
|
52
|
-
const rateLimit = Number(headers['x-ratelimit-limit']);
|
|
53
|
-
const rateLimitRemaining = Number(headers['x-ratelimit-remaining']);
|
|
54
|
-
const totalResults = headers['total'] ? Number(headers['total']) : undefined;
|
|
55
|
-
*/
|
|
56
|
-
/**
|
|
57
|
-
* Set a new API URL.
|
|
58
|
-
* @param newURL The new API url
|
|
59
|
-
*/
|
|
60
|
-
setApiUrl(newURL) {
|
|
61
|
-
this.apiClient.setBaseURL(newURL);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.LibrariesIO = LibrariesIO;
|
package/dist/api/APIBase.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { ClientOptions } from '../interfaces';
|
|
3
|
-
export declare class APIBase {
|
|
4
|
-
protected readonly apiClient: APIClient;
|
|
5
|
-
protected readonly options: ClientOptions;
|
|
6
|
-
constructor(apiClient: APIClient, options: ClientOptions);
|
|
7
|
-
/**
|
|
8
|
-
* Set a new API key.
|
|
9
|
-
* @param apiKey The new API key
|
|
10
|
-
*/
|
|
11
|
-
setApiKey(apiKey: string): void;
|
|
12
|
-
/**
|
|
13
|
-
* Set a new API URL.
|
|
14
|
-
* @param newURL The new API url
|
|
15
|
-
*/
|
|
16
|
-
setApiUrl(newURL: string): void;
|
|
17
|
-
protected checkApiKey(apiName?: string): void;
|
|
18
|
-
}
|
package/dist/api/APIBase.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APIBase = void 0;
|
|
4
|
-
class APIBase {
|
|
5
|
-
constructor(apiClient, options) {
|
|
6
|
-
this.apiClient = apiClient;
|
|
7
|
-
this.options = options;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Set a new API key.
|
|
11
|
-
* @param apiKey The new API key
|
|
12
|
-
*/
|
|
13
|
-
setApiKey(apiKey) {
|
|
14
|
-
this.options.apiKey = apiKey;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Set a new API URL.
|
|
18
|
-
* @param newURL The new API url
|
|
19
|
-
*/
|
|
20
|
-
setApiUrl(newURL) {
|
|
21
|
-
this.apiClient.setBaseURL(newURL);
|
|
22
|
-
}
|
|
23
|
-
checkApiKey(apiName) {
|
|
24
|
-
const name = apiName ? `the "${apiName}"` : 'this';
|
|
25
|
-
if (!this.options.apiKey) {
|
|
26
|
-
throw new Error(`An API key needs to be set in order to use ${name} API`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.APIBase = APIBase;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { ClientOptions, LibrariesIOResult, PaginationOptions, Project, RepositoryWithDependencies } from '../../interfaces/';
|
|
3
|
-
import { APIBase } from '../APIBase';
|
|
4
|
-
export declare class GitHubRepositoryAPI extends APIBase {
|
|
5
|
-
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
-
/**
|
|
7
|
-
* Get a list of packages referencing the given repository.
|
|
8
|
-
* @see https://libraries.io/api#repository-projects
|
|
9
|
-
* @param repositoryOwner The repository owner
|
|
10
|
-
* @param repositoryName The repository name
|
|
11
|
-
* @param options Pagination Options
|
|
12
|
-
*/
|
|
13
|
-
getProjects(repositoryOwner: string, repositoryName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
|
|
14
|
-
/**
|
|
15
|
-
* Get a info for a repository. Currently only works for open source repositories.
|
|
16
|
-
* @see https://libraries.io/api#repository
|
|
17
|
-
* @param repositoryOwner The repository owner
|
|
18
|
-
* @param repositoryName The repository name
|
|
19
|
-
*/
|
|
20
|
-
getRepository(repositoryOwner: string, repositoryName: string): Promise<LibrariesIOResult<RepositoryWithDependencies>>;
|
|
21
|
-
/**
|
|
22
|
-
* Get a list of dependencies for a repositories. Currently only works for open source repositories.
|
|
23
|
-
* @see https://libraries.io/api#repository-dependencies
|
|
24
|
-
* @param repositoryOwner The repository owner
|
|
25
|
-
* @param repositoryName The repository name
|
|
26
|
-
*/
|
|
27
|
-
getRepositoryWithDependencies(repositoryOwner: string, repositoryName: string): Promise<LibrariesIOResult<RepositoryWithDependencies>>;
|
|
28
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GitHubRepositoryAPI = void 0;
|
|
13
|
-
const Endpoints_1 = require("../../Endpoints");
|
|
14
|
-
const APIBase_1 = require("../APIBase");
|
|
15
|
-
class GitHubRepositoryAPI extends APIBase_1.APIBase {
|
|
16
|
-
constructor(apiClient, options) {
|
|
17
|
-
super(apiClient, options);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get a list of packages referencing the given repository.
|
|
21
|
-
* @see https://libraries.io/api#repository-projects
|
|
22
|
-
* @param repositoryOwner The repository owner
|
|
23
|
-
* @param repositoryName The repository name
|
|
24
|
-
* @param options Pagination Options
|
|
25
|
-
*/
|
|
26
|
-
getProjects(repositoryOwner, repositoryName, options) {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.Repository.projects(repositoryOwner, repositoryName);
|
|
29
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
30
|
-
return data;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Get a info for a repository. Currently only works for open source repositories.
|
|
35
|
-
* @see https://libraries.io/api#repository
|
|
36
|
-
* @param repositoryOwner The repository owner
|
|
37
|
-
* @param repositoryName The repository name
|
|
38
|
-
*/
|
|
39
|
-
getRepository(repositoryOwner, repositoryName) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.Repository.repository(repositoryOwner, repositoryName);
|
|
42
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
43
|
-
return data;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get a list of dependencies for a repositories. Currently only works for open source repositories.
|
|
48
|
-
* @see https://libraries.io/api#repository-dependencies
|
|
49
|
-
* @param repositoryOwner The repository owner
|
|
50
|
-
* @param repositoryName The repository name
|
|
51
|
-
*/
|
|
52
|
-
getRepositoryWithDependencies(repositoryOwner, repositoryName) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.Repository.dependencies(repositoryOwner, repositoryName);
|
|
55
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
56
|
-
return data;
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.GitHubRepositoryAPI = GitHubRepositoryAPI;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { ClientOptions, Contributor, LibrariesIOResult, PaginationOptions, PlatformType, Project, Repository } from '../../interfaces/';
|
|
3
|
-
import { APIBase } from '../APIBase';
|
|
4
|
-
export declare class GitHubUserAPI extends APIBase {
|
|
5
|
-
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
-
/**
|
|
7
|
-
* Get a list of packages that the given user has contributed to.
|
|
8
|
-
* @see https://libraries.io/api#user-project-contributions
|
|
9
|
-
* @param userName The username
|
|
10
|
-
* @param options Pagination options
|
|
11
|
-
*/
|
|
12
|
-
getContributedProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
|
|
13
|
-
/**
|
|
14
|
-
* Get a list of repositories that the given user has contributed to.
|
|
15
|
-
* @see https://libraries.io/api#user-repository-contributions
|
|
16
|
-
* @param userName The username
|
|
17
|
-
* @param options Pagination options
|
|
18
|
-
*/
|
|
19
|
-
getContributedRepositories(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>;
|
|
20
|
-
getDependencies(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
|
|
21
|
-
getDependencies(userName: string, platform?: PlatformType, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
|
|
22
|
-
/**
|
|
23
|
-
* Get a list of packages referencing the given user's repositories.
|
|
24
|
-
* @see https://libraries.io/api#user-projects
|
|
25
|
-
* @param userName The username
|
|
26
|
-
* @param options Pagination options
|
|
27
|
-
*/
|
|
28
|
-
getProjects(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
|
|
29
|
-
/**
|
|
30
|
-
* Get repositories owned by a user.
|
|
31
|
-
* @see https://libraries.io/api#user-repositories
|
|
32
|
-
* @param userName The username
|
|
33
|
-
* @param options Pagination options
|
|
34
|
-
*/
|
|
35
|
-
getRepositories(userName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>;
|
|
36
|
-
/**
|
|
37
|
-
* Get information for a given user or organization.
|
|
38
|
-
* @see https://libraries.io/api#user
|
|
39
|
-
* @param userName The username
|
|
40
|
-
*/
|
|
41
|
-
getUser(userName: string): Promise<LibrariesIOResult<Contributor>>;
|
|
42
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GitHubUserAPI = void 0;
|
|
13
|
-
const Endpoints_1 = require("../../Endpoints");
|
|
14
|
-
const APIBase_1 = require("../APIBase");
|
|
15
|
-
class GitHubUserAPI extends APIBase_1.APIBase {
|
|
16
|
-
constructor(apiClient, options) {
|
|
17
|
-
super(apiClient, options);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get a list of packages that the given user has contributed to.
|
|
21
|
-
* @see https://libraries.io/api#user-project-contributions
|
|
22
|
-
* @param userName The username
|
|
23
|
-
* @param options Pagination options
|
|
24
|
-
*/
|
|
25
|
-
getContributedProjects(userName, options) {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.User.contributedProjects(userName);
|
|
28
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
29
|
-
return data;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Get a list of repositories that the given user has contributed to.
|
|
34
|
-
* @see https://libraries.io/api#user-repository-contributions
|
|
35
|
-
* @param userName The username
|
|
36
|
-
* @param options Pagination options
|
|
37
|
-
*/
|
|
38
|
-
getContributedRepositories(userName, options) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.User.contributedRepositories(userName);
|
|
41
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
42
|
-
return data;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* 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
|
-
* @param userName The username
|
|
49
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
50
|
-
* @param options Pagination options
|
|
51
|
-
*/
|
|
52
|
-
getDependencies(userName, platformOrOptions, options) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.User.contributedRepositories(userName);
|
|
55
|
-
let parameters = {};
|
|
56
|
-
if (platformOrOptions) {
|
|
57
|
-
if (typeof platformOrOptions === 'string') {
|
|
58
|
-
parameters = Object.assign({ platform: platformOrOptions }, options);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
parameters = platformOrOptions;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
const { data } = yield this.apiClient.get(endpoint, { data: parameters });
|
|
65
|
-
return data;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Get a list of packages referencing the given user's repositories.
|
|
70
|
-
* @see https://libraries.io/api#user-projects
|
|
71
|
-
* @param userName The username
|
|
72
|
-
* @param options Pagination options
|
|
73
|
-
*/
|
|
74
|
-
getProjects(userName, options) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.User.repositories(userName);
|
|
77
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
78
|
-
return data;
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Get repositories owned by a user.
|
|
83
|
-
* @see https://libraries.io/api#user-repositories
|
|
84
|
-
* @param userName The username
|
|
85
|
-
* @param options Pagination options
|
|
86
|
-
*/
|
|
87
|
-
getRepositories(userName, options) {
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.User.repositories(userName);
|
|
90
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
91
|
-
return data;
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Get information for a given user or organization.
|
|
96
|
-
* @see https://libraries.io/api#user
|
|
97
|
-
* @param userName The username
|
|
98
|
-
*/
|
|
99
|
-
getUser(userName) {
|
|
100
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const endpoint = Endpoints_1.Endpoint.GitHub.User.user(userName);
|
|
102
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
103
|
-
return data;
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
exports.GitHubUserAPI = GitHubUserAPI;
|
package/dist/api/GitHub/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./GitHubRepositoryAPI"), exports);
|
|
18
|
-
__exportStar(require("./GitHubUserAPI"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { ClientOptions, LibrariesIOResult, PaginationOptions, Platform } from '../interfaces/';
|
|
3
|
-
import { APIBase } from './APIBase';
|
|
4
|
-
export declare class PlatformAPI extends APIBase {
|
|
5
|
-
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
-
/**
|
|
7
|
-
* Get list of supported package managers.
|
|
8
|
-
* @see https://libraries.io/api#platforms
|
|
9
|
-
* @param options Pagination options
|
|
10
|
-
*/
|
|
11
|
-
getPlatforms(options?: PaginationOptions): Promise<LibrariesIOResult<Platform[]>>;
|
|
12
|
-
}
|
package/dist/api/PlatformAPI.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.PlatformAPI = void 0;
|
|
13
|
-
const Endpoints_1 = require("../Endpoints");
|
|
14
|
-
const APIBase_1 = require("./APIBase");
|
|
15
|
-
class PlatformAPI extends APIBase_1.APIBase {
|
|
16
|
-
constructor(apiClient, options) {
|
|
17
|
-
super(apiClient, options);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get list of supported package managers.
|
|
21
|
-
* @see https://libraries.io/api#platforms
|
|
22
|
-
* @param options Pagination options
|
|
23
|
-
*/
|
|
24
|
-
getPlatforms(options) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const endpoint = Endpoints_1.Endpoint.platforms();
|
|
27
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
28
|
-
return data;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.PlatformAPI = PlatformAPI;
|
package/dist/api/ProjectAPI.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { ClientOptions, Contributor, LibrariesIOResult, PaginationOptions, PlatformType, Project, ProjectUsage, ProjectWithDependencies, Repository, SearchOptions } from '../interfaces/';
|
|
3
|
-
import { APIBase } from './APIBase';
|
|
4
|
-
export declare class ProjectAPI extends APIBase {
|
|
5
|
-
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
-
/**
|
|
7
|
-
* Get users that have contributed to a given project.
|
|
8
|
-
* @see https://libraries.io/api#project-contributors
|
|
9
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
10
|
-
* @param projectName The project name
|
|
11
|
-
* @param options Pagination options
|
|
12
|
-
*/
|
|
13
|
-
getContributors(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Contributor[]>>;
|
|
14
|
-
/**
|
|
15
|
-
* Get repositories that depend on a given project.
|
|
16
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
17
|
-
* @param projectName The project name
|
|
18
|
-
* @param options Pagination options
|
|
19
|
-
*/
|
|
20
|
-
getDependendentRepositories(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Repository[]>>;
|
|
21
|
-
/**
|
|
22
|
-
* Get packages that have at least one version that depends on a given project.
|
|
23
|
-
* @see https://libraries.io/api#project-dependents
|
|
24
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
25
|
-
* @param projectName The project name
|
|
26
|
-
* @param options Pagination options
|
|
27
|
-
*/
|
|
28
|
-
getDependendents(platform: PlatformType, projectName: string, options?: PaginationOptions): Promise<LibrariesIOResult<Project[]>>;
|
|
29
|
-
/**
|
|
30
|
-
* Get information about a package and it's versions.
|
|
31
|
-
* @see https://libraries.io/api#project
|
|
32
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
33
|
-
* @param projectName The project name
|
|
34
|
-
*/
|
|
35
|
-
getProject(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<Project>>;
|
|
36
|
-
/**
|
|
37
|
-
* 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
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
40
|
-
* @param projectName The project name
|
|
41
|
-
* @param projectVersion
|
|
42
|
-
*/
|
|
43
|
-
getProjectWithDependencies(platform: PlatformType, projectName: string, projectVersion: string): Promise<LibrariesIOResult<ProjectWithDependencies>>;
|
|
44
|
-
/**
|
|
45
|
-
* Get breakdown of SourceRank score for a given project.
|
|
46
|
-
* @see https://libraries.io/api#project-sourcerank
|
|
47
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
48
|
-
* @param projectName The project name
|
|
49
|
-
*/
|
|
50
|
-
getSourceRank(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<number>>;
|
|
51
|
-
/**
|
|
52
|
-
* Get breakdown of version usage for a given project.
|
|
53
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
54
|
-
* @param projectName The project name
|
|
55
|
-
*/
|
|
56
|
-
getUsage(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<ProjectUsage>>;
|
|
57
|
-
/**
|
|
58
|
-
* Search for projects.
|
|
59
|
-
* @see https://libraries.io/api#project-search
|
|
60
|
-
* @param query The search query
|
|
61
|
-
* @param options Sorting, filter and pagination options
|
|
62
|
-
*/
|
|
63
|
-
search(query: string, options?: SearchOptions): Promise<LibrariesIOResult<Project[]>>;
|
|
64
|
-
}
|
package/dist/api/ProjectAPI.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ProjectAPI = void 0;
|
|
13
|
-
const Endpoints_1 = require("../Endpoints");
|
|
14
|
-
const APIBase_1 = require("./APIBase");
|
|
15
|
-
class ProjectAPI extends APIBase_1.APIBase {
|
|
16
|
-
constructor(apiClient, options) {
|
|
17
|
-
super(apiClient, options);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get users that have contributed to a given project.
|
|
21
|
-
* @see https://libraries.io/api#project-contributors
|
|
22
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
23
|
-
* @param projectName The project name
|
|
24
|
-
* @param options Pagination options
|
|
25
|
-
*/
|
|
26
|
-
getContributors(platform, projectName, options) {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName);
|
|
29
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
30
|
-
return data;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Get repositories that depend on a given project.
|
|
35
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
36
|
-
* @param projectName The project name
|
|
37
|
-
* @param options Pagination options
|
|
38
|
-
*/
|
|
39
|
-
getDependendentRepositories(platform, projectName, options) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName);
|
|
42
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
43
|
-
return data;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Get packages that have at least one version that depends on a given project.
|
|
48
|
-
* @see https://libraries.io/api#project-dependents
|
|
49
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
50
|
-
* @param projectName The project name
|
|
51
|
-
* @param options Pagination options
|
|
52
|
-
*/
|
|
53
|
-
getDependendents(platform, projectName, options) {
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
const endpoint = Endpoints_1.Endpoint.Project.dependents(platform, projectName);
|
|
56
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
57
|
-
return data;
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Get information about a package and it's versions.
|
|
62
|
-
* @see https://libraries.io/api#project
|
|
63
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
64
|
-
* @param projectName The project name
|
|
65
|
-
*/
|
|
66
|
-
getProject(platform, projectName) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const endpoint = Endpoints_1.Endpoint.Project.project(platform, projectName);
|
|
69
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
70
|
-
return data;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* 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
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
77
|
-
* @param projectName The project name
|
|
78
|
-
* @param projectVersion
|
|
79
|
-
*/
|
|
80
|
-
getProjectWithDependencies(platform, projectName, projectVersion) {
|
|
81
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
const endpoint = Endpoints_1.Endpoint.Project.dependencies(platform, projectName, projectVersion);
|
|
83
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
84
|
-
return data;
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Get breakdown of SourceRank score for a given project.
|
|
89
|
-
* @see https://libraries.io/api#project-sourcerank
|
|
90
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
91
|
-
* @param projectName The project name
|
|
92
|
-
*/
|
|
93
|
-
getSourceRank(platform, projectName) {
|
|
94
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
const endpoint = Endpoints_1.Endpoint.Project.sourceRank(platform, projectName);
|
|
96
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
97
|
-
return data;
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Get breakdown of version usage for a given project.
|
|
102
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
103
|
-
* @param projectName The project name
|
|
104
|
-
*/
|
|
105
|
-
getUsage(platform, projectName) {
|
|
106
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
const endpoint = Endpoints_1.Endpoint.Project.sourceRank(platform, projectName);
|
|
108
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
109
|
-
return data;
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Search for projects.
|
|
114
|
-
* @see https://libraries.io/api#project-search
|
|
115
|
-
* @param query The search query
|
|
116
|
-
* @param options Sorting, filter and pagination options
|
|
117
|
-
*/
|
|
118
|
-
search(query, options) {
|
|
119
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
const endpoint = Endpoints_1.Endpoint.Project.search();
|
|
121
|
-
// eslint-disable-next-line id-length
|
|
122
|
-
const { data } = yield this.apiClient.get(endpoint, { data: Object.assign(Object.assign({}, options), { q: query }) });
|
|
123
|
-
return data;
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
exports.ProjectAPI = ProjectAPI;
|
package/dist/api/UserAPI.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
-
import type { ClientOptions, LibrariesIOHeaders, LibrariesIOResult, PaginationOptions, PlatformType, PreReleaseOptions, Subscription } from '../interfaces/';
|
|
3
|
-
import { APIBase } from './APIBase';
|
|
4
|
-
export declare class UserAPI extends APIBase {
|
|
5
|
-
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
-
/**
|
|
7
|
-
* List packages that a user is subscribed to recieved notifications about new releases.
|
|
8
|
-
* @see https://libraries.io/api#subscriptions-index
|
|
9
|
-
* @param options Pagination options
|
|
10
|
-
*/
|
|
11
|
-
getAllSubscriptions(options?: PaginationOptions): Promise<LibrariesIOResult<Subscription[]>>;
|
|
12
|
-
/**
|
|
13
|
-
* Check if a users is subscribed to receive notifications about new releases of a project.
|
|
14
|
-
* @see https://libraries.io/api#subscriptions-show
|
|
15
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
16
|
-
* @param projectName The project name
|
|
17
|
-
*/
|
|
18
|
-
getSubscription(platform: PlatformType, projectName: string): Promise<LibrariesIOResult<Subscription | null>>;
|
|
19
|
-
/**
|
|
20
|
-
* Subscribe to receive notifications about new releases of a project.
|
|
21
|
-
* @see https://libraries.io/api#subscriptions-create
|
|
22
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
23
|
-
* @param projectName The project name
|
|
24
|
-
* @param options Subscription options
|
|
25
|
-
*/
|
|
26
|
-
subscribe(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<LibrariesIOResult<Subscription>>;
|
|
27
|
-
/**
|
|
28
|
-
* Stop receiving release notifications from a project.
|
|
29
|
-
* @see https://libraries.io/api#subscriptions-destroy
|
|
30
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
31
|
-
* @param projectName The project name
|
|
32
|
-
*/
|
|
33
|
-
unsubscribe(platform: PlatformType, projectName: string): Promise<LibrariesIOHeaders>;
|
|
34
|
-
/**
|
|
35
|
-
* Update the options for a subscription.
|
|
36
|
-
* @see https://libraries.io/api#subscriptions-update
|
|
37
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
38
|
-
* @param projectName The project name
|
|
39
|
-
* @param options Subscription options
|
|
40
|
-
*/
|
|
41
|
-
updateSubscription(platform: PlatformType, projectName: string, options?: PreReleaseOptions): Promise<LibrariesIOResult<Subscription>>;
|
|
42
|
-
}
|
package/dist/api/UserAPI.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UserAPI = void 0;
|
|
13
|
-
const Endpoints_1 = require("../Endpoints");
|
|
14
|
-
const APIBase_1 = require("./APIBase");
|
|
15
|
-
class UserAPI extends APIBase_1.APIBase {
|
|
16
|
-
constructor(apiClient, options) {
|
|
17
|
-
super(apiClient, options);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* List packages that a user is subscribed to recieved notifications about new releases.
|
|
21
|
-
* @see https://libraries.io/api#subscriptions-index
|
|
22
|
-
* @param options Pagination options
|
|
23
|
-
*/
|
|
24
|
-
getAllSubscriptions(options) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const endpoint = Endpoints_1.Endpoint.subscriptions();
|
|
27
|
-
const { data } = yield this.apiClient.get(endpoint, { data: options });
|
|
28
|
-
return data;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a users is subscribed to receive notifications about new releases of a project.
|
|
33
|
-
* @see https://libraries.io/api#subscriptions-show
|
|
34
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
35
|
-
* @param projectName The project name
|
|
36
|
-
*/
|
|
37
|
-
getSubscription(platform, projectName) {
|
|
38
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName);
|
|
40
|
-
const { data } = yield this.apiClient.get(endpoint);
|
|
41
|
-
return data;
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Subscribe to receive notifications about new releases of a project.
|
|
46
|
-
* @see https://libraries.io/api#subscriptions-create
|
|
47
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
48
|
-
* @param projectName The project name
|
|
49
|
-
* @param options Subscription options
|
|
50
|
-
*/
|
|
51
|
-
subscribe(platform, projectName, options) {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
const endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName);
|
|
54
|
-
const { data } = yield this.apiClient.post(endpoint, { data: options });
|
|
55
|
-
return data;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Stop receiving release notifications from a project.
|
|
60
|
-
* @see https://libraries.io/api#subscriptions-destroy
|
|
61
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
62
|
-
* @param projectName The project name
|
|
63
|
-
*/
|
|
64
|
-
unsubscribe(platform, projectName) {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
const endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName);
|
|
67
|
-
const { data } = yield this.apiClient.delete(endpoint);
|
|
68
|
-
return data;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Update the options for a subscription.
|
|
73
|
-
* @see https://libraries.io/api#subscriptions-update
|
|
74
|
-
* @param platform The project platform (e.g. "npm", "cargo", ...)
|
|
75
|
-
* @param projectName The project name
|
|
76
|
-
* @param options Subscription options
|
|
77
|
-
*/
|
|
78
|
-
updateSubscription(platform, projectName, options) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
const endpoint = Endpoints_1.Endpoint.subscriptions(platform, projectName);
|
|
81
|
-
const { data } = yield this.apiClient.put(endpoint, { data: options });
|
|
82
|
-
return data;
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
exports.UserAPI = UserAPI;
|
package/dist/api/index.d.ts
DELETED
package/dist/api/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./GitHub/"), exports);
|
|
18
|
-
__exportStar(require("./PlatformAPI"), exports);
|
|
19
|
-
__exportStar(require("./ProjectAPI"), exports);
|
|
20
|
-
__exportStar(require("./UserAPI"), exports);
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./LibrariesIO"), exports);
|
|
18
|
-
__exportStar(require("./interfaces/"), exports);
|
package/dist/interfaces/API.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GitHubRepositoryAPI, GitHubUserAPI, PlatformAPI, ProjectAPI, UserAPI } from '../api/';
|
|
2
|
-
export interface API {
|
|
3
|
-
github: {
|
|
4
|
-
repository: GitHubRepositoryAPI;
|
|
5
|
-
user: GitHubUserAPI;
|
|
6
|
-
};
|
|
7
|
-
platform: PlatformAPI;
|
|
8
|
-
project: ProjectAPI;
|
|
9
|
-
user: UserAPI;
|
|
10
|
-
}
|
package/dist/interfaces/API.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface Contributor {
|
|
2
|
-
bio: string | null;
|
|
3
|
-
blog: string | null;
|
|
4
|
-
company: string | null;
|
|
5
|
-
created_at: string;
|
|
6
|
-
email: string | null;
|
|
7
|
-
followers: number | null;
|
|
8
|
-
following: number | null;
|
|
9
|
-
github_id: string;
|
|
10
|
-
hidden: boolean;
|
|
11
|
-
host_type: string;
|
|
12
|
-
last_synced_at: string;
|
|
13
|
-
location: string | null;
|
|
14
|
-
login: string;
|
|
15
|
-
name: string;
|
|
16
|
-
updated_at: string;
|
|
17
|
-
user_type: string;
|
|
18
|
-
uuid: string;
|
|
19
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type SortType = 'contributions_count' | 'created_at' | 'dependent_repos_count' | 'dependents_count' | 'latest_release_published_at' | 'rank' | 'stars';
|
|
2
|
-
export interface FilterOptions {
|
|
3
|
-
keywords?: string[];
|
|
4
|
-
languages?: string[];
|
|
5
|
-
licenses?: string[];
|
|
6
|
-
platforms?: PlatformType[];
|
|
7
|
-
}
|
|
8
|
-
export interface ClientOptions {
|
|
9
|
-
apiKey: string;
|
|
10
|
-
apiUrl?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PreReleaseOptions {
|
|
13
|
-
includePreRelease?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface PaginationOptions {
|
|
16
|
-
page?: number;
|
|
17
|
-
per_page?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface SearchOptions extends PaginationOptions {
|
|
20
|
-
filter?: FilterOptions;
|
|
21
|
-
/** sort by */
|
|
22
|
-
sort?: SortType;
|
|
23
|
-
}
|
|
24
|
-
export interface RequestOptions extends SearchOptions, PreReleaseOptions {
|
|
25
|
-
api_key?: string;
|
|
26
|
-
platform?: PlatformType;
|
|
27
|
-
/** query */
|
|
28
|
-
q?: string;
|
|
29
|
-
}
|
|
30
|
-
export type HttpMethod = 'delete' | 'get' | 'post' | 'put';
|
|
31
|
-
export type PlatformType = 'alcatraz' | 'atom' | 'bower' | 'cargo' | 'carthage' | 'clojars' | 'cocoapods' | 'cpan' | 'cran' | 'dub' | 'elm' | 'emacs' | 'go' | 'hackage' | 'haxelib' | 'hex' | 'homebrew' | 'inqlude' | 'julia' | 'maven' | 'meteor' | 'nimble' | 'npm' | 'nuget' | 'packagist' | 'platformio' | 'pub' | 'puppet' | 'purescript' | 'pypi' | 'racket' | 'rubygems' | 'sublime' | 'swiftpm' | 'wordpress';
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { PlatformType } from './Options';
|
|
2
|
-
export interface Project {
|
|
3
|
-
dependent_repos_count: number;
|
|
4
|
-
dependents_count: number;
|
|
5
|
-
description: string | null;
|
|
6
|
-
forks: number;
|
|
7
|
-
homepage: string | null;
|
|
8
|
-
keywords: string[];
|
|
9
|
-
language: string;
|
|
10
|
-
latest_download_url: string;
|
|
11
|
-
latest_release_number: string;
|
|
12
|
-
latest_release_published_at: string;
|
|
13
|
-
latest_stable_release: ProjectRelease;
|
|
14
|
-
name: string;
|
|
15
|
-
normalized_licenses: string[];
|
|
16
|
-
package_manager_url: string;
|
|
17
|
-
platform: string;
|
|
18
|
-
rank: number;
|
|
19
|
-
repository_url: string | null;
|
|
20
|
-
stars: number;
|
|
21
|
-
status: string | null;
|
|
22
|
-
versions: ProjectVersion[];
|
|
23
|
-
}
|
|
24
|
-
export interface ProjectWithDependencies extends Project {
|
|
25
|
-
dependencies: ProjectDependency[];
|
|
26
|
-
dependencies_for_version: string;
|
|
27
|
-
dependent_repos_count: number;
|
|
28
|
-
dependents_count: number;
|
|
29
|
-
}
|
|
30
|
-
export interface ProjectDependency {
|
|
31
|
-
deprecated: boolean;
|
|
32
|
-
filepath: string | null;
|
|
33
|
-
kind: 'Development' | 'runtime' | 'Optional';
|
|
34
|
-
latest: string;
|
|
35
|
-
latest_stable: string;
|
|
36
|
-
name: string;
|
|
37
|
-
outdated: boolean;
|
|
38
|
-
platform: PlatformType;
|
|
39
|
-
project_name: string;
|
|
40
|
-
requirements: string;
|
|
41
|
-
}
|
|
42
|
-
export interface ProjectRelease {
|
|
43
|
-
created_at: string;
|
|
44
|
-
id: number;
|
|
45
|
-
number: string;
|
|
46
|
-
project_id: number;
|
|
47
|
-
published_at: string;
|
|
48
|
-
runtime_dependencies_count: number | null;
|
|
49
|
-
updated_at: string;
|
|
50
|
-
}
|
|
51
|
-
export interface ProjectUsage {
|
|
52
|
-
[version: string]: number;
|
|
53
|
-
}
|
|
54
|
-
export interface ProjectVersion {
|
|
55
|
-
number: string;
|
|
56
|
-
published_at: string;
|
|
57
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { ProjectDependency } from '../interfaces/Project';
|
|
2
|
-
export interface Repository {
|
|
3
|
-
contributions_count: number | null;
|
|
4
|
-
created_at: string;
|
|
5
|
-
default_branch: string;
|
|
6
|
-
description: string;
|
|
7
|
-
fork: false;
|
|
8
|
-
fork_policy: string | null;
|
|
9
|
-
forks_count: number;
|
|
10
|
-
full_name: string;
|
|
11
|
-
github_contributions_count: number;
|
|
12
|
-
github_id: string;
|
|
13
|
-
has_audit: string | null;
|
|
14
|
-
has_changelog: string | null;
|
|
15
|
-
has_coc: string | null;
|
|
16
|
-
has_contributing: string | null;
|
|
17
|
-
has_issues: boolean;
|
|
18
|
-
has_license: string | null;
|
|
19
|
-
has_pages: boolean;
|
|
20
|
-
has_readme: string | null;
|
|
21
|
-
has_threat_model: string | null;
|
|
22
|
-
has_wiki: boolean;
|
|
23
|
-
homepage: string;
|
|
24
|
-
host_domain: string | null;
|
|
25
|
-
host_type: string;
|
|
26
|
-
keywords: string[];
|
|
27
|
-
language: string;
|
|
28
|
-
last_synced_at: string;
|
|
29
|
-
license: string;
|
|
30
|
-
logo_url: string | null;
|
|
31
|
-
mirror_url: string | null;
|
|
32
|
-
name: string | null;
|
|
33
|
-
open_issues_count: number;
|
|
34
|
-
private: boolean;
|
|
35
|
-
pull_requests_enabled: string | null;
|
|
36
|
-
pushed_at: string;
|
|
37
|
-
rank: number;
|
|
38
|
-
scm: string;
|
|
39
|
-
size: number;
|
|
40
|
-
source_name: string | null;
|
|
41
|
-
stargazers_count: number;
|
|
42
|
-
status: string | null;
|
|
43
|
-
subscribers_count: number;
|
|
44
|
-
updated_at: string;
|
|
45
|
-
uuid: string;
|
|
46
|
-
}
|
|
47
|
-
export interface RepositoryWithDependencies extends Repository {
|
|
48
|
-
dependencies: ProjectDependency[];
|
|
49
|
-
}
|
package/dist/interfaces/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./API"), exports);
|
|
18
|
-
__exportStar(require("./Contributor"), exports);
|
|
19
|
-
__exportStar(require("./LibrariesIOHeaders"), exports);
|
|
20
|
-
__exportStar(require("./Options"), exports);
|
|
21
|
-
__exportStar(require("./Platform"), exports);
|
|
22
|
-
__exportStar(require("./Project"), exports);
|
|
23
|
-
__exportStar(require("./Repository"), exports);
|
|
24
|
-
__exportStar(require("./Subscription"), exports);
|