crates.io 2.3.8 → 2.4.1
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/dist/CratesIO.d.ts +2 -2
- package/dist/CratesIO.js +5 -5
- package/dist/api/CratesAPI.d.ts +2 -2
- package/package.json +8 -8
package/dist/CratesIO.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ export declare class CratesIO {
|
|
|
12
12
|
setApiKey(apiKey: string): void;
|
|
13
13
|
/**
|
|
14
14
|
* Set a new API URL.
|
|
15
|
-
* @param
|
|
15
|
+
* @param newURL The new API url
|
|
16
16
|
*/
|
|
17
|
-
setApiUrl(
|
|
17
|
+
setApiUrl(newURL: string): void;
|
|
18
18
|
/**
|
|
19
19
|
* Retrieve a summary containing crates.io wide information.
|
|
20
20
|
*/
|
package/dist/CratesIO.js
CHANGED
|
@@ -10,13 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CratesIO = void 0;
|
|
13
|
-
const
|
|
13
|
+
const api_client_1 = require("@ffflorian/api-client");
|
|
14
14
|
const api_1 = require("./api");
|
|
15
15
|
const Endpoints_1 = require("./Endpoints");
|
|
16
16
|
class CratesIO {
|
|
17
17
|
constructor(options) {
|
|
18
18
|
this.options = typeof options === 'string' ? { apiKey: options } : options || {};
|
|
19
|
-
this.apiClient =
|
|
19
|
+
this.apiClient = new api_client_1.APIClient('https://crates.io/api/v1');
|
|
20
20
|
this.api = {
|
|
21
21
|
crates: new api_1.CratesAPI(this.apiClient),
|
|
22
22
|
};
|
|
@@ -31,10 +31,10 @@ class CratesIO {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Set a new API URL.
|
|
34
|
-
* @param
|
|
34
|
+
* @param newURL The new API url
|
|
35
35
|
*/
|
|
36
|
-
setApiUrl(
|
|
37
|
-
this.apiClient.
|
|
36
|
+
setApiUrl(newURL) {
|
|
37
|
+
this.apiClient.setBaseURL(newURL);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Retrieve a summary containing crates.io wide information.
|
package/dist/api/CratesAPI.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
2
|
import type { AuthorsResult, CrateResult, DependenciesResult, DownloadsResult, FollowingResult, ReverseDependenciesResult, SearchOptions, SearchResult, TeamsResult, UrlResult, UsersResult, Version } from '../interfaces/';
|
|
3
3
|
export declare class CratesAPI {
|
|
4
4
|
private readonly apiClient;
|
|
5
5
|
private apiKey?;
|
|
6
|
-
constructor(apiClient:
|
|
6
|
+
constructor(apiClient: APIClient, apiKey?: string);
|
|
7
7
|
/**
|
|
8
8
|
* Retrieve the owners of a crate.
|
|
9
9
|
* @param packageName The package name
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"
|
|
4
|
+
"@ffflorian/api-client": "2.1.2"
|
|
5
5
|
},
|
|
6
6
|
"description": "A crates.io API client",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@types/node": "~24",
|
|
9
|
-
"rimraf": "6.0
|
|
10
|
-
"typedoc": "0.28.
|
|
9
|
+
"rimraf": "6.1.0",
|
|
10
|
+
"typedoc": "0.28.14",
|
|
11
11
|
"typescript": "5.9.3"
|
|
12
12
|
},
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": ">=
|
|
14
|
+
"node": ">= 21"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist"
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"name": "crates.io",
|
|
28
28
|
"repository": "https://github.com/ffflorian/api-clients/tree/main/packages/crates.io",
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build:ts": "tsc",
|
|
31
|
-
"build:docs": "typedoc --options ../../typedoc.json --out ../../docs/packages/crates.io src/index.ts",
|
|
30
|
+
"build:ts": "tsc -p tsconfig.build.json",
|
|
31
|
+
"build:docs": "typedoc --tsconfig tsconfig.build.json --options ../../typedoc.json --out ../../docs/packages/crates.io src/index.ts",
|
|
32
32
|
"clean": "rimraf dist",
|
|
33
33
|
"dist": "yarn clean && yarn build:ts",
|
|
34
34
|
"test": "exit 0"
|
|
35
35
|
},
|
|
36
|
-
"version": "2.
|
|
37
|
-
"gitHead": "
|
|
36
|
+
"version": "2.4.1",
|
|
37
|
+
"gitHead": "e5aa38e74982d788efcfac2dd3b46be012c98afb"
|
|
38
38
|
}
|