@stockfind/twelve-data 0.1.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 +15 -0
- package/dist/index.cjs +83 -0
- package/dist/index.d.cts +108 -0
- package/dist/index.d.mts +108 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.mjs +80 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @stockfind/twelve-data
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for the [Twelve Data](https://twelvedata.com) financial API.
|
|
4
|
+
|
|
5
|
+
## Planned Features
|
|
6
|
+
|
|
7
|
+
- Full coverage of 60+ REST endpoints (market data, fundamentals, analysis, technical indicators, etc.)
|
|
8
|
+
- Real-time price streaming via WebSocket
|
|
9
|
+
- Fully typed request/response interfaces
|
|
10
|
+
- Zero runtime dependencies (native `fetch`)
|
|
11
|
+
- Namespaced API design (`td.marketData.*`, `td.fundamentals.*`, `td.technicalIndicators.*`)
|
|
12
|
+
|
|
13
|
+
## Research
|
|
14
|
+
|
|
15
|
+
Design docs and API reference are stored as a Claude Code skill in `.claude/skills/twelve-data-sdk/`.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class MarketDataEndpoints {
|
|
4
|
+
constructor(http) {
|
|
5
|
+
this.http = http;
|
|
6
|
+
}
|
|
7
|
+
timeSeries(params) {
|
|
8
|
+
return this.http.get("/time_series", params);
|
|
9
|
+
}
|
|
10
|
+
quote(params) {
|
|
11
|
+
return this.http.get("/quote", params);
|
|
12
|
+
}
|
|
13
|
+
price(params) {
|
|
14
|
+
return this.http.get("/price", params);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class TwelveDataError extends Error {
|
|
19
|
+
code;
|
|
20
|
+
status;
|
|
21
|
+
constructor(message, code) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = "TwelveDataError";
|
|
24
|
+
this.code = code;
|
|
25
|
+
this.status = "error";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
class HttpClient {
|
|
30
|
+
baseUrl;
|
|
31
|
+
apiKey;
|
|
32
|
+
timeout;
|
|
33
|
+
constructor(apiKey, baseUrl, timeout) {
|
|
34
|
+
this.apiKey = apiKey;
|
|
35
|
+
this.baseUrl = baseUrl;
|
|
36
|
+
this.timeout = timeout;
|
|
37
|
+
}
|
|
38
|
+
async get(path, params = {}) {
|
|
39
|
+
const url = new URL(path, this.baseUrl);
|
|
40
|
+
for (const [key, value] of Object.entries(
|
|
41
|
+
params
|
|
42
|
+
)) {
|
|
43
|
+
if (value !== void 0) {
|
|
44
|
+
url.searchParams.set(key, String(value));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const controller = new AbortController();
|
|
48
|
+
const timer = setTimeout(() => controller.abort(), this.timeout);
|
|
49
|
+
let response;
|
|
50
|
+
try {
|
|
51
|
+
response = await fetch(url.toString(), {
|
|
52
|
+
headers: { Authorization: `apikey ${this.apiKey}` },
|
|
53
|
+
signal: controller.signal
|
|
54
|
+
});
|
|
55
|
+
} finally {
|
|
56
|
+
clearTimeout(timer);
|
|
57
|
+
}
|
|
58
|
+
const body = await response.json();
|
|
59
|
+
if (body.status === "error") {
|
|
60
|
+
throw new TwelveDataError(
|
|
61
|
+
body.message ?? "Unknown error",
|
|
62
|
+
body.code ?? response.status
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
return body;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
class TwelveData {
|
|
70
|
+
marketData;
|
|
71
|
+
http;
|
|
72
|
+
constructor(config) {
|
|
73
|
+
this.http = new HttpClient(
|
|
74
|
+
config.apiKey,
|
|
75
|
+
config.baseUrl ?? "https://api.twelvedata.com",
|
|
76
|
+
config.timeout ?? 3e4
|
|
77
|
+
);
|
|
78
|
+
this.marketData = new MarketDataEndpoints(this.http);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
exports.TwelveData = TwelveData;
|
|
83
|
+
exports.TwelveDataError = TwelveDataError;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
declare class HttpClient {
|
|
2
|
+
private baseUrl;
|
|
3
|
+
private apiKey;
|
|
4
|
+
private timeout;
|
|
5
|
+
constructor(apiKey: string, baseUrl: string, timeout: number);
|
|
6
|
+
get<T>(path: string, params?: object): Promise<T>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type Interval = "1min" | "5min" | "15min" | "30min" | "45min" | "1h" | "2h" | "4h" | "1day" | "1week" | "1month";
|
|
10
|
+
interface TwelveDataConfig {
|
|
11
|
+
apiKey: string;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface TimeSeriesParams {
|
|
17
|
+
symbol: string;
|
|
18
|
+
interval: Interval;
|
|
19
|
+
outputsize?: number;
|
|
20
|
+
start_date?: string;
|
|
21
|
+
end_date?: string;
|
|
22
|
+
timezone?: string;
|
|
23
|
+
format?: "JSON" | "CSV";
|
|
24
|
+
}
|
|
25
|
+
interface TimeSeriesValue {
|
|
26
|
+
datetime: string;
|
|
27
|
+
open: string;
|
|
28
|
+
high: string;
|
|
29
|
+
low: string;
|
|
30
|
+
close: string;
|
|
31
|
+
volume?: string;
|
|
32
|
+
}
|
|
33
|
+
interface TimeSeriesResponse {
|
|
34
|
+
meta: {
|
|
35
|
+
symbol: string;
|
|
36
|
+
interval: string;
|
|
37
|
+
currency: string;
|
|
38
|
+
exchange_timezone: string;
|
|
39
|
+
exchange: string;
|
|
40
|
+
mic_code: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
values: TimeSeriesValue[];
|
|
44
|
+
status: string;
|
|
45
|
+
}
|
|
46
|
+
interface QuoteParams {
|
|
47
|
+
symbol: string;
|
|
48
|
+
interval?: Interval;
|
|
49
|
+
eod?: boolean;
|
|
50
|
+
rolling_period?: number;
|
|
51
|
+
}
|
|
52
|
+
interface QuoteResponse {
|
|
53
|
+
symbol: string;
|
|
54
|
+
name: string;
|
|
55
|
+
exchange: string;
|
|
56
|
+
mic_code: string;
|
|
57
|
+
currency: string;
|
|
58
|
+
datetime: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
open: string;
|
|
61
|
+
high: string;
|
|
62
|
+
low: string;
|
|
63
|
+
close: string;
|
|
64
|
+
volume: string;
|
|
65
|
+
previous_close: string;
|
|
66
|
+
change: string;
|
|
67
|
+
percent_change: string;
|
|
68
|
+
average_volume: string;
|
|
69
|
+
is_market_open: boolean;
|
|
70
|
+
fifty_two_week: {
|
|
71
|
+
low: string;
|
|
72
|
+
high: string;
|
|
73
|
+
low_change: string;
|
|
74
|
+
high_change: string;
|
|
75
|
+
low_change_percent: string;
|
|
76
|
+
high_change_percent: string;
|
|
77
|
+
range: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
interface PriceParams {
|
|
81
|
+
symbol: string;
|
|
82
|
+
format?: "JSON" | "CSV";
|
|
83
|
+
}
|
|
84
|
+
interface PriceResponse {
|
|
85
|
+
price: string;
|
|
86
|
+
}
|
|
87
|
+
declare class MarketDataEndpoints {
|
|
88
|
+
private http;
|
|
89
|
+
constructor(http: HttpClient);
|
|
90
|
+
timeSeries(params: TimeSeriesParams): Promise<TimeSeriesResponse>;
|
|
91
|
+
quote(params: QuoteParams): Promise<QuoteResponse>;
|
|
92
|
+
price(params: PriceParams): Promise<PriceResponse>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare class TwelveData {
|
|
96
|
+
readonly marketData: MarketDataEndpoints;
|
|
97
|
+
private http;
|
|
98
|
+
constructor(config: TwelveDataConfig);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class TwelveDataError extends Error {
|
|
102
|
+
code: number;
|
|
103
|
+
status: "error";
|
|
104
|
+
constructor(message: string, code: number);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { TwelveData, TwelveDataError };
|
|
108
|
+
export type { Interval, PriceParams, PriceResponse, QuoteParams, QuoteResponse, TimeSeriesParams, TimeSeriesResponse, TimeSeriesValue, TwelveDataConfig };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
declare class HttpClient {
|
|
2
|
+
private baseUrl;
|
|
3
|
+
private apiKey;
|
|
4
|
+
private timeout;
|
|
5
|
+
constructor(apiKey: string, baseUrl: string, timeout: number);
|
|
6
|
+
get<T>(path: string, params?: object): Promise<T>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type Interval = "1min" | "5min" | "15min" | "30min" | "45min" | "1h" | "2h" | "4h" | "1day" | "1week" | "1month";
|
|
10
|
+
interface TwelveDataConfig {
|
|
11
|
+
apiKey: string;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface TimeSeriesParams {
|
|
17
|
+
symbol: string;
|
|
18
|
+
interval: Interval;
|
|
19
|
+
outputsize?: number;
|
|
20
|
+
start_date?: string;
|
|
21
|
+
end_date?: string;
|
|
22
|
+
timezone?: string;
|
|
23
|
+
format?: "JSON" | "CSV";
|
|
24
|
+
}
|
|
25
|
+
interface TimeSeriesValue {
|
|
26
|
+
datetime: string;
|
|
27
|
+
open: string;
|
|
28
|
+
high: string;
|
|
29
|
+
low: string;
|
|
30
|
+
close: string;
|
|
31
|
+
volume?: string;
|
|
32
|
+
}
|
|
33
|
+
interface TimeSeriesResponse {
|
|
34
|
+
meta: {
|
|
35
|
+
symbol: string;
|
|
36
|
+
interval: string;
|
|
37
|
+
currency: string;
|
|
38
|
+
exchange_timezone: string;
|
|
39
|
+
exchange: string;
|
|
40
|
+
mic_code: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
values: TimeSeriesValue[];
|
|
44
|
+
status: string;
|
|
45
|
+
}
|
|
46
|
+
interface QuoteParams {
|
|
47
|
+
symbol: string;
|
|
48
|
+
interval?: Interval;
|
|
49
|
+
eod?: boolean;
|
|
50
|
+
rolling_period?: number;
|
|
51
|
+
}
|
|
52
|
+
interface QuoteResponse {
|
|
53
|
+
symbol: string;
|
|
54
|
+
name: string;
|
|
55
|
+
exchange: string;
|
|
56
|
+
mic_code: string;
|
|
57
|
+
currency: string;
|
|
58
|
+
datetime: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
open: string;
|
|
61
|
+
high: string;
|
|
62
|
+
low: string;
|
|
63
|
+
close: string;
|
|
64
|
+
volume: string;
|
|
65
|
+
previous_close: string;
|
|
66
|
+
change: string;
|
|
67
|
+
percent_change: string;
|
|
68
|
+
average_volume: string;
|
|
69
|
+
is_market_open: boolean;
|
|
70
|
+
fifty_two_week: {
|
|
71
|
+
low: string;
|
|
72
|
+
high: string;
|
|
73
|
+
low_change: string;
|
|
74
|
+
high_change: string;
|
|
75
|
+
low_change_percent: string;
|
|
76
|
+
high_change_percent: string;
|
|
77
|
+
range: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
interface PriceParams {
|
|
81
|
+
symbol: string;
|
|
82
|
+
format?: "JSON" | "CSV";
|
|
83
|
+
}
|
|
84
|
+
interface PriceResponse {
|
|
85
|
+
price: string;
|
|
86
|
+
}
|
|
87
|
+
declare class MarketDataEndpoints {
|
|
88
|
+
private http;
|
|
89
|
+
constructor(http: HttpClient);
|
|
90
|
+
timeSeries(params: TimeSeriesParams): Promise<TimeSeriesResponse>;
|
|
91
|
+
quote(params: QuoteParams): Promise<QuoteResponse>;
|
|
92
|
+
price(params: PriceParams): Promise<PriceResponse>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare class TwelveData {
|
|
96
|
+
readonly marketData: MarketDataEndpoints;
|
|
97
|
+
private http;
|
|
98
|
+
constructor(config: TwelveDataConfig);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class TwelveDataError extends Error {
|
|
102
|
+
code: number;
|
|
103
|
+
status: "error";
|
|
104
|
+
constructor(message: string, code: number);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { TwelveData, TwelveDataError };
|
|
108
|
+
export type { Interval, PriceParams, PriceResponse, QuoteParams, QuoteResponse, TimeSeriesParams, TimeSeriesResponse, TimeSeriesValue, TwelveDataConfig };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
declare class HttpClient {
|
|
2
|
+
private baseUrl;
|
|
3
|
+
private apiKey;
|
|
4
|
+
private timeout;
|
|
5
|
+
constructor(apiKey: string, baseUrl: string, timeout: number);
|
|
6
|
+
get<T>(path: string, params?: object): Promise<T>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type Interval = "1min" | "5min" | "15min" | "30min" | "45min" | "1h" | "2h" | "4h" | "1day" | "1week" | "1month";
|
|
10
|
+
interface TwelveDataConfig {
|
|
11
|
+
apiKey: string;
|
|
12
|
+
baseUrl?: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface TimeSeriesParams {
|
|
17
|
+
symbol: string;
|
|
18
|
+
interval: Interval;
|
|
19
|
+
outputsize?: number;
|
|
20
|
+
start_date?: string;
|
|
21
|
+
end_date?: string;
|
|
22
|
+
timezone?: string;
|
|
23
|
+
format?: "JSON" | "CSV";
|
|
24
|
+
}
|
|
25
|
+
interface TimeSeriesValue {
|
|
26
|
+
datetime: string;
|
|
27
|
+
open: string;
|
|
28
|
+
high: string;
|
|
29
|
+
low: string;
|
|
30
|
+
close: string;
|
|
31
|
+
volume?: string;
|
|
32
|
+
}
|
|
33
|
+
interface TimeSeriesResponse {
|
|
34
|
+
meta: {
|
|
35
|
+
symbol: string;
|
|
36
|
+
interval: string;
|
|
37
|
+
currency: string;
|
|
38
|
+
exchange_timezone: string;
|
|
39
|
+
exchange: string;
|
|
40
|
+
mic_code: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
values: TimeSeriesValue[];
|
|
44
|
+
status: string;
|
|
45
|
+
}
|
|
46
|
+
interface QuoteParams {
|
|
47
|
+
symbol: string;
|
|
48
|
+
interval?: Interval;
|
|
49
|
+
eod?: boolean;
|
|
50
|
+
rolling_period?: number;
|
|
51
|
+
}
|
|
52
|
+
interface QuoteResponse {
|
|
53
|
+
symbol: string;
|
|
54
|
+
name: string;
|
|
55
|
+
exchange: string;
|
|
56
|
+
mic_code: string;
|
|
57
|
+
currency: string;
|
|
58
|
+
datetime: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
open: string;
|
|
61
|
+
high: string;
|
|
62
|
+
low: string;
|
|
63
|
+
close: string;
|
|
64
|
+
volume: string;
|
|
65
|
+
previous_close: string;
|
|
66
|
+
change: string;
|
|
67
|
+
percent_change: string;
|
|
68
|
+
average_volume: string;
|
|
69
|
+
is_market_open: boolean;
|
|
70
|
+
fifty_two_week: {
|
|
71
|
+
low: string;
|
|
72
|
+
high: string;
|
|
73
|
+
low_change: string;
|
|
74
|
+
high_change: string;
|
|
75
|
+
low_change_percent: string;
|
|
76
|
+
high_change_percent: string;
|
|
77
|
+
range: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
interface PriceParams {
|
|
81
|
+
symbol: string;
|
|
82
|
+
format?: "JSON" | "CSV";
|
|
83
|
+
}
|
|
84
|
+
interface PriceResponse {
|
|
85
|
+
price: string;
|
|
86
|
+
}
|
|
87
|
+
declare class MarketDataEndpoints {
|
|
88
|
+
private http;
|
|
89
|
+
constructor(http: HttpClient);
|
|
90
|
+
timeSeries(params: TimeSeriesParams): Promise<TimeSeriesResponse>;
|
|
91
|
+
quote(params: QuoteParams): Promise<QuoteResponse>;
|
|
92
|
+
price(params: PriceParams): Promise<PriceResponse>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare class TwelveData {
|
|
96
|
+
readonly marketData: MarketDataEndpoints;
|
|
97
|
+
private http;
|
|
98
|
+
constructor(config: TwelveDataConfig);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class TwelveDataError extends Error {
|
|
102
|
+
code: number;
|
|
103
|
+
status: "error";
|
|
104
|
+
constructor(message: string, code: number);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { TwelveData, TwelveDataError };
|
|
108
|
+
export type { Interval, PriceParams, PriceResponse, QuoteParams, QuoteResponse, TimeSeriesParams, TimeSeriesResponse, TimeSeriesValue, TwelveDataConfig };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
class MarketDataEndpoints {
|
|
2
|
+
constructor(http) {
|
|
3
|
+
this.http = http;
|
|
4
|
+
}
|
|
5
|
+
timeSeries(params) {
|
|
6
|
+
return this.http.get("/time_series", params);
|
|
7
|
+
}
|
|
8
|
+
quote(params) {
|
|
9
|
+
return this.http.get("/quote", params);
|
|
10
|
+
}
|
|
11
|
+
price(params) {
|
|
12
|
+
return this.http.get("/price", params);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class TwelveDataError extends Error {
|
|
17
|
+
code;
|
|
18
|
+
status;
|
|
19
|
+
constructor(message, code) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.name = "TwelveDataError";
|
|
22
|
+
this.code = code;
|
|
23
|
+
this.status = "error";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
class HttpClient {
|
|
28
|
+
baseUrl;
|
|
29
|
+
apiKey;
|
|
30
|
+
timeout;
|
|
31
|
+
constructor(apiKey, baseUrl, timeout) {
|
|
32
|
+
this.apiKey = apiKey;
|
|
33
|
+
this.baseUrl = baseUrl;
|
|
34
|
+
this.timeout = timeout;
|
|
35
|
+
}
|
|
36
|
+
async get(path, params = {}) {
|
|
37
|
+
const url = new URL(path, this.baseUrl);
|
|
38
|
+
for (const [key, value] of Object.entries(
|
|
39
|
+
params
|
|
40
|
+
)) {
|
|
41
|
+
if (value !== void 0) {
|
|
42
|
+
url.searchParams.set(key, String(value));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const controller = new AbortController();
|
|
46
|
+
const timer = setTimeout(() => controller.abort(), this.timeout);
|
|
47
|
+
let response;
|
|
48
|
+
try {
|
|
49
|
+
response = await fetch(url.toString(), {
|
|
50
|
+
headers: { Authorization: `apikey ${this.apiKey}` },
|
|
51
|
+
signal: controller.signal
|
|
52
|
+
});
|
|
53
|
+
} finally {
|
|
54
|
+
clearTimeout(timer);
|
|
55
|
+
}
|
|
56
|
+
const body = await response.json();
|
|
57
|
+
if (body.status === "error") {
|
|
58
|
+
throw new TwelveDataError(
|
|
59
|
+
body.message ?? "Unknown error",
|
|
60
|
+
body.code ?? response.status
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return body;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class TwelveData {
|
|
68
|
+
marketData;
|
|
69
|
+
http;
|
|
70
|
+
constructor(config) {
|
|
71
|
+
this.http = new HttpClient(
|
|
72
|
+
config.apiKey,
|
|
73
|
+
config.baseUrl ?? "https://api.twelvedata.com",
|
|
74
|
+
config.timeout ?? 3e4
|
|
75
|
+
);
|
|
76
|
+
this.marketData = new MarketDataEndpoints(this.http);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export { TwelveData, TwelveDataError };
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stockfind/twelve-data",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "TypeScript SDK for the Twelve Data financial API",
|
|
6
|
+
"author": "Ru Chern CHONG <ruchern.chong@stockfind.app>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"main": "./dist/index.cjs",
|
|
9
|
+
"module": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
15
|
+
"default": "./dist/index.mjs"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/index.d.cts",
|
|
19
|
+
"default": "./dist/index.cjs"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@biomejs/biome": "^2.4.6",
|
|
28
|
+
"@commitlint/cli": "^20.4.3",
|
|
29
|
+
"@commitlint/config-conventional": "^20.4.3",
|
|
30
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
31
|
+
"@semantic-release/git": "^10.0.1",
|
|
32
|
+
"husky": "^9.1.7",
|
|
33
|
+
"lint-staged": "^16.3.2",
|
|
34
|
+
"semantic-release": "^25.0.3",
|
|
35
|
+
"typescript": "^5.9.3",
|
|
36
|
+
"unbuild": "^3.6.1"
|
|
37
|
+
},
|
|
38
|
+
"lint-staged": {
|
|
39
|
+
"*": [
|
|
40
|
+
"biome check --write --no-errors-on-unmatched"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "unbuild",
|
|
45
|
+
"check": "biome check",
|
|
46
|
+
"format": "biome check --write",
|
|
47
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
48
|
+
}
|
|
49
|
+
}
|