@tenno-companion/core 0.1.5 → 0.2.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 +1 -1
- package/dist/chunk-MZYECZBA.mjs +1 -0
- package/dist/chunk-STFT6SKY.mjs +1 -0
- package/dist/enemies-YS2SO76V.mjs +1 -0
- package/dist/index.d.mts +16 -41
- package/dist/index.d.ts +16 -41
- package/dist/index.js +16 -16
- package/dist/index.mjs +1 -1
- package/dist/lib/locales.d.mts +1 -1
- package/dist/lib/locales.d.ts +1 -1
- 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 +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -1
- package/package.json +6 -1
- package/dist/chunk-TL2VWYDC.mjs +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,62 +1,39 @@
|
|
|
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
2
|
import { D as Data } from './internal-DDFPKiUV.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
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Static helper used by subclasses to fetch and translate data
|
|
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.
|
|
21
|
-
*/
|
|
22
|
-
private static translateRecursive;
|
|
9
|
+
constructor(items: Data<T>, locale: string);
|
|
23
10
|
getAll(): T[];
|
|
24
11
|
getByUniqueName(uniqueName: string): T | null;
|
|
25
|
-
|
|
12
|
+
filter<S extends T>(predicate: (item: T) => item is S): S[];
|
|
13
|
+
filter(predicate: (item: T) => boolean): T[];
|
|
26
14
|
}
|
|
27
15
|
|
|
28
|
-
type Options = {
|
|
29
|
-
locale?: string;
|
|
30
|
-
};
|
|
31
16
|
type FilterOptions = {
|
|
32
17
|
masterable?: boolean;
|
|
33
18
|
};
|
|
34
|
-
declare class
|
|
35
|
-
static create(options?: Options): Promise<FactionProvider>;
|
|
19
|
+
declare class Factions extends BaseClient<Faction> {
|
|
36
20
|
}
|
|
37
|
-
declare class
|
|
38
|
-
static create(options?: Options): Promise<MissionTypeProvider>;
|
|
21
|
+
declare class MissionTypes extends BaseClient<MissionType> {
|
|
39
22
|
}
|
|
40
|
-
declare class
|
|
41
|
-
static create(options?: Options): Promise<RailjackIntrinsicProvider>;
|
|
23
|
+
declare class RailjackIntrinsics extends BaseClient<Intrinsic> {
|
|
42
24
|
}
|
|
43
|
-
declare class
|
|
44
|
-
static create(options?: Options): Promise<RegionProvider>;
|
|
25
|
+
declare class Regions extends BaseClient<Region> {
|
|
45
26
|
}
|
|
46
|
-
declare class
|
|
47
|
-
static create(options?: Options): Promise<SentinelProvider>;
|
|
27
|
+
declare class Sentinels extends BaseClient<Sentinel> {
|
|
48
28
|
}
|
|
49
|
-
declare class
|
|
29
|
+
declare class Warframes extends BaseClient<Warframe> {
|
|
50
30
|
getPrimes(): Warframe[];
|
|
51
|
-
static create(options?: Options): Promise<WarframeProvider>;
|
|
52
31
|
}
|
|
53
|
-
declare class
|
|
54
|
-
static create(options?: Options): Promise<ArchwingProvider>;
|
|
32
|
+
declare class Archwings extends BaseClient<Archwing> {
|
|
55
33
|
}
|
|
56
|
-
declare class
|
|
57
|
-
static create(options?: Options): Promise<NecramechProvider>;
|
|
34
|
+
declare class Necramechs extends BaseClient<Necramech> {
|
|
58
35
|
}
|
|
59
|
-
declare class
|
|
36
|
+
declare class Weapons extends BaseClient<Weapon> {
|
|
60
37
|
/**
|
|
61
38
|
* Generic filter runner that applies the masterable logic if requested
|
|
62
39
|
*/
|
|
@@ -71,10 +48,8 @@ declare class WeaponProvider extends BaseProvider<Weapon> {
|
|
|
71
48
|
getKDrives(options?: FilterOptions): KDrive[];
|
|
72
49
|
getKitguns(options?: FilterOptions): Kitgun[];
|
|
73
50
|
getZaws(options?: FilterOptions): Zaw[];
|
|
74
|
-
static create(options?: Options): Promise<WeaponProvider>;
|
|
75
51
|
}
|
|
76
|
-
declare class
|
|
77
|
-
static create(options?: Options): Promise<PetProvider>;
|
|
52
|
+
declare class Pets extends BaseClient<Sentinel | Weapon> {
|
|
78
53
|
/**
|
|
79
54
|
* Generic filter runner that applies the masterable logic if requested
|
|
80
55
|
*/
|
|
@@ -106,4 +81,4 @@ declare class PetProvider extends BaseProvider<Sentinel | Weapon> {
|
|
|
106
81
|
getSentinelWeapons(options?: FilterOptions): SentinelWeapon[];
|
|
107
82
|
}
|
|
108
83
|
|
|
109
|
-
export {
|
|
84
|
+
export { Archwings, Factions, MissionTypes, Necramechs, Pets, RailjackIntrinsics, Regions, Sentinels, Warframes, Weapons };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,62 +1,39 @@
|
|
|
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
2
|
import { D as Data } from './internal-DDFPKiUV.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
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Static helper used by subclasses to fetch and translate data
|
|
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.
|
|
21
|
-
*/
|
|
22
|
-
private static translateRecursive;
|
|
9
|
+
constructor(items: Data<T>, locale: string);
|
|
23
10
|
getAll(): T[];
|
|
24
11
|
getByUniqueName(uniqueName: string): T | null;
|
|
25
|
-
|
|
12
|
+
filter<S extends T>(predicate: (item: T) => item is S): S[];
|
|
13
|
+
filter(predicate: (item: T) => boolean): T[];
|
|
26
14
|
}
|
|
27
15
|
|
|
28
|
-
type Options = {
|
|
29
|
-
locale?: string;
|
|
30
|
-
};
|
|
31
16
|
type FilterOptions = {
|
|
32
17
|
masterable?: boolean;
|
|
33
18
|
};
|
|
34
|
-
declare class
|
|
35
|
-
static create(options?: Options): Promise<FactionProvider>;
|
|
19
|
+
declare class Factions extends BaseClient<Faction> {
|
|
36
20
|
}
|
|
37
|
-
declare class
|
|
38
|
-
static create(options?: Options): Promise<MissionTypeProvider>;
|
|
21
|
+
declare class MissionTypes extends BaseClient<MissionType> {
|
|
39
22
|
}
|
|
40
|
-
declare class
|
|
41
|
-
static create(options?: Options): Promise<RailjackIntrinsicProvider>;
|
|
23
|
+
declare class RailjackIntrinsics extends BaseClient<Intrinsic> {
|
|
42
24
|
}
|
|
43
|
-
declare class
|
|
44
|
-
static create(options?: Options): Promise<RegionProvider>;
|
|
25
|
+
declare class Regions extends BaseClient<Region> {
|
|
45
26
|
}
|
|
46
|
-
declare class
|
|
47
|
-
static create(options?: Options): Promise<SentinelProvider>;
|
|
27
|
+
declare class Sentinels extends BaseClient<Sentinel> {
|
|
48
28
|
}
|
|
49
|
-
declare class
|
|
29
|
+
declare class Warframes extends BaseClient<Warframe> {
|
|
50
30
|
getPrimes(): Warframe[];
|
|
51
|
-
static create(options?: Options): Promise<WarframeProvider>;
|
|
52
31
|
}
|
|
53
|
-
declare class
|
|
54
|
-
static create(options?: Options): Promise<ArchwingProvider>;
|
|
32
|
+
declare class Archwings extends BaseClient<Archwing> {
|
|
55
33
|
}
|
|
56
|
-
declare class
|
|
57
|
-
static create(options?: Options): Promise<NecramechProvider>;
|
|
34
|
+
declare class Necramechs extends BaseClient<Necramech> {
|
|
58
35
|
}
|
|
59
|
-
declare class
|
|
36
|
+
declare class Weapons extends BaseClient<Weapon> {
|
|
60
37
|
/**
|
|
61
38
|
* Generic filter runner that applies the masterable logic if requested
|
|
62
39
|
*/
|
|
@@ -71,10 +48,8 @@ declare class WeaponProvider extends BaseProvider<Weapon> {
|
|
|
71
48
|
getKDrives(options?: FilterOptions): KDrive[];
|
|
72
49
|
getKitguns(options?: FilterOptions): Kitgun[];
|
|
73
50
|
getZaws(options?: FilterOptions): Zaw[];
|
|
74
|
-
static create(options?: Options): Promise<WeaponProvider>;
|
|
75
51
|
}
|
|
76
|
-
declare class
|
|
77
|
-
static create(options?: Options): Promise<PetProvider>;
|
|
52
|
+
declare class Pets extends BaseClient<Sentinel | Weapon> {
|
|
78
53
|
/**
|
|
79
54
|
* Generic filter runner that applies the masterable logic if requested
|
|
80
55
|
*/
|
|
@@ -106,4 +81,4 @@ declare class PetProvider extends BaseProvider<Sentinel | Weapon> {
|
|
|
106
81
|
getSentinelWeapons(options?: FilterOptions): SentinelWeapon[];
|
|
107
82
|
}
|
|
108
83
|
|
|
109
|
-
export {
|
|
84
|
+
export { Archwings, Factions, MissionTypes, Necramechs, Pets, RailjackIntrinsics, Regions, Sentinels, Warframes, Weapons };
|