npms.io 2.4.6 → 2.5.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
  # npms.io [![npm version](https://img.shields.io/npm/v/npms.io.svg)](https://www.npmjs.com/package/npms.io)
2
2
 
3
- A [npms.io](https://npms.io) API client. For a documentation on the API see https://api-docs.npms.io/.
3
+ A [npms.io](https://npms.io) API client. For a documentation on the API see [the npms.io API reference](https://api-docs.npms.io).
4
4
 
5
5
  ### Installation
6
6
 
@@ -0,0 +1,15 @@
1
+ export declare const Endpoint: {
2
+ API_VERSION: string;
3
+ MGET: string;
4
+ PACKAGE: string;
5
+ Package: {
6
+ multiPackageInfo(): string;
7
+ packageInfo(packageName: string): string;
8
+ };
9
+ SEARCH: string;
10
+ Search: {
11
+ search(): string;
12
+ suggestions(): string;
13
+ };
14
+ SUGGESTIONS: string;
15
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Endpoint = void 0;
4
+ exports.Endpoint = {
5
+ API_VERSION: 'v2',
6
+ MGET: 'mget',
7
+ PACKAGE: 'package',
8
+ Package: {
9
+ multiPackageInfo() {
10
+ return `${exports.Endpoint.API_VERSION}/${exports.Endpoint.PACKAGE}/${exports.Endpoint.MGET}`;
11
+ },
12
+ packageInfo(packageName) {
13
+ return `${exports.Endpoint.API_VERSION}/${exports.Endpoint.PACKAGE}/${encodeURIComponent(packageName)}`;
14
+ },
15
+ },
16
+ SEARCH: 'search',
17
+ Search: {
18
+ search() {
19
+ return `${exports.Endpoint.API_VERSION}/${exports.Endpoint.SEARCH}`;
20
+ },
21
+ suggestions() {
22
+ return `${exports.Endpoint.API_VERSION}/${exports.Endpoint.SEARCH}/${exports.Endpoint.SUGGESTIONS}`;
23
+ },
24
+ },
25
+ SUGGESTIONS: 'suggestions',
26
+ };
@@ -0,0 +1,11 @@
1
+ import type { API, ClientOptions } from './interfaces/';
2
+ export declare class NpmsIO {
3
+ readonly api: API;
4
+ private readonly apiClient;
5
+ constructor(options?: ClientOptions);
6
+ /**
7
+ * Set a new API URL.
8
+ * @param newURL The new API url
9
+ */
10
+ setApiUrl(newURL: string): void;
11
+ }
package/dist/NpmsIO.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NpmsIO = void 0;
4
+ const api_client_1 = require("@ffflorian/api-client");
5
+ const api_1 = require("./api");
6
+ class NpmsIO {
7
+ constructor(options = {}) {
8
+ this.apiClient = new api_client_1.APIClient(options.apiUrl || 'https://api.npms.io');
9
+ this.api = {
10
+ package: new api_1.PackageAPI(this.apiClient),
11
+ search: new api_1.SearchAPI(this.apiClient),
12
+ };
13
+ }
14
+ /**
15
+ * Set a new API URL.
16
+ * @param newURL The new API url
17
+ */
18
+ setApiUrl(newURL) {
19
+ this.apiClient.setBaseURL(newURL);
20
+ this.api.package = new api_1.PackageAPI(this.apiClient);
21
+ this.api.search = new api_1.SearchAPI(this.apiClient);
22
+ }
23
+ }
24
+ exports.NpmsIO = NpmsIO;
@@ -0,0 +1,18 @@
1
+ import type { APIClient } from '@ffflorian/api-client';
2
+ import type { PackageInfo } from '../interfaces/';
3
+ export declare class PackageAPI {
4
+ private readonly apiClient;
5
+ constructor(apiClient: APIClient);
6
+ /**
7
+ * Get various packages info.
8
+ * @param packageNames The package names
9
+ * @see https://api-docs.npms.io/#api-Package-GetMultiPackageInfo
10
+ */
11
+ multiPackageInfo(packageNames: string[]): Promise<Record<string, PackageInfo>>;
12
+ /**
13
+ * Get package info.
14
+ * @param packageName The package name
15
+ * @see https://api-docs.npms.io/#api-Package-GetPackageInfo
16
+ */
17
+ packageInfo(packageName: string): Promise<PackageInfo>;
18
+ }
@@ -0,0 +1,43 @@
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.PackageAPI = void 0;
13
+ const Endpoints_1 = require("../Endpoints");
14
+ class PackageAPI {
15
+ constructor(apiClient) {
16
+ this.apiClient = apiClient;
17
+ }
18
+ /**
19
+ * Get various packages info.
20
+ * @param packageNames The package names
21
+ * @see https://api-docs.npms.io/#api-Package-GetMultiPackageInfo
22
+ */
23
+ multiPackageInfo(packageNames) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const endpoint = Endpoints_1.Endpoint.Package.multiPackageInfo();
26
+ const { data } = yield this.apiClient.post(endpoint, packageNames);
27
+ return data;
28
+ });
29
+ }
30
+ /**
31
+ * Get package info.
32
+ * @param packageName The package name
33
+ * @see https://api-docs.npms.io/#api-Package-GetPackageInfo
34
+ */
35
+ packageInfo(packageName) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const endpoint = Endpoints_1.Endpoint.Package.packageInfo(packageName);
38
+ const { data } = yield this.apiClient.get(endpoint);
39
+ return data;
40
+ });
41
+ }
42
+ }
43
+ exports.PackageAPI = PackageAPI;
@@ -0,0 +1,34 @@
1
+ import type { APIClient } from '@ffflorian/api-client';
2
+ import type { SearchOptions, SearchResult, SuggestionsOptions, SuggestionsResult } from '../interfaces';
3
+ export declare class SearchAPI {
4
+ private readonly apiClient;
5
+ constructor(apiClient: APIClient);
6
+ /**
7
+ * Fetch suggestions.
8
+ * @param query Perform a search query
9
+ * @see https://api-docs.npms.io/#api-Search-SearchSuggestions
10
+ */
11
+ getSuggestions(query: string, options?: SuggestionsOptions): Promise<SuggestionsResult>;
12
+ /**
13
+ * Perform a search query.
14
+ * @param query Besides normal text, `query` supports qualifiers to express filters and other modifiers:
15
+ * - `scope:types` Show/filter results that belong to the `@types` scope
16
+ * - `author:sindresorhus` Show/filter results in which `sindresorhus` is the author
17
+ * - `maintainer:sindresorhus` Show/filter results in which `sindresorhus` is qualifier as a maintainer
18
+ * - `keywords:gulpplugin` Show/filter results that have `gulpplugin` in the keywords (separate multiple keywords with commas, you may also exclude keywords e.g.: `-framework`)
19
+ * - `not:deprecated` Exclude deprecated packages from the results
20
+ * - `not:unstable` Exclude packages whose version is `< 1.0.0`
21
+ * - `not:insecure` Exclude packages that are insecure or have vulnerable dependencies (as per [nsp](https://nodesecurity.io/))
22
+ * - `is:deprecated` Show/filter is deprecated packages
23
+ * - `is:unstable` Show/filter packages whose version is `< 1.0.0`
24
+ * - `is:insecure` Show/filter packages that are insecure or have vulnerable dependencies (as per [nsp](https://nodesecurity.io/))
25
+ * - `boost-exact:false` Do not boost exact matches, defaults to `true`
26
+ * - `score-effect:14` Set the effect that package scores have for the final search score, defaults to `15.3`
27
+ * - `quality-weight:1` Set the weight that quality has for the each package score, defaults to `1.95`
28
+ * - `popularity-weight:1` Set the weight that popularity has for the each package score, defaults to `3.3`
29
+ * - `maintenance-weight:1` Set the weight that the quality has for the each package score, defaults to `2.05`
30
+ * @param options Additional search options
31
+ * @see https://api-docs.npms.io/#api-Search-ExecuteSearchQuery
32
+ */
33
+ searchPackage(query: string, options?: SearchOptions): Promise<SearchResult>;
34
+ }
@@ -0,0 +1,65 @@
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.SearchAPI = void 0;
13
+ const Endpoints_1 = require("../Endpoints");
14
+ class SearchAPI {
15
+ constructor(apiClient) {
16
+ this.apiClient = apiClient;
17
+ }
18
+ /**
19
+ * Fetch suggestions.
20
+ * @param query Perform a search query
21
+ * @see https://api-docs.npms.io/#api-Search-SearchSuggestions
22
+ */
23
+ getSuggestions(query_1) {
24
+ return __awaiter(this, arguments, void 0, function* (query, options = {}) {
25
+ const endpoint = Endpoints_1.Endpoint.Search.suggestions();
26
+ const params = Object.assign({
27
+ // eslint-disable-next-line id-length
28
+ q: query }, (options.size && { size: options.size }));
29
+ const { data } = yield this.apiClient.get(endpoint, { params });
30
+ return data;
31
+ });
32
+ }
33
+ /**
34
+ * Perform a search query.
35
+ * @param query Besides normal text, `query` supports qualifiers to express filters and other modifiers:
36
+ * - `scope:types` Show/filter results that belong to the `@types` scope
37
+ * - `author:sindresorhus` Show/filter results in which `sindresorhus` is the author
38
+ * - `maintainer:sindresorhus` Show/filter results in which `sindresorhus` is qualifier as a maintainer
39
+ * - `keywords:gulpplugin` Show/filter results that have `gulpplugin` in the keywords (separate multiple keywords with commas, you may also exclude keywords e.g.: `-framework`)
40
+ * - `not:deprecated` Exclude deprecated packages from the results
41
+ * - `not:unstable` Exclude packages whose version is `< 1.0.0`
42
+ * - `not:insecure` Exclude packages that are insecure or have vulnerable dependencies (as per [nsp](https://nodesecurity.io/))
43
+ * - `is:deprecated` Show/filter is deprecated packages
44
+ * - `is:unstable` Show/filter packages whose version is `< 1.0.0`
45
+ * - `is:insecure` Show/filter packages that are insecure or have vulnerable dependencies (as per [nsp](https://nodesecurity.io/))
46
+ * - `boost-exact:false` Do not boost exact matches, defaults to `true`
47
+ * - `score-effect:14` Set the effect that package scores have for the final search score, defaults to `15.3`
48
+ * - `quality-weight:1` Set the weight that quality has for the each package score, defaults to `1.95`
49
+ * - `popularity-weight:1` Set the weight that popularity has for the each package score, defaults to `3.3`
50
+ * - `maintenance-weight:1` Set the weight that the quality has for the each package score, defaults to `2.05`
51
+ * @param options Additional search options
52
+ * @see https://api-docs.npms.io/#api-Search-ExecuteSearchQuery
53
+ */
54
+ searchPackage(query_1) {
55
+ return __awaiter(this, arguments, void 0, function* (query, options = {}) {
56
+ const endpoint = Endpoints_1.Endpoint.Search.search();
57
+ const params = Object.assign(Object.assign({
58
+ // eslint-disable-next-line id-length
59
+ q: query }, (options.from && { from: options.from })), (options.size && { size: options.size }));
60
+ const { data } = yield this.apiClient.get(endpoint, { params });
61
+ return data;
62
+ });
63
+ }
64
+ }
65
+ exports.SearchAPI = SearchAPI;
@@ -0,0 +1,2 @@
1
+ export * from './PackageAPI';
2
+ export * from './SearchAPI';
@@ -0,0 +1,18 @@
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("./PackageAPI"), exports);
18
+ __exportStar(require("./SearchAPI"), exports);
@@ -0,0 +1,3 @@
1
+ export * from './api/';
2
+ export * from './interfaces/';
3
+ export * from './NpmsIO';
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
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("./interfaces/"), exports);
19
+ __exportStar(require("./NpmsIO"), exports);
@@ -0,0 +1,5 @@
1
+ import { PackageAPI, SearchAPI } from '../api/';
2
+ export interface API {
3
+ package: PackageAPI;
4
+ search: SearchAPI;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface ClientOptions {
2
+ apiUrl?: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,151 @@
1
+ export interface Badge {
2
+ info: Info;
3
+ urls: Urls;
4
+ }
5
+ export interface Collected {
6
+ github?: GitHub;
7
+ metadata: Metadata;
8
+ npm: Npm;
9
+ source?: Source;
10
+ }
11
+ export interface Error {
12
+ code: string;
13
+ message: string;
14
+ }
15
+ export interface Evaluation {
16
+ maintenance: Maintenance;
17
+ popularity: Popularity;
18
+ quality: Quality;
19
+ }
20
+ export interface PackageInfo {
21
+ /** The date in which the package was last analyzed */
22
+ analyzedAt: string;
23
+ /** The collected information from all sources */
24
+ collected: Collected;
25
+ /** The error associated with the last analyze attempt */
26
+ error?: Error;
27
+ /** The package evaluation */
28
+ evaluation: Evaluation;
29
+ /** The package score */
30
+ score: Score;
31
+ }
32
+ export interface Score {
33
+ detail: Detail;
34
+ final: number;
35
+ }
36
+ interface Contributor {
37
+ commitsCount: number;
38
+ username: string;
39
+ }
40
+ interface Detail {
41
+ maintenance: number;
42
+ popularity: number;
43
+ quality: number;
44
+ }
45
+ interface Files {
46
+ hasChangelog: boolean;
47
+ readmeSize: number;
48
+ testsSize: number;
49
+ }
50
+ interface GitHub {
51
+ commits: Release[];
52
+ contributors: Contributor[];
53
+ forksCount: number;
54
+ homepage?: string;
55
+ issues: Issues;
56
+ starsCount: number;
57
+ statuses: Status[];
58
+ subscribersCount: number;
59
+ }
60
+ interface Info {
61
+ modifiers?: Modifiers;
62
+ service: string;
63
+ type: string;
64
+ }
65
+ interface Issues {
66
+ count: number;
67
+ distribution: Record<string, number>;
68
+ isDisabled: boolean;
69
+ openCount: number;
70
+ }
71
+ interface Links {
72
+ bugs?: string;
73
+ homepage?: string;
74
+ npm: string;
75
+ repository?: string;
76
+ }
77
+ interface Maintenance {
78
+ commitsFrequency: number;
79
+ issuesDistribution: number;
80
+ openIssues: number;
81
+ releasesFrequency: number;
82
+ }
83
+ interface Metadata {
84
+ date: string;
85
+ dependencies: Record<string, string>;
86
+ description: string;
87
+ hasSelectiveFiles?: boolean;
88
+ hasTestScript?: boolean;
89
+ keywords: string[];
90
+ license: string;
91
+ links: Links;
92
+ maintainers: Publisher[];
93
+ name: string;
94
+ publisher: Publisher;
95
+ readme?: string;
96
+ releases: Release[];
97
+ repository: Repository;
98
+ scope: string;
99
+ version: string;
100
+ }
101
+ interface Modifiers {
102
+ type: string;
103
+ }
104
+ interface Npm {
105
+ dependentsCount: number;
106
+ downloads: Release[];
107
+ starsCount: number;
108
+ }
109
+ interface Popularity {
110
+ communityInterest: number;
111
+ dependentsCount: number;
112
+ downloadsAcceleration: number;
113
+ downloadsCount: number;
114
+ }
115
+ interface Publisher {
116
+ email?: string;
117
+ username: string;
118
+ }
119
+ interface Quality {
120
+ branding: number;
121
+ carefulness: number;
122
+ health: number;
123
+ tests: number;
124
+ }
125
+ interface Release {
126
+ count: number;
127
+ from: string;
128
+ to: string;
129
+ }
130
+ interface Repository {
131
+ directory: string;
132
+ type?: string;
133
+ url: string;
134
+ }
135
+ interface Source {
136
+ badges: Badge[];
137
+ coverage: number;
138
+ files: Files;
139
+ linters: string[];
140
+ }
141
+ interface Status {
142
+ context: string;
143
+ state: string;
144
+ }
145
+ interface Urls {
146
+ content: string;
147
+ original: string;
148
+ service?: string;
149
+ shields: string;
150
+ }
151
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ export interface SearchOptions extends SuggestionsOptions {
2
+ /**
3
+ * The offset in which to start searching from (max of 5000)
4
+ *
5
+ * Default value: `0`
6
+ */
7
+ from?: string;
8
+ /**
9
+ * The total number of results to return (max of 250)
10
+ *
11
+ * Default value: `25`
12
+ */
13
+ size?: string;
14
+ }
15
+ export interface SuggestionsOptions {
16
+ /**
17
+ * The total number of results to return (max of 100)
18
+ *
19
+ * Default value: `25`
20
+ */
21
+ size?: string;
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,62 @@
1
+ export interface Author {
2
+ email?: string;
3
+ name: string;
4
+ url?: string;
5
+ username?: string;
6
+ }
7
+ export interface Flags {
8
+ deprecated?: boolean;
9
+ insecure?: boolean;
10
+ unstable?: boolean;
11
+ }
12
+ export interface Package {
13
+ author?: Author;
14
+ date: string;
15
+ description: string;
16
+ keywords?: string[];
17
+ links: Links;
18
+ maintainers: Publisher[];
19
+ name: string;
20
+ publisher: Publisher;
21
+ scope: string;
22
+ version: string;
23
+ }
24
+ export interface Publisher {
25
+ email: string;
26
+ username: string;
27
+ }
28
+ export interface Result {
29
+ /** The package flags (deprecated, unstable, insecure) */
30
+ flags?: Flags;
31
+ /** The package data which contains the name, version and other useful information */
32
+ package: Package;
33
+ /** The package score */
34
+ score: Score;
35
+ /** The computed search score (from Elasticsearch) */
36
+ searchScore: number;
37
+ }
38
+ export interface SearchResult {
39
+ results: Result[];
40
+ total: number;
41
+ }
42
+ export interface SuggestionResult extends Result {
43
+ /** A string containing highlighted matched text */
44
+ highlight?: string;
45
+ }
46
+ export type SuggestionsResult = SuggestionResult[];
47
+ interface Detail {
48
+ maintenance: number;
49
+ popularity: number;
50
+ quality: number;
51
+ }
52
+ interface Links {
53
+ bugs?: string;
54
+ homepage?: string;
55
+ npm: string;
56
+ repository?: string;
57
+ }
58
+ interface Score {
59
+ detail: Detail;
60
+ final: number;
61
+ }
62
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export * from './API';
2
+ export * from './ClientOptions';
3
+ export * from './PackageInfo';
4
+ export * from './SearchOptions';
5
+ export * from './SearchResult';
@@ -0,0 +1,21 @@
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("./ClientOptions"), exports);
19
+ __exportStar(require("./PackageInfo"), exports);
20
+ __exportStar(require("./SearchOptions"), exports);
21
+ __exportStar(require("./SearchResult"), exports);
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "author": "Florian Imdahl <git@ffflorian.de>",
3
3
  "dependencies": {
4
- "@ffflorian/api-client": "2.5.0"
4
+ "@ffflorian/api-client": "2.5.1"
5
5
  },
6
6
  "description": "A npms.io API client",
7
7
  "devDependencies": {
8
8
  "@types/node": "~24",
9
+ "nock": "14.0.12",
9
10
  "rimraf": "6.1.3",
10
- "typedoc": "0.28.18",
11
- "typescript": "6.0.2"
11
+ "typedoc": "0.28.19",
12
+ "typescript": "6.0.3",
13
+ "vitest": "4.1.4"
12
14
  },
13
15
  "engines": {
14
16
  "node": ">= 21"
@@ -29,11 +31,12 @@
29
31
  "readme": "https://github.com/ffflorian/api-clients#readme",
30
32
  "repository": "https://github.com/ffflorian/api-clients.git",
31
33
  "scripts": {
34
+ "build": "yarn build:ts",
32
35
  "build:ts": "tsc -p tsconfig.build.json",
33
36
  "build:docs": "typedoc --tsconfig tsconfig.build.json --options ../../typedoc.json --out ../../docs/packages/npms.io src/index.ts",
34
37
  "clean": "rimraf dist",
35
- "dist": "yarn clean && yarn build:ts",
36
- "test": "exit 0"
38
+ "dist": "yarn clean && yarn build",
39
+ "test": "vitest run"
37
40
  },
38
- "version": "2.4.6"
41
+ "version": "2.5.0"
39
42
  }