From f7fe7fe4a5d1c5dc51c12191eafb92d41c8e3b98 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 5 Oct 2023 13:43:18 +0100 Subject: [PATCH] Update types --- .../10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../10ScopesAndTypes/types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts | 3 +++ .../types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts | 3 +++ .../types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ .../12ClassExtensionOverride/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts | 3 +++ TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../13AddTrader/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../13AddTrader/types/services/ModCompilerService.d.ts | 1 + .../13AddTrader/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/13AddTrader/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/13AddTrader/types/utils/VFS.d.ts | 3 +++ .../14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts | 3 +++ .../types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/15HttpListenerExample/types/utils/VFS.d.ts | 3 +++ .../16ImporterUtil/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../16ImporterUtil/types/services/ModCompilerService.d.ts | 1 + .../16ImporterUtil/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/16ImporterUtil/types/utils/VFS.d.ts | 3 +++ .../types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ .../types/utils/JsonUtil.d.ts | 2 ++ .../17AsyncImporterWithDependency1/types/utils/VFS.d.ts | 3 +++ .../types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ .../types/utils/JsonUtil.d.ts | 2 ++ .../17AsyncImporterWithDependency2/types/utils/VFS.d.ts | 3 +++ .../18CustomItemService/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/18CustomItemService/types/utils/VFS.d.ts | 3 +++ TypeScript/1LogToConsole/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../1LogToConsole/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../1LogToConsole/types/services/ModCompilerService.d.ts | 1 + .../1LogToConsole/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/1LogToConsole/types/utils/VFS.d.ts | 3 +++ TypeScript/2EditDatabase/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../2EditDatabase/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../2EditDatabase/types/services/ModCompilerService.d.ts | 1 + .../2EditDatabase/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/2EditDatabase/types/utils/VFS.d.ts | 3 +++ .../3GetSptConfigFile/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/3GetSptConfigFile/types/utils/VFS.d.ts | 3 +++ .../types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts | 3 +++ .../5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../5ReplaceMethod/types/services/ModCompilerService.d.ts | 1 + .../5ReplaceMethod/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/5ReplaceMethod/types/utils/VFS.d.ts | 3 +++ .../types/loaders/PreAkiModLoader.d.ts | 3 +++ .../types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../types/services/ModCompilerService.d.ts | 1 + .../types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts | 3 +++ TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../7OnLoadHook/types/services/ModCompilerService.d.ts | 1 + .../7OnLoadHook/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/7OnLoadHook/types/utils/VFS.d.ts | 3 +++ TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../8OnUpdateHook/types/services/ModCompilerService.d.ts | 1 + .../8OnUpdateHook/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/8OnUpdateHook/types/utils/VFS.d.ts | 3 +++ TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts | 3 +++ .../9RouterHooks/types/models/spt/config/ICoreConfig.d.ts | 4 ++++ .../9RouterHooks/types/services/ModCompilerService.d.ts | 1 + .../9RouterHooks/types/services/SeasonalEventService.d.ts | 6 ++++++ TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts | 2 ++ TypeScript/9RouterHooks/types/utils/VFS.d.ts | 3 +++ 114 files changed, 361 insertions(+) diff --git a/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts b/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts b/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts b/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/13AddTrader/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/13AddTrader/types/services/ModCompilerService.d.ts b/TypeScript/13AddTrader/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/13AddTrader/types/services/ModCompilerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts b/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/13AddTrader/types/utils/VFS.d.ts b/TypeScript/13AddTrader/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/13AddTrader/types/utils/VFS.d.ts +++ b/TypeScript/13AddTrader/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts b/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/services/ModCompilerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ModCompilerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts b/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/15HttpListenerExample/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/services/ModCompilerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/15HttpListenerExample/types/services/ModCompilerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts b/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts b/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/16ImporterUtil/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/16ImporterUtil/types/services/ModCompilerService.d.ts b/TypeScript/16ImporterUtil/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/16ImporterUtil/types/services/ModCompilerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/16ImporterUtil/types/utils/VFS.d.ts b/TypeScript/16ImporterUtil/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/16ImporterUtil/types/utils/VFS.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ModCompilerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ModCompilerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ModCompilerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ModCompilerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts b/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/18CustomItemService/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/18CustomItemService/types/services/ModCompilerService.d.ts b/TypeScript/18CustomItemService/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/18CustomItemService/types/services/ModCompilerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts b/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/18CustomItemService/types/utils/VFS.d.ts b/TypeScript/18CustomItemService/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/18CustomItemService/types/utils/VFS.d.ts +++ b/TypeScript/18CustomItemService/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/1LogToConsole/types/loaders/PreAkiModLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/1LogToConsole/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts b/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts +++ b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/1LogToConsole/types/utils/VFS.d.ts b/TypeScript/1LogToConsole/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/1LogToConsole/types/utils/VFS.d.ts +++ b/TypeScript/1LogToConsole/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/2EditDatabase/types/loaders/PreAkiModLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/2EditDatabase/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts b/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts +++ b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/2EditDatabase/types/utils/VFS.d.ts b/TypeScript/2EditDatabase/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/2EditDatabase/types/utils/VFS.d.ts +++ b/TypeScript/2EditDatabase/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/3GetSptConfigFile/types/loaders/PreAkiModLoader.d.ts b/TypeScript/3GetSptConfigFile/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/3GetSptConfigFile/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/3GetSptConfigFile/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/services/ModCompilerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ModCompilerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/3GetSptConfigFile/types/utils/VFS.d.ts b/TypeScript/3GetSptConfigFile/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/VFS.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts b/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts b/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/7OnLoadHook/types/utils/VFS.d.ts b/TypeScript/7OnLoadHook/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/7OnLoadHook/types/utils/VFS.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts b/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void; diff --git a/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts index 08059ff..a1664e1 100644 --- a/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/PreAkiModLoader.d.ts @@ -25,6 +25,8 @@ export declare class PreAkiModLoader implements IModLoader { protected order: Record; protected imported: Record; protected akiConfig: ICoreConfig; + protected serverDependencies: Record; + protected skippedMods: string[]; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck); load(container: DependencyContainer): Promise; /** @@ -63,6 +65,7 @@ export declare class PreAkiModLoader implements IModLoader { protected executeMods(container: DependencyContainer): Promise; sortModsLoadOrder(): string[]; protected addMod(mod: string): Promise; + protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void; protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record): boolean; protected isModCompatible(mod: IPackageJsonData, loadedMods: Record): boolean; /** diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts index 4603224..d8b957f 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ICoreConfig.d.ts @@ -8,6 +8,7 @@ export interface ICoreConfig extends IBaseConfig { profileSaveIntervalSeconds: number; sptFriendNickname: string; fixes: IGameFixes; + features: IServerFeatures; commit: string; } export interface IGameFixes { @@ -16,3 +17,6 @@ export interface IGameFixes { /** Remove items added by mods when the mod no longer exists - can fix dead profiles stuck at game load*/ removeModItemsFromProfile: boolean; } +export interface IServerFeatures { + autoInstallModDependencies: boolean; +} diff --git a/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts b/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts index e306177..52d4e26 100644 --- a/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ModCompilerService.d.ts @@ -6,6 +6,7 @@ export declare class ModCompilerService { protected logger: ILogger; protected hashCacheService: HashCacheService; protected vfs: VFS; + protected serverDependencies: string[]; constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS); /** * Convert a mods TS into JS diff --git a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts index 237cfeb..9fb3454 100644 --- a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts +++ b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts @@ -45,6 +45,12 @@ export declare class SeasonalEventService { * @returns */ itemIsSeasonalRelated(itemTpl: string): boolean; + /** + * Get an array of items that appear during a seasonal event + * returns multiple seasonal event items if they are both active + * @returns array of tpl strings + */ + getAllSeasonalEventItems(): string[]; /** * Get an array of seasonal items that should be blocked as season is not currently active * @returns Array of tpl strings diff --git a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts index 732c15d..30cf2ac 100644 --- a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts @@ -33,6 +33,7 @@ export declare class JsonUtil { * @returns The string converted from the JavaScript value */ serializeJsonC(data: any, filename?: string | null, options?: IStringifyOptions | Reviver): string; + serializeJson5(data: any, filename?: string | null, prettify?: boolean): string; /** * From string to object * @param jsonString json string to turn into object @@ -48,6 +49,7 @@ export declare class JsonUtil { * @returns object */ deserializeJsonC(jsonString: string, filename?: string, options?: IParseOptions): T; + deserializeJson5(jsonString: string, filename?: string): T; deserializeWithCacheCheckAsync(jsonString: string, filePath: string): Promise; /** * From json string to object diff --git a/TypeScript/9RouterHooks/types/utils/VFS.d.ts b/TypeScript/9RouterHooks/types/utils/VFS.d.ts index 842150c..2cb09fa 100644 --- a/TypeScript/9RouterHooks/types/utils/VFS.d.ts +++ b/TypeScript/9RouterHooks/types/utils/VFS.d.ts @@ -23,6 +23,7 @@ export declare class VFS { }) => Promise; unlinkPromisify: (path: fs.PathLike) => Promise; rmdirPromisify: (path: fs.PathLike) => Promise; + renamePromisify: (oldPath: fs.PathLike, newPath: fs.PathLike) => Promise; constructor(asyncQueue: IAsyncQueue, uuidGenerator: IUUidGenerator); exists(filepath: fs.PathLike): boolean; existsAsync(filepath: fs.PathLike): Promise; @@ -45,6 +46,8 @@ export declare class VFS { removeFileAsync(filepath: string): Promise; removeDir(filepath: string): void; removeDirAsync(filepath: string): Promise; + rename(oldPath: string, newPath: string): void; + renameAsync(oldPath: string, newPath: string): Promise; protected lockFileSync(filepath: any): void; protected checkFileSync(filepath: any): any; protected unlockFileSync(filepath: any): void;