@tenno-companion/core 0.1.5 → 0.2.1
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 +1 -1
- package/dist/chunk-CVH7OE4T.mjs +1 -0
- package/dist/chunk-R6UIVSP5.mjs +1 -0
- package/dist/chunk-STFT6SKY.mjs +1 -0
- package/dist/enemies-YS2SO76V.mjs +1 -0
- package/dist/index.d.mts +23 -51
- package/dist/index.d.ts +23 -51
- package/dist/index.js +16 -16
- package/dist/index.mjs +1 -1
- package/dist/internal-w-h4vnIB.d.mts +8 -0
- package/dist/internal-w-h4vnIB.d.ts +8 -0
- package/dist/lib/constants.d.mts +2 -2
- package/dist/lib/constants.d.ts +2 -2
- package/dist/lib/constants.js +1 -1
- package/dist/lib/constants.mjs +1 -1
- package/dist/lib/locales.d.mts +2 -2
- package/dist/lib/locales.d.ts +2 -2
- package/dist/lib/locales.js +16 -16
- package/dist/lib/locales.mjs +1 -1
- package/dist/server.d.mts +58 -0
- package/dist/server.d.ts +58 -0
- package/dist/server.js +2287 -0
- package/dist/server.mjs +1 -0
- package/dist/syndicates-OPKYQ2TN.mjs +1 -0
- package/dist/types/index.d.mts +8 -6
- package/dist/types/index.d.ts +8 -6
- package/dist/types/index.js +1 -1
- package/package.json +7 -1
- package/dist/chunk-SAP35QIC.mjs +0 -1
- package/dist/chunk-TL2VWYDC.mjs +0 -1
- package/dist/internal-DDFPKiUV.d.mts +0 -5
- package/dist/internal-DDFPKiUV.d.ts +0 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,66 +1,44 @@
|
|
|
1
1
|
import { BaseItem, Archwing, Faction, MissionType, Necramech, Sentinel, Weapon, MOA, Hound, KubrowPet, SpecialItem, SentinelWeapon, Intrinsic, Region, Warframe, PrimaryWeapon, SecondaryWeapon, Melee, Archgun, Archmelee, Amp, KDrive, Kitgun, Zaw } from './types/index.mjs';
|
|
2
|
-
import { D as Data } from './internal-
|
|
2
|
+
import { D as Data, F as FilterOptions } from './internal-w-h4vnIB.mjs';
|
|
3
3
|
import './lib/constants.mjs';
|
|
4
|
+
import '@tenno-companion/shared/locales';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
locale?: string;
|
|
7
|
-
productCategory?: string;
|
|
8
|
-
skipSorting?: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare abstract class BaseProvider<T extends BaseItem> {
|
|
6
|
+
declare abstract class BaseClient<T extends BaseItem> {
|
|
11
7
|
protected items: Data<T>;
|
|
12
8
|
protected locale: string;
|
|
13
|
-
|
|
9
|
+
constructor(items: Data<T>, locale: string);
|
|
14
10
|
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
protected static getHydratedData<T extends BaseItem>(category: string, { locale, productCategory, skipSorting }?: HydratedDataOptions): Promise<Data<T>>;
|
|
18
|
-
/**
|
|
19
|
-
* Recursively scans an object/array and replaces any string
|
|
20
|
-
* starting with "/Lotus/Language" with its translation.
|
|
11
|
+
* Generic filter runner that applies the masterable logic if requested
|
|
21
12
|
*/
|
|
22
|
-
|
|
13
|
+
protected getFiltered<E extends T>(options: FilterOptions, predicate: (w: T) => w is E): E[];
|
|
23
14
|
getAll(): T[];
|
|
24
15
|
getByUniqueName(uniqueName: string): T | null;
|
|
25
|
-
|
|
16
|
+
filter<S extends T>(predicate: (item: T) => item is S): S[];
|
|
17
|
+
filter(predicate: (item: T) => boolean): T[];
|
|
26
18
|
}
|
|
27
19
|
|
|
28
|
-
|
|
29
|
-
locale?: string;
|
|
30
|
-
};
|
|
31
|
-
type FilterOptions = {
|
|
32
|
-
masterable?: boolean;
|
|
33
|
-
};
|
|
34
|
-
declare class FactionProvider extends BaseProvider<Faction> {
|
|
35
|
-
static create(options?: Options): Promise<FactionProvider>;
|
|
20
|
+
declare class Factions extends BaseClient<Faction> {
|
|
36
21
|
}
|
|
37
|
-
declare class
|
|
38
|
-
static create(options?: Options): Promise<MissionTypeProvider>;
|
|
22
|
+
declare class MissionTypes extends BaseClient<MissionType> {
|
|
39
23
|
}
|
|
40
|
-
declare class
|
|
41
|
-
static create(options?: Options): Promise<RailjackIntrinsicProvider>;
|
|
24
|
+
declare class RailjackIntrinsics extends BaseClient<Intrinsic> {
|
|
42
25
|
}
|
|
43
|
-
declare class
|
|
44
|
-
|
|
26
|
+
declare class Regions extends BaseClient<Region> {
|
|
27
|
+
getStarChart(options?: FilterOptions): Record<number, {
|
|
28
|
+
systemName: string;
|
|
29
|
+
nodes: Region[];
|
|
30
|
+
}>;
|
|
45
31
|
}
|
|
46
|
-
declare class
|
|
47
|
-
static create(options?: Options): Promise<SentinelProvider>;
|
|
32
|
+
declare class Sentinels extends BaseClient<Sentinel> {
|
|
48
33
|
}
|
|
49
|
-
declare class
|
|
34
|
+
declare class Warframes extends BaseClient<Warframe> {
|
|
50
35
|
getPrimes(): Warframe[];
|
|
51
|
-
static create(options?: Options): Promise<WarframeProvider>;
|
|
52
36
|
}
|
|
53
|
-
declare class
|
|
54
|
-
static create(options?: Options): Promise<ArchwingProvider>;
|
|
37
|
+
declare class Archwings extends BaseClient<Archwing> {
|
|
55
38
|
}
|
|
56
|
-
declare class
|
|
57
|
-
static create(options?: Options): Promise<NecramechProvider>;
|
|
39
|
+
declare class Necramechs extends BaseClient<Necramech> {
|
|
58
40
|
}
|
|
59
|
-
declare class
|
|
60
|
-
/**
|
|
61
|
-
* Generic filter runner that applies the masterable logic if requested
|
|
62
|
-
*/
|
|
63
|
-
private getFiltered;
|
|
41
|
+
declare class Weapons extends BaseClient<Weapon> {
|
|
64
42
|
getPrimaries(options?: FilterOptions): PrimaryWeapon[];
|
|
65
43
|
getSecondaries(options?: FilterOptions): SecondaryWeapon[];
|
|
66
44
|
getMelees(options?: FilterOptions): Melee[];
|
|
@@ -71,14 +49,8 @@ declare class WeaponProvider extends BaseProvider<Weapon> {
|
|
|
71
49
|
getKDrives(options?: FilterOptions): KDrive[];
|
|
72
50
|
getKitguns(options?: FilterOptions): Kitgun[];
|
|
73
51
|
getZaws(options?: FilterOptions): Zaw[];
|
|
74
|
-
static create(options?: Options): Promise<WeaponProvider>;
|
|
75
52
|
}
|
|
76
|
-
declare class
|
|
77
|
-
static create(options?: Options): Promise<PetProvider>;
|
|
78
|
-
/**
|
|
79
|
-
* Generic filter runner that applies the masterable logic if requested
|
|
80
|
-
*/
|
|
81
|
-
private getFiltered;
|
|
53
|
+
declare class Pets extends BaseClient<Sentinel | Weapon> {
|
|
82
54
|
/**
|
|
83
55
|
* Returns Sentinels (Dethcube, Taxon, etc.)
|
|
84
56
|
*/
|
|
@@ -106,4 +78,4 @@ declare class PetProvider extends BaseProvider<Sentinel | Weapon> {
|
|
|
106
78
|
getSentinelWeapons(options?: FilterOptions): SentinelWeapon[];
|
|
107
79
|
}
|
|
108
80
|
|
|
109
|
-
export {
|
|
81
|
+
export { Archwings, Factions, MissionTypes, Necramechs, Pets, RailjackIntrinsics, Regions, Sentinels, Warframes, Weapons };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,66 +1,44 @@
|
|
|
1
1
|
import { BaseItem, Archwing, Faction, MissionType, Necramech, Sentinel, Weapon, MOA, Hound, KubrowPet, SpecialItem, SentinelWeapon, Intrinsic, Region, Warframe, PrimaryWeapon, SecondaryWeapon, Melee, Archgun, Archmelee, Amp, KDrive, Kitgun, Zaw } from './types/index.js';
|
|
2
|
-
import { D as Data } from './internal-
|
|
2
|
+
import { D as Data, F as FilterOptions } from './internal-w-h4vnIB.js';
|
|
3
3
|
import './lib/constants.js';
|
|
4
|
+
import '@tenno-companion/shared/locales';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
locale?: string;
|
|
7
|
-
productCategory?: string;
|
|
8
|
-
skipSorting?: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare abstract class BaseProvider<T extends BaseItem> {
|
|
6
|
+
declare abstract class BaseClient<T extends BaseItem> {
|
|
11
7
|
protected items: Data<T>;
|
|
12
8
|
protected locale: string;
|
|
13
|
-
|
|
9
|
+
constructor(items: Data<T>, locale: string);
|
|
14
10
|
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
protected static getHydratedData<T extends BaseItem>(category: string, { locale, productCategory, skipSorting }?: HydratedDataOptions): Promise<Data<T>>;
|
|
18
|
-
/**
|
|
19
|
-
* Recursively scans an object/array and replaces any string
|
|
20
|
-
* starting with "/Lotus/Language" with its translation.
|
|
11
|
+
* Generic filter runner that applies the masterable logic if requested
|
|
21
12
|
*/
|
|
22
|
-
|
|
13
|
+
protected getFiltered<E extends T>(options: FilterOptions, predicate: (w: T) => w is E): E[];
|
|
23
14
|
getAll(): T[];
|
|
24
15
|
getByUniqueName(uniqueName: string): T | null;
|
|
25
|
-
|
|
16
|
+
filter<S extends T>(predicate: (item: T) => item is S): S[];
|
|
17
|
+
filter(predicate: (item: T) => boolean): T[];
|
|
26
18
|
}
|
|
27
19
|
|
|
28
|
-
|
|
29
|
-
locale?: string;
|
|
30
|
-
};
|
|
31
|
-
type FilterOptions = {
|
|
32
|
-
masterable?: boolean;
|
|
33
|
-
};
|
|
34
|
-
declare class FactionProvider extends BaseProvider<Faction> {
|
|
35
|
-
static create(options?: Options): Promise<FactionProvider>;
|
|
20
|
+
declare class Factions extends BaseClient<Faction> {
|
|
36
21
|
}
|
|
37
|
-
declare class
|
|
38
|
-
static create(options?: Options): Promise<MissionTypeProvider>;
|
|
22
|
+
declare class MissionTypes extends BaseClient<MissionType> {
|
|
39
23
|
}
|
|
40
|
-
declare class
|
|
41
|
-
static create(options?: Options): Promise<RailjackIntrinsicProvider>;
|
|
24
|
+
declare class RailjackIntrinsics extends BaseClient<Intrinsic> {
|
|
42
25
|
}
|
|
43
|
-
declare class
|
|
44
|
-
|
|
26
|
+
declare class Regions extends BaseClient<Region> {
|
|
27
|
+
getStarChart(options?: FilterOptions): Record<number, {
|
|
28
|
+
systemName: string;
|
|
29
|
+
nodes: Region[];
|
|
30
|
+
}>;
|
|
45
31
|
}
|
|
46
|
-
declare class
|
|
47
|
-
static create(options?: Options): Promise<SentinelProvider>;
|
|
32
|
+
declare class Sentinels extends BaseClient<Sentinel> {
|
|
48
33
|
}
|
|
49
|
-
declare class
|
|
34
|
+
declare class Warframes extends BaseClient<Warframe> {
|
|
50
35
|
getPrimes(): Warframe[];
|
|
51
|
-
static create(options?: Options): Promise<WarframeProvider>;
|
|
52
36
|
}
|
|
53
|
-
declare class
|
|
54
|
-
static create(options?: Options): Promise<ArchwingProvider>;
|
|
37
|
+
declare class Archwings extends BaseClient<Archwing> {
|
|
55
38
|
}
|
|
56
|
-
declare class
|
|
57
|
-
static create(options?: Options): Promise<NecramechProvider>;
|
|
39
|
+
declare class Necramechs extends BaseClient<Necramech> {
|
|
58
40
|
}
|
|
59
|
-
declare class
|
|
60
|
-
/**
|
|
61
|
-
* Generic filter runner that applies the masterable logic if requested
|
|
62
|
-
*/
|
|
63
|
-
private getFiltered;
|
|
41
|
+
declare class Weapons extends BaseClient<Weapon> {
|
|
64
42
|
getPrimaries(options?: FilterOptions): PrimaryWeapon[];
|
|
65
43
|
getSecondaries(options?: FilterOptions): SecondaryWeapon[];
|
|
66
44
|
getMelees(options?: FilterOptions): Melee[];
|
|
@@ -71,14 +49,8 @@ declare class WeaponProvider extends BaseProvider<Weapon> {
|
|
|
71
49
|
getKDrives(options?: FilterOptions): KDrive[];
|
|
72
50
|
getKitguns(options?: FilterOptions): Kitgun[];
|
|
73
51
|
getZaws(options?: FilterOptions): Zaw[];
|
|
74
|
-
static create(options?: Options): Promise<WeaponProvider>;
|
|
75
52
|
}
|
|
76
|
-
declare class
|
|
77
|
-
static create(options?: Options): Promise<PetProvider>;
|
|
78
|
-
/**
|
|
79
|
-
* Generic filter runner that applies the masterable logic if requested
|
|
80
|
-
*/
|
|
81
|
-
private getFiltered;
|
|
53
|
+
declare class Pets extends BaseClient<Sentinel | Weapon> {
|
|
82
54
|
/**
|
|
83
55
|
* Returns Sentinels (Dethcube, Taxon, etc.)
|
|
84
56
|
*/
|
|
@@ -106,4 +78,4 @@ declare class PetProvider extends BaseProvider<Sentinel | Weapon> {
|
|
|
106
78
|
getSentinelWeapons(options?: FilterOptions): SentinelWeapon[];
|
|
107
79
|
}
|
|
108
80
|
|
|
109
|
-
export {
|
|
81
|
+
export { Archwings, Factions, MissionTypes, Necramechs, Pets, RailjackIntrinsics, Regions, Sentinels, Warframes, Weapons };
|