@b10cks/client 0.9.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/LICENSE +21 -0
- package/dist/index.d.ts +172 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +46 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present – Coder's Cantina e.U.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
export declare class ApiClient {
|
|
2
|
+
private readonly baseUrl;
|
|
3
|
+
private readonly token;
|
|
4
|
+
private readonly vid;
|
|
5
|
+
private rv;
|
|
6
|
+
private readonly fetchClient;
|
|
7
|
+
constructor(options: B10cksApiClientOptions, url: URL);
|
|
8
|
+
get<T>(endpoint: Endpoint, params?: Omit<IBBaseQueryParams, 'token'>): Promise<T>;
|
|
9
|
+
getAll<T>(endpoint: Endpoint, params?: Omit<IBBaseQueryParams, 'token'>): Promise<T[]>;
|
|
10
|
+
private buildUrl;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare interface B10cksApiClientOptions {
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
token: string;
|
|
16
|
+
version?: 'draft' | 'published';
|
|
17
|
+
fetchClient: FetchClient;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare type Endpoint = 'blocks' | 'contents' | `contents/${string}` | `datasources/${string}/entries` | 'datasources' | 'spaces/me';
|
|
21
|
+
|
|
22
|
+
export declare type FetchClient = typeof fetch;
|
|
23
|
+
|
|
24
|
+
declare interface IBBaseQueryParams extends IBPaginationParams, IBSortParams {
|
|
25
|
+
vid?: string;
|
|
26
|
+
version?: string;
|
|
27
|
+
token: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare interface IBBlock {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
slug: string;
|
|
34
|
+
schema: string;
|
|
35
|
+
tags: string[] | null;
|
|
36
|
+
created_at: string;
|
|
37
|
+
updated_at: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare interface IBCollectionResponse<T> {
|
|
41
|
+
data: T[];
|
|
42
|
+
links: {
|
|
43
|
+
first: string | null;
|
|
44
|
+
last: string | null;
|
|
45
|
+
prev: string | null;
|
|
46
|
+
next: string | null;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export declare interface IBContent<Content = IBContentBlock<string> & {
|
|
51
|
+
[index: string]: unknown;
|
|
52
|
+
}> {
|
|
53
|
+
id: string;
|
|
54
|
+
slug: string;
|
|
55
|
+
name: string;
|
|
56
|
+
content: Content;
|
|
57
|
+
type: string;
|
|
58
|
+
parent_id: string | null;
|
|
59
|
+
full_slug: string;
|
|
60
|
+
language_iso: string;
|
|
61
|
+
published_at: string | null;
|
|
62
|
+
created_at: string;
|
|
63
|
+
updated_at: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare interface IBContentBlock<T extends string> {
|
|
67
|
+
id?: string;
|
|
68
|
+
block?: T;
|
|
69
|
+
_editable?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare interface IBContentQueryParams extends IBBaseQueryParams {
|
|
73
|
+
slug?: string;
|
|
74
|
+
full_slug?: string;
|
|
75
|
+
language_iso?: string;
|
|
76
|
+
type?: string;
|
|
77
|
+
parent_id?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare interface IBContentRelation {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
slug: string;
|
|
84
|
+
full_slug: string;
|
|
85
|
+
language_iso: string;
|
|
86
|
+
published_at: string | null;
|
|
87
|
+
created_at: string;
|
|
88
|
+
updated_at: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare interface IBDataEntry {
|
|
92
|
+
id: string;
|
|
93
|
+
key: string;
|
|
94
|
+
value: string;
|
|
95
|
+
updated_at: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare interface IBDataSource {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
slug: string;
|
|
102
|
+
dimensions: string[] | null;
|
|
103
|
+
created_at: string;
|
|
104
|
+
updated_at: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare interface IBMeta {
|
|
108
|
+
current_page: number;
|
|
109
|
+
from: number;
|
|
110
|
+
last_page: number;
|
|
111
|
+
links: IBMetaLink[];
|
|
112
|
+
path: string;
|
|
113
|
+
per_page: number;
|
|
114
|
+
to: number;
|
|
115
|
+
total: number;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare interface IBMetaLink {
|
|
119
|
+
url: string | null;
|
|
120
|
+
label: string | null;
|
|
121
|
+
active: boolean;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare interface IBPaginationParams {
|
|
125
|
+
page?: number;
|
|
126
|
+
per_page?: number;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare interface IBRedirect {
|
|
130
|
+
source: string;
|
|
131
|
+
target: string;
|
|
132
|
+
status_code: number;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export declare interface IBResponse<T> {
|
|
136
|
+
data: T;
|
|
137
|
+
rv?: string | number;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
declare interface IBSortParams {
|
|
141
|
+
sort?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
declare interface IBSpace {
|
|
145
|
+
id: string;
|
|
146
|
+
name: string;
|
|
147
|
+
updated_at: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare namespace types {
|
|
151
|
+
export {
|
|
152
|
+
IBResponse,
|
|
153
|
+
IBCollectionResponse,
|
|
154
|
+
IBMetaLink,
|
|
155
|
+
IBMeta,
|
|
156
|
+
IBContentRelation,
|
|
157
|
+
IBContent,
|
|
158
|
+
IBContentBlock,
|
|
159
|
+
IBDataEntry,
|
|
160
|
+
IBPaginationParams,
|
|
161
|
+
IBSortParams,
|
|
162
|
+
IBBaseQueryParams,
|
|
163
|
+
IBBlock,
|
|
164
|
+
IBDataSource,
|
|
165
|
+
IBSpace,
|
|
166
|
+
IBRedirect,
|
|
167
|
+
IBContentQueryParams,
|
|
168
|
+
B10cksApiClientOptions
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export { }
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));class c{baseUrl;token;vid;rv=0;fetchClient;constructor(e,s){this.baseUrl=e.baseUrl.endsWith("/")?e.baseUrl.slice(0,-1):e.baseUrl,this.token=e.token,this.fetchClient=e.fetchClient,this.vid=s.searchParams.get("b10cks_vid")||e.version||"published",this.rv=s.searchParams.get("b10cks_rv")??this.rv}async get(e,s={}){const t=this.buildUrl(e,{vid:this.vid,...s,rv:this.rv,token:this.token}),r=await this.fetchClient(t);return r.rv&&(this.rv=r.rv),r}async getAll(e,s={}){const t=await this.get(e,{...s,page:1});if(!t.meta||t.meta.last_page<=1)return"data"in t?t.data:t;const r=Array.from({length:t.meta.last_page},(i,l)=>this.get(e,{...s,page:l+1}));return(await Promise.all(r)).flatMap(i=>i.data)}buildUrl(e,s){const t=new URL(`${this.baseUrl}/v1/${e}`);return Object.entries(s).forEach(([r,a])=>{a!=null&&t.searchParams.append(r,String(a))}),t.toString()}}exports.ApiClient=c;exports.types=n;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { B10cksApiClientOptions, IBBaseQueryParams, IBCollectionResponse, IBMeta, IBResponse, } from './types'\n\nexport type FetchClient = typeof fetch\nexport type Endpoint = 'blocks' | 'contents' | `contents/${string}` | `datasources/${string}/entries` | 'datasources' | 'spaces/me'\n\nexport * as types from './types'\nexport type { IBBlock, IBResponse, IBContent, B10cksApiClientOptions } from './types'\n\nexport class ApiClient {\n private readonly baseUrl: string\n private readonly token: string\n private readonly vid: string | null\n private rv: string | number = 0\n private readonly fetchClient: FetchClient\n\n constructor(options: B10cksApiClientOptions, url: URL) {\n this.baseUrl = options.baseUrl.endsWith('/') ? options.baseUrl.slice(0, -1) : options.baseUrl\n this.token = options.token\n this.fetchClient = options.fetchClient\n\n this.vid = url.searchParams.get('b10cks_vid') || options.version || 'published'\n this.rv = url.searchParams.get('b10cks_rv') ?? this.rv\n }\n\n async get<T>(endpoint: Endpoint, params: Omit<IBBaseQueryParams, 'token'> = {}): Promise<T> {\n const url = this.buildUrl(endpoint, {\n vid: this.vid,\n ...params,\n rv: this.rv,\n token: this.token\n })\n\n const response = await this.fetchClient(url) as unknown as IBResponse<T>\n if (response.rv) {\n this.rv = response.rv\n }\n\n return response as T\n }\n\n async getAll<T>(endpoint: Endpoint, params: Omit<IBBaseQueryParams, 'token'> = {}): Promise<T[]> {\n const response = await this.get<IBCollectionResponse<T> & { meta?: IBMeta }>(\n endpoint,\n { ...params, page: 1 }\n )\n\n if (!response.meta || response.meta.last_page <= 1) {\n return 'data' in response ? response.data : (response as unknown as T[])\n }\n\n const pageRequests = Array.from(\n { length: response.meta.last_page },\n (_, i) => this.get<IBCollectionResponse<T>>(endpoint, { ...params, page: i + 1 })\n )\n\n const allResponses = await Promise.all(pageRequests)\n\n return allResponses.flatMap(r => r.data)\n }\n\n private buildUrl(endpoint: string, params: Record<string, unknown>): string {\n const url = new URL(`${this.baseUrl}/v1/${endpoint}`)\n\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n url.searchParams.append(key, String(value))\n }\n })\n\n return url.toString()\n }\n}"],"names":["ApiClient","options","url","endpoint","params","response","pageRequests","_","i","r","key","value"],"mappings":"mLAQO,MAAMA,CAAU,CACJ,QACA,MACA,IACT,GAAsB,EACb,YAEjB,YAAYC,EAAiCC,EAAU,CACrD,KAAK,QAAUD,EAAQ,QAAQ,SAAS,GAAG,EAAIA,EAAQ,QAAQ,MAAM,EAAG,EAAE,EAAIA,EAAQ,QACtF,KAAK,MAAQA,EAAQ,MACrB,KAAK,YAAcA,EAAQ,YAE3B,KAAK,IAAMC,EAAI,aAAa,IAAI,YAAY,GAAKD,EAAQ,SAAW,YACpE,KAAK,GAAKC,EAAI,aAAa,IAAI,WAAW,GAAK,KAAK,EACtD,CAEA,MAAM,IAAOC,EAAoBC,EAA2C,GAAgB,CAC1F,MAAMF,EAAM,KAAK,SAASC,EAAU,CAClC,IAAK,KAAK,IACV,GAAGC,EACH,GAAI,KAAK,GACT,MAAO,KAAK,KAAA,CACb,EAEKC,EAAW,MAAM,KAAK,YAAYH,CAAG,EAC3C,OAAIG,EAAS,KACX,KAAK,GAAKA,EAAS,IAGdA,CACT,CAEA,MAAM,OAAUF,EAAoBC,EAA2C,GAAkB,CAC/F,MAAMC,EAAW,MAAM,KAAK,IAC1BF,EACA,CAAE,GAAGC,EAAQ,KAAM,CAAA,CAAE,EAGvB,GAAI,CAACC,EAAS,MAAQA,EAAS,KAAK,WAAa,EAC/C,MAAO,SAAUA,EAAWA,EAAS,KAAQA,EAG/C,MAAMC,EAAe,MAAM,KACzB,CAAE,OAAQD,EAAS,KAAK,SAAA,EACxB,CAACE,EAAGC,IAAM,KAAK,IAA6BL,EAAU,CAAE,GAAGC,EAAQ,KAAMI,EAAI,CAAA,CAAG,CAAA,EAKlF,OAFqB,MAAM,QAAQ,IAAIF,CAAY,GAE/B,QAAQG,GAAKA,EAAE,IAAI,CACzC,CAEQ,SAASN,EAAkBC,EAAyC,CAC1E,MAAMF,EAAM,IAAI,IAAI,GAAG,KAAK,OAAO,OAAOC,CAAQ,EAAE,EAEpD,cAAO,QAAQC,CAAM,EAAE,QAAQ,CAAC,CAACM,EAAKC,CAAK,IAAM,CACpBA,GAAU,MACnCT,EAAI,aAAa,OAAOQ,EAAK,OAAOC,CAAK,CAAC,CAE9C,CAAC,EAEMT,EAAI,SAAA,CACb,CACF"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2
|
+
__proto__: null
|
|
3
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4
|
+
class h {
|
|
5
|
+
baseUrl;
|
|
6
|
+
token;
|
|
7
|
+
vid;
|
|
8
|
+
rv = 0;
|
|
9
|
+
fetchClient;
|
|
10
|
+
constructor(e, s) {
|
|
11
|
+
this.baseUrl = e.baseUrl.endsWith("/") ? e.baseUrl.slice(0, -1) : e.baseUrl, this.token = e.token, this.fetchClient = e.fetchClient, this.vid = s.searchParams.get("b10cks_vid") || e.version || "published", this.rv = s.searchParams.get("b10cks_rv") ?? this.rv;
|
|
12
|
+
}
|
|
13
|
+
async get(e, s = {}) {
|
|
14
|
+
const t = this.buildUrl(e, {
|
|
15
|
+
vid: this.vid,
|
|
16
|
+
...s,
|
|
17
|
+
rv: this.rv,
|
|
18
|
+
token: this.token
|
|
19
|
+
}), r = await this.fetchClient(t);
|
|
20
|
+
return r.rv && (this.rv = r.rv), r;
|
|
21
|
+
}
|
|
22
|
+
async getAll(e, s = {}) {
|
|
23
|
+
const t = await this.get(
|
|
24
|
+
e,
|
|
25
|
+
{ ...s, page: 1 }
|
|
26
|
+
);
|
|
27
|
+
if (!t.meta || t.meta.last_page <= 1)
|
|
28
|
+
return "data" in t ? t.data : t;
|
|
29
|
+
const r = Array.from(
|
|
30
|
+
{ length: t.meta.last_page },
|
|
31
|
+
(i, l) => this.get(e, { ...s, page: l + 1 })
|
|
32
|
+
);
|
|
33
|
+
return (await Promise.all(r)).flatMap((i) => i.data);
|
|
34
|
+
}
|
|
35
|
+
buildUrl(e, s) {
|
|
36
|
+
const t = new URL(`${this.baseUrl}/v1/${e}`);
|
|
37
|
+
return Object.entries(s).forEach(([r, a]) => {
|
|
38
|
+
a != null && t.searchParams.append(r, String(a));
|
|
39
|
+
}), t.toString();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
h as ApiClient,
|
|
44
|
+
c as types
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import type { B10cksApiClientOptions, IBBaseQueryParams, IBCollectionResponse, IBMeta, IBResponse, } from './types'\n\nexport type FetchClient = typeof fetch\nexport type Endpoint = 'blocks' | 'contents' | `contents/${string}` | `datasources/${string}/entries` | 'datasources' | 'spaces/me'\n\nexport * as types from './types'\nexport type { IBBlock, IBResponse, IBContent, B10cksApiClientOptions } from './types'\n\nexport class ApiClient {\n private readonly baseUrl: string\n private readonly token: string\n private readonly vid: string | null\n private rv: string | number = 0\n private readonly fetchClient: FetchClient\n\n constructor(options: B10cksApiClientOptions, url: URL) {\n this.baseUrl = options.baseUrl.endsWith('/') ? options.baseUrl.slice(0, -1) : options.baseUrl\n this.token = options.token\n this.fetchClient = options.fetchClient\n\n this.vid = url.searchParams.get('b10cks_vid') || options.version || 'published'\n this.rv = url.searchParams.get('b10cks_rv') ?? this.rv\n }\n\n async get<T>(endpoint: Endpoint, params: Omit<IBBaseQueryParams, 'token'> = {}): Promise<T> {\n const url = this.buildUrl(endpoint, {\n vid: this.vid,\n ...params,\n rv: this.rv,\n token: this.token\n })\n\n const response = await this.fetchClient(url) as unknown as IBResponse<T>\n if (response.rv) {\n this.rv = response.rv\n }\n\n return response as T\n }\n\n async getAll<T>(endpoint: Endpoint, params: Omit<IBBaseQueryParams, 'token'> = {}): Promise<T[]> {\n const response = await this.get<IBCollectionResponse<T> & { meta?: IBMeta }>(\n endpoint,\n { ...params, page: 1 }\n )\n\n if (!response.meta || response.meta.last_page <= 1) {\n return 'data' in response ? response.data : (response as unknown as T[])\n }\n\n const pageRequests = Array.from(\n { length: response.meta.last_page },\n (_, i) => this.get<IBCollectionResponse<T>>(endpoint, { ...params, page: i + 1 })\n )\n\n const allResponses = await Promise.all(pageRequests)\n\n return allResponses.flatMap(r => r.data)\n }\n\n private buildUrl(endpoint: string, params: Record<string, unknown>): string {\n const url = new URL(`${this.baseUrl}/v1/${endpoint}`)\n\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined && value !== null) {\n url.searchParams.append(key, String(value))\n }\n })\n\n return url.toString()\n }\n}"],"names":["ApiClient","options","url","endpoint","params","response","pageRequests","_","i","r","key","value"],"mappings":";;;AAQO,MAAMA,EAAU;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACT,KAAsB;AAAA,EACb;AAAA,EAEjB,YAAYC,GAAiCC,GAAU;AACrD,SAAK,UAAUD,EAAQ,QAAQ,SAAS,GAAG,IAAIA,EAAQ,QAAQ,MAAM,GAAG,EAAE,IAAIA,EAAQ,SACtF,KAAK,QAAQA,EAAQ,OACrB,KAAK,cAAcA,EAAQ,aAE3B,KAAK,MAAMC,EAAI,aAAa,IAAI,YAAY,KAAKD,EAAQ,WAAW,aACpE,KAAK,KAAKC,EAAI,aAAa,IAAI,WAAW,KAAK,KAAK;AAAA,EACtD;AAAA,EAEA,MAAM,IAAOC,GAAoBC,IAA2C,IAAgB;AAC1F,UAAMF,IAAM,KAAK,SAASC,GAAU;AAAA,MAClC,KAAK,KAAK;AAAA,MACV,GAAGC;AAAA,MACH,IAAI,KAAK;AAAA,MACT,OAAO,KAAK;AAAA,IAAA,CACb,GAEKC,IAAW,MAAM,KAAK,YAAYH,CAAG;AAC3C,WAAIG,EAAS,OACX,KAAK,KAAKA,EAAS,KAGdA;AAAA,EACT;AAAA,EAEA,MAAM,OAAUF,GAAoBC,IAA2C,IAAkB;AAC/F,UAAMC,IAAW,MAAM,KAAK;AAAA,MAC1BF;AAAA,MACA,EAAE,GAAGC,GAAQ,MAAM,EAAA;AAAA,IAAE;AAGvB,QAAI,CAACC,EAAS,QAAQA,EAAS,KAAK,aAAa;AAC/C,aAAO,UAAUA,IAAWA,EAAS,OAAQA;AAG/C,UAAMC,IAAe,MAAM;AAAA,MACzB,EAAE,QAAQD,EAAS,KAAK,UAAA;AAAA,MACxB,CAACE,GAAGC,MAAM,KAAK,IAA6BL,GAAU,EAAE,GAAGC,GAAQ,MAAMI,IAAI,EAAA,CAAG;AAAA,IAAA;AAKlF,YAFqB,MAAM,QAAQ,IAAIF,CAAY,GAE/B,QAAQ,CAAAG,MAAKA,EAAE,IAAI;AAAA,EACzC;AAAA,EAEQ,SAASN,GAAkBC,GAAyC;AAC1E,UAAMF,IAAM,IAAI,IAAI,GAAG,KAAK,OAAO,OAAOC,CAAQ,EAAE;AAEpD,kBAAO,QAAQC,CAAM,EAAE,QAAQ,CAAC,CAACM,GAAKC,CAAK,MAAM;AAC/C,MAA2BA,KAAU,QACnCT,EAAI,aAAa,OAAOQ,GAAK,OAAOC,CAAK,CAAC;AAAA,IAE9C,CAAC,GAEMT,EAAI,SAAA;AAAA,EACb;AACF;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@b10cks/client",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"version": "0.9.6",
|
|
5
|
+
"author": "Michael Wallner @ Coder's Cantina",
|
|
6
|
+
"description": "Core b10cks API client",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/b10cks/sdk.git",
|
|
11
|
+
"directory": "packages/client"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.mjs",
|
|
18
|
+
"require": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"module": "./dist/index.mjs",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"source": "src/index.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"chalk": "^5.6.0",
|
|
30
|
+
"vite": "^7.1.4",
|
|
31
|
+
"vite-plugin-banner": "^0.8.1",
|
|
32
|
+
"vite-plugin-dts": "^4.5.4",
|
|
33
|
+
"vitest": "^3.2.4"
|
|
34
|
+
},
|
|
35
|
+
"release": {
|
|
36
|
+
"branches": [
|
|
37
|
+
"main"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "vite build",
|
|
45
|
+
"dev": "vite build --watch",
|
|
46
|
+
"test": "vitest",
|
|
47
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts --fix",
|
|
48
|
+
"clean": "rm -rf dist"
|
|
49
|
+
}
|
|
50
|
+
}
|