@xylabs/api 5.0.94 → 5.0.96

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,62 +1,52 @@
1
1
  # @xylabs/api
2
2
 
3
- [![logo][]](https://xylabs.com)
3
+ [![npm][npm-badge]][npm-link]
4
+ [![license][license-badge]][license-link]
4
5
 
5
- [![main-build][]][main-build-link]
6
- [![npm-badge][]][npm-link]
7
- [![npm-downloads-badge][]][npm-link]
8
- [![jsdelivr-badge][]][jsdelivr-link]
9
- [![npm-license-badge][]](LICENSE)
10
- [![codacy-badge][]][codacy-link]
11
- [![codeclimate-badge][]][codeclimate-link]
12
- [![snyk-badge][]][snyk-link]
13
- [![socket-badge][]][socket-link]
6
+ > Base functionality used throughout XY Labs TypeScript/JavaScript libraries
14
7
 
8
+ ## Install
15
9
 
16
- Base functionality used throughout XY Labs TypeScript/JavaScript libraries
17
-
10
+ Using npm:
18
11
 
12
+ ```sh
13
+ npm install {{name}}
14
+ ```
19
15
 
20
- ## Reference
16
+ Using yarn:
21
17
 
22
- **@xylabs/api**
18
+ ```sh
19
+ yarn add {{name}}
20
+ ```
23
21
 
24
- ***
22
+ Using pnpm:
25
23
 
26
- ## Classes
24
+ ```sh
25
+ pnpm add {{name}}
26
+ ```
27
27
 
28
- | Class | Description |
29
- | ------ | ------ |
30
- | [ApiClient](#classes/ApiClient) | Abstract base class for API clients that provides stage and token configuration. |
31
- | [ApiEndpoint](#classes/ApiEndpoint) | Generic REST API endpoint wrapper that supports fetching and inserting typed data. |
28
+ Using bun:
32
29
 
33
- ## Interfaces
30
+ ```sh
31
+ bun add {{name}}
32
+ ```
34
33
 
35
- | Interface | Description |
36
- | ------ | ------ |
37
- | [ApiConfig](#interfaces/ApiConfig) | Configuration for connecting to an API, including domain, authentication, and user identification. |
38
34
 
39
- ## Type Aliases
35
+ ## License
40
36
 
41
- | Type Alias | Description |
42
- | ------ | ------ |
43
- | [ApiStage](#type-aliases/ApiStage) | A valid API stage value ('prod', 'beta', or 'local'). |
37
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
44
38
 
45
- ## Variables
39
+ ## Reference
46
40
 
47
- | Variable | Description |
48
- | ------ | ------ |
49
- | [ApiStage](#variables/ApiStage) | Deployment stage identifiers for API environments. |
41
+ ### packages
50
42
 
51
- ## Functions
43
+ ### api
52
44
 
53
- | Function | Description |
54
- | ------ | ------ |
55
- | [getApiStage](#functions/getApiStage) | Determines the API stage based on the hostname. |
45
+ ### .temp-typedoc
56
46
 
57
- ### classes
47
+ ### classes
58
48
 
59
- ### <a id="ApiClient"></a>ApiClient
49
+ ### <a id="ApiClient"></a>ApiClient
60
50
 
61
51
  [**@xylabs/api**](#../README)
62
52
 
@@ -69,15 +59,18 @@ Abstract base class for API clients that provides stage and token configuration.
69
59
  ### Constructor
70
60
 
71
61
  ```ts
72
- new ApiClient(token?: string | null, stage?: ApiStage): ApiClient;
62
+ new ApiClient(token?, stage?): ApiClient;
73
63
  ```
74
64
 
75
65
  ### Parameters
76
66
 
77
- | Parameter | Type |
78
- | ------ | ------ |
79
- | `token?` | `string` \| `null` |
80
- | `stage?` | [`ApiStage`](#../type-aliases/ApiStage) |
67
+ #### token?
68
+
69
+ `string` \| `null`
70
+
71
+ #### stage?
72
+
73
+ [`ApiStage`](#../type-aliases/ApiStage)
81
74
 
82
75
  ### Returns
83
76
 
@@ -85,10 +78,19 @@ new ApiClient(token?: string | null, stage?: ApiStage): ApiClient;
85
78
 
86
79
  ## Properties
87
80
 
88
- | Property | Modifier | Type |
89
- | ------ | ------ | ------ |
90
- | <a id="stage"></a> `stage?` | `protected` | [`ApiStage`](#../type-aliases/ApiStage) |
91
- | <a id="token"></a> `token?` | `protected` | `string` \| `null` |
81
+ ### stage?
82
+
83
+ ```ts
84
+ protected optional stage?: ApiStage;
85
+ ```
86
+
87
+ ***
88
+
89
+ ### token?
90
+
91
+ ```ts
92
+ protected optional token?: string | null;
93
+ ```
92
94
 
93
95
  ## Methods
94
96
 
@@ -102,7 +104,7 @@ abstract endPoint(): string;
102
104
 
103
105
  `string`
104
106
 
105
- ### <a id="ApiEndpoint"></a>ApiEndpoint
107
+ ### <a id="ApiEndpoint"></a>ApiEndpoint
106
108
 
107
109
  [**@xylabs/api**](#../README)
108
110
 
@@ -112,24 +114,29 @@ Generic REST API endpoint wrapper that supports fetching and inserting typed dat
112
114
 
113
115
  ## Type Parameters
114
116
 
115
- | Type Parameter | Description |
116
- | ------ | ------ |
117
- | `T` | The type of data returned by the endpoint |
117
+ ### T
118
+
119
+ `T`
120
+
121
+ The type of data returned by the endpoint
118
122
 
119
123
  ## Constructors
120
124
 
121
125
  ### Constructor
122
126
 
123
127
  ```ts
124
- new ApiEndpoint<T>(config: ApiConfig, path: string): ApiEndpoint<T>;
128
+ new ApiEndpoint<T>(config, path): ApiEndpoint<T>;
125
129
  ```
126
130
 
127
131
  ### Parameters
128
132
 
129
- | Parameter | Type |
130
- | ------ | ------ |
131
- | `config` | [`ApiConfig`](#../interfaces/ApiConfig) |
132
- | `path` | `string` |
133
+ #### config
134
+
135
+ [`ApiConfig`](#../interfaces/ApiConfig)
136
+
137
+ #### path
138
+
139
+ `string`
133
140
 
134
141
  ### Returns
135
142
 
@@ -178,38 +185,40 @@ get(): Promise<T | NonNullable<T>>;
178
185
  ### insert()
179
186
 
180
187
  ```ts
181
- insert(value: T): Promise<T>;
188
+ insert(value): Promise<T>;
182
189
  ```
183
190
 
184
191
  ### Parameters
185
192
 
186
- | Parameter | Type |
187
- | ------ | ------ |
188
- | `value` | `T` |
193
+ #### value
194
+
195
+ `T`
189
196
 
190
197
  ### Returns
191
198
 
192
199
  `Promise`\<`T`\>
193
200
 
194
- ### functions
201
+ ### functions
195
202
 
196
- ### <a id="getApiStage"></a>getApiStage
203
+ ### <a id="getApiStage"></a>getApiStage
197
204
 
198
205
  [**@xylabs/api**](#../README)
199
206
 
200
207
  ***
201
208
 
202
209
  ```ts
203
- function getApiStage(hostname: string): "beta" | "local" | "prod";
210
+ function getApiStage(hostname): "beta" | "local" | "prod";
204
211
  ```
205
212
 
206
213
  Determines the API stage based on the hostname.
207
214
 
208
215
  ## Parameters
209
216
 
210
- | Parameter | Type | Description |
211
- | ------ | ------ | ------ |
212
- | `hostname` | `string` | The hostname to evaluate |
217
+ ### hostname
218
+
219
+ `string`
220
+
221
+ The hostname to evaluate
213
222
 
214
223
  ## Returns
215
224
 
@@ -217,9 +226,9 @@ Determines the API stage based on the hostname.
217
226
 
218
227
  The corresponding ApiStage (Local, Beta, or Prod)
219
228
 
220
- ### interfaces
229
+ ### interfaces
221
230
 
222
- ### <a id="ApiConfig"></a>ApiConfig
231
+ ### <a id="ApiConfig"></a>ApiConfig
223
232
 
224
233
  [**@xylabs/api**](#../README)
225
234
 
@@ -229,16 +238,39 @@ Configuration for connecting to an API, including domain, authentication, and us
229
238
 
230
239
  ## Properties
231
240
 
232
- | Property | Type |
233
- | ------ | ------ |
234
- | <a id="apidomain"></a> `apiDomain` | `string` |
235
- | <a id="apikey"></a> `apiKey?` | `string` |
236
- | <a id="jwttoken"></a> `jwtToken?` | `string` |
237
- | <a id="userid"></a> `userid?` | `string` |
241
+ ### apiDomain
242
+
243
+ ```ts
244
+ apiDomain: string;
245
+ ```
246
+
247
+ ***
248
+
249
+ ### apiKey?
250
+
251
+ ```ts
252
+ optional apiKey?: string;
253
+ ```
254
+
255
+ ***
256
+
257
+ ### jwtToken?
258
+
259
+ ```ts
260
+ optional jwtToken?: string;
261
+ ```
262
+
263
+ ***
238
264
 
239
- ### type-aliases
265
+ ### userid?
240
266
 
241
- ### <a id="ApiStage"></a>ApiStage
267
+ ```ts
268
+ optional userid?: string;
269
+ ```
270
+
271
+ ### type-aliases
272
+
273
+ ### <a id="ApiStage"></a>ApiStage
242
274
 
243
275
  [**@xylabs/api**](#../README)
244
276
 
@@ -250,9 +282,9 @@ type ApiStage = EnumValue<typeof ApiStage>;
250
282
 
251
283
  A valid API stage value ('prod', 'beta', or 'local').
252
284
 
253
- ### variables
285
+ ### variables
254
286
 
255
- ### <a id="ApiStage"></a>ApiStage
287
+ ### <a id="ApiStage"></a>ApiStage
256
288
 
257
289
  [**@xylabs/api**](#../README)
258
290
 
@@ -269,41 +301,7 @@ const ApiStage: Enum<{
269
301
  Deployment stage identifiers for API environments.
270
302
 
271
303
 
272
- Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
273
-
274
- ## Maintainers
275
-
276
- - [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
277
- - [Matt Jones](https://github.com/jonesmac)
278
- - [Joel Carter](https://github.com/JoelBCarter)
279
- - [Jordan Trouw](https://github.com/jordantrouw)
280
-
281
- ## License
282
-
283
- > See the [LICENSE](LICENSE) file for license details
284
-
285
- ## Credits
286
-
287
- [Made with 🔥 and ❄️ by XYLabs](https://xylabs.com)
288
-
289
- [logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
290
-
291
- [main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
292
- [main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
293
304
  [npm-badge]: https://img.shields.io/npm/v/@xylabs/api.svg
294
305
  [npm-link]: https://www.npmjs.com/package/@xylabs/api
295
- [codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698
296
- [codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade
297
- [codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
298
- [codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
299
- [snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
300
- [snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
301
-
302
- [npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/api
303
- [npm-license-badge]: https://img.shields.io/npm/l/@xylabs/api
304
-
305
- [jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xylabs/api/badge
306
- [jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xylabs/api
307
-
308
- [socket-badge]: https://socket.dev/api/badge/npm/package/@xylabs/api
309
- [socket-link]: https://socket.dev/npm/package/@xylabs/api
306
+ [license-badge]: https://img.shields.io/npm/l/@xylabs/api.svg
307
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
@@ -11,9 +11,9 @@ declare class ApiEndpoint<T> {
11
11
  get value(): T | undefined;
12
12
  private get headers();
13
13
  private get url();
14
- fetch(): Promise<T>;
15
- get(): Promise<T | NonNullable<T>>;
16
- insert(value: T): Promise<T>;
14
+ fetch(): Promise<T | undefined>;
15
+ get(): Promise<T | NonNullable<T> | undefined>;
16
+ insert(value: T): Promise<T | undefined>;
17
17
  }
18
18
  export { ApiEndpoint };
19
19
  //# sourceMappingURL=ApiEndpoint.d.ts.map
@@ -17,8 +17,8 @@ var ApiClient = class {
17
17
  };
18
18
 
19
19
  // src/ApiEndpoint.ts
20
+ import { fetchJsonGet, fetchJsonPost } from "@xylabs/fetch";
20
21
  import { isUndefined } from "@xylabs/typeof";
21
- import axios from "axios";
22
22
  var ApiEndpoint = class {
23
23
  _value;
24
24
  config;
@@ -37,9 +37,9 @@ var ApiEndpoint = class {
37
37
  return `${this.config.apiDomain}/${this.path}`;
38
38
  }
39
39
  async fetch() {
40
- const response = await axios.get(this.url, { headers: this.headers });
40
+ const response = await fetchJsonGet(this.url, { headers: this.headers });
41
41
  if (response.status === 200) {
42
- this._value = response.data;
42
+ this._value = response.data ?? void 0;
43
43
  } else {
44
44
  throw new Error("Unexpected Status Code");
45
45
  }
@@ -49,9 +49,9 @@ var ApiEndpoint = class {
49
49
  return this._value ?? await this.fetch();
50
50
  }
51
51
  async insert(value) {
52
- const response = await axios.post(this.url, value, { headers: this.headers });
52
+ const response = await fetchJsonPost(this.url, value, { headers: this.headers });
53
53
  if (response.status === 200) {
54
- this._value = response.data;
54
+ this._value = response.data ?? void 0;
55
55
  } else {
56
56
  throw new Error("Unexpected Status Code");
57
57
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ApiStage.ts","../../src/ApiClient.ts","../../src/ApiEndpoint.ts","../../src/getApiStage.ts"],"sourcesContent":["import type { EnumValue } from '@xylabs/enum'\nimport { Enum } from '@xylabs/enum'\n\n/** Deployment stage identifiers for API environments. */\nexport const ApiStage = Enum({\n Beta: 'beta',\n Local: 'local',\n Prod: 'prod',\n})\n\n/** A valid API stage value ('prod', 'beta', or 'local'). */\nexport type ApiStage = EnumValue<typeof ApiStage>\n","import { ApiStage } from './ApiStage.ts'\n\n/** Abstract base class for API clients that provides stage and token configuration. */\nabstract class ApiClient {\n protected stage?: ApiStage\n protected token?: string | null\n\n constructor(\n token?: string | null,\n stage?: ApiStage,\n ) {\n this.stage = stage ?? ApiStage.Prod\n this.token = token\n }\n\n abstract endPoint(): string\n}\n\nexport { ApiClient }\n","import { isUndefined } from '@xylabs/typeof'\nimport axios from 'axios'\n\nimport type { ApiConfig } from './ApiConfig.ts'\n\n/**\n * Generic REST API endpoint wrapper that supports fetching and inserting typed data.\n * @typeParam T - The type of data returned by the endpoint\n */\nclass ApiEndpoint<T> {\n private _value?: T\n private config: ApiConfig\n private path: string\n\n constructor(config: ApiConfig, path: string) {\n this.config = config\n this.path = path\n }\n\n get value() {\n return this._value\n }\n\n private get headers() {\n return isUndefined(this.config.jwtToken) ? undefined : { Authorization: this.config.jwtToken }\n }\n\n private get url() {\n return `${this.config.apiDomain}/${this.path}`\n }\n\n async fetch() {\n const response = await axios.get<T>(this.url, { headers: this.headers })\n if (response.status === 200) {\n this._value = response.data\n } else {\n throw new Error('Unexpected Status Code')\n }\n return this._value\n }\n\n async get() {\n return this._value ?? (await this.fetch())\n }\n\n async insert(value: T) {\n const response = await axios.post<T>(this.url, value, { headers: this.headers })\n if (response.status === 200) {\n this._value = response.data\n } else {\n throw new Error('Unexpected Status Code')\n }\n return this._value\n }\n}\n\nexport { ApiEndpoint }\n","import { ApiStage } from './ApiStage.ts'\n\n/**\n * Determines the API stage based on the hostname.\n * @param hostname - The hostname to evaluate\n * @returns The corresponding ApiStage (Local, Beta, or Prod)\n */\nconst getApiStage = (hostname: string) => {\n if (hostname.startsWith('localhost')) {\n return ApiStage.Local\n } else if (hostname.startsWith('beta.')) {\n return ApiStage.Beta\n } else {\n return ApiStage.Prod\n }\n}\n\nexport { getApiStage }\n"],"mappings":";AACA,SAAS,YAAY;AAGd,IAAM,WAAW,KAAK;AAAA,EAC3B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AACR,CAAC;;;ACLD,IAAe,YAAf,MAAyB;AAAA,EACb;AAAA,EACA;AAAA,EAEV,YACE,OACA,OACA;AACA,SAAK,QAAQ,SAAS,SAAS;AAC/B,SAAK,QAAQ;AAAA,EACf;AAGF;;;AChBA,SAAS,mBAAmB;AAC5B,OAAO,WAAW;AAQlB,IAAM,cAAN,MAAqB;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,QAAmB,MAAc;AAC3C,SAAK,SAAS;AACd,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,IAAI,QAAQ;AACV,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAY,UAAU;AACpB,WAAO,YAAY,KAAK,OAAO,QAAQ,IAAI,SAAY,EAAE,eAAe,KAAK,OAAO,SAAS;AAAA,EAC/F;AAAA,EAEA,IAAY,MAAM;AAChB,WAAO,GAAG,KAAK,OAAO,SAAS,IAAI,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,MAAM,QAAQ;AACZ,UAAM,WAAW,MAAM,MAAM,IAAO,KAAK,KAAK,EAAE,SAAS,KAAK,QAAQ,CAAC;AACvE,QAAI,SAAS,WAAW,KAAK;AAC3B,WAAK,SAAS,SAAS;AAAA,IACzB,OAAO;AACL,YAAM,IAAI,MAAM,wBAAwB;AAAA,IAC1C;AACA,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAM,MAAM;AACV,WAAO,KAAK,UAAW,MAAM,KAAK,MAAM;AAAA,EAC1C;AAAA,EAEA,MAAM,OAAO,OAAU;AACrB,UAAM,WAAW,MAAM,MAAM,KAAQ,KAAK,KAAK,OAAO,EAAE,SAAS,KAAK,QAAQ,CAAC;AAC/E,QAAI,SAAS,WAAW,KAAK;AAC3B,WAAK,SAAS,SAAS;AAAA,IACzB,OAAO;AACL,YAAM,IAAI,MAAM,wBAAwB;AAAA,IAC1C;AACA,WAAO,KAAK;AAAA,EACd;AACF;;;AC/CA,IAAM,cAAc,CAAC,aAAqB;AACxC,MAAI,SAAS,WAAW,WAAW,GAAG;AACpC,WAAO,SAAS;AAAA,EAClB,WAAW,SAAS,WAAW,OAAO,GAAG;AACvC,WAAO,SAAS;AAAA,EAClB,OAAO;AACL,WAAO,SAAS;AAAA,EAClB;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/ApiStage.ts","../../src/ApiClient.ts","../../src/ApiEndpoint.ts","../../src/getApiStage.ts"],"sourcesContent":["import type { EnumValue } from '@xylabs/enum'\nimport { Enum } from '@xylabs/enum'\n\n/** Deployment stage identifiers for API environments. */\nexport const ApiStage = Enum({\n Beta: 'beta',\n Local: 'local',\n Prod: 'prod',\n})\n\n/** A valid API stage value ('prod', 'beta', or 'local'). */\nexport type ApiStage = EnumValue<typeof ApiStage>\n","import { ApiStage } from './ApiStage.ts'\n\n/** Abstract base class for API clients that provides stage and token configuration. */\nabstract class ApiClient {\n protected stage?: ApiStage\n protected token?: string | null\n\n constructor(\n token?: string | null,\n stage?: ApiStage,\n ) {\n this.stage = stage ?? ApiStage.Prod\n this.token = token\n }\n\n abstract endPoint(): string\n}\n\nexport { ApiClient }\n","import { fetchJsonGet, fetchJsonPost } from '@xylabs/fetch'\nimport { isUndefined } from '@xylabs/typeof'\n\nimport type { ApiConfig } from './ApiConfig.ts'\n\n/**\n * Generic REST API endpoint wrapper that supports fetching and inserting typed data.\n * @typeParam T - The type of data returned by the endpoint\n */\nclass ApiEndpoint<T> {\n private _value?: T\n private config: ApiConfig\n private path: string\n\n constructor(config: ApiConfig, path: string) {\n this.config = config\n this.path = path\n }\n\n get value() {\n return this._value\n }\n\n private get headers() {\n return isUndefined(this.config.jwtToken) ? undefined : { Authorization: this.config.jwtToken }\n }\n\n private get url() {\n return `${this.config.apiDomain}/${this.path}`\n }\n\n async fetch() {\n const response = await fetchJsonGet<T>(this.url, { headers: this.headers })\n if (response.status === 200) {\n this._value = response.data ?? undefined\n } else {\n throw new Error('Unexpected Status Code')\n }\n return this._value\n }\n\n async get() {\n return this._value ?? (await this.fetch())\n }\n\n async insert(value: T) {\n const response = await fetchJsonPost<T>(this.url, value, { headers: this.headers })\n if (response.status === 200) {\n this._value = response.data ?? undefined\n } else {\n throw new Error('Unexpected Status Code')\n }\n return this._value\n }\n}\n\nexport { ApiEndpoint }\n","import { ApiStage } from './ApiStage.ts'\n\n/**\n * Determines the API stage based on the hostname.\n * @param hostname - The hostname to evaluate\n * @returns The corresponding ApiStage (Local, Beta, or Prod)\n */\nconst getApiStage = (hostname: string) => {\n if (hostname.startsWith('localhost')) {\n return ApiStage.Local\n } else if (hostname.startsWith('beta.')) {\n return ApiStage.Beta\n } else {\n return ApiStage.Prod\n }\n}\n\nexport { getApiStage }\n"],"mappings":";AACA,SAAS,YAAY;AAGd,IAAM,WAAW,KAAK;AAAA,EAC3B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AACR,CAAC;;;ACLD,IAAe,YAAf,MAAyB;AAAA,EACb;AAAA,EACA;AAAA,EAEV,YACE,OACA,OACA;AACA,SAAK,QAAQ,SAAS,SAAS;AAC/B,SAAK,QAAQ;AAAA,EACf;AAGF;;;AChBA,SAAS,cAAc,qBAAqB;AAC5C,SAAS,mBAAmB;AAQ5B,IAAM,cAAN,MAAqB;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,QAAmB,MAAc;AAC3C,SAAK,SAAS;AACd,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,IAAI,QAAQ;AACV,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAY,UAAU;AACpB,WAAO,YAAY,KAAK,OAAO,QAAQ,IAAI,SAAY,EAAE,eAAe,KAAK,OAAO,SAAS;AAAA,EAC/F;AAAA,EAEA,IAAY,MAAM;AAChB,WAAO,GAAG,KAAK,OAAO,SAAS,IAAI,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,MAAM,QAAQ;AACZ,UAAM,WAAW,MAAM,aAAgB,KAAK,KAAK,EAAE,SAAS,KAAK,QAAQ,CAAC;AAC1E,QAAI,SAAS,WAAW,KAAK;AAC3B,WAAK,SAAS,SAAS,QAAQ;AAAA,IACjC,OAAO;AACL,YAAM,IAAI,MAAM,wBAAwB;AAAA,IAC1C;AACA,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAM,MAAM;AACV,WAAO,KAAK,UAAW,MAAM,KAAK,MAAM;AAAA,EAC1C;AAAA,EAEA,MAAM,OAAO,OAAU;AACrB,UAAM,WAAW,MAAM,cAAiB,KAAK,KAAK,OAAO,EAAE,SAAS,KAAK,QAAQ,CAAC;AAClF,QAAI,SAAS,WAAW,KAAK;AAC3B,WAAK,SAAS,SAAS,QAAQ;AAAA,IACjC,OAAO;AACL,YAAM,IAAI,MAAM,wBAAwB;AAAA,IAC1C;AACA,WAAO,KAAK;AAAA,EACd;AACF;;;AC/CA,IAAM,cAAc,CAAC,aAAqB;AACxC,MAAI,SAAS,WAAW,WAAW,GAAG;AACpC,WAAO,SAAS;AAAA,EAClB,WAAW,SAAS,WAAW,OAAO,GAAG;AACvC,WAAO,SAAS;AAAA,EAClB,OAAO;AACL,WAAO,SAAS;AAAA,EAClB;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/api",
3
- "version": "5.0.94",
3
+ "version": "5.0.96",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -28,12 +28,10 @@
28
28
  "exports": {
29
29
  ".": {
30
30
  "types": "./dist/neutral/index.d.ts",
31
- "import": "./dist/neutral/index.mjs",
32
31
  "default": "./dist/neutral/index.mjs"
33
32
  },
34
33
  "./package.json": "./package.json"
35
34
  },
36
- "types": "./dist/neutral/index.d.ts",
37
35
  "files": [
38
36
  "dist",
39
37
  "!**/*.bench.*",
@@ -42,23 +40,22 @@
42
40
  "README.md"
43
41
  ],
44
42
  "dependencies": {
45
- "@xylabs/enum": "~5.0.94",
46
- "@xylabs/typeof": "~5.0.94"
43
+ "@xylabs/enum": "~5.0.96",
44
+ "@xylabs/typeof": "~5.0.96",
45
+ "@xylabs/fetch": "~5.0.96"
47
46
  },
48
47
  "devDependencies": {
49
- "@types/node": "^25.5.2",
50
- "@xylabs/ts-scripts-common": "~7.7.3",
51
- "@xylabs/ts-scripts-pnpm": "~7.7.3",
52
- "@xylabs/tsconfig": "~7.7.3",
53
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0",
54
- "axios": "^1.14.0",
48
+ "@types/node": "^25.6.0",
49
+ "@xylabs/toolchain": "~7.10.4",
50
+ "@xylabs/tsconfig": "~7.10.4",
55
51
  "esbuild": "^0.28.0",
52
+ "pako": "~2.1.0",
56
53
  "typescript": "^5",
57
- "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
58
- "vitest": "^4.1.2"
54
+ "vite": "^8.0.8",
55
+ "vitest": "^4.1.4"
59
56
  },
60
57
  "peerDependencies": {
61
- "axios": "^1"
58
+ "pako": "~2.1.0"
62
59
  },
63
60
  "engines": {
64
61
  "node": ">=18"