@butr/vortexextensionnative 1.0.10

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.
Files changed (33) hide show
  1. package/dist/Bannerlord.VortexExtension.Native.dll +0 -0
  2. package/dist/main/lib/index.d.ts +24 -0
  3. package/dist/main/lib/index.js +99 -0
  4. package/dist/main/lib/index.js.map +1 -0
  5. package/dist/main/lib/types/BannerlordModuleManager.d.ts +100 -0
  6. package/dist/main/lib/types/BannerlordModuleManager.js +38 -0
  7. package/dist/main/lib/types/BannerlordModuleManager.js.map +1 -0
  8. package/dist/main/lib/types/FetchBannerlordVersion.d.ts +5 -0
  9. package/dist/main/lib/types/FetchBannerlordVersion.js +13 -0
  10. package/dist/main/lib/types/FetchBannerlordVersion.js.map +1 -0
  11. package/dist/main/lib/types/VortexExtensionManager.d.ts +28 -0
  12. package/dist/main/lib/types/VortexExtensionManager.js +13 -0
  13. package/dist/main/lib/types/VortexExtensionManager.js.map +1 -0
  14. package/dist/main/lib/types/index.d.ts +8 -0
  15. package/dist/main/lib/types/index.js +30 -0
  16. package/dist/main/lib/types/index.js.map +1 -0
  17. package/dist/module/lib/index.d.ts +24 -0
  18. package/dist/module/lib/index.js +60 -0
  19. package/dist/module/lib/index.js.map +1 -0
  20. package/dist/module/lib/types/BannerlordModuleManager.d.ts +100 -0
  21. package/dist/module/lib/types/BannerlordModuleManager.js +25 -0
  22. package/dist/module/lib/types/BannerlordModuleManager.js.map +1 -0
  23. package/dist/module/lib/types/FetchBannerlordVersion.d.ts +5 -0
  24. package/dist/module/lib/types/FetchBannerlordVersion.js +2 -0
  25. package/dist/module/lib/types/FetchBannerlordVersion.js.map +1 -0
  26. package/dist/module/lib/types/VortexExtensionManager.d.ts +28 -0
  27. package/dist/module/lib/types/VortexExtensionManager.js +2 -0
  28. package/dist/module/lib/types/VortexExtensionManager.js.map +1 -0
  29. package/dist/module/lib/types/index.d.ts +8 -0
  30. package/dist/module/lib/types/index.js +4 -0
  31. package/dist/module/lib/types/index.js.map +1 -0
  32. package/dist/vortexextension.node +0 -0
  33. package/package.json +120 -0
@@ -0,0 +1,24 @@
1
+ import * as types from './types';
2
+ export declare const createVortexExtensionManager: () => types.VortexExtensionManager;
3
+ export declare class BannerlordModuleManager {
4
+ private constructor();
5
+ static sort(unsorted: types.ModuleInfoExtended[]): types.ModuleInfoExtended[];
6
+ static sortWithOptions(unsorted: types.ModuleInfoExtended[], options: types.ModuleSorterOptions): types.ModuleInfoExtended[];
7
+ static areAllDependenciesOfModulePresent(unsorted: types.ModuleInfoExtended[], module: types.ModuleInfoExtended): boolean;
8
+ static getDependentModulesOf(source: types.ModuleInfoExtended[], module: types.ModuleInfoExtended): types.ModuleInfoExtended[];
9
+ static getDependentModulesOfWithOptions(source: types.ModuleInfoExtended[], module: types.ModuleInfoExtended, options: types.ModuleSorterOptions): types.ModuleInfoExtended[];
10
+ static validateLoadOrder(source: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended): types.ModuleIssue[];
11
+ static validateModule(modules: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended, manager: types.IValidationManager): types.ModuleIssue[];
12
+ static enableModule(modules: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended, manager: types.IEnableDisableManager): types.ModuleIssue[];
13
+ static disableModule(modules: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended, manager: types.IEnableDisableManager): types.ModuleIssue[];
14
+ static getModuleInfo(xml: string): types.ModuleInfoExtended | undefined;
15
+ static getSubModuleInfo(xml: string): types.SubModuleInfoExtended | undefined;
16
+ static compareVersions(x: types.ApplicationVersion, y: types.ApplicationVersion): number;
17
+ }
18
+ export declare class FetchBannerlordVersion {
19
+ private constructor();
20
+ static getChangeSet(gameFolderPath: string, libAssembly: string): number;
21
+ static getVersion(gameFolderPath: string, libAssembly: string): string;
22
+ static getVersionType(gameFolderPath: string, libAssembly: string): number;
23
+ }
24
+ export { types };
@@ -0,0 +1,99 @@
1
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
+ if (k2 === undefined) k2 = k;
3
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
+ desc = { enumerable: true, get: function() { return m[k]; } };
6
+ }
7
+ Object.defineProperty(o, k2, desc);
8
+ }) : (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ o[k2] = m[k];
11
+ }));
12
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
13
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
14
+ }) : function(o, v) {
15
+ o["default"] = v;
16
+ });
17
+ var __importStar = (this && this.__importStar) || function (mod) {
18
+ if (mod && mod.__esModule) return mod;
19
+ var result = {};
20
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
21
+ __setModuleDefault(result, mod);
22
+ return result;
23
+ };
24
+ (function (factory) {
25
+ if (typeof module === "object" && typeof module.exports === "object") {
26
+ var v = factory(require, exports);
27
+ if (v !== undefined) module.exports = v;
28
+ }
29
+ else if (typeof define === "function" && define.amd) {
30
+ define(["require", "exports", "./types"], factory);
31
+ }
32
+ })(function (require, exports) {
33
+ "use strict";
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.types = exports.FetchBannerlordVersion = exports.BannerlordModuleManager = exports.createVortexExtensionManager = void 0;
36
+ const types = __importStar(require("./types"));
37
+ exports.types = types;
38
+ const vortexextension = require('./../../vortexextension.node');
39
+ const createVortexExtensionManager = () => {
40
+ return new vortexextension.VortexExtensionManager();
41
+ };
42
+ exports.createVortexExtensionManager = createVortexExtensionManager;
43
+ class BannerlordModuleManager {
44
+ /* istanbul ignore next */
45
+ constructor() { }
46
+ static sort(unsorted) {
47
+ return vortexextension.sort(unsorted);
48
+ }
49
+ static sortWithOptions(unsorted, options) {
50
+ return vortexextension.sortWithOptions(unsorted, options);
51
+ }
52
+ static areAllDependenciesOfModulePresent(unsorted, module) {
53
+ return vortexextension.areAllDependenciesOfModulePresent(unsorted, module);
54
+ }
55
+ static getDependentModulesOf(source, module) {
56
+ return vortexextension.getDependentModulesOf(source, module);
57
+ }
58
+ static getDependentModulesOfWithOptions(source, module, options) {
59
+ return vortexextension.getDependentModulesOfWithOptions(source, module, options);
60
+ }
61
+ static validateLoadOrder(source, targetModule) {
62
+ return vortexextension.validateLoadOrder(source, targetModule);
63
+ }
64
+ static validateModule(modules, targetModule, manager) {
65
+ return vortexextension.validateModule(modules, targetModule, manager);
66
+ }
67
+ static enableModule(modules, targetModule, manager) {
68
+ return vortexextension.enableModule(modules, targetModule, manager);
69
+ }
70
+ static disableModule(modules, targetModule, manager) {
71
+ return vortexextension.disableModule(modules, targetModule, manager);
72
+ }
73
+ static getModuleInfo(xml) {
74
+ return vortexextension.getModuleInfo(xml);
75
+ }
76
+ static getSubModuleInfo(xml) {
77
+ return vortexextension.getSubModuleInfo(xml);
78
+ }
79
+ static compareVersions(x, y) {
80
+ return vortexextension.compareVersions(x, y);
81
+ }
82
+ }
83
+ exports.BannerlordModuleManager = BannerlordModuleManager;
84
+ class FetchBannerlordVersion {
85
+ /* istanbul ignore next */
86
+ constructor() { }
87
+ static getChangeSet(gameFolderPath, libAssembly) {
88
+ return vortexextension.getChangeSet(gameFolderPath, libAssembly);
89
+ }
90
+ static getVersion(gameFolderPath, libAssembly) {
91
+ return vortexextension.getVersion(gameFolderPath, libAssembly);
92
+ }
93
+ static getVersionType(gameFolderPath, libAssembly) {
94
+ return vortexextension.getVersionType(gameFolderPath, libAssembly);
95
+ }
96
+ }
97
+ exports.FetchBannerlordVersion = FetchBannerlordVersion;
98
+ });
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA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ion;
6
+ isSingleplayerModule: boolean;
7
+ isMultiplayerModule: boolean;
8
+ subModules: Array<SubModuleInfoExtended>;
9
+ dependentModules: Array<DependentModule>;
10
+ modulesToLoadAfterThis: Array<DependentModule>;
11
+ incompatibleModules: Array<DependentModule>;
12
+ url: string;
13
+ dependentModuleMetadatas: Array<DependentModuleMetadata>;
14
+ }
15
+ export interface ApplicationVersion {
16
+ applicationVersionType: ApplicationVersionType;
17
+ major: number;
18
+ minor: number;
19
+ revision: number;
20
+ changeSet: number;
21
+ }
22
+ export declare enum ApplicationVersionType {
23
+ Alpha = 0,
24
+ Beta = 1,
25
+ EarlyAccess = 2,
26
+ Release = 3,
27
+ Development = 4,
28
+ Invalid = 5
29
+ }
30
+ export interface SubModuleInfoExtended {
31
+ name: string;
32
+ dLLName: string;
33
+ assemblies: Array<string>;
34
+ subModuleClassType: string;
35
+ tags: Map<string, Array<string>>;
36
+ }
37
+ export interface DependentModule {
38
+ id: string;
39
+ version: ApplicationVersion;
40
+ isOptional: boolean;
41
+ }
42
+ export interface DependentModuleMetadata {
43
+ id: string;
44
+ loadType: LoadType;
45
+ isOptional: boolean;
46
+ isIncompatible: boolean;
47
+ version: ApplicationVersion;
48
+ versionRange: ApplicationVersionRange;
49
+ }
50
+ export declare enum LoadType {
51
+ None = 0,
52
+ LoadAfterThis = 1,
53
+ LoadBeforeThis = 2
54
+ }
55
+ export interface ApplicationVersionRange {
56
+ min: ApplicationVersion;
57
+ max: ApplicationVersion;
58
+ }
59
+ export interface ModuleSorterOptions {
60
+ skipOptionals: boolean;
61
+ skipExternalDependencies: boolean;
62
+ }
63
+ export interface ModuleIssue {
64
+ target: ModuleInfoExtended;
65
+ sourceId: string;
66
+ type: ModuleIssueType;
67
+ reason: string;
68
+ sourceVersion: ApplicationVersionRange;
69
+ }
70
+ export declare enum ModuleIssueType {
71
+ MissingDependencies = 0,
72
+ DependencyMissingDependencies = 1,
73
+ DependencyValidationError = 2,
74
+ VersionMismatch = 3,
75
+ Incompatible = 4,
76
+ DependencyConflict = 5
77
+ }
78
+ export interface IValidationManager {
79
+ isSelected(moduleId: string): boolean;
80
+ }
81
+ export interface IEnableDisableManager {
82
+ getSelected(moduleId: string): boolean;
83
+ setSelected(moduleId: string, value: boolean): void;
84
+ getDisabled(moduleId: string): boolean;
85
+ setDisabled(moduleId: string, value: boolean): void;
86
+ }
87
+ export interface IBannerlordModuleManager {
88
+ sort(unsorted: Array<ModuleInfoExtended>): Array<ModuleInfoExtended>;
89
+ sortWithOptions(unsorted: Array<ModuleInfoExtended>, options: ModuleSorterOptions): Array<ModuleInfoExtended>;
90
+ areAllDependenciesOfModulePresent(unsorted: Array<ModuleInfoExtended>, module: ModuleInfoExtended): boolean;
91
+ getDependentModulesOf(source: Array<ModuleInfoExtended>, module: ModuleInfoExtended): Array<ModuleInfoExtended>;
92
+ getDependentModulesOfWithOptions(source: Array<ModuleInfoExtended>, module: ModuleInfoExtended, options: ModuleSorterOptions): Array<ModuleInfoExtended>;
93
+ validateLoadOrder(source: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended): Array<ModuleIssue>;
94
+ validateModule(modules: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended, manager: IValidationManager): Array<ModuleIssue>;
95
+ enableModule(modules: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended, manager: IEnableDisableManager): Array<ModuleIssue>;
96
+ disableModule(modules: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended, manager: IEnableDisableManager): Array<ModuleIssue>;
97
+ getModuleInfo(xml: string): ModuleInfoExtended | undefined;
98
+ getSubModuleInfo(xml: string): SubModuleInfoExtended | undefined;
99
+ compareVersions(x: ApplicationVersion, y: ApplicationVersion): number;
100
+ }
@@ -0,0 +1,38 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ModuleIssueType = exports.LoadType = exports.ApplicationVersionType = void 0;
13
+ var ApplicationVersionType;
14
+ (function (ApplicationVersionType) {
15
+ ApplicationVersionType[ApplicationVersionType["Alpha"] = 0] = "Alpha";
16
+ ApplicationVersionType[ApplicationVersionType["Beta"] = 1] = "Beta";
17
+ ApplicationVersionType[ApplicationVersionType["EarlyAccess"] = 2] = "EarlyAccess";
18
+ ApplicationVersionType[ApplicationVersionType["Release"] = 3] = "Release";
19
+ ApplicationVersionType[ApplicationVersionType["Development"] = 4] = "Development";
20
+ ApplicationVersionType[ApplicationVersionType["Invalid"] = 5] = "Invalid";
21
+ })(ApplicationVersionType = exports.ApplicationVersionType || (exports.ApplicationVersionType = {}));
22
+ var LoadType;
23
+ (function (LoadType) {
24
+ LoadType[LoadType["None"] = 0] = "None";
25
+ LoadType[LoadType["LoadAfterThis"] = 1] = "LoadAfterThis";
26
+ LoadType[LoadType["LoadBeforeThis"] = 2] = "LoadBeforeThis";
27
+ })(LoadType = exports.LoadType || (exports.LoadType = {}));
28
+ var ModuleIssueType;
29
+ (function (ModuleIssueType) {
30
+ ModuleIssueType[ModuleIssueType["MissingDependencies"] = 0] = "MissingDependencies";
31
+ ModuleIssueType[ModuleIssueType["DependencyMissingDependencies"] = 1] = "DependencyMissingDependencies";
32
+ ModuleIssueType[ModuleIssueType["DependencyValidationError"] = 2] = "DependencyValidationError";
33
+ ModuleIssueType[ModuleIssueType["VersionMismatch"] = 3] = "VersionMismatch";
34
+ ModuleIssueType[ModuleIssueType["Incompatible"] = 4] = "Incompatible";
35
+ ModuleIssueType[ModuleIssueType["DependencyConflict"] = 5] = "DependencyConflict";
36
+ })(ModuleIssueType = exports.ModuleIssueType || (exports.ModuleIssueType = {}));
37
+ });
38
+ //# sourceMappingURL=BannerlordModuleManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerlordModuleManager.js","sourceRoot":"","sources":["../../../../src/lib/types/BannerlordModuleManager.ts"],"names":[],"mappings":";;;;;;;;;;;;IAqBA,IAAY,sBAOX;IAPD,WAAY,sBAAsB;QAC9B,qEAAK,CAAA;QACL,mEAAI,CAAA;QACJ,iFAAW,CAAA;QACX,yEAAO,CAAA;QACP,iFAAW,CAAA;QACX,yEAAO,CAAA;IACX,CAAC,EAPW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAOjC;IAqBD,IAAY,QAIX;IAJD,WAAY,QAAQ;QAChB,uCAAI,CAAA;QACJ,yDAAa,CAAA;QACb,2DAAc,CAAA;IAClB,CAAC,EAJW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAInB;IAgBD,IAAY,eAOX;IAPD,WAAY,eAAe;QACvB,mFAAmB,CAAA;QACnB,uGAA6B,CAAA;QAC7B,+FAAyB,CAAA;QACzB,2EAAe,CAAA;QACf,qEAAY,CAAA;QACZ,iFAAkB,CAAA;IACtB,CAAC,EAPW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAO1B"}
@@ -0,0 +1,5 @@
1
+ export interface IFetchBannerlordVersion {
2
+ getChangeSet(gameFolderPath: string, libAssembly: string): number;
3
+ getVersion(gameFolderPath: string, libAssembly: string): string;
4
+ getVersionType(gameFolderPath: string, libAssembly: string): number;
5
+ }
@@ -0,0 +1,13 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ });
13
+ //# sourceMappingURL=FetchBannerlordVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchBannerlordVersion.js","sourceRoot":"","sources":["../../../../src/lib/types/FetchBannerlordVersion.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import { types } from "vortex-api";
2
+ import { ModuleInfoExtended } from "./BannerlordModuleManager";
3
+ export interface IVortexExtension {
4
+ VortexExtensionManager: new () => VortexExtensionManager;
5
+ }
6
+ export interface ILoadOrderEntry<T = any> {
7
+ pos: number;
8
+ enabled: boolean;
9
+ prefix?: string;
10
+ data?: T;
11
+ locked?: boolean;
12
+ external?: boolean;
13
+ }
14
+ export interface ILoadOrder {
15
+ [modId: string]: ILoadOrderEntry;
16
+ }
17
+ export type VortexExtensionManager = {
18
+ constructor(): VortexExtensionManager;
19
+ registerCallbacks(getActiveProfile: () => types.IProfile, getProfileById: (id: string) => types.IProfile, getActiveGameId: () => string, setGameParameters: (gameId: string, executable: string, gameParameters: string[]) => void, getLoadOrder: () => ILoadOrder, setLoadOrder: (loadOrder: ILoadOrder) => void, translateString: (text: string, ns: string) => string, sendNotification: (id: string, type: types.NotificationType, message: string, delayMS: number) => void, getInstallPath: () => string, readFileContent: (filePath: string) => string | null, readDirectoryFileList: (directoryPath: string) => string[] | null, readDirectoryList: (directoryPath: string) => string[] | null): void;
20
+ getGameVersion(): string;
21
+ testModule(files: string[], gameId: string): types.ISupportedResult;
22
+ installModule(files: string[], destinationPath: string): types.IInstallResult;
23
+ isSorting(): boolean;
24
+ sort(): string;
25
+ getLoadOrder(): ILoadOrder;
26
+ setLoadOrder(loadOrder: ILoadOrder): void;
27
+ getModules(): ModuleInfoExtended[];
28
+ };
@@ -0,0 +1,13 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ });
13
+ //# sourceMappingURL=VortexExtensionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VortexExtensionManager.js","sourceRoot":"","sources":["../../../../src/lib/types/VortexExtensionManager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export * from './BannerlordModuleManager';
2
+ export * from './FetchBannerlordVersion';
3
+ export * from './VortexExtensionManager';
4
+ import { IBannerlordModuleManager } from './BannerlordModuleManager';
5
+ import { IFetchBannerlordVersion } from './FetchBannerlordVersion';
6
+ import { IVortexExtension } from './VortexExtensionManager';
7
+ export interface IExtension extends IBannerlordModuleManager, IFetchBannerlordVersion, IVortexExtension {
8
+ }
@@ -0,0 +1,30 @@
1
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
+ if (k2 === undefined) k2 = k;
3
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
+ desc = { enumerable: true, get: function() { return m[k]; } };
6
+ }
7
+ Object.defineProperty(o, k2, desc);
8
+ }) : (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ o[k2] = m[k];
11
+ }));
12
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
13
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
14
+ };
15
+ (function (factory) {
16
+ if (typeof module === "object" && typeof module.exports === "object") {
17
+ var v = factory(require, exports);
18
+ if (v !== undefined) module.exports = v;
19
+ }
20
+ else if (typeof define === "function" && define.amd) {
21
+ define(["require", "exports", "./BannerlordModuleManager", "./FetchBannerlordVersion", "./VortexExtensionManager"], factory);
22
+ }
23
+ })(function (require, exports) {
24
+ "use strict";
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ __exportStar(require("./BannerlordModuleManager"), exports);
27
+ __exportStar(require("./FetchBannerlordVersion"), exports);
28
+ __exportStar(require("./VortexExtensionManager"), exports);
29
+ });
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAA,4DAA0C;IAC1C,2DAAyC;IACzC,2DAAyC"}
@@ -0,0 +1,24 @@
1
+ import * as types from './types';
2
+ export declare const createVortexExtensionManager: () => types.VortexExtensionManager;
3
+ export declare class BannerlordModuleManager {
4
+ private constructor();
5
+ static sort(unsorted: types.ModuleInfoExtended[]): types.ModuleInfoExtended[];
6
+ static sortWithOptions(unsorted: types.ModuleInfoExtended[], options: types.ModuleSorterOptions): types.ModuleInfoExtended[];
7
+ static areAllDependenciesOfModulePresent(unsorted: types.ModuleInfoExtended[], module: types.ModuleInfoExtended): boolean;
8
+ static getDependentModulesOf(source: types.ModuleInfoExtended[], module: types.ModuleInfoExtended): types.ModuleInfoExtended[];
9
+ static getDependentModulesOfWithOptions(source: types.ModuleInfoExtended[], module: types.ModuleInfoExtended, options: types.ModuleSorterOptions): types.ModuleInfoExtended[];
10
+ static validateLoadOrder(source: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended): types.ModuleIssue[];
11
+ static validateModule(modules: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended, manager: types.IValidationManager): types.ModuleIssue[];
12
+ static enableModule(modules: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended, manager: types.IEnableDisableManager): types.ModuleIssue[];
13
+ static disableModule(modules: types.ModuleInfoExtended[], targetModule: types.ModuleInfoExtended, manager: types.IEnableDisableManager): types.ModuleIssue[];
14
+ static getModuleInfo(xml: string): types.ModuleInfoExtended | undefined;
15
+ static getSubModuleInfo(xml: string): types.SubModuleInfoExtended | undefined;
16
+ static compareVersions(x: types.ApplicationVersion, y: types.ApplicationVersion): number;
17
+ }
18
+ export declare class FetchBannerlordVersion {
19
+ private constructor();
20
+ static getChangeSet(gameFolderPath: string, libAssembly: string): number;
21
+ static getVersion(gameFolderPath: string, libAssembly: string): string;
22
+ static getVersionType(gameFolderPath: string, libAssembly: string): number;
23
+ }
24
+ export { types };
@@ -0,0 +1,60 @@
1
+ import * as types from './types';
2
+ const vortexextension = require('./../../vortexextension.node');
3
+ export const createVortexExtensionManager = () => {
4
+ return new vortexextension.VortexExtensionManager();
5
+ };
6
+ export class BannerlordModuleManager {
7
+ /* istanbul ignore next */
8
+ constructor() { }
9
+ static sort(unsorted) {
10
+ return vortexextension.sort(unsorted);
11
+ }
12
+ static sortWithOptions(unsorted, options) {
13
+ return vortexextension.sortWithOptions(unsorted, options);
14
+ }
15
+ static areAllDependenciesOfModulePresent(unsorted, module) {
16
+ return vortexextension.areAllDependenciesOfModulePresent(unsorted, module);
17
+ }
18
+ static getDependentModulesOf(source, module) {
19
+ return vortexextension.getDependentModulesOf(source, module);
20
+ }
21
+ static getDependentModulesOfWithOptions(source, module, options) {
22
+ return vortexextension.getDependentModulesOfWithOptions(source, module, options);
23
+ }
24
+ static validateLoadOrder(source, targetModule) {
25
+ return vortexextension.validateLoadOrder(source, targetModule);
26
+ }
27
+ static validateModule(modules, targetModule, manager) {
28
+ return vortexextension.validateModule(modules, targetModule, manager);
29
+ }
30
+ static enableModule(modules, targetModule, manager) {
31
+ return vortexextension.enableModule(modules, targetModule, manager);
32
+ }
33
+ static disableModule(modules, targetModule, manager) {
34
+ return vortexextension.disableModule(modules, targetModule, manager);
35
+ }
36
+ static getModuleInfo(xml) {
37
+ return vortexextension.getModuleInfo(xml);
38
+ }
39
+ static getSubModuleInfo(xml) {
40
+ return vortexextension.getSubModuleInfo(xml);
41
+ }
42
+ static compareVersions(x, y) {
43
+ return vortexextension.compareVersions(x, y);
44
+ }
45
+ }
46
+ export class FetchBannerlordVersion {
47
+ /* istanbul ignore next */
48
+ constructor() { }
49
+ static getChangeSet(gameFolderPath, libAssembly) {
50
+ return vortexextension.getChangeSet(gameFolderPath, libAssembly);
51
+ }
52
+ static getVersion(gameFolderPath, libAssembly) {
53
+ return vortexextension.getVersion(gameFolderPath, libAssembly);
54
+ }
55
+ static getVersionType(gameFolderPath, libAssembly) {
56
+ return vortexextension.getVersionType(gameFolderPath, libAssembly);
57
+ }
58
+ }
59
+ export { types };
60
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,MAAM,eAAe,GAAqB,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAElF,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAiC,EAAE;IAC3E,OAAO,IAAI,eAAe,CAAC,sBAAsB,EAAE,CAAC;AACxD,CAAC,CAAA;AAED,MAAM,OAAO,uBAAuB;IAChC,0BAA0B;IAC1B,gBAAwB,CAAC;IAEzB,MAAM,CAAC,IAAI,CAAC,QAAoC;QAC5C,OAAO,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,QAAoC,EAAE,OAAkC;QAC3F,OAAO,eAAe,CAAC,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,CAAC,iCAAiC,CAAC,QAAoC,EAAE,MAAgC;QAC3G,OAAO,eAAe,CAAC,iCAAiC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC/E,CAAC;IAED,MAAM,CAAC,qBAAqB,CAAC,MAAkC,EAAE,MAAgC;QAC7F,OAAO,eAAe,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,gCAAgC,CAAC,MAAkC,EAAE,MAAgC,EAAE,OAAkC;QAC5I,OAAO,eAAe,CAAC,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,MAAkC,EAAE,YAAsC;QAC/F,OAAO,eAAe,CAAC,iBAAiB,CAAC,MAAM,EAAE,YAAY,CAAC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cAAc,EAAE,WAAW,CAAC,CAAC;IACvE,CAAC;CACJ;AAED,OAAO,EACH,KAAK,EACR,CAAA"}
@@ -0,0 +1,100 @@
1
+ export interface ModuleInfoExtended {
2
+ id: string;
3
+ name: string;
4
+ isOfficial: boolean;
5
+ version: ApplicationVersion;
6
+ isSingleplayerModule: boolean;
7
+ isMultiplayerModule: boolean;
8
+ subModules: Array<SubModuleInfoExtended>;
9
+ dependentModules: Array<DependentModule>;
10
+ modulesToLoadAfterThis: Array<DependentModule>;
11
+ incompatibleModules: Array<DependentModule>;
12
+ url: string;
13
+ dependentModuleMetadatas: Array<DependentModuleMetadata>;
14
+ }
15
+ export interface ApplicationVersion {
16
+ applicationVersionType: ApplicationVersionType;
17
+ major: number;
18
+ minor: number;
19
+ revision: number;
20
+ changeSet: number;
21
+ }
22
+ export declare enum ApplicationVersionType {
23
+ Alpha = 0,
24
+ Beta = 1,
25
+ EarlyAccess = 2,
26
+ Release = 3,
27
+ Development = 4,
28
+ Invalid = 5
29
+ }
30
+ export interface SubModuleInfoExtended {
31
+ name: string;
32
+ dLLName: string;
33
+ assemblies: Array<string>;
34
+ subModuleClassType: string;
35
+ tags: Map<string, Array<string>>;
36
+ }
37
+ export interface DependentModule {
38
+ id: string;
39
+ version: ApplicationVersion;
40
+ isOptional: boolean;
41
+ }
42
+ export interface DependentModuleMetadata {
43
+ id: string;
44
+ loadType: LoadType;
45
+ isOptional: boolean;
46
+ isIncompatible: boolean;
47
+ version: ApplicationVersion;
48
+ versionRange: ApplicationVersionRange;
49
+ }
50
+ export declare enum LoadType {
51
+ None = 0,
52
+ LoadAfterThis = 1,
53
+ LoadBeforeThis = 2
54
+ }
55
+ export interface ApplicationVersionRange {
56
+ min: ApplicationVersion;
57
+ max: ApplicationVersion;
58
+ }
59
+ export interface ModuleSorterOptions {
60
+ skipOptionals: boolean;
61
+ skipExternalDependencies: boolean;
62
+ }
63
+ export interface ModuleIssue {
64
+ target: ModuleInfoExtended;
65
+ sourceId: string;
66
+ type: ModuleIssueType;
67
+ reason: string;
68
+ sourceVersion: ApplicationVersionRange;
69
+ }
70
+ export declare enum ModuleIssueType {
71
+ MissingDependencies = 0,
72
+ DependencyMissingDependencies = 1,
73
+ DependencyValidationError = 2,
74
+ VersionMismatch = 3,
75
+ Incompatible = 4,
76
+ DependencyConflict = 5
77
+ }
78
+ export interface IValidationManager {
79
+ isSelected(moduleId: string): boolean;
80
+ }
81
+ export interface IEnableDisableManager {
82
+ getSelected(moduleId: string): boolean;
83
+ setSelected(moduleId: string, value: boolean): void;
84
+ getDisabled(moduleId: string): boolean;
85
+ setDisabled(moduleId: string, value: boolean): void;
86
+ }
87
+ export interface IBannerlordModuleManager {
88
+ sort(unsorted: Array<ModuleInfoExtended>): Array<ModuleInfoExtended>;
89
+ sortWithOptions(unsorted: Array<ModuleInfoExtended>, options: ModuleSorterOptions): Array<ModuleInfoExtended>;
90
+ areAllDependenciesOfModulePresent(unsorted: Array<ModuleInfoExtended>, module: ModuleInfoExtended): boolean;
91
+ getDependentModulesOf(source: Array<ModuleInfoExtended>, module: ModuleInfoExtended): Array<ModuleInfoExtended>;
92
+ getDependentModulesOfWithOptions(source: Array<ModuleInfoExtended>, module: ModuleInfoExtended, options: ModuleSorterOptions): Array<ModuleInfoExtended>;
93
+ validateLoadOrder(source: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended): Array<ModuleIssue>;
94
+ validateModule(modules: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended, manager: IValidationManager): Array<ModuleIssue>;
95
+ enableModule(modules: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended, manager: IEnableDisableManager): Array<ModuleIssue>;
96
+ disableModule(modules: Array<ModuleInfoExtended>, targetModule: ModuleInfoExtended, manager: IEnableDisableManager): Array<ModuleIssue>;
97
+ getModuleInfo(xml: string): ModuleInfoExtended | undefined;
98
+ getSubModuleInfo(xml: string): SubModuleInfoExtended | undefined;
99
+ compareVersions(x: ApplicationVersion, y: ApplicationVersion): number;
100
+ }
@@ -0,0 +1,25 @@
1
+ export var ApplicationVersionType;
2
+ (function (ApplicationVersionType) {
3
+ ApplicationVersionType[ApplicationVersionType["Alpha"] = 0] = "Alpha";
4
+ ApplicationVersionType[ApplicationVersionType["Beta"] = 1] = "Beta";
5
+ ApplicationVersionType[ApplicationVersionType["EarlyAccess"] = 2] = "EarlyAccess";
6
+ ApplicationVersionType[ApplicationVersionType["Release"] = 3] = "Release";
7
+ ApplicationVersionType[ApplicationVersionType["Development"] = 4] = "Development";
8
+ ApplicationVersionType[ApplicationVersionType["Invalid"] = 5] = "Invalid";
9
+ })(ApplicationVersionType || (ApplicationVersionType = {}));
10
+ export var LoadType;
11
+ (function (LoadType) {
12
+ LoadType[LoadType["None"] = 0] = "None";
13
+ LoadType[LoadType["LoadAfterThis"] = 1] = "LoadAfterThis";
14
+ LoadType[LoadType["LoadBeforeThis"] = 2] = "LoadBeforeThis";
15
+ })(LoadType || (LoadType = {}));
16
+ export var ModuleIssueType;
17
+ (function (ModuleIssueType) {
18
+ ModuleIssueType[ModuleIssueType["MissingDependencies"] = 0] = "MissingDependencies";
19
+ ModuleIssueType[ModuleIssueType["DependencyMissingDependencies"] = 1] = "DependencyMissingDependencies";
20
+ ModuleIssueType[ModuleIssueType["DependencyValidationError"] = 2] = "DependencyValidationError";
21
+ ModuleIssueType[ModuleIssueType["VersionMismatch"] = 3] = "VersionMismatch";
22
+ ModuleIssueType[ModuleIssueType["Incompatible"] = 4] = "Incompatible";
23
+ ModuleIssueType[ModuleIssueType["DependencyConflict"] = 5] = "DependencyConflict";
24
+ })(ModuleIssueType || (ModuleIssueType = {}));
25
+ //# sourceMappingURL=BannerlordModuleManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerlordModuleManager.js","sourceRoot":"","sources":["../../../../src/lib/types/BannerlordModuleManager.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAC9B,qEAAK,CAAA;IACL,mEAAI,CAAA;IACJ,iFAAW,CAAA;IACX,yEAAO,CAAA;IACP,iFAAW,CAAA;IACX,yEAAO,CAAA;AACX,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAqBD,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAChB,uCAAI,CAAA;IACJ,yDAAa,CAAA;IACb,2DAAc,CAAA;AAClB,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAgBD,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACvB,mFAAmB,CAAA;IACnB,uGAA6B,CAAA;IAC7B,+FAAyB,CAAA;IACzB,2EAAe,CAAA;IACf,qEAAY,CAAA;IACZ,iFAAkB,CAAA;AACtB,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B"}
@@ -0,0 +1,5 @@
1
+ export interface IFetchBannerlordVersion {
2
+ getChangeSet(gameFolderPath: string, libAssembly: string): number;
3
+ getVersion(gameFolderPath: string, libAssembly: string): string;
4
+ getVersionType(gameFolderPath: string, libAssembly: string): number;
5
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=FetchBannerlordVersion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchBannerlordVersion.js","sourceRoot":"","sources":["../../../../src/lib/types/FetchBannerlordVersion.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import { types } from "vortex-api";
2
+ import { ModuleInfoExtended } from "./BannerlordModuleManager";
3
+ export interface IVortexExtension {
4
+ VortexExtensionManager: new () => VortexExtensionManager;
5
+ }
6
+ export interface ILoadOrderEntry<T = any> {
7
+ pos: number;
8
+ enabled: boolean;
9
+ prefix?: string;
10
+ data?: T;
11
+ locked?: boolean;
12
+ external?: boolean;
13
+ }
14
+ export interface ILoadOrder {
15
+ [modId: string]: ILoadOrderEntry;
16
+ }
17
+ export type VortexExtensionManager = {
18
+ constructor(): VortexExtensionManager;
19
+ registerCallbacks(getActiveProfile: () => types.IProfile, getProfileById: (id: string) => types.IProfile, getActiveGameId: () => string, setGameParameters: (gameId: string, executable: string, gameParameters: string[]) => void, getLoadOrder: () => ILoadOrder, setLoadOrder: (loadOrder: ILoadOrder) => void, translateString: (text: string, ns: string) => string, sendNotification: (id: string, type: types.NotificationType, message: string, delayMS: number) => void, getInstallPath: () => string, readFileContent: (filePath: string) => string | null, readDirectoryFileList: (directoryPath: string) => string[] | null, readDirectoryList: (directoryPath: string) => string[] | null): void;
20
+ getGameVersion(): string;
21
+ testModule(files: string[], gameId: string): types.ISupportedResult;
22
+ installModule(files: string[], destinationPath: string): types.IInstallResult;
23
+ isSorting(): boolean;
24
+ sort(): string;
25
+ getLoadOrder(): ILoadOrder;
26
+ setLoadOrder(loadOrder: ILoadOrder): void;
27
+ getModules(): ModuleInfoExtended[];
28
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=VortexExtensionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VortexExtensionManager.js","sourceRoot":"","sources":["../../../../src/lib/types/VortexExtensionManager.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export * from './BannerlordModuleManager';
2
+ export * from './FetchBannerlordVersion';
3
+ export * from './VortexExtensionManager';
4
+ import { IBannerlordModuleManager } from './BannerlordModuleManager';
5
+ import { IFetchBannerlordVersion } from './FetchBannerlordVersion';
6
+ import { IVortexExtension } from './VortexExtensionManager';
7
+ export interface IExtension extends IBannerlordModuleManager, IFetchBannerlordVersion, IVortexExtension {
8
+ }
@@ -0,0 +1,4 @@
1
+ export * from './BannerlordModuleManager';
2
+ export * from './FetchBannerlordVersion';
3
+ export * from './VortexExtensionManager';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
Binary file
package/package.json ADDED
@@ -0,0 +1,120 @@
1
+ {
2
+ "name": "@butr/vortexextensionnative",
3
+ "version": "1.0.10",
4
+ "description": "Package of native bindings bundled with TS declarations",
5
+ "main": "dist/main/lib/index.js",
6
+ "typings": "dist/main/lib/index.d.ts",
7
+ "module": "dist/module/lib/index.js",
8
+ "gypfile": true,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+ssh://git@github.com:BUTR/Bannerlord.VortexExtension.git"
12
+ },
13
+ "keywords": [
14
+ "bannerlord",
15
+ "modulemanager"
16
+ ],
17
+ "author": "BUTR",
18
+ "license": "MIT",
19
+ "homepage": "https://github.com/BUTR/Bannerlord.VortexExtension#readme",
20
+ "bugs": {
21
+ "url": "https://github.com/BUTR/Bannerlord.VortexExtension/issues"
22
+ },
23
+ "scripts": {
24
+ "install": "echo",
25
+ "clean": "shx rm *.7z && shx rm -rf ./build && shx rm -rf ./dist",
26
+ "native:0": "dotnet publish -r win-x64 --self-contained -c Release ../Bannerlord.VortexExtension.Native",
27
+ "native:1": "shx cp -f ../Bannerlord.VortexExtension.Native/bin/Release/net7.0/win-x64/native/Bannerlord.VortexExtension.Native.dll .",
28
+ "native:2": "shx cp -f ../Bannerlord.VortexExtension.Native/bin/Release/net7.0/win-x64/native/Bannerlord.VortexExtension.Native.lib .",
29
+ "native:3": "shx cp -f ../Bannerlord.VortexExtension.Native/bin/Release/net7.0/win-x64/Common.Native.h .",
30
+ "native:4": "shx cp -f ../Bannerlord.VortexExtension.Native/bin/Release/net7.0/win-x64/Bannerlord.FetchVersion.Native.h .",
31
+ "native:5": "shx cp -f ../Bannerlord.VortexExtension.Native/bin/Release/net7.0/win-x64/Bannerlord.ModuleManager.Native.h .",
32
+ "native:6": "shx cp -f ../Bannerlord.VortexExtension.Native/bin/Release/net7.0/win-x64/Bannerlord.VortexExtension.Native.h .",
33
+ "build": "run-s native:* && run-s build:*",
34
+ "build-ts": "run-p build:*",
35
+ "build-native": "run-s native:*",
36
+ "build:bindings": "node-gyp rebuild",
37
+ "build:main": "tsc -p tsconfig.json",
38
+ "build:module": "tsc -p tsconfig.module.json",
39
+ "build:copy-00": "shx cp Bannerlord.VortexExtension.Native.dll dist/",
40
+ "build:copy-01": "shx cp build/Release/vortexextension.node dist/",
41
+ "build:copy-02": "shx mkdir -p dist/main/test/bin/Win64_Shipping_Client/",
42
+ "build:copy-03": "shx cp src/test/Version.xml dist/main/test/bin/Win64_Shipping_Client/",
43
+ "build:copy-04": "shx mkdir -p dist/main/test/Modules/Bannerlord.Harmony/",
44
+ "build:copy-05": "shx mkdir -p dist/main/test/Modules/Bannerlord.UIExtenderEx/",
45
+ "build:copy-06": "shx cp src/test/Harmony.xml dist/main/test/Modules/Bannerlord.Harmony/SubModule.xml",
46
+ "build:copy-07": "shx cp src/test/UIExtenderEx.xml dist/main/test/Modules/Bannerlord.UIExtenderEx/SubModule.xml",
47
+ "build:copy-08": "shx mkdir -p dist/module/test/bin/Win64_Shipping_Client/",
48
+ "build:copy-09": "shx cp src/test/Version.xml dist/module/test/bin/Win64_Shipping_Client/",
49
+ "build:copy-10": "shx mkdir -p dist/module/test/Modules/Bannerlord.Harmony/",
50
+ "build:copy-11": "shx mkdir -p dist/module/test/Modules/Bannerlord.UIExtenderEx/",
51
+ "build:copy-12": "shx cp src/test/Harmony.xml dist/module/test/Modules/Bannerlord.Harmony/SubModule.xml",
52
+ "build:copy-13": "shx cp src/test/UIExtenderEx.xml dist/module/test/Modules/Bannerlord.UIExtenderEx/SubModule.xml",
53
+ "test": "run-s build test:*",
54
+ "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts,src/**/*.js}\"",
55
+ "test:unit": "nyc ava",
56
+ "watch:build": "tsc -p tsconfig.json -w",
57
+ "watch:test": "nyc --silent ava --watch",
58
+ "cov": "run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html",
59
+ "cov:html": "nyc report --reporter=html",
60
+ "cov:lcov": "nyc report --reporter=lcov",
61
+ "cov:send": "run-s cov:lcov && codecov",
62
+ "cov:check": "nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100",
63
+ "doc": "run-s doc:html && open-cli dist/docs/index.html",
64
+ "doc:html": "typedoc --entryPoints src/lib/index.ts --exclude **/*.spec.* --exclude **/_*.* --out dist/docs",
65
+ "doc:json": "typedoc --entryPoints src/lib/index.ts --exclude **/*.spec.* --exclude **/_*.* --json dist/docs/typedoc.json"
66
+ },
67
+ "engines": {
68
+ "node": ">=10"
69
+ },
70
+ "devDependencies": {
71
+ "@ava/typescript": "^1.1.1",
72
+ "@istanbuljs/nyc-config-typescript": "^1.0.1",
73
+ "@types/node": "^18.7.9",
74
+ "ava": "^4.3.3",
75
+ "codecov": "^3.8.2",
76
+ "cspell": "^6.19.2",
77
+ "node-addon-api": "^5.0.0",
78
+ "node-gyp": "^9.1.0",
79
+ "npm-run-all": "^4.1.5",
80
+ "nyc": "^15.1.0",
81
+ "open-cli": "^7.0.1",
82
+ "shx": "^0.3.4",
83
+ "ts-node": "^10.9.1",
84
+ "typedoc": "^0.23.7",
85
+ "typescript": "^4.7.4"
86
+ },
87
+ "files": [
88
+ "dist/main/index.*",
89
+ "dist/main/lib",
90
+ "dist/module/index.*",
91
+ "dist/module/lib",
92
+ "dist/Bannerlord.VortexExtension.Native.dll",
93
+ "dist/vortexextension.node",
94
+ "dist/steam_api64.dll",
95
+ "dist/steam_appid.txt",
96
+ "CHANGELOG.md",
97
+ "LICENSE",
98
+ "README.md"
99
+ ],
100
+ "ava": {
101
+ "failFast": true,
102
+ "timeout": "60s",
103
+ "typescript": {
104
+ "rewritePaths": {
105
+ "src/": "dist/main/"
106
+ }
107
+ },
108
+ "files": [
109
+ "!dist/module/**"
110
+ ]
111
+ },
112
+ "nyc": {
113
+ "extends": "@istanbuljs/nyc-config-typescript",
114
+ "exclude": [
115
+ "**/_*.*",
116
+ "**/Version.xml",
117
+ "**/*.spec.*"
118
+ ]
119
+ }
120
+ }