eve-esi-types 3.2.3 → 3.2.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.2.4] - 2025-04-22
6
+
7
+ ### 🚜 Refactor
8
+
9
+ - Ensure type check passes with `skipLibCheck: false`
10
+
11
+ ### ⚙️ Miscellaneous Tasks
12
+
13
+ - Update CHANGELOG.md
14
+ - Bump version to v3.2.4
15
+
5
16
  ## [3.2.3] - 2025-04-22
6
17
 
7
18
  ### 🐛 Bug Fixes
package/jsconfig.json CHANGED
@@ -2,12 +2,13 @@
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
4
  // This flag is required
5
- "skipLibCheck": true,
5
+ // "skipLibCheck": true,
6
6
  // This flag is required
7
7
  "checkJs": true,
8
8
  // This flag is required
9
9
  "strict": true,
10
10
  "noEmit": true,
11
+ "listFiles": true,
11
12
  // "skipDefaultLibCheck": true,
12
13
  // "target": "esnext",
13
14
  // "module": "esnext",
@@ -12,4 +12,7 @@ declare global {
12
12
  * @param {boolean} enable
13
13
  */
14
14
  export declare function defineColors(enable: boolean): void;
15
+ /**
16
+ * @param {string} banner
17
+ */
15
18
  export declare function getLogger(banner: string, logSelector?: string): (...args: any[]) => void;
@@ -72,6 +72,9 @@ const jsonBeautify = (jsonString) => {
72
72
  return m;
73
73
  });
74
74
  };
75
+ /**
76
+ * @param {string} banner
77
+ */
75
78
  export function getLogger(banner, logSelector = ".log-frame") {
76
79
  /** @type {Element=} */
77
80
  const logElement = isNode ? void 0 : document.querySelector(logSelector) || void 0;
package/lib/rq-util.d.mts CHANGED
@@ -176,6 +176,9 @@ export declare const curl: <T extends unknown>(endp: T) => string;
176
176
  * @type {() => Promise<string>}
177
177
  */
178
178
  export declare function getSDEVersion(): Promise<string>;
179
+ /**
180
+ * @param {string} banner
181
+ */
179
182
  export declare const getUniversalLogger: (banner: string, logSelector?: string) => (...args: any[]) => void;
180
183
  export declare function getLogger(): {
181
184
  clog: (...args: any[]) => void;
package/lib/rq-util.mjs CHANGED
@@ -251,6 +251,7 @@ export const fetchP = async (endpointUrl, rqopt, usp, pc, increment = () => { })
251
251
  return Promise.all(rqs).then(jsons => {
252
252
  // DEVNOTE: let check the page 2, type is array?
253
253
  if (isArray(jsons[0])) {
254
+ /** @type {unknown[]} */
254
255
  let combined = [];
255
256
  for (let i = 0, end = jsons.length; i < end;) {
256
257
  combined = combined.concat(jsons[i++]);
@@ -312,6 +313,9 @@ export async function getSDEVersion() {
312
313
  return "sde-202Xxxxx-TRANQUILITY";
313
314
  }
314
315
  }
316
+ /**
317
+ * @param {string} banner
318
+ */
315
319
  export const getUniversalLogger = (banner, logSelector = ".log-frame") => {
316
320
  return consoleUtil.getLogger(banner, logSelector);
317
321
  };
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "eve-esi-types",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "Extracted the main type of ESI. use for ESI request response types (version 2 only)",
5
5
  "main": "v2/index.d.ts",
6
6
  "scripts": {
7
+ "start": "tsc -p jsconfig.json",
7
8
  "test": "node request-v3.mjs -debug",
8
9
  "test:mini": "node minimal-rq.mjs -debug"
9
10
  },
@@ -45,6 +46,7 @@
45
46
  },
46
47
  "homepage": "https://github.com/jeffy-g/eve-esi-types#readme",
47
48
  "devDependencies": {
49
+ "@types/node": "^22.14.1",
48
50
  "colors.ts": "^1.0.20",
49
51
  "typescript": "latest"
50
52
  }
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/esi-tagged-types.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.3 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { TESIResponseOKMap } from "./index.d.ts";
15
15
  export type * from "./index.d.ts";
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/experimental-esi-types.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.3 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { _ESIResponseType, PickPathParameters, UnionToTuple, Split } from "./index.d.ts";
15
15
 
@@ -35,7 +35,7 @@ export type InferESIResponseResultFromUnion<
35
35
  EP extends unknown
36
36
  // EP extends ESIEndpointUnions
37
37
  > = EP extends `${infer M}:${infer EPRest}`
38
- /* ctt
38
+ //* ctt
39
39
  ? M extends TESIEntryMethod
40
40
  ? EPRest extends ESIEndpointOf<M>
41
41
  ? _ESIResponseType<M, EPRest> extends { result: infer U }
@@ -118,7 +118,9 @@ export type ResolveNextEndpoint<
118
118
  export type ResolveNextEndpointFromUnion<
119
119
  EPU extends ESIEndpointUnions,
120
120
  SplitM_EP = Split<EPU>,
121
+ // @ts-expect-error
121
122
  M extends TESIEntryMethod = SplitM_EP[0],
123
+ // @ts-expect-error
122
124
  EP extends Exclude<ESIEndpointOf<M>, symbol> = SplitM_EP[1],
123
125
  BaseResut extends InferESIResponseResult<M, EP> = InferESIResponseResult<M, EP>,
124
126
  Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
@@ -184,13 +186,14 @@ type ValidateEndpointParamsInArray<
184
186
  BaseResut extends unknown, // SomeType[]
185
187
  NextEP extends string,
186
188
  Debug = 0,
187
- PathParams = UnionToTuple<PickPathParameters<NextEP>>,
189
+ PathParams extends any[] = UnionToTuple<PickPathParameters<NextEP>>,
188
190
  > = BaseResut extends (infer O)[]
189
- ? NonNullable<O[PathParams[1]]> extends number
191
+ ? PathParams[1] extends keyof O ? NonNullable<O[PathParams[1]]> extends number
190
192
  ? Debug extends 1 // development
191
193
  ? [O, PathParams] : 1
192
194
  : 0
193
- : 0;
195
+ : 0
196
+ : 0;
194
197
 
195
198
  /**
196
199
  * `ResolveNextEndpointLoos` is a utility type that infers the next endpoint based on the current endpoint and method.
@@ -215,15 +218,15 @@ type ValidateEndpointParamsInArray<
215
218
  */
216
219
  export type ResolveNextEndpointLoos<
217
220
  M extends TESIEntryMethod,
218
- //* ctt
221
+ /* ctt
219
222
  // DEVNOTE: As it turns out, the behavior of this utility type is broken unless you use the "skipLibCheck=true".
220
223
  EP extends ESIEndpointOf<M> = ESIEndpointOf<M>,
221
224
  Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
222
- /*/
225
+ /*/
223
226
  // This fix is required for skipLibCheck=false
224
227
  EP extends Exclude<ESIEndpointOf<M>, symbol> = Exclude<ESIEndpointOf<M>, symbol>,
225
- Endpoints extends Exclude<ESIEndpointOf<M>, symbol> = Exclude<ESIEndpointOf<M>, symbol>,
226
- //*/
228
+ Endpoints extends ESIEndpointOf<M> = ESIEndpointOf<M>,
229
+ //*/
227
230
  > = {
228
231
  [NextEP in Endpoints]: NextEP extends `${EP}{${string}}${string}` ? NextEP : never
229
232
  }[Endpoints];
@@ -233,7 +236,7 @@ export type ResolveNextEndpointLoos<
233
236
  */
234
237
  export type ESIEndpointUnions = {
235
238
  [M in TESIEntryMethod]: `${M}:${
236
- //* ctt
239
+ /* ctt
237
240
  ESIEndpointOf<M>
238
241
  /*/
239
242
  Exclude<ESIEndpointOf<M>, symbol>
@@ -280,7 +283,7 @@ export type FilterEndpointUnionsByResponse<T> = {
280
283
  * ```
281
284
  */
282
285
  export type ExtractValidNextEndpoints<
283
- T = number[], EPUs = FilterEndpointUnionsByResponse<T>,
286
+ T = number[], EPUs extends ESIEndpointUnions = FilterEndpointUnionsByResponse<T>,
284
287
  Debug = 0
285
288
  > = {
286
289
  // [EPU in EPUs]: ResolveNextEndpointFromUnion<EPU>;
package/v2/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/index.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.3 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { TESIResponseOKMap } from "./response-map.d.ts";
15
15
  import type { PickPathParameters, InferKeysLen } from "./util.d.ts";
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/response-map.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.3 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import "./types-index.d.ts";
15
15
 
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/types-index.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.3 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import "./globals/alliance.d.ts";
15
15
  import "./globals/assets.d.ts";
@@ -9,7 +9,7 @@
9
9
  * THIS DTS IS AUTO GENERATED, DO NOT EDIT
10
10
  *
11
11
  * @file eve-esi-types/v2/types-util.d.ts
12
- * @summary This file is auto-generated and defines version 3.2.3 of the EVE Online ESI response types.
12
+ * @summary This file is auto-generated and defines version 3.2.4 of the EVE Online ESI response types.
13
13
  */
14
14
  import type { TESIResponseOKMap } from "./response-map.d.ts";
15
15