@ianlucas/cs2-lib 9.1.0-rc.2 → 9.1.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/dist/economy-constants.d.mts +66 -67
- package/dist/economy-container.d.mts +18 -19
- package/dist/economy-types.d.mts +17 -18
- package/dist/economy.d.mts +4 -5
- package/dist/inventory-format.d.mts +10 -11
- package/dist/inventory-migrations/index.d.mts +5 -6
- package/dist/inventory-rules.d.mts +25 -26
- package/dist/inventory-types.d.mts +5 -6
- package/dist/inventory.d.mts +9 -10
- package/dist/items.d.mts +2 -3
- package/dist/items.mjs +1 -1
- package/dist/keyvalues.d.mts +2 -3
- package/dist/keyvalues3.d.mts +2 -3
- package/dist/maps.d.mts +14 -15
- package/dist/teams.d.mts +4 -5
- package/dist/translations/brazilian.d.mts +2 -3
- package/dist/translations/bulgarian.d.mts +2 -3
- package/dist/translations/czech.d.mts +2 -3
- package/dist/translations/danish.d.mts +2 -3
- package/dist/translations/dutch.d.mts +2 -3
- package/dist/translations/english.d.mts +2 -3
- package/dist/translations/finnish.d.mts +2 -3
- package/dist/translations/french.d.mts +2 -3
- package/dist/translations/german.d.mts +2 -3
- package/dist/translations/greek.d.mts +2 -3
- package/dist/translations/hungarian.d.mts +2 -3
- package/dist/translations/indonesian.d.mts +2 -3
- package/dist/translations/italian.d.mts +2 -3
- package/dist/translations/japanese.d.mts +2 -3
- package/dist/translations/koreana.d.mts +2 -3
- package/dist/translations/latam.d.mts +2 -3
- package/dist/translations/norwegian.d.mts +2 -3
- package/dist/translations/polish.d.mts +2 -3
- package/dist/translations/portuguese.d.mts +2 -3
- package/dist/translations/romanian.d.mts +2 -3
- package/dist/translations/russian.d.mts +2 -3
- package/dist/translations/schinese.d.mts +2 -3
- package/dist/translations/spanish.d.mts +2 -3
- package/dist/translations/swedish.d.mts +2 -3
- package/dist/translations/tchinese.d.mts +2 -3
- package/dist/translations/thai.d.mts +2 -3
- package/dist/translations/turkish.d.mts +2 -3
- package/dist/translations/ukrainian.d.mts +2 -3
- package/dist/translations/vietnamese.d.mts +2 -3
- package/dist/utils.d.mts +17 -18
- package/dist/veto.d.mts +9 -10
- package/package.json +3 -3
package/dist/keyvalues.d.mts
CHANGED
package/dist/keyvalues3.d.mts
CHANGED
package/dist/maps.d.mts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
//#region src/maps.d.ts
|
|
2
|
-
interface CS2Map {
|
|
2
|
+
export interface CS2Map {
|
|
3
3
|
mapname: string;
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
|
-
declare const CS2_ANCIENT_MAP: CS2Map;
|
|
7
|
-
declare const CS2_ANUBIS_MAP: CS2Map;
|
|
8
|
-
declare const CS2_INFERNO_MAP: CS2Map;
|
|
9
|
-
declare const CS2_MIRAGE_MAP: CS2Map;
|
|
10
|
-
declare const CS2_DUST2_MAP: CS2Map;
|
|
11
|
-
declare const CS2_NUKE_MAP: CS2Map;
|
|
12
|
-
declare const CS2_OVERPASS_MAP: CS2Map;
|
|
13
|
-
declare const CS2_VERTIGO_MAP: CS2Map;
|
|
14
|
-
declare const CS2_TRAIN_MAP: CS2Map;
|
|
15
|
-
declare const CS2_CACHE_MAP: CS2Map;
|
|
16
|
-
declare const CS2_ALL_MAPS: CS2Map[];
|
|
17
|
-
declare function getMapnameName(mapname: string): string;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { CS2Map, CS2_ALL_MAPS, CS2_ANCIENT_MAP, CS2_ANUBIS_MAP, CS2_CACHE_MAP, CS2_DUST2_MAP, CS2_INFERNO_MAP, CS2_MIRAGE_MAP, CS2_NUKE_MAP, CS2_OVERPASS_MAP, CS2_TRAIN_MAP, CS2_VERTIGO_MAP, getMapnameName };
|
|
6
|
+
export declare const CS2_ANCIENT_MAP: CS2Map;
|
|
7
|
+
export declare const CS2_ANUBIS_MAP: CS2Map;
|
|
8
|
+
export declare const CS2_INFERNO_MAP: CS2Map;
|
|
9
|
+
export declare const CS2_MIRAGE_MAP: CS2Map;
|
|
10
|
+
export declare const CS2_DUST2_MAP: CS2Map;
|
|
11
|
+
export declare const CS2_NUKE_MAP: CS2Map;
|
|
12
|
+
export declare const CS2_OVERPASS_MAP: CS2Map;
|
|
13
|
+
export declare const CS2_VERTIGO_MAP: CS2Map;
|
|
14
|
+
export declare const CS2_TRAIN_MAP: CS2Map;
|
|
15
|
+
export declare const CS2_CACHE_MAP: CS2Map;
|
|
16
|
+
export declare const CS2_ALL_MAPS: CS2Map[];
|
|
17
|
+
export declare function getMapnameName(mapname: string): string;
|
|
18
|
+
//#endregion
|
package/dist/teams.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { EnumValues } from "./utils.mjs";
|
|
2
2
|
//#region src/teams.d.ts
|
|
3
|
-
declare const CS2Team: {
|
|
3
|
+
export declare const CS2Team: {
|
|
4
4
|
readonly None: 0;
|
|
5
5
|
readonly T: 2;
|
|
6
6
|
readonly CT: 3;
|
|
7
7
|
};
|
|
8
|
-
type CS2Team = EnumValues<typeof CS2Team>;
|
|
9
|
-
declare function toggleCS2Team(team: CS2Team): CS2Team;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { CS2Team, toggleCS2Team };
|
|
8
|
+
export type CS2Team = EnumValues<typeof CS2Team>;
|
|
9
|
+
export declare function toggleCS2Team(team: CS2Team): CS2Team;
|
|
10
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CS2ItemTranslationMap } from "../economy-types.mjs";
|
|
2
2
|
//#region src/translations/indonesian.d.ts
|
|
3
|
-
declare const indonesian: CS2ItemTranslationMap;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { indonesian };
|
|
3
|
+
export declare const indonesian: CS2ItemTranslationMap;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CS2ItemTranslationMap } from "../economy-types.mjs";
|
|
2
2
|
//#region src/translations/portuguese.d.ts
|
|
3
|
-
declare const portuguese: CS2ItemTranslationMap;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { portuguese };
|
|
3
|
+
export declare const portuguese: CS2ItemTranslationMap;
|
|
4
|
+
//#endregion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CS2ItemTranslationMap } from "../economy-types.mjs";
|
|
2
2
|
//#region src/translations/vietnamese.d.ts
|
|
3
|
-
declare const vietnamese: CS2ItemTranslationMap;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { vietnamese };
|
|
3
|
+
export declare const vietnamese: CS2ItemTranslationMap;
|
|
4
|
+
//#endregion
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
//#region src/utils.d.ts
|
|
2
|
-
type EnumValues<T> = T[keyof T];
|
|
3
|
-
type Interface<T extends object> = { [key in T extends any ? { [K in keyof T]-?: {} extends Pick<T, K> ? never : K; }[keyof T] : never]: T[key]; } & { [key in T extends any ? { [K in keyof T]-?: {} extends Pick<T, K> ? K : never; }[keyof T] : never]-?: T[key] | undefined; };
|
|
4
|
-
type MapValue<T> = T extends Map<any, infer I> ? I : never;
|
|
5
|
-
type RecordValue<T> = T extends Record<any, infer I> ? I : never;
|
|
6
|
-
declare function compare<T, U>(var1: T, var2: U): boolean;
|
|
7
|
-
declare function float(literal: number, fractionDigits?: number): number;
|
|
8
|
-
declare function clamp(value: number, min: number, max: number): number;
|
|
9
|
-
declare function countDecimals(value: number): number;
|
|
10
|
-
declare function isFactorPrecise(value: number, factor: number): boolean;
|
|
11
|
-
declare function truncateToFactor(value: number, factor: number): number;
|
|
12
|
-
declare function roundToFactor(value: number, factor: number): number;
|
|
13
|
-
declare function ensure<T>(value: T, message?: string): NonNullable<T> & {};
|
|
14
|
-
declare function safe<T>(fn: () => T): false | T;
|
|
15
|
-
declare function assert(condition: any, message?: string): asserts condition;
|
|
16
|
-
declare function fail(message?: string): never;
|
|
17
|
-
declare function isNotUndefined<T>(value: T): value is NonNullable<T>;
|
|
18
|
-
//#endregion
|
|
19
|
-
export { EnumValues, Interface, MapValue, RecordValue, assert, clamp, compare, countDecimals, ensure, fail, float, isFactorPrecise, isNotUndefined, roundToFactor, safe, truncateToFactor };
|
|
2
|
+
export type EnumValues<T> = T[keyof T];
|
|
3
|
+
export type Interface<T extends object> = { [key in T extends any ? { [K in keyof T]-?: {} extends Pick<T, K> ? never : K; }[keyof T] : never]: T[key]; } & { [key in T extends any ? { [K in keyof T]-?: {} extends Pick<T, K> ? K : never; }[keyof T] : never]-?: T[key] | undefined; };
|
|
4
|
+
export type MapValue<T> = T extends Map<any, infer I> ? I : never;
|
|
5
|
+
export type RecordValue<T> = T extends Record<any, infer I> ? I : never;
|
|
6
|
+
export declare function compare<T, U>(var1: T, var2: U): boolean;
|
|
7
|
+
export declare function float(literal: number, fractionDigits?: number): number;
|
|
8
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
9
|
+
export declare function countDecimals(value: number): number;
|
|
10
|
+
export declare function isFactorPrecise(value: number, factor: number): boolean;
|
|
11
|
+
export declare function truncateToFactor(value: number, factor: number): number;
|
|
12
|
+
export declare function roundToFactor(value: number, factor: number): number;
|
|
13
|
+
export declare function ensure<T>(value: T, message?: string): NonNullable<T> & {};
|
|
14
|
+
export declare function safe<T>(fn: () => T): false | T;
|
|
15
|
+
export declare function assert(condition: any, message?: string): asserts condition;
|
|
16
|
+
export declare function fail(message?: string): never;
|
|
17
|
+
export declare function isNotUndefined<T>(value: T): value is NonNullable<T>;
|
|
18
|
+
//#endregion
|
package/dist/veto.d.mts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { EnumValues } from "./utils.mjs";
|
|
2
2
|
import { CS2Map } from "./maps.mjs";
|
|
3
3
|
//#region src/veto.d.ts
|
|
4
|
-
declare const CS2VetoAction: {
|
|
4
|
+
export declare const CS2VetoAction: {
|
|
5
5
|
readonly Pick: 1;
|
|
6
6
|
readonly Ban: 2;
|
|
7
7
|
};
|
|
8
|
-
type CS2VetoAction = EnumValues<typeof CS2VetoAction>;
|
|
9
|
-
declare const CS2VetoType: {
|
|
8
|
+
export type CS2VetoAction = EnumValues<typeof CS2VetoAction>;
|
|
9
|
+
export declare const CS2VetoType: {
|
|
10
10
|
readonly BO1: "bo1";
|
|
11
11
|
readonly BO2: "bo2";
|
|
12
12
|
readonly BO3: "bo3";
|
|
13
13
|
readonly BO5: "bo5";
|
|
14
14
|
readonly Custom: "custom";
|
|
15
15
|
};
|
|
16
|
-
type CS2VetoType = EnumValues<typeof CS2VetoType>;
|
|
17
|
-
type CS2VetoTeam = 0 | 1;
|
|
18
|
-
interface CS2VetoMap {
|
|
16
|
+
export type CS2VetoType = EnumValues<typeof CS2VetoType>;
|
|
17
|
+
export type CS2VetoTeam = 0 | 1;
|
|
18
|
+
export interface CS2VetoMap {
|
|
19
19
|
action?: CS2VetoAction;
|
|
20
20
|
mapname: string;
|
|
21
21
|
team?: CS2VetoTeam;
|
|
22
22
|
}
|
|
23
|
-
interface CS2VetoEvent {
|
|
23
|
+
export interface CS2VetoEvent {
|
|
24
24
|
action?: CS2VetoAction;
|
|
25
25
|
mapname: string;
|
|
26
26
|
team?: CS2VetoTeam;
|
|
27
27
|
}
|
|
28
|
-
declare class CS2Veto {
|
|
28
|
+
export declare class CS2Veto {
|
|
29
29
|
private actions;
|
|
30
30
|
private history;
|
|
31
31
|
private maps;
|
|
@@ -44,5 +44,4 @@ declare class CS2Veto {
|
|
|
44
44
|
choose(mapname: string): boolean;
|
|
45
45
|
random(): boolean;
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
|
-
export { CS2Veto, CS2VetoAction, CS2VetoEvent, CS2VetoMap, CS2VetoTeam, CS2VetoType };
|
|
47
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"meshoptimizer": "1.2.0",
|
|
60
60
|
"prettier": "3.9.6",
|
|
61
61
|
"rolldown": "^1.1.4",
|
|
62
|
-
"rolldown-plugin-dts": "^0.28.
|
|
62
|
+
"rolldown-plugin-dts": "^0.28.2",
|
|
63
63
|
"rollup-plugin-delete": "^3.0.2",
|
|
64
64
|
"sharp": "0.35.3",
|
|
65
|
-
"tsx": "^4.23.
|
|
65
|
+
"tsx": "^4.23.12",
|
|
66
66
|
"typedoc": "^0.28.20",
|
|
67
67
|
"typescript": "^6.0.3",
|
|
68
68
|
"vitest": "^4.1.10"
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": ">=20"
|
|
72
72
|
},
|
|
73
|
-
"version": "9.1.0
|
|
73
|
+
"version": "9.1.0"
|
|
74
74
|
}
|