From c97c22b43469869ccfb7206624fec03a62386d14 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 25 Aug 2025 13:37:14 -0700 Subject: [PATCH 01/22] chore: use relative imports with .ts (#2694) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2694 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- package-lock.json | 2 +- package.json | 4 +- scripts/fix-imports.js | 45 ++- src/app.ts | 20 +- .../api/abandonLibraryDailyTaskController.ts | 4 +- .../api/abortDojoComponentController.ts | 8 +- ...abortDojoComponentDestructionController.ts | 13 +- .../api/activateRandomModController.ts | 12 +- src/controllers/api/addFriendController.ts | 12 +- .../api/addFriendImageController.ts | 6 +- .../api/addIgnoredUserController.ts | 10 +- .../api/addPendingFriendController.ts | 16 +- .../api/addToAllianceController.ts | 14 +- src/controllers/api/addToGuildController.ts | 24 +- src/controllers/api/adoptPetController.ts | 6 +- src/controllers/api/apartmentController.ts | 4 +- src/controllers/api/arcaneCommonController.ts | 8 +- src/controllers/api/archonFusionController.ts | 8 +- .../api/artifactTransmutationController.ts | 12 +- src/controllers/api/artifactsController.ts | 8 +- .../api/cancelGuildAdvertisementController.ts | 10 +- .../api/changeDojoRootController.ts | 17 +- .../api/changeGuildRankController.ts | 8 +- .../api/checkDailyMissionBonusController.ts | 2 +- .../api/claimCompletedRecipeController.ts | 26 +- .../claimJunctionChallengeRewardController.ts | 8 +- .../claimLibraryDailyTaskRewardController.ts | 4 +- .../api/clearDialogueHistoryController.ts | 4 +- .../api/completeCalendarEventController.ts | 10 +- .../completeRandomModChallengeController.ts | 12 +- .../confirmAllianceInvitationController.ts | 6 +- .../api/confirmGuildInvitationController.ts | 16 +- .../api/contributeGuildClassController.ts | 12 +- .../contributeToDojoComponentController.ts | 18 +- .../api/contributeToVaultController.ts | 14 +- .../api/createAllianceController.ts | 12 +- src/controllers/api/createGuildController.ts | 12 +- src/controllers/api/creditsController.ts | 4 +- src/controllers/api/crewMembersController.ts | 10 +- .../api/crewShipFusionController.ts | 14 +- .../api/crewShipIdentifySalvageController.ts | 16 +- ...stomObstacleCourseLeaderboardController.ts | 14 +- .../api/customizeGuildRanksController.ts | 8 +- .../api/declineAllianceInviteController.ts | 4 +- .../api/declineGuildInviteController.ts | 4 +- .../api/deleteSessionController.ts | 2 +- .../api/destroyDojoDecoController.ts | 10 +- .../api/divvyAllianceVaultController.ts | 10 +- .../api/dojoComponentRushController.ts | 17 +- src/controllers/api/dronesController.ts | 16 +- src/controllers/api/endlessXpController.ts | 20 +- .../api/entratiLabConquestModeController.ts | 8 +- src/controllers/api/evolveWeaponController.ts | 12 +- src/controllers/api/findSessionsController.ts | 6 +- src/controllers/api/fishmongerController.ts | 8 +- src/controllers/api/focusController.ts | 12 +- .../api/fusionTreasuresController.ts | 8 +- src/controllers/api/gardeningController.ts | 20 +- .../api/genericUpdateController.ts | 8 +- src/controllers/api/getAllianceController.ts | 8 +- .../api/getDailyDealStockLevelsController.ts | 2 +- src/controllers/api/getFriendsController.ts | 10 +- .../api/getGuildContributionsController.ts | 8 +- src/controllers/api/getGuildController.ts | 10 +- src/controllers/api/getGuildDojoController.ts | 6 +- .../api/getGuildEventScoreController.ts | 6 +- src/controllers/api/getGuildLogController.ts | 10 +- .../api/getIgnoredUsersController.ts | 10 +- .../api/getNewRewardSeedController.ts | 6 +- .../api/getPastWeeklyChallengesController.ts | 10 +- src/controllers/api/getShipController.ts | 14 +- .../api/getVendorInfoController.ts | 8 +- .../api/getVoidProjectionRewardsController.ts | 10 +- src/controllers/api/giftingController.ts | 20 +- src/controllers/api/gildWeaponController.ts | 18 +- .../giveKeyChainTriggeredItemsController.ts | 10 +- .../giveKeyChainTriggeredMessageController.ts | 8 +- .../api/giveQuestKeyRewardController.ts | 8 +- .../giveShipDecoAndLoreFragmentController.ts | 10 +- .../api/giveStartingGearController.ts | 8 +- src/controllers/api/guildTechController.ts | 26 +- src/controllers/api/hostSessionController.ts | 10 +- src/controllers/api/hubBlessingController.ts | 8 +- src/controllers/api/inboxController.ts | 16 +- .../api/infestedFoundryController.ts | 22 +- src/controllers/api/inventoryController.ts | 52 +-- .../api/inventorySlotsController.ts | 8 +- src/controllers/api/joinSessionController.ts | 4 +- src/controllers/api/loginController.ts | 16 +- src/controllers/api/loginRewardsController.ts | 12 +- .../api/loginRewardsSelectionController.ts | 14 +- src/controllers/api/logoutController.ts | 4 +- src/controllers/api/maturePetController.ts | 6 +- .../api/missionInventoryUpdateController.ts | 20 +- .../api/modularWeaponCraftingController.ts | 20 +- .../api/modularWeaponSaleController.ts | 24 +- src/controllers/api/nameWeaponController.ts | 10 +- src/controllers/api/nemesisController.ts | 28 +- .../api/placeDecoInComponentController.ts | 10 +- .../api/playedParkourTutorialController.ts | 4 +- src/controllers/api/playerSkillsController.ts | 10 +- .../api/postGuildAdvertisementController.ts | 16 +- .../api/projectionManagerController.ts | 4 +- src/controllers/api/purchaseController.ts | 10 +- src/controllers/api/questControlController.ts | 4 +- ...queueDojoComponentDestructionController.ts | 15 +- .../api/redeemPromoCodeController.ts | 8 +- src/controllers/api/releasePetController.ts | 8 +- src/controllers/api/removeFriendController.ts | 16 +- .../api/removeFromAllianceController.ts | 8 +- .../api/removeFromGuildController.ts | 21 +- .../api/removeIgnoredUserController.ts | 6 +- src/controllers/api/renamePetController.ts | 10 +- .../api/rerollRandomModController.ts | 12 +- .../api/retrievePetFromStasisController.ts | 8 +- src/controllers/api/saveDialogueController.ts | 8 +- src/controllers/api/saveLoadoutController.ts | 8 +- src/controllers/api/saveSettingsController.ts | 8 +- .../api/saveVaultAutoContributeController.ts | 12 +- src/controllers/api/sellController.ts | 14 +- .../api/sendMsgToInBoxController.ts | 6 +- .../api/setActiveQuestController.ts | 4 +- .../api/setActiveShipController.ts | 6 +- .../setAllianceGuildPermissionsController.ts | 6 +- .../api/setBootLocationController.ts | 8 +- .../api/setDojoComponentColorsController.ts | 15 +- .../api/setDojoComponentMessageController.ts | 2 +- .../api/setDojoComponentSettingsController.ts | 15 +- .../api/setEquippedInstrumentController.ts | 6 +- .../api/setFriendNoteController.ts | 6 +- src/controllers/api/setGuildMotdController.ts | 14 +- .../api/setHubNpcCustomizationsController.ts | 8 +- .../api/setPlacedDecoInfoController.ts | 6 +- .../api/setShipCustomizationsController.ts | 8 +- .../api/setShipFavouriteLoadoutController.ts | 8 +- .../api/setShipVignetteController.ts | 10 +- .../api/setSuitInfectionController.ts | 10 +- .../api/setSupportedSyndicateController.ts | 4 +- .../api/setWeaponSkillTreeController.ts | 10 +- .../api/shipDecorationsController.ts | 6 +- .../api/startCollectibleEntryController.ts | 8 +- .../api/startDojoRecipeController.ts | 12 +- .../api/startLibraryDailyTaskController.ts | 4 +- .../startLibraryPersonalTargetController.ts | 4 +- src/controllers/api/startRecipeController.ts | 22 +- .../api/stepSequencersController.ts | 6 +- .../api/syndicateSacrificeController.ts | 14 +- .../api/syndicateStandingBonusController.ts | 16 +- src/controllers/api/tauntHistoryController.ts | 8 +- src/controllers/api/tradingController.ts | 8 +- .../api/trainingResultController.ts | 14 +- src/controllers/api/umbraController.ts | 10 +- .../api/unlockShipFeatureController.ts | 6 +- .../api/updateAlignmentController.ts | 8 +- .../api/updateChallengeProgressController.ts | 14 +- src/controllers/api/updateQuestController.ts | 12 +- .../api/updateSessionController.ts | 2 +- .../api/updateSongChallengeController.ts | 8 +- src/controllers/api/updateThemeController.ts | 6 +- src/controllers/api/upgradesController.ts | 22 +- src/controllers/api/valenceSwapController.ts | 8 +- src/controllers/api/wishlistController.ts | 6 +- .../custom/abilityOverrideController.ts | 6 +- .../custom/addCurrencyController.ts | 4 +- src/controllers/custom/addItemsController.ts | 4 +- .../addMissingHelminthBlueprintsController.ts | 4 +- .../custom/addMissingMaxRankModsController.ts | 4 +- src/controllers/custom/addXpController.ts | 10 +- .../custom/changeModularPartsController.ts | 6 +- .../custom/completeAllMissionsController.ts | 12 +- src/controllers/custom/configController.ts | 8 +- .../custom/createAccountController.ts | 4 +- .../custom/createMessageController.ts | 4 +- .../custom/deleteAccountController.ts | 26 +- .../editSuitInvigorationUpgradeController.ts | 4 +- .../custom/getAccountInfoController.ts | 6 +- .../custom/getItemListsController.ts | 6 +- src/controllers/custom/getNameController.ts | 2 +- src/controllers/custom/importController.ts | 14 +- .../custom/ircDroppedController.ts | 2 +- .../custom/manageQuestsController.ts | 8 +- .../popArchonCrystalUpgradeController.ts | 4 +- .../pushArchonCrystalUpgradeController.ts | 4 +- .../custom/renameAccountController.ts | 6 +- .../custom/setAccountCheatController.ts | 6 +- .../custom/setBoosterController.ts | 4 +- .../custom/setEvolutionProgressController.ts | 4 +- .../custom/unlockAllIntrinsicsController.ts | 4 +- .../custom/updateFingerprintController.ts | 6 +- .../webuiFileChangeDetectedController.ts | 4 +- .../dynamic/aggregateSessionsController.ts | 2 +- .../dynamic/getGuildAdsController.ts | 6 +- .../getProfileViewingDataController.ts | 36 +- .../dynamic/worldStateController.ts | 4 +- .../stats/leaderboardController.ts | 2 +- src/controllers/stats/uploadController.ts | 8 +- src/controllers/stats/viewController.ts | 12 +- src/helpers/customHelpers/customHelpers.ts | 6 +- src/helpers/inventoryHelpers.ts | 4 +- src/helpers/modularWeaponHelper.ts | 2 +- src/helpers/nemesisHelpers.ts | 10 +- src/helpers/purchaseHelpers.ts | 2 +- src/helpers/relicHelper.ts | 18 +- src/helpers/rivenHelper.ts | 2 +- src/index.ts | 12 +- src/managers/sessionManager.ts | 4 +- src/middleware/errorHandler.ts | 2 +- src/middleware/middleware.ts | 2 +- src/middleware/morgenMiddleware.ts | 2 +- src/models/commonModel.ts | 2 +- src/models/friendModel.ts | 2 +- src/models/guildModel.ts | 12 +- src/models/inboxModel.ts | 6 +- src/models/inventoryModels/inventoryModel.ts | 16 +- src/models/inventoryModels/loadoutModel.ts | 8 +- src/models/leaderboardModel.ts | 2 +- src/models/loginModel.ts | 2 +- src/models/personalRoomsModel.ts | 8 +- src/models/shipModel.ts | 8 +- src/models/statsModel.ts | 2 +- src/models/worldStateModel.ts | 2 +- src/pathman.ts | 13 - src/routes/api.ts | 332 +++++++++--------- src/routes/cache.ts | 2 +- src/routes/custom.ts | 58 +-- src/routes/dynamic.ts | 8 +- src/routes/pay.ts | 4 +- src/routes/stats.ts | 6 +- src/routes/webui.ts | 4 +- src/services/buildConfigService.ts | 2 +- src/services/configService.ts | 6 +- src/services/configWatcherService.ts | 18 +- src/services/configWriterService.ts | 2 +- src/services/friendService.ts | 12 +- src/services/guildService.ts | 40 +-- src/services/importService.ts | 18 +- src/services/inboxService.ts | 10 +- src/services/infestedFoundryService.ts | 8 +- src/services/inventoryService.ts | 70 ++-- src/services/itemDataService.ts | 6 +- src/services/leaderboardService.ts | 12 +- src/services/loadoutService.ts | 4 +- src/services/loginRewardService.ts | 16 +- src/services/loginService.ts | 16 +- src/services/missionInventoryUpdateService.ts | 68 ++-- src/services/personalRoomsService.ts | 8 +- src/services/purchaseService.ts | 32 +- src/services/questService.ts | 24 +- src/services/saveLoadoutService.ts | 20 +- src/services/serversideVendorsService.ts | 16 +- src/services/shipCustomizationsService.ts | 20 +- src/services/shipService.ts | 4 +- src/services/statsService.ts | 12 +- src/services/webService.ts | 8 +- src/services/worldStateService.ts | 38 +- src/services/wsService.ts | 8 +- src/types/equipmentTypes.ts | 4 +- src/types/friendTypes.ts | 2 +- src/types/genericUpdate.ts | 2 +- src/types/guildTypes.ts | 8 +- .../inventoryTypes/commonInventoryTypes.ts | 2 +- src/types/inventoryTypes/inventoryTypes.ts | 12 +- src/types/missionTypes.ts | 2 +- src/types/personalRoomsTypes.ts | 6 +- src/types/purchaseTypes.ts | 6 +- src/types/requestTypes.ts | 12 +- src/types/saveLoadoutTypes.ts | 6 +- src/types/shipTypes.ts | 2 +- src/types/vendorTypes.ts | 2 +- src/types/worldStateTypes.ts | 2 +- src/utils/logger.ts | 4 +- tsconfig.json | 3 +- 272 files changed, 1590 insertions(+), 1546 deletions(-) delete mode 100644 src/pathman.ts diff --git a/package-lock.json b/package-lock.json index 3b2f138b..b072d3d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "mongoose": "^8.11.0", "morgan": "^1.10.0", "ncp": "^2.0.0", - "typescript": "^5.5", + "typescript": "^5.7", "undici": "^7.10.0", "warframe-public-export-plus": "^0.5.82", "warframe-riven-info": "^0.1.2", diff --git a/package.json b/package.json index f7617ec7..3c2ce7cd 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "WF Emulator", "main": "index.ts", "scripts": { - "start": "node --enable-source-maps --import ./build/src/pathman.js build/src/index.js", + "start": "node --enable-source-maps build/src/index.js", "build": "tsgo --sourceMap && ncp static/webui build/static/webui", "build:tsc": "tsc --incremental --sourceMap && ncp static/webui build/static/webui", "build:dev": "tsgo --sourceMap", @@ -38,7 +38,7 @@ "mongoose": "^8.11.0", "morgan": "^1.10.0", "ncp": "^2.0.0", - "typescript": "^5.5", + "typescript": "^5.7", "undici": "^7.10.0", "warframe-public-export-plus": "^0.5.82", "warframe-riven-info": "^0.1.2", diff --git a/scripts/fix-imports.js b/scripts/fix-imports.js index 66878694..7859ba44 100644 --- a/scripts/fix-imports.js +++ b/scripts/fix-imports.js @@ -28,15 +28,44 @@ for (const file of files) { continue; } const dir = path.dirname(file); - const fixedContent = content.replaceAll(/} from "([^"]+)";/g, (sub, importPath) => { - if (!importPath.startsWith("@/")) { - const fullImportPath = path.resolve(dir, importPath); - if (fs.existsSync(fullImportPath + ".ts")) { - const relative = path.relative(root, fullImportPath).replace(/\\/g, "/"); - const fixedPath = "@/" + relative; - console.log(`${importPath} -> ${fixedPath}`); - return sub.split(importPath).join(fixedPath); + const fixedContent = content.replaceAll(/from "([^"]+)";/g, (sub, importPath) => { + if (importPath.startsWith("@/") || importPath.startsWith(".")) { + const base = importPath.startsWith("@/") + ? path.join(root, importPath.slice(2)) + : path.resolve(dir, importPath); + let target = base; + + if (fs.existsSync(target)) { + const stat = fs.statSync(target); + if (stat.isDirectory()) { + if (fs.existsSync(path.join(target, "index.ts"))) { + target = path.join(target, "index.ts"); + } else { + return sub; + } + } else { + const ext = path.extname(target); + if (!ext) { + target += ".ts"; + } + } + } else if (fs.existsSync(target + ".ts")) { + target += ".ts"; + } else if (fs.existsSync(path.join(target, "index.ts"))) { + target = path.join(target, "index.ts"); + } else { + return sub; } + + let relative = path.relative(dir, target).replace(/\\/g, "/"); + if (!path.extname(relative)) { + relative += ".ts"; + } + if (!relative.startsWith(".")) { + relative = "./" + relative; + } + console.log(`${importPath} -> ${relative}`); + return sub.split(importPath).join(relative); } return sub; }); diff --git a/src/app.ts b/src/app.ts index 48079166..971fe210 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,17 +1,17 @@ import express from "express"; import bodyParser from "body-parser"; -import { unknownEndpointHandler } from "@/src/middleware/middleware"; -import { requestLogger } from "@/src/middleware/morgenMiddleware"; -import { errorHandler } from "@/src/middleware/errorHandler"; +import { unknownEndpointHandler } from "./middleware/middleware.ts"; +import { requestLogger } from "./middleware/morgenMiddleware.ts"; +import { errorHandler } from "./middleware/errorHandler.ts"; -import { apiRouter } from "@/src/routes/api"; -import { cacheRouter } from "@/src/routes/cache"; -import { customRouter } from "@/src/routes/custom"; -import { dynamicController } from "@/src/routes/dynamic"; -import { payRouter } from "@/src/routes/pay"; -import { statsRouter } from "@/src/routes/stats"; -import { webuiRouter } from "@/src/routes/webui"; +import { apiRouter } from "./routes/api.ts"; +import { cacheRouter } from "./routes/cache.ts"; +import { customRouter } from "./routes/custom.ts"; +import { dynamicController } from "./routes/dynamic.ts"; +import { payRouter } from "./routes/pay.ts"; +import { statsRouter } from "./routes/stats.ts"; +import { webuiRouter } from "./routes/webui.ts"; const app = express(); diff --git a/src/controllers/api/abandonLibraryDailyTaskController.ts b/src/controllers/api/abandonLibraryDailyTaskController.ts index d7dbdcdd..0b44a2ee 100644 --- a/src/controllers/api/abandonLibraryDailyTaskController.ts +++ b/src/controllers/api/abandonLibraryDailyTaskController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/abortDojoComponentController.ts b/src/controllers/api/abortDojoComponentController.ts index 03fe0459..803c8baa 100644 --- a/src/controllers/api/abortDojoComponentController.ts +++ b/src/controllers/api/abortDojoComponentController.ts @@ -5,10 +5,10 @@ import { hasGuildPermission, removeDojoDeco, removeDojoRoom -} from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const abortDojoComponentController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/abortDojoComponentDestructionController.ts b/src/controllers/api/abortDojoComponentDestructionController.ts index 75e2efb4..8ea79363 100644 --- a/src/controllers/api/abortDojoComponentDestructionController.ts +++ b/src/controllers/api/abortDojoComponentDestructionController.ts @@ -1,7 +1,12 @@ -import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { + getDojoClient, + getGuildForRequestEx, + hasAccessToDojo, + hasGuildPermission +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/activateRandomModController.ts b/src/controllers/api/activateRandomModController.ts index f4679f5b..ce452b37 100644 --- a/src/controllers/api/activateRandomModController.ts +++ b/src/controllers/api/activateRandomModController.ts @@ -1,13 +1,13 @@ -import { toOid } from "@/src/helpers/inventoryHelpers"; +import { toOid } from "../../helpers/inventoryHelpers.ts"; import { createVeiledRivenFingerprint, createUnveiledRivenFingerprint, rivenRawToRealWeighted -} from "@/src/helpers/rivenHelper"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addMods, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getRandomElement } from "@/src/services/rngService"; +} from "../../helpers/rivenHelper.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addMods, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getRandomElement } from "../../services/rngService.ts"; import type { RequestHandler } from "express"; import { ExportUpgrades } from "warframe-public-export-plus"; diff --git a/src/controllers/api/addFriendController.ts b/src/controllers/api/addFriendController.ts index 2637731f..c6a24e20 100644 --- a/src/controllers/api/addFriendController.ts +++ b/src/controllers/api/addFriendController.ts @@ -1,9 +1,9 @@ -import { toOid } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Friendship } from "@/src/models/friendModel"; -import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IFriendInfo } from "@/src/types/friendTypes"; +import { toOid } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Friendship } from "../../models/friendModel.ts"; +import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "../../services/friendService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IFriendInfo } from "../../types/friendTypes.ts"; import type { RequestHandler } from "express"; export const addFriendController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/addFriendImageController.ts b/src/controllers/api/addFriendImageController.ts index f8ba7d61..d3702c12 100644 --- a/src/controllers/api/addFriendImageController.ts +++ b/src/controllers/api/addFriendImageController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; export const addFriendImageController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/addIgnoredUserController.ts b/src/controllers/api/addIgnoredUserController.ts index 48bacaeb..b268e498 100644 --- a/src/controllers/api/addIgnoredUserController.ts +++ b/src/controllers/api/addIgnoredUserController.ts @@ -1,8 +1,8 @@ -import { toOid } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Account, Ignore } from "@/src/models/loginModel"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IFriendInfo } from "@/src/types/friendTypes"; +import { toOid } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Account, Ignore } from "../../models/loginModel.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IFriendInfo } from "../../types/friendTypes.ts"; import type { RequestHandler } from "express"; export const addIgnoredUserController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/addPendingFriendController.ts b/src/controllers/api/addPendingFriendController.ts index 30279c2b..fc1e06c9 100644 --- a/src/controllers/api/addPendingFriendController.ts +++ b/src/controllers/api/addPendingFriendController.ts @@ -1,11 +1,11 @@ -import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Friendship } from "@/src/models/friendModel"; -import { Account } from "@/src/models/loginModel"; -import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "@/src/services/friendService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IFriendInfo } from "@/src/types/friendTypes"; +import { toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Friendship } from "../../models/friendModel.ts"; +import { Account } from "../../models/loginModel.ts"; +import { addInventoryDataToFriendInfo, areFriendsOfFriends } from "../../services/friendService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IFriendInfo } from "../../types/friendTypes.ts"; import type { RequestHandler } from "express"; export const addPendingFriendController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/addToAllianceController.ts b/src/controllers/api/addToAllianceController.ts index abf409ae..6e004bf2 100644 --- a/src/controllers/api/addToAllianceController.ts +++ b/src/controllers/api/addToAllianceController.ts @@ -1,10 +1,10 @@ -import { getJSONfromString, regexEscape } from "@/src/helpers/stringHelpers"; -import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; -import { createMessage } from "@/src/services/inboxService"; -import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; -import { logger } from "@/src/utils/logger"; +import { getJSONfromString, regexEscape } from "../../helpers/stringHelpers.ts"; +import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts"; +import { createMessage } from "../../services/inboxService.ts"; +import { getEffectiveAvatarImageType, getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest, getSuffixedName } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; import { ExportFlavour } from "warframe-public-export-plus"; diff --git a/src/controllers/api/addToGuildController.ts b/src/controllers/api/addToGuildController.ts index bb16aa5a..57fb6193 100644 --- a/src/controllers/api/addToGuildController.ts +++ b/src/controllers/api/addToGuildController.ts @@ -1,15 +1,15 @@ -import { toMongoDate } from "@/src/helpers/inventoryHelpers"; -import { Guild, GuildMember } from "@/src/models/guildModel"; -import { Account } from "@/src/models/loginModel"; -import { addInventoryDataToFriendInfo, areFriends } from "@/src/services/friendService"; -import { hasGuildPermission } from "@/src/services/guildService"; -import { createMessage } from "@/src/services/inboxService"; -import { getEffectiveAvatarImageType, getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService"; -import type { IOid } from "@/src/types/commonTypes"; -import type { IGuildMemberClient } from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; -import { logger } from "@/src/utils/logger"; +import { toMongoDate } from "../../helpers/inventoryHelpers.ts"; +import { Guild, GuildMember } from "../../models/guildModel.ts"; +import { Account } from "../../models/loginModel.ts"; +import { addInventoryDataToFriendInfo, areFriends } from "../../services/friendService.ts"; +import { hasGuildPermission } from "../../services/guildService.ts"; +import { createMessage } from "../../services/inboxService.ts"; +import { getEffectiveAvatarImageType, getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "../../services/loginService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; +import type { IGuildMemberClient } from "../../types/guildTypes.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; import { ExportFlavour } from "warframe-public-export-plus"; diff --git a/src/controllers/api/adoptPetController.ts b/src/controllers/api/adoptPetController.ts index 1c275029..607ea5d2 100644 --- a/src/controllers/api/adoptPetController.ts +++ b/src/controllers/api/adoptPetController.ts @@ -1,6 +1,6 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const adoptPetController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/apartmentController.ts b/src/controllers/api/apartmentController.ts index b857180a..247d5b10 100644 --- a/src/controllers/api/apartmentController.ts +++ b/src/controllers/api/apartmentController.ts @@ -1,5 +1,5 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getPersonalRooms } from "@/src/services/personalRoomsService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getPersonalRooms } from "../../services/personalRoomsService.ts"; import type { RequestHandler } from "express"; export const apartmentController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/arcaneCommonController.ts b/src/controllers/api/arcaneCommonController.ts index ea6bb279..299b1b22 100644 --- a/src/controllers/api/arcaneCommonController.ts +++ b/src/controllers/api/arcaneCommonController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory, addMods } from "@/src/services/inventoryService"; -import type { IOid } from "@/src/types/commonTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory, addMods } from "../../services/inventoryService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; export const arcaneCommonController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/archonFusionController.ts b/src/controllers/api/archonFusionController.ts index 5b84bb6b..3c046d41 100644 --- a/src/controllers/api/archonFusionController.ts +++ b/src/controllers/api/archonFusionController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { colorToShard, combineColors, shardToColor } from "@/src/helpers/shardHelper"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addMiscItems, getInventory } from "../../services/inventoryService.ts"; +import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { colorToShard, combineColors, shardToColor } from "../../helpers/shardHelper.ts"; export const archonFusionController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/artifactTransmutationController.ts b/src/controllers/api/artifactTransmutationController.ts index bcacfb80..69cc41ee 100644 --- a/src/controllers/api/artifactTransmutationController.ts +++ b/src/controllers/api/artifactTransmutationController.ts @@ -1,9 +1,9 @@ -import { fromOid, toOid } from "@/src/helpers/inventoryHelpers"; -import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "@/src/helpers/rivenHelper"; -import { addMiscItems, addMods, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "@/src/services/rngService"; -import type { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes"; +import { fromOid, toOid } from "../../helpers/inventoryHelpers.ts"; +import { createVeiledRivenFingerprint, rivenRawToRealWeighted } from "../../helpers/rivenHelper.ts"; +import { addMiscItems, addMods, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getRandomElement, getRandomWeightedReward, getRandomWeightedRewardUc } from "../../services/rngService.ts"; +import type { IUpgradeFromClient } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; import type { TRarity } from "warframe-public-export-plus"; import { ExportBoosterPacks, ExportUpgrades } from "warframe-public-export-plus"; diff --git a/src/controllers/api/artifactsController.ts b/src/controllers/api/artifactsController.ts index c25db5d3..4fb2155d 100644 --- a/src/controllers/api/artifactsController.ts +++ b/src/controllers/api/artifactsController.ts @@ -1,8 +1,8 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; -import type { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import { addMods, getInventory } from "@/src/services/inventoryService"; +import type { IInventoryClient, IUpgradeClient } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { addMods, getInventory } from "../../services/inventoryService.ts"; export const artifactsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/cancelGuildAdvertisementController.ts b/src/controllers/api/cancelGuildAdvertisementController.ts index 1a7ccf12..a94fd2d0 100644 --- a/src/controllers/api/cancelGuildAdvertisementController.ts +++ b/src/controllers/api/cancelGuildAdvertisementController.ts @@ -1,8 +1,8 @@ -import { GuildAd } from "@/src/models/guildModel"; -import { getGuildForRequestEx, hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { GuildAd } from "../../models/guildModel.ts"; +import { getGuildForRequestEx, hasGuildPermission } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/changeDojoRootController.ts b/src/controllers/api/changeDojoRootController.ts index cd8f050e..f4ab62ce 100644 --- a/src/controllers/api/changeDojoRootController.ts +++ b/src/controllers/api/changeDojoRootController.ts @@ -1,11 +1,16 @@ import type { RequestHandler } from "express"; -import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; -import { logger } from "@/src/utils/logger"; -import type { IDojoComponentDatabase } from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { + getDojoClient, + getGuildForRequestEx, + hasAccessToDojo, + hasGuildPermission +} from "../../services/guildService.ts"; +import { logger } from "../../utils/logger.ts"; +import type { IDojoComponentDatabase } from "../../types/guildTypes.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import { Types } from "mongoose"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; export const changeDojoRootController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/changeGuildRankController.ts b/src/controllers/api/changeGuildRankController.ts index 5a0a6bc0..30ebe2c3 100644 --- a/src/controllers/api/changeGuildRankController.ts +++ b/src/controllers/api/changeGuildRankController.ts @@ -1,7 +1,7 @@ -import { GuildMember } from "@/src/models/guildModel"; -import { getGuildForRequest, hasGuildPermissionEx } from "@/src/services/guildService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { GuildMember } from "../../models/guildModel.ts"; +import { getGuildForRequest, hasGuildPermissionEx } from "../../services/guildService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const changeGuildRankController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/checkDailyMissionBonusController.ts b/src/controllers/api/checkDailyMissionBonusController.ts index 5d67d4b5..4bdcb628 100644 --- a/src/controllers/api/checkDailyMissionBonusController.ts +++ b/src/controllers/api/checkDailyMissionBonusController.ts @@ -1,4 +1,4 @@ -import { getAccountForRequest } from "@/src/services/loginService"; +import { getAccountForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const checkDailyMissionBonusController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/claimCompletedRecipeController.ts b/src/controllers/api/claimCompletedRecipeController.ts index fa93611e..7deb7b09 100644 --- a/src/controllers/api/claimCompletedRecipeController.ts +++ b/src/controllers/api/claimCompletedRecipeController.ts @@ -2,11 +2,11 @@ //it will claim a recipe for the user import type { RequestHandler } from "express"; -import { logger } from "@/src/utils/logger"; -import { getRecipe } from "@/src/services/itemDataService"; -import type { IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getAccountForRequest } from "@/src/services/loginService"; +import { logger } from "../../utils/logger.ts"; +import { getRecipe } from "../../services/itemDataService.ts"; +import type { IOid, IOidWithLegacySupport } from "../../types/commonTypes.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; import { getInventory, updateCurrency, @@ -17,15 +17,15 @@ import { addKubrowPetPrint, addPowerSuit, addEquipment -} from "@/src/services/inventoryService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import type { IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import { toOid2 } from "@/src/helpers/inventoryHelpers"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +} from "../../services/inventoryService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import type { IPendingRecipeDatabase } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { toOid2 } from "../../helpers/inventoryHelpers.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; import type { IRecipe } from "warframe-public-export-plus"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { EquipmentFeatures, Status } from "@/src/types/equipmentTypes"; +import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; +import { EquipmentFeatures, Status } from "../../types/equipmentTypes.ts"; interface IClaimCompletedRecipeRequest { RecipeIds: IOid[]; diff --git a/src/controllers/api/claimJunctionChallengeRewardController.ts b/src/controllers/api/claimJunctionChallengeRewardController.ts index b83fbde4..4e45852e 100644 --- a/src/controllers/api/claimJunctionChallengeRewardController.ts +++ b/src/controllers/api/claimJunctionChallengeRewardController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { combineInventoryChanges, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { handleStoreItemAcquisition } from "../../services/purchaseService.ts"; import type { RequestHandler } from "express"; import { ExportChallenges } from "warframe-public-export-plus"; diff --git a/src/controllers/api/claimLibraryDailyTaskRewardController.ts b/src/controllers/api/claimLibraryDailyTaskRewardController.ts index 60bd036a..423c3ba2 100644 --- a/src/controllers/api/claimLibraryDailyTaskRewardController.ts +++ b/src/controllers/api/claimLibraryDailyTaskRewardController.ts @@ -1,5 +1,5 @@ -import { addFusionPoints, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { addFusionPoints, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/clearDialogueHistoryController.ts b/src/controllers/api/clearDialogueHistoryController.ts index 4dfc9e93..4a657dfe 100644 --- a/src/controllers/api/clearDialogueHistoryController.ts +++ b/src/controllers/api/clearDialogueHistoryController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const clearDialogueHistoryController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/completeCalendarEventController.ts b/src/controllers/api/completeCalendarEventController.ts index e9dbc4e4..5faef69c 100644 --- a/src/controllers/api/completeCalendarEventController.ts +++ b/src/controllers/api/completeCalendarEventController.ts @@ -1,8 +1,8 @@ -import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { getWorldState } from "@/src/services/worldStateService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { checkCalendarAutoAdvance, getCalendarProgress, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { handleStoreItemAcquisition } from "../../services/purchaseService.ts"; +import { getWorldState } from "../../services/worldStateService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; // GET request; query parameters: CompletedEventIdx=0&Iteration=4&Version=19&Season=CST_SUMMER diff --git a/src/controllers/api/completeRandomModChallengeController.ts b/src/controllers/api/completeRandomModChallengeController.ts index 730c6111..d3c0055a 100644 --- a/src/controllers/api/completeRandomModChallengeController.ts +++ b/src/controllers/api/completeRandomModChallengeController.ts @@ -1,10 +1,10 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { IVeiledRivenFingerprint } from "@/src/helpers/rivenHelper"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addMiscItems, getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { IVeiledRivenFingerprint } from "../../helpers/rivenHelper.ts"; export const completeRandomModChallengeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/confirmAllianceInvitationController.ts b/src/controllers/api/confirmAllianceInvitationController.ts index 4dd206ec..095fa165 100644 --- a/src/controllers/api/confirmAllianceInvitationController.ts +++ b/src/controllers/api/confirmAllianceInvitationController.ts @@ -1,6 +1,6 @@ -import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; -import { getAllianceClient } from "@/src/services/guildService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts"; +import { getAllianceClient } from "../../services/guildService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const confirmAllianceInvitationController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/confirmGuildInvitationController.ts b/src/controllers/api/confirmGuildInvitationController.ts index 02fe5140..bfe30fb2 100644 --- a/src/controllers/api/confirmGuildInvitationController.ts +++ b/src/controllers/api/confirmGuildInvitationController.ts @@ -1,17 +1,17 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Guild, GuildMember } from "@/src/models/guildModel"; -import { Account } from "@/src/models/loginModel"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Guild, GuildMember } from "../../models/guildModel.ts"; +import { Account } from "../../models/loginModel.ts"; import { deleteGuild, getGuildClient, giveClanKey, hasGuildPermission, removeDojoKeyItems -} from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest, getAccountIdForRequest, getSuffixedName } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; import { Types } from "mongoose"; diff --git a/src/controllers/api/contributeGuildClassController.ts b/src/controllers/api/contributeGuildClassController.ts index 6bf4014d..3a04ee6d 100644 --- a/src/controllers/api/contributeGuildClassController.ts +++ b/src/controllers/api/contributeGuildClassController.ts @@ -1,9 +1,9 @@ -import { toMongoDate } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Guild } from "@/src/models/guildModel"; -import { checkClanAscensionHasRequiredContributors } from "@/src/services/guildService"; -import { addFusionPoints, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { toMongoDate } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Guild } from "../../models/guildModel.ts"; +import { checkClanAscensionHasRequiredContributors } from "../../services/guildService.ts"; +import { addFusionPoints, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; import { Types } from "mongoose"; diff --git a/src/controllers/api/contributeToDojoComponentController.ts b/src/controllers/api/contributeToDojoComponentController.ts index eaed2d18..14c43878 100644 --- a/src/controllers/api/contributeToDojoComponentController.ts +++ b/src/controllers/api/contributeToDojoComponentController.ts @@ -1,6 +1,6 @@ -import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; -import { GuildMember } from "@/src/models/guildModel"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TGuildDatabaseDocument } from "../../models/guildModel.ts"; +import { GuildMember } from "../../models/guildModel.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; import { addGuildMemberMiscItemContribution, getDojoClient, @@ -9,12 +9,12 @@ import { processDojoBuildMaterialsGathered, scaleRequiredCount, setDojoRoomLogFunded -} from "@/src/services/guildService"; -import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +} from "../../services/guildService.ts"; +import { addMiscItems, getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IDojoContributable, IGuildMemberDatabase } from "../../types/guildTypes.ts"; +import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; import type { IDojoBuild } from "warframe-public-export-plus"; import { ExportDojoRecipes } from "warframe-public-export-plus"; diff --git a/src/controllers/api/contributeToVaultController.ts b/src/controllers/api/contributeToVaultController.ts index d793549a..d65930ce 100644 --- a/src/controllers/api/contributeToVaultController.ts +++ b/src/controllers/api/contributeToVaultController.ts @@ -1,5 +1,5 @@ -import type { TGuildDatabaseDocument, TGuildMemberDatabaseDocument } from "@/src/models/guildModel"; -import { Alliance, Guild, GuildMember } from "@/src/models/guildModel"; +import type { TGuildDatabaseDocument, TGuildMemberDatabaseDocument } from "../../models/guildModel.ts"; +import { Alliance, Guild, GuildMember } from "../../models/guildModel.ts"; import { addGuildMemberMiscItemContribution, addGuildMemberShipDecoContribution, @@ -7,17 +7,17 @@ import { addVaultMiscItems, addVaultShipDecos, getGuildForRequestEx -} from "@/src/services/guildService"; +} from "../../services/guildService.ts"; import { addFusionTreasures, addMiscItems, addShipDecorations, getInventory, updateCurrency -} from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { ITypeCount } from "@/src/types/commonTypes"; -import type { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +} from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { ITypeCount } from "../../types/commonTypes.ts"; +import type { IFusionTreasure, IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const contributeToVaultController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/createAllianceController.ts b/src/controllers/api/createAllianceController.ts index 205e67a6..48fdd5cb 100644 --- a/src/controllers/api/createAllianceController.ts +++ b/src/controllers/api/createAllianceController.ts @@ -1,9 +1,9 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; -import { getAllianceClient } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts"; +import { getAllianceClient } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const createAllianceController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/createGuildController.ts b/src/controllers/api/createGuildController.ts index ac5d1f94..239b3318 100644 --- a/src/controllers/api/createGuildController.ts +++ b/src/controllers/api/createGuildController.ts @@ -1,10 +1,10 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Guild, GuildMember } from "@/src/models/guildModel"; -import { createUniqueClanName, getGuildClient, giveClanKey } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Guild, GuildMember } from "../../models/guildModel.ts"; +import { createUniqueClanName, getGuildClient, giveClanKey } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; export const createGuildController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/creditsController.ts b/src/controllers/api/creditsController.ts index 8bbac3a8..8b6a5474 100644 --- a/src/controllers/api/creditsController.ts +++ b/src/controllers/api/creditsController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; export const creditsController: RequestHandler = async (req, res) => { const inventory = ( diff --git a/src/controllers/api/crewMembersController.ts b/src/controllers/api/crewMembersController.ts index fd5d9087..6f95836d 100644 --- a/src/controllers/api/crewMembersController.ts +++ b/src/controllers/api/crewMembersController.ts @@ -1,8 +1,8 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { ICrewMemberClient } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; import { Types } from "mongoose"; diff --git a/src/controllers/api/crewShipFusionController.ts b/src/controllers/api/crewShipFusionController.ts index 093d975f..c0981f4f 100644 --- a/src/controllers/api/crewShipFusionController.ts +++ b/src/controllers/api/crewShipFusionController.ts @@ -1,10 +1,10 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IOid } from "@/src/types/commonTypes"; -import type { ICrewShipComponentFingerprint } from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; +import type { ICrewShipComponentFingerprint } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus"; diff --git a/src/controllers/api/crewShipIdentifySalvageController.ts b/src/controllers/api/crewShipIdentifySalvageController.ts index 29ac2609..317da572 100644 --- a/src/controllers/api/crewShipIdentifySalvageController.ts +++ b/src/controllers/api/crewShipIdentifySalvageController.ts @@ -3,19 +3,19 @@ import { addCrewShipRawSalvage, getInventory, addEquipment -} from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +} from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; import type { ICrewShipComponentFingerprint, IInnateDamageFingerprint -} from "@/src/types/inventoryTypes/inventoryTypes"; +} from "../../types/inventoryTypes/inventoryTypes.ts"; import { ExportCustoms, ExportRailjackWeapons, ExportUpgrades } from "warframe-public-export-plus"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { getRandomInt } from "@/src/services/rngService"; -import type { IFingerprintStat } from "@/src/helpers/rivenHelper"; -import type { IEquipmentDatabase } from "@/src/types/equipmentTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { getRandomInt } from "../../services/rngService.ts"; +import type { IFingerprintStat } from "../../helpers/rivenHelper.ts"; +import type { IEquipmentDatabase } from "../../types/equipmentTypes.ts"; export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/customObstacleCourseLeaderboardController.ts b/src/controllers/api/customObstacleCourseLeaderboardController.ts index 731766b0..616407c3 100644 --- a/src/controllers/api/customObstacleCourseLeaderboardController.ts +++ b/src/controllers/api/customObstacleCourseLeaderboardController.ts @@ -1,10 +1,10 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Guild } from "@/src/models/guildModel"; -import { hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest, getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; -import { logger } from "@/src/utils/logger"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Guild } from "../../models/guildModel.ts"; +import { hasAccessToDojo, hasGuildPermission } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest, getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/customizeGuildRanksController.ts b/src/controllers/api/customizeGuildRanksController.ts index 4106ef21..afc7225c 100644 --- a/src/controllers/api/customizeGuildRanksController.ts +++ b/src/controllers/api/customizeGuildRanksController.ts @@ -1,7 +1,7 @@ -import { getGuildForRequest, hasGuildPermission } from "@/src/services/guildService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IGuildRank } from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { getGuildForRequest, hasGuildPermission } from "../../services/guildService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IGuildRank } from "../../types/guildTypes.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const customizeGuildRanksController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/declineAllianceInviteController.ts b/src/controllers/api/declineAllianceInviteController.ts index c2e3ae36..4c8953ed 100644 --- a/src/controllers/api/declineAllianceInviteController.ts +++ b/src/controllers/api/declineAllianceInviteController.ts @@ -1,5 +1,5 @@ -import { AllianceMember, GuildMember } from "@/src/models/guildModel"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { AllianceMember, GuildMember } from "../../models/guildModel.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const declineAllianceInviteController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/declineGuildInviteController.ts b/src/controllers/api/declineGuildInviteController.ts index a6690006..4fca79bd 100644 --- a/src/controllers/api/declineGuildInviteController.ts +++ b/src/controllers/api/declineGuildInviteController.ts @@ -1,5 +1,5 @@ -import { GuildMember } from "@/src/models/guildModel"; -import { getAccountForRequest } from "@/src/services/loginService"; +import { GuildMember } from "../../models/guildModel.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const declineGuildInviteController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/deleteSessionController.ts b/src/controllers/api/deleteSessionController.ts index 1662be48..52967522 100644 --- a/src/controllers/api/deleteSessionController.ts +++ b/src/controllers/api/deleteSessionController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import { deleteSession } from "@/src/managers/sessionManager"; +import { deleteSession } from "../../managers/sessionManager.ts"; const deleteSessionController: RequestHandler = (_req, res) => { deleteSession(_req.query.sessionId as string); diff --git a/src/controllers/api/destroyDojoDecoController.ts b/src/controllers/api/destroyDojoDecoController.ts index 5e27bd86..c47dfde3 100644 --- a/src/controllers/api/destroyDojoDecoController.ts +++ b/src/controllers/api/destroyDojoDecoController.ts @@ -5,11 +5,11 @@ import { hasGuildPermission, refundDojoDeco, removeDojoDeco -} from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; -import { logger } from "@/src/utils/logger"; +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; export const destroyDojoDecoController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/divvyAllianceVaultController.ts b/src/controllers/api/divvyAllianceVaultController.ts index 4ecdaa02..0ebdcf67 100644 --- a/src/controllers/api/divvyAllianceVaultController.ts +++ b/src/controllers/api/divvyAllianceVaultController.ts @@ -1,8 +1,8 @@ -import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; -import { parallelForeach } from "@/src/utils/async-utils"; -import { logger } from "@/src/utils/logger"; +import { Alliance, AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import { parallelForeach } from "../../utils/async-utils.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; export const divvyAllianceVaultController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/dojoComponentRushController.ts b/src/controllers/api/dojoComponentRushController.ts index 03770928..4bee8424 100644 --- a/src/controllers/api/dojoComponentRushController.ts +++ b/src/controllers/api/dojoComponentRushController.ts @@ -1,9 +1,14 @@ -import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; -import { GuildMember } from "@/src/models/guildModel"; -import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, scaleRequiredCount } from "@/src/services/guildService"; -import { getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IDojoContributable } from "@/src/types/guildTypes"; +import type { TGuildDatabaseDocument } from "../../models/guildModel.ts"; +import { GuildMember } from "../../models/guildModel.ts"; +import { + getDojoClient, + getGuildForRequestEx, + hasAccessToDojo, + scaleRequiredCount +} from "../../services/guildService.ts"; +import { getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IDojoContributable } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; import type { IDojoBuild } from "warframe-public-export-plus"; import { ExportDojoRecipes } from "warframe-public-export-plus"; diff --git a/src/controllers/api/dronesController.ts b/src/controllers/api/dronesController.ts index 393178f8..07cbaedd 100644 --- a/src/controllers/api/dronesController.ts +++ b/src/controllers/api/dronesController.ts @@ -1,11 +1,11 @@ -import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import { fromStoreItem } from "@/src/services/itemDataService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getRandomInt, getRandomWeightedRewardUc } from "@/src/services/rngService"; -import type { IMongoDate, IOid } from "@/src/types/commonTypes"; -import type { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts"; +import { addMiscItems, getInventory } from "../../services/inventoryService.ts"; +import { fromStoreItem } from "../../services/itemDataService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getRandomInt, getRandomWeightedRewardUc } from "../../services/rngService.ts"; +import type { IMongoDate, IOid } from "../../types/commonTypes.ts"; +import type { IDroneClient } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; import { ExportDrones, ExportResources, ExportSystems } from "warframe-public-export-plus"; diff --git a/src/controllers/api/endlessXpController.ts b/src/controllers/api/endlessXpController.ts index 0a98ed9a..1bcdc06d 100644 --- a/src/controllers/api/endlessXpController.ts +++ b/src/controllers/api/endlessXpController.ts @@ -1,14 +1,18 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { IEndlessXpReward, IInventoryClient, TEndlessXpCategory } from "@/src/types/inventoryTypes/inventoryTypes"; -import { logger } from "@/src/utils/logger"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { combineInventoryChanges, getInventory } from "../../services/inventoryService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { + IEndlessXpReward, + IInventoryClient, + TEndlessXpCategory +} from "../../types/inventoryTypes/inventoryTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { ICountedStoreItem } from "warframe-public-export-plus"; import { ExportRewards } from "warframe-public-export-plus"; -import { getRandomElement } from "@/src/services/rngService"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { getRandomElement } from "../../services/rngService.ts"; +import { handleStoreItemAcquisition } from "../../services/purchaseService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; export const endlessXpController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/entratiLabConquestModeController.ts b/src/controllers/api/entratiLabConquestModeController.ts index 226cb348..93f0dbb7 100644 --- a/src/controllers/api/entratiLabConquestModeController.ts +++ b/src/controllers/api/entratiLabConquestModeController.ts @@ -1,7 +1,7 @@ -import { toMongoDate } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory, updateEntratiVault } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { toMongoDate } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory, updateEntratiVault } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const entratiLabConquestModeController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/evolveWeaponController.ts b/src/controllers/api/evolveWeaponController.ts index 50887844..9ed211c9 100644 --- a/src/controllers/api/evolveWeaponController.ts +++ b/src/controllers/api/evolveWeaponController.ts @@ -1,10 +1,10 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { WeaponTypeInternal } from "@/src/services/itemDataService"; -import { getRecipe } from "@/src/services/itemDataService"; -import { EquipmentFeatures } from "@/src/types/equipmentTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addMiscItems, getInventory } from "../../services/inventoryService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { WeaponTypeInternal } from "../../services/itemDataService.ts"; +import { getRecipe } from "../../services/itemDataService.ts"; +import { EquipmentFeatures } from "../../types/equipmentTypes.ts"; export const evolveWeaponController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/findSessionsController.ts b/src/controllers/api/findSessionsController.ts index 152df91d..5dd819f7 100644 --- a/src/controllers/api/findSessionsController.ts +++ b/src/controllers/api/findSessionsController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { getSession } from "@/src/managers/sessionManager"; -import { logger } from "@/src/utils/logger"; -import type { IFindSessionRequest } from "@/src/types/session"; +import { getSession } from "../../managers/sessionManager.ts"; +import { logger } from "../../utils/logger.ts"; +import type { IFindSessionRequest } from "../../types/session.ts"; export const findSessionsController: RequestHandler = (_req, res) => { const req = JSON.parse(String(_req.body)) as IFindSessionRequest; diff --git a/src/controllers/api/fishmongerController.ts b/src/controllers/api/fishmongerController.ts index 43946fdf..85502d0b 100644 --- a/src/controllers/api/fishmongerController.ts +++ b/src/controllers/api/fishmongerController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addMiscItems, addStanding, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addMiscItems, addStanding, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; import { ExportResources } from "warframe-public-export-plus"; diff --git a/src/controllers/api/focusController.ts b/src/controllers/api/focusController.ts index e5764aed..f518ddc4 100644 --- a/src/controllers/api/focusController.ts +++ b/src/controllers/api/focusController.ts @@ -1,11 +1,11 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory, addMiscItems, addEquipment, occupySlot } from "@/src/services/inventoryService"; -import type { IMiscItem, TFocusPolarity, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import { logger } from "@/src/utils/logger"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory, addMiscItems, addEquipment, occupySlot } from "../../services/inventoryService.ts"; +import type { IMiscItem, TFocusPolarity, TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { logger } from "../../utils/logger.ts"; import { ExportFocusUpgrades } from "warframe-public-export-plus"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; export const focusController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/fusionTreasuresController.ts b/src/controllers/api/fusionTreasuresController.ts index 0aee216a..86e33034 100644 --- a/src/controllers/api/fusionTreasuresController.ts +++ b/src/controllers/api/fusionTreasuresController.ts @@ -1,9 +1,9 @@ import type { RequestHandler } from "express"; import { ExportResources } from "warframe-public-export-plus"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addFusionTreasures, addMiscItems, getInventory } from "@/src/services/inventoryService"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addFusionTreasures, addMiscItems, getInventory } from "../../services/inventoryService.ts"; +import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { parseFusionTreasure } from "../../helpers/inventoryHelpers.ts"; interface IFusionTreasureRequest { oldTreasureName: string; diff --git a/src/controllers/api/gardeningController.ts b/src/controllers/api/gardeningController.ts index b21c8fb2..e98c8a6a 100644 --- a/src/controllers/api/gardeningController.ts +++ b/src/controllers/api/gardeningController.ts @@ -1,13 +1,13 @@ -import { toMongoDate } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addMiscItem, getInventory } from "@/src/services/inventoryService"; -import { toStoreItem } from "@/src/services/itemDataService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService"; -import type { IMongoDate } from "@/src/types/commonTypes"; -import type { IMissionReward } from "@/src/types/missionTypes"; -import type { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { toMongoDate } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addMiscItem, getInventory } from "../../services/inventoryService.ts"; +import { toStoreItem } from "../../services/itemDataService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { createGarden, getPersonalRooms } from "../../services/personalRoomsService.ts"; +import type { IMongoDate } from "../../types/commonTypes.ts"; +import type { IMissionReward } from "../../types/missionTypes.ts"; +import type { IGardeningClient, IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; import { dict_en, ExportResources } from "warframe-public-export-plus"; diff --git a/src/controllers/api/genericUpdateController.ts b/src/controllers/api/genericUpdateController.ts index 2146fb32..3a602661 100644 --- a/src/controllers/api/genericUpdateController.ts +++ b/src/controllers/api/genericUpdateController.ts @@ -1,8 +1,8 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { updateGeneric } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { updateGeneric } from "../../services/inventoryService.ts"; import type { RequestHandler } from "express"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { IGenericUpdate } from "@/src/types/genericUpdate"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { IGenericUpdate } from "../../types/genericUpdate.ts"; // This endpoint used to be /api/genericUpdate.php, but sometime around the Jade Shadows update, it was changed to /api/updateNodeIntros.php. // SpaceNinjaServer supports both endpoints right now. diff --git a/src/controllers/api/getAllianceController.ts b/src/controllers/api/getAllianceController.ts index b6be0648..928a06e4 100644 --- a/src/controllers/api/getAllianceController.ts +++ b/src/controllers/api/getAllianceController.ts @@ -1,7 +1,7 @@ -import { Alliance, Guild } from "@/src/models/guildModel"; -import { getAllianceClient } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { Alliance, Guild } from "../../models/guildModel.ts"; +import { getAllianceClient } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const getAllianceController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getDailyDealStockLevelsController.ts b/src/controllers/api/getDailyDealStockLevelsController.ts index bd8cfeff..b53d8fbc 100644 --- a/src/controllers/api/getDailyDealStockLevelsController.ts +++ b/src/controllers/api/getDailyDealStockLevelsController.ts @@ -1,4 +1,4 @@ -import { DailyDeal } from "@/src/models/worldStateModel"; +import { DailyDeal } from "../../models/worldStateModel.ts"; import type { RequestHandler } from "express"; export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getFriendsController.ts b/src/controllers/api/getFriendsController.ts index 2135873f..797b44b9 100644 --- a/src/controllers/api/getFriendsController.ts +++ b/src/controllers/api/getFriendsController.ts @@ -1,8 +1,8 @@ -import { toOid } from "@/src/helpers/inventoryHelpers"; -import { Friendship } from "@/src/models/friendModel"; -import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IFriendInfo } from "@/src/types/friendTypes"; +import { toOid } from "../../helpers/inventoryHelpers.ts"; +import { Friendship } from "../../models/friendModel.ts"; +import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "../../services/friendService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IFriendInfo } from "../../types/friendTypes.ts"; import type { Request, RequestHandler, Response } from "express"; // POST with {} instead of GET as of 38.5.0 diff --git a/src/controllers/api/getGuildContributionsController.ts b/src/controllers/api/getGuildContributionsController.ts index 123a39f6..201a3767 100644 --- a/src/controllers/api/getGuildContributionsController.ts +++ b/src/controllers/api/getGuildContributionsController.ts @@ -1,7 +1,7 @@ -import { GuildMember } from "@/src/models/guildModel"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IGuildMemberClient } from "@/src/types/guildTypes"; +import { GuildMember } from "../../models/guildModel.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IGuildMemberClient } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const getGuildContributionsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getGuildController.ts b/src/controllers/api/getGuildController.ts index cef53aa8..a8003a33 100644 --- a/src/controllers/api/getGuildController.ts +++ b/src/controllers/api/getGuildController.ts @@ -1,9 +1,9 @@ import type { RequestHandler } from "express"; -import { Guild } from "@/src/models/guildModel"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { logger } from "@/src/utils/logger"; -import { getInventory } from "@/src/services/inventoryService"; -import { createUniqueClanName, getGuildClient } from "@/src/services/guildService"; +import { Guild } from "../../models/guildModel.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { logger } from "../../utils/logger.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { createUniqueClanName, getGuildClient } from "../../services/guildService.ts"; export const getGuildController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/getGuildDojoController.ts b/src/controllers/api/getGuildDojoController.ts index b5076235..05d4685c 100644 --- a/src/controllers/api/getGuildDojoController.ts +++ b/src/controllers/api/getGuildDojoController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; import { Types } from "mongoose"; -import { Guild } from "@/src/models/guildModel"; -import { getDojoClient } from "@/src/services/guildService"; -import { Account } from "@/src/models/loginModel"; +import { Guild } from "../../models/guildModel.ts"; +import { getDojoClient } from "../../services/guildService.ts"; +import { Account } from "../../models/loginModel.ts"; export const getGuildDojoController: RequestHandler = async (req, res) => { const guildId = req.query.guildId as string; diff --git a/src/controllers/api/getGuildEventScoreController.ts b/src/controllers/api/getGuildEventScoreController.ts index a045d2e5..a0b229b5 100644 --- a/src/controllers/api/getGuildEventScoreController.ts +++ b/src/controllers/api/getGuildEventScoreController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; -import { Guild } from "@/src/models/guildModel"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { Guild } from "../../models/guildModel.ts"; export const getGuildEventScoreController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/getGuildLogController.ts b/src/controllers/api/getGuildLogController.ts index 035a8c28..0e5daf1f 100644 --- a/src/controllers/api/getGuildLogController.ts +++ b/src/controllers/api/getGuildLogController.ts @@ -1,8 +1,8 @@ -import { toMongoDate } from "@/src/helpers/inventoryHelpers"; -import { Guild } from "@/src/models/guildModel"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IMongoDate } from "@/src/types/commonTypes"; +import { toMongoDate } from "../../helpers/inventoryHelpers.ts"; +import { Guild } from "../../models/guildModel.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IMongoDate } from "../../types/commonTypes.ts"; import type { RequestHandler } from "express"; export const getGuildLogController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getIgnoredUsersController.ts b/src/controllers/api/getIgnoredUsersController.ts index e893b42f..de46cfec 100644 --- a/src/controllers/api/getIgnoredUsersController.ts +++ b/src/controllers/api/getIgnoredUsersController.ts @@ -1,8 +1,8 @@ -import { toOid } from "@/src/helpers/inventoryHelpers"; -import { Account, Ignore } from "@/src/models/loginModel"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IFriendInfo } from "@/src/types/friendTypes"; -import { parallelForeach } from "@/src/utils/async-utils"; +import { toOid } from "../../helpers/inventoryHelpers.ts"; +import { Account, Ignore } from "../../models/loginModel.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IFriendInfo } from "../../types/friendTypes.ts"; +import { parallelForeach } from "../../utils/async-utils.ts"; import type { RequestHandler } from "express"; export const getIgnoredUsersController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getNewRewardSeedController.ts b/src/controllers/api/getNewRewardSeedController.ts index 75e4bfec..b069a07e 100644 --- a/src/controllers/api/getNewRewardSeedController.ts +++ b/src/controllers/api/getNewRewardSeedController.ts @@ -1,6 +1,6 @@ -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { generateRewardSeed } from "@/src/services/rngService"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { generateRewardSeed } from "../../services/rngService.ts"; import type { RequestHandler } from "express"; export const getNewRewardSeedController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getPastWeeklyChallengesController.ts b/src/controllers/api/getPastWeeklyChallengesController.ts index 3f4b551a..806198c8 100644 --- a/src/controllers/api/getPastWeeklyChallengesController.ts +++ b/src/controllers/api/getPastWeeklyChallengesController.ts @@ -1,9 +1,9 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; -import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "@/src/services/worldStateService"; -import { unixTimesInMs } from "@/src/constants/timeConstants"; -import type { ISeasonChallenge } from "@/src/types/worldStateTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { EPOCH, getSeasonChallengePools, getWorldState, pushWeeklyActs } from "../../services/worldStateService.ts"; +import { unixTimesInMs } from "../../constants/timeConstants.ts"; +import type { ISeasonChallenge } from "../../types/worldStateTypes.ts"; import { ExportChallenges } from "warframe-public-export-plus"; export const getPastWeeklyChallengesController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/getShipController.ts b/src/controllers/api/getShipController.ts index 5f976ef5..b411db68 100644 --- a/src/controllers/api/getShipController.ts +++ b/src/controllers/api/getShipController.ts @@ -1,11 +1,11 @@ import type { RequestHandler } from "express"; -import { config } from "@/src/services/configService"; -import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { createGarden, getPersonalRooms } from "@/src/services/personalRoomsService"; -import type { IGetShipResponse, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; -import { getLoadout } from "@/src/services/loadoutService"; -import { toOid } from "@/src/helpers/inventoryHelpers"; +import { config } from "../../services/configService.ts"; +import allShipFeatures from "../../../static/fixed_responses/allShipFeatures.json"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { createGarden, getPersonalRooms } from "../../services/personalRoomsService.ts"; +import type { IGetShipResponse, IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts"; +import { getLoadout } from "../../services/loadoutService.ts"; +import { toOid } from "../../helpers/inventoryHelpers.ts"; export const getShipController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/getVendorInfoController.ts b/src/controllers/api/getVendorInfoController.ts index a0ffd654..52a3f5cb 100644 --- a/src/controllers/api/getVendorInfoController.ts +++ b/src/controllers/api/getVendorInfoController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; -import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "@/src/services/serversideVendorsService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { config } from "@/src/services/configService"; +import { applyStandingToVendorManifest, getVendorManifestByTypeName } from "../../services/serversideVendorsService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { config } from "../../services/configService.ts"; export const getVendorInfoController: RequestHandler = async (req, res) => { let manifest = getVendorManifestByTypeName(req.query.vendor as string); diff --git a/src/controllers/api/getVoidProjectionRewardsController.ts b/src/controllers/api/getVoidProjectionRewardsController.ts index 96614431..46e960e0 100644 --- a/src/controllers/api/getVoidProjectionRewardsController.ts +++ b/src/controllers/api/getVoidProjectionRewardsController.ts @@ -1,8 +1,8 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { crackRelic } from "@/src/helpers/relicHelper"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IVoidTearParticipantInfo } from "@/src/types/requestTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { crackRelic } from "../../helpers/relicHelper.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IVoidTearParticipantInfo } from "../../types/requestTypes.ts"; import type { RequestHandler } from "express"; export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/giftingController.ts b/src/controllers/api/giftingController.ts index a54cdcab..9de09482 100644 --- a/src/controllers/api/giftingController.ts +++ b/src/controllers/api/giftingController.ts @@ -1,18 +1,18 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Account } from "@/src/models/loginModel"; -import { areFriends } from "@/src/services/friendService"; -import { createMessage } from "@/src/services/inboxService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Account } from "../../models/loginModel.ts"; +import { areFriends } from "../../services/friendService.ts"; +import { createMessage } from "../../services/inboxService.ts"; import { combineInventoryChanges, getEffectiveAvatarImageType, getInventory, updateCurrency -} from "@/src/services/inventoryService"; -import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; -import { handleDailyDealPurchase, handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import type { IOid } from "@/src/types/commonTypes"; -import type { IPurchaseParams, IPurchaseResponse } from "@/src/types/purchaseTypes"; -import { PurchaseSource } from "@/src/types/purchaseTypes"; +} from "../../services/inventoryService.ts"; +import { getAccountForRequest, getSuffixedName } from "../../services/loginService.ts"; +import { handleDailyDealPurchase, handleStoreItemAcquisition } from "../../services/purchaseService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; +import type { IPurchaseParams, IPurchaseResponse } from "../../types/purchaseTypes.ts"; +import { PurchaseSource } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; import { ExportBundles, ExportFlavour } from "warframe-public-export-plus"; diff --git a/src/controllers/api/gildWeaponController.ts b/src/controllers/api/gildWeaponController.ts index a5b18af4..0bd921b3 100644 --- a/src/controllers/api/gildWeaponController.ts +++ b/src/controllers/api/gildWeaponController.ts @@ -1,14 +1,14 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addMiscItems, getInventory } from "../../services/inventoryService.ts"; +import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts"; import { ExportRecipes } from "warframe-public-export-plus"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { EquipmentFeatures } from "@/src/types/equipmentTypes"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; +import { EquipmentFeatures } from "../../types/equipmentTypes.ts"; interface IGildWeaponRequest { ItemName: string; diff --git a/src/controllers/api/giveKeyChainTriggeredItemsController.ts b/src/controllers/api/giveKeyChainTriggeredItemsController.ts index 4cbd602b..22d2fccc 100644 --- a/src/controllers/api/giveKeyChainTriggeredItemsController.ts +++ b/src/controllers/api/giveKeyChainTriggeredItemsController.ts @@ -1,9 +1,9 @@ import type { RequestHandler } from "express"; -import { parseString } from "@/src/helpers/general"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { giveKeyChainItem } from "@/src/services/questService"; -import type { IKeyChainRequest } from "@/src/types/requestTypes"; +import { parseString } from "../../helpers/general.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { giveKeyChainItem } from "../../services/questService.ts"; +import type { IKeyChainRequest } from "../../types/requestTypes.ts"; export const giveKeyChainTriggeredItemsController: RequestHandler = async (req, res) => { const accountId = parseString(req.query.accountId); diff --git a/src/controllers/api/giveKeyChainTriggeredMessageController.ts b/src/controllers/api/giveKeyChainTriggeredMessageController.ts index 2afc5ec6..e4d243be 100644 --- a/src/controllers/api/giveKeyChainTriggeredMessageController.ts +++ b/src/controllers/api/giveKeyChainTriggeredMessageController.ts @@ -1,7 +1,7 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { giveKeyChainMessage } from "@/src/services/questService"; -import type { IKeyChainRequest } from "@/src/types/requestTypes"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { giveKeyChainMessage } from "../../services/questService.ts"; +import type { IKeyChainRequest } from "../../types/requestTypes.ts"; import type { RequestHandler } from "express"; export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/giveQuestKeyRewardController.ts b/src/controllers/api/giveQuestKeyRewardController.ts index bf64693f..9cbdfd40 100644 --- a/src/controllers/api/giveQuestKeyRewardController.ts +++ b/src/controllers/api/giveQuestKeyRewardController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addItem, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IOid } from "@/src/types/commonTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addItem, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; import type { RequestHandler } from "express"; export const giveQuestKeyRewardController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/giveShipDecoAndLoreFragmentController.ts b/src/controllers/api/giveShipDecoAndLoreFragmentController.ts index 0b8b5c30..a61d27cf 100644 --- a/src/controllers/api/giveShipDecoAndLoreFragmentController.ts +++ b/src/controllers/api/giveShipDecoAndLoreFragmentController.ts @@ -1,8 +1,8 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addLoreFragmentScans, addShipDecorations, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { ITypeCount } from "@/src/types/commonTypes"; -import type { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addLoreFragmentScans, addShipDecorations, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { ITypeCount } from "../../types/commonTypes.ts"; +import type { ILoreFragmentScan } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/giveStartingGearController.ts b/src/controllers/api/giveStartingGearController.ts index 1ac5afc1..cd964ef1 100644 --- a/src/controllers/api/giveStartingGearController.ts +++ b/src/controllers/api/giveStartingGearController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addStartingGear, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addStartingGear, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { TPartialStartingGear } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const giveStartingGearController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/guildTechController.ts b/src/controllers/api/guildTechController.ts index 177a9b4b..84bce3b2 100644 --- a/src/controllers/api/guildTechController.ts +++ b/src/controllers/api/guildTechController.ts @@ -11,9 +11,9 @@ import { removePigmentsFromGuildMembers, scaleRequiredCount, setGuildTechLogState -} from "@/src/services/guildService"; +} from "../../services/guildService.ts"; import { ExportDojoRecipes, ExportRailjackWeapons } from "warframe-public-export-plus"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import { addCrewShipWeaponSkin, addEquipment, @@ -24,17 +24,17 @@ import { getInventory, occupySlot, updateCurrency -} from "@/src/services/inventoryService"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { config } from "@/src/services/configService"; -import type { ITechProjectClient } from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; -import { GuildMember } from "@/src/models/guildModel"; -import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { logger } from "@/src/utils/logger"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +} from "../../services/inventoryService.ts"; +import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { config } from "../../services/configService.ts"; +import type { ITechProjectClient } from "../../types/guildTypes.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import { GuildMember } from "../../models/guildModel.ts"; +import { toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts"; +import { logger } from "../../utils/logger.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; export const guildTechController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/hostSessionController.ts b/src/controllers/api/hostSessionController.ts index 3ab49740..c31fa447 100644 --- a/src/controllers/api/hostSessionController.ts +++ b/src/controllers/api/hostSessionController.ts @@ -1,10 +1,10 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { createNewSession } from "@/src/managers/sessionManager"; -import { logger } from "@/src/utils/logger"; -import type { ISession } from "@/src/types/session"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { createNewSession } from "../../managers/sessionManager.ts"; +import { logger } from "../../utils/logger.ts"; +import type { ISession } from "../../types/session.ts"; import { JSONParse } from "json-with-bigint"; -import { toOid2, version_compare } from "@/src/helpers/inventoryHelpers"; +import { toOid2, version_compare } from "../../helpers/inventoryHelpers.ts"; const hostSessionController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/hubBlessingController.ts b/src/controllers/api/hubBlessingController.ts index 410d6680..467186b5 100644 --- a/src/controllers/api/hubBlessingController.ts +++ b/src/controllers/api/hubBlessingController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addBooster, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getRandomInt } from "@/src/services/rngService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addBooster, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getRandomInt } from "../../services/rngService.ts"; import type { RequestHandler } from "express"; import { ExportBoosters } from "warframe-public-export-plus"; diff --git a/src/controllers/api/inboxController.ts b/src/controllers/api/inboxController.ts index a62c79ed..61911684 100644 --- a/src/controllers/api/inboxController.ts +++ b/src/controllers/api/inboxController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import { Inbox } from "@/src/models/inboxModel"; +import { Inbox } from "../../models/inboxModel.ts"; import { createMessage, createNewEventMessages, @@ -7,20 +7,20 @@ import { deleteMessageRead, getAllMessagesSorted, getMessage -} from "@/src/services/inboxService"; -import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "@/src/services/loginService"; +} from "../../services/inboxService.ts"; +import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "../../services/loginService.ts"; import { addItems, combineInventoryChanges, getEffectiveAvatarImageType, getInventory, updateCurrency -} from "@/src/services/inventoryService"; -import { logger } from "@/src/utils/logger"; +} from "../../services/inventoryService.ts"; +import { logger } from "../../utils/logger.ts"; import { ExportFlavour } from "warframe-public-export-plus"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService"; -import type { IOid } from "@/src/types/commonTypes"; +import { handleStoreItemAcquisition } from "../../services/purchaseService.ts"; +import { fromStoreItem, isStoreItem } from "../../services/itemDataService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; export const inboxController: RequestHandler = async (req, res) => { const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query; diff --git a/src/controllers/api/infestedFoundryController.ts b/src/controllers/api/infestedFoundryController.ts index ddc94b75..de0b714e 100644 --- a/src/controllers/api/infestedFoundryController.ts +++ b/src/controllers/api/infestedFoundryController.ts @@ -1,25 +1,25 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "@/src/services/inventoryService"; -import type { IOid } from "@/src/types/commonTypes"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory, addMiscItems, updateCurrency, addRecipes, freeUpSlot } from "../../services/inventoryService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; import type { IConsumedSuit, IHelminthFoodRecord, IInventoryClient, IMiscItem -} from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; +} from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; import { ExportMisc } from "warframe-public-export-plus"; -import { getRecipe } from "@/src/services/itemDataService"; -import { toMongoDate, version_compare } from "@/src/helpers/inventoryHelpers"; -import { logger } from "@/src/utils/logger"; -import { colorToShard } from "@/src/helpers/shardHelper"; +import { getRecipe } from "../../services/itemDataService.ts"; +import { toMongoDate, version_compare } from "../../helpers/inventoryHelpers.ts"; +import { logger } from "../../utils/logger.ts"; +import { colorToShard } from "../../helpers/shardHelper.ts"; import { addInfestedFoundryXP, applyCheatsToInfestedFoundry, handleSubsumeCompletion -} from "@/src/services/infestedFoundryService"; +} from "../../services/infestedFoundryService.ts"; export const infestedFoundryController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 729df2e7..1dd64fbf 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -1,17 +1,17 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest } from "@/src/services/loginService"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { config } from "@/src/services/configService"; -import allDialogue from "@/static/fixed_responses/allDialogue.json"; -import type { ILoadoutDatabase } from "@/src/types/saveLoadoutTypes"; -import type { IInventoryClient, IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes"; -import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; +import { config } from "../../services/configService.ts"; +import allDialogue from "../../../static/fixed_responses/allDialogue.json"; +import type { ILoadoutDatabase } from "../../types/saveLoadoutTypes.ts"; +import type { IInventoryClient, IShipInventory } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { equipmentKeys } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts"; +import { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts"; import type { ICountedItem } from "warframe-public-export-plus"; import { eFaction, ExportCustoms, ExportFlavour, ExportResources, ExportVirtuals } from "warframe-public-export-plus"; -import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService"; +import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "../../services/infestedFoundryService.ts"; import { addEmailItem, addItem, @@ -21,22 +21,22 @@ import { cleanupInventory, createLibraryDailyTask, getCalendarProgress -} from "@/src/services/inventoryService"; -import { logger } from "@/src/utils/logger"; -import { addString, catBreadHash } from "@/src/helpers/stringHelpers"; +} from "../../services/inventoryService.ts"; +import { logger } from "../../utils/logger.ts"; +import { addString, catBreadHash } from "../../helpers/stringHelpers.ts"; import { Types } from "mongoose"; -import { getNemesisManifest } from "@/src/helpers/nemesisHelpers"; -import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import type { IPersonalRoomsClient } from "@/src/types/personalRoomsTypes"; -import { Ship } from "@/src/models/shipModel"; -import { toLegacyOid, toOid, version_compare } from "@/src/helpers/inventoryHelpers"; -import { Inbox } from "@/src/models/inboxModel"; -import { unixTimesInMs } from "@/src/constants/timeConstants"; -import { DailyDeal } from "@/src/models/worldStateModel"; -import { EquipmentFeatures } from "@/src/types/equipmentTypes"; -import { generateRewardSeed } from "@/src/services/rngService"; -import { getInvasionByOid, getWorldState } from "@/src/services/worldStateService"; -import { createMessage } from "@/src/services/inboxService"; +import { getNemesisManifest } from "../../helpers/nemesisHelpers.ts"; +import { getPersonalRooms } from "../../services/personalRoomsService.ts"; +import type { IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts"; +import { Ship } from "../../models/shipModel.ts"; +import { toLegacyOid, toOid, version_compare } from "../../helpers/inventoryHelpers.ts"; +import { Inbox } from "../../models/inboxModel.ts"; +import { unixTimesInMs } from "../../constants/timeConstants.ts"; +import { DailyDeal } from "../../models/worldStateModel.ts"; +import { EquipmentFeatures } from "../../types/equipmentTypes.ts"; +import { generateRewardSeed } from "../../services/rngService.ts"; +import { getInvasionByOid, getWorldState } from "../../services/worldStateService.ts"; +import { createMessage } from "../../services/inboxService.ts"; export const inventoryController: RequestHandler = async (request, response) => { const account = await getAccountForRequest(request); diff --git a/src/controllers/api/inventorySlotsController.ts b/src/controllers/api/inventorySlotsController.ts index 7b937a2e..56bad04c 100644 --- a/src/controllers/api/inventorySlotsController.ts +++ b/src/controllers/api/inventorySlotsController.ts @@ -1,8 +1,8 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory, updateCurrency, updateSlots } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory, updateCurrency, updateSlots } from "../../services/inventoryService.ts"; import type { RequestHandler } from "express"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import { exhaustive } from "@/src/utils/ts-utils"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { exhaustive } from "../../utils/ts-utils.ts"; /* loadout slots are additionally purchased slots only diff --git a/src/controllers/api/joinSessionController.ts b/src/controllers/api/joinSessionController.ts index 8bb516ad..95cb874d 100644 --- a/src/controllers/api/joinSessionController.ts +++ b/src/controllers/api/joinSessionController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getSessionByID } from "@/src/managers/sessionManager"; -import { logger } from "@/src/utils/logger"; +import { getSessionByID } from "../../managers/sessionManager.ts"; +import { logger } from "../../utils/logger.ts"; export const joinSessionController: RequestHandler = (req, res) => { const reqBody = JSON.parse(String(req.body)) as IJoinSessionRequest; diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index 68fffd93..20c33d7a 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -1,14 +1,14 @@ import type { RequestHandler } from "express"; -import { config } from "@/src/services/configService"; -import { buildConfig } from "@/src/services/buildConfigService"; +import { config } from "../../services/configService.ts"; +import { buildConfig } from "../../services/buildConfigService.ts"; -import { Account } from "@/src/models/loginModel"; -import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "@/src/services/loginService"; -import type { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "@/src/types/loginTypes"; -import { logger } from "@/src/utils/logger"; -import { version_compare } from "@/src/helpers/inventoryHelpers"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; +import { Account } from "../../models/loginModel.ts"; +import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "../../services/loginService.ts"; +import type { IDatabaseAccountJson, ILoginRequest, ILoginResponse } from "../../types/loginTypes.ts"; +import { logger } from "../../utils/logger.ts"; +import { version_compare } from "../../helpers/inventoryHelpers.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; export const loginController: RequestHandler = async (request, response) => { const loginRequest = JSON.parse(String(request.body)) as ILoginRequest; // parse octet stream of json data to json object diff --git a/src/controllers/api/loginRewardsController.ts b/src/controllers/api/loginRewardsController.ts index a994b860..3145a462 100644 --- a/src/controllers/api/loginRewardsController.ts +++ b/src/controllers/api/loginRewardsController.ts @@ -1,15 +1,15 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest } from "@/src/services/loginService"; -import type { ILoginRewardsReponse } from "@/src/services/loginRewardService"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import type { ILoginRewardsReponse } from "../../services/loginRewardService.ts"; import { claimLoginReward, getRandomLoginRewards, isLoginRewardAChoice, setAccountGotLoginRewardToday -} from "@/src/services/loginRewardService"; -import { getInventory } from "@/src/services/inventoryService"; -import { config } from "@/src/services/configService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; +} from "../../services/loginRewardService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { config } from "../../services/configService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; export const loginRewardsController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/api/loginRewardsSelectionController.ts b/src/controllers/api/loginRewardsSelectionController.ts index d0f10f73..13e7ec4d 100644 --- a/src/controllers/api/loginRewardsSelectionController.ts +++ b/src/controllers/api/loginRewardsSelectionController.ts @@ -1,14 +1,14 @@ -import { getInventory } from "@/src/services/inventoryService"; +import { getInventory } from "../../services/inventoryService.ts"; import { claimLoginReward, getRandomLoginRewards, setAccountGotLoginRewardToday -} from "@/src/services/loginRewardService"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { logger } from "@/src/utils/logger"; +} from "../../services/loginRewardService.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { handleStoreItemAcquisition } from "../../services/purchaseService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; export const loginRewardsSelectionController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/logoutController.ts b/src/controllers/api/logoutController.ts index 14821921..d1c13c2d 100644 --- a/src/controllers/api/logoutController.ts +++ b/src/controllers/api/logoutController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { Account } from "@/src/models/loginModel"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; +import { Account } from "../../models/loginModel.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; export const logoutController: RequestHandler = async (req, res) => { if (!req.query.accountId) { diff --git a/src/controllers/api/maturePetController.ts b/src/controllers/api/maturePetController.ts index 5c769307..9ddc2786 100644 --- a/src/controllers/api/maturePetController.ts +++ b/src/controllers/api/maturePetController.ts @@ -1,6 +1,6 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const maturePetController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/missionInventoryUpdateController.ts b/src/controllers/api/missionInventoryUpdateController.ts index b2ca85c9..9902f021 100644 --- a/src/controllers/api/missionInventoryUpdateController.ts +++ b/src/controllers/api/missionInventoryUpdateController.ts @@ -1,18 +1,18 @@ import type { RequestHandler } from "express"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getAccountForRequest } from "@/src/services/loginService"; -import type { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes"; -import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getInventoryResponse } from "@/src/controllers/api/inventoryController"; -import { logger } from "@/src/utils/logger"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import type { IMissionInventoryUpdateRequest } from "../../types/requestTypes.ts"; +import { addMissionInventoryUpdates, addMissionRewards } from "../../services/missionInventoryUpdateService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getInventoryResponse } from "./inventoryController.ts"; +import { logger } from "../../utils/logger.ts"; import type { IMissionInventoryUpdateResponse, IMissionInventoryUpdateResponseBackToDryDock, IMissionInventoryUpdateResponseRailjackInterstitial -} from "@/src/types/missionTypes"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { generateRewardSeed } from "@/src/services/rngService"; +} from "../../types/missionTypes.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import { generateRewardSeed } from "../../services/rngService.ts"; /* **** INPUT **** diff --git a/src/controllers/api/modularWeaponCraftingController.ts b/src/controllers/api/modularWeaponCraftingController.ts index 4ba319e5..7e235241 100644 --- a/src/controllers/api/modularWeaponCraftingController.ts +++ b/src/controllers/api/modularWeaponCraftingController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; import { getInventory, updateCurrency, @@ -12,15 +12,15 @@ import { productCategoryToInventoryBin, combineInventoryChanges, addSpecialItem -} from "@/src/services/inventoryService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { getDefaultUpgrades } from "@/src/services/itemDataService"; -import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper"; -import { getRandomInt } from "@/src/services/rngService"; +} from "../../services/inventoryService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { getDefaultUpgrades } from "../../services/itemDataService.ts"; +import { modularWeaponTypes } from "../../helpers/modularWeaponHelper.ts"; +import { getRandomInt } from "../../services/rngService.ts"; import type { IDefaultUpgrade } from "warframe-public-export-plus"; import { ExportSentinels, ExportWeapons } from "warframe-public-export-plus"; -import type { IEquipmentDatabase } from "@/src/types/equipmentTypes"; -import { Status } from "@/src/types/equipmentTypes"; +import type { IEquipmentDatabase } from "../../types/equipmentTypes.ts"; +import { Status } from "../../types/equipmentTypes.ts"; interface IModularCraftRequest { WeaponType: string; diff --git a/src/controllers/api/modularWeaponSaleController.ts b/src/controllers/api/modularWeaponSaleController.ts index 4f5a1b2e..71b18f3f 100644 --- a/src/controllers/api/modularWeaponSaleController.ts +++ b/src/controllers/api/modularWeaponSaleController.ts @@ -1,10 +1,10 @@ import type { RequestHandler } from "express"; import { ExportWeapons } from "warframe-public-export-plus"; -import type { IMongoDate } from "@/src/types/commonTypes"; -import { toMongoDate } from "@/src/helpers/inventoryHelpers"; -import { SRng } from "@/src/services/rngService"; -import type { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; +import type { IMongoDate } from "../../types/commonTypes.ts"; +import { toMongoDate } from "../../helpers/inventoryHelpers.ts"; +import { SRng } from "../../services/rngService.ts"; +import type { ArtifactPolarity } from "../../types/inventoryTypes/commonInventoryTypes.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; import { addEquipment, applyDefaultUpgrades, @@ -12,13 +12,13 @@ import { occupySlot, productCategoryToInventoryBin, updateCurrency -} from "@/src/services/inventoryService"; -import { getDefaultUpgrades } from "@/src/services/itemDataService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; -import { modularWeaponTypes } from "@/src/helpers/modularWeaponHelper"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { EquipmentFeatures } from "@/src/types/equipmentTypes"; +} from "../../services/inventoryService.ts"; +import { getDefaultUpgrades } from "../../services/itemDataService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import { modularWeaponTypes } from "../../helpers/modularWeaponHelper.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { EquipmentFeatures } from "../../types/equipmentTypes.ts"; export const modularWeaponSaleController: RequestHandler = async (req, res) => { const partTypeToParts: Record = {}; diff --git a/src/controllers/api/nameWeaponController.ts b/src/controllers/api/nameWeaponController.ts index e0f45cdc..ece87fef 100644 --- a/src/controllers/api/nameWeaponController.ts +++ b/src/controllers/api/nameWeaponController.ts @@ -1,9 +1,9 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; interface INameWeaponRequest { ItemName: string; diff --git a/src/controllers/api/nemesisController.ts b/src/controllers/api/nemesisController.ts index 2352c56c..71329285 100644 --- a/src/controllers/api/nemesisController.ts +++ b/src/controllers/api/nemesisController.ts @@ -1,5 +1,5 @@ -import { fromDbOid, version_compare } from "@/src/helpers/inventoryHelpers"; -import type { IKnifeResponse } from "@/src/helpers/nemesisHelpers"; +import { fromDbOid, version_compare } from "../../helpers/inventoryHelpers.ts"; +import type { IKnifeResponse } from "../../helpers/nemesisHelpers.ts"; import { antivirusMods, decodeNemesisGuess, @@ -14,15 +14,15 @@ import { GUESS_NONE, GUESS_WILDCARD, parseUpgrade -} from "@/src/helpers/nemesisHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; -import { addMods, freeUpSlot, getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { SRng } from "@/src/services/rngService"; -import type { IMongoDate, IOid } from "@/src/types/commonTypes"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +} from "../../helpers/nemesisHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; +import { Loadout } from "../../models/inventoryModels/loadoutModel.ts"; +import { addMods, freeUpSlot, getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { SRng } from "../../services/rngService.ts"; +import type { IMongoDate, IOid } from "../../types/commonTypes.ts"; +import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; import type { IInnateDamageFingerprint, IInventoryClient, @@ -31,9 +31,9 @@ import type { IWeaponSkinClient, TEquipmentKey, TNemesisFaction -} from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot, LoadoutIndex } from "@/src/types/inventoryTypes/inventoryTypes"; -import { logger } from "@/src/utils/logger"; +} from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot, LoadoutIndex } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; import { Types } from "mongoose"; diff --git a/src/controllers/api/placeDecoInComponentController.ts b/src/controllers/api/placeDecoInComponentController.ts index 5c26a3e4..a56aae67 100644 --- a/src/controllers/api/placeDecoInComponentController.ts +++ b/src/controllers/api/placeDecoInComponentController.ts @@ -6,14 +6,14 @@ import { hasGuildPermission, processDojoBuildMaterialsGathered, scaleRequiredCount -} from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; import { Types } from "mongoose"; import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus"; -import { config } from "@/src/services/configService"; +import { config } from "../../services/configService.ts"; export const placeDecoInComponentController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/playedParkourTutorialController.ts b/src/controllers/api/playedParkourTutorialController.ts index 242ec24c..6197c08f 100644 --- a/src/controllers/api/playedParkourTutorialController.ts +++ b/src/controllers/api/playedParkourTutorialController.ts @@ -1,5 +1,5 @@ -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const playedParkourTutorialController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/playerSkillsController.ts b/src/controllers/api/playerSkillsController.ts index 02d123e7..0a75ff1b 100644 --- a/src/controllers/api/playerSkillsController.ts +++ b/src/controllers/api/playerSkillsController.ts @@ -1,8 +1,8 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addConsumables, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IPlayerSkills } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addConsumables, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IPlayerSkills } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; export const playerSkillsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/postGuildAdvertisementController.ts b/src/controllers/api/postGuildAdvertisementController.ts index 5135c19d..308b1f96 100644 --- a/src/controllers/api/postGuildAdvertisementController.ts +++ b/src/controllers/api/postGuildAdvertisementController.ts @@ -1,17 +1,17 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { GuildAd, GuildMember } from "@/src/models/guildModel"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { GuildAd, GuildMember } from "../../models/guildModel.ts"; import { addGuildMemberMiscItemContribution, addVaultMiscItems, getGuildForRequestEx, getVaultMiscItemCount, hasGuildPermissionEx -} from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getVendorManifestByTypeName } from "@/src/services/serversideVendorsService"; -import { GuildPermission } from "@/src/types/guildTypes"; -import type { IPurchaseParams } from "@/src/types/purchaseTypes"; +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getVendorManifestByTypeName } from "../../services/serversideVendorsService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; +import type { IPurchaseParams } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; export const postGuildAdvertisementController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/projectionManagerController.ts b/src/controllers/api/projectionManagerController.ts index c2c2cf76..366f07ef 100644 --- a/src/controllers/api/projectionManagerController.ts +++ b/src/controllers/api/projectionManagerController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addMiscItems, getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addMiscItems, getInventory } from "../../services/inventoryService.ts"; import type { IRelic } from "warframe-public-export-plus"; import { ExportRelics } from "warframe-public-export-plus"; diff --git a/src/controllers/api/purchaseController.ts b/src/controllers/api/purchaseController.ts index b021366d..cd3e4443 100644 --- a/src/controllers/api/purchaseController.ts +++ b/src/controllers/api/purchaseController.ts @@ -1,9 +1,9 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IPurchaseRequest } from "@/src/types/purchaseTypes"; -import { handlePurchase } from "@/src/services/purchaseService"; -import { getInventory } from "@/src/services/inventoryService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IPurchaseRequest } from "../../types/purchaseTypes.ts"; +import { handlePurchase } from "../../services/purchaseService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; export const purchaseController: RequestHandler = async (req, res) => { const purchaseRequest = JSON.parse(String(req.body)) as IPurchaseRequest; diff --git a/src/controllers/api/questControlController.ts b/src/controllers/api/questControlController.ts index e9e346ea..6750fdf6 100644 --- a/src/controllers/api/questControlController.ts +++ b/src/controllers/api/questControlController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; // Basic shim handling action=sync to login on U21 diff --git a/src/controllers/api/queueDojoComponentDestructionController.ts b/src/controllers/api/queueDojoComponentDestructionController.ts index 15248f17..98cddd70 100644 --- a/src/controllers/api/queueDojoComponentDestructionController.ts +++ b/src/controllers/api/queueDojoComponentDestructionController.ts @@ -1,8 +1,13 @@ -import { config } from "@/src/services/configService"; -import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { config } from "../../services/configService.ts"; +import { + getDojoClient, + getGuildForRequestEx, + hasAccessToDojo, + hasGuildPermission +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const queueDojoComponentDestructionController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/redeemPromoCodeController.ts b/src/controllers/api/redeemPromoCodeController.ts index edce905a..733ded0b 100644 --- a/src/controllers/api/redeemPromoCodeController.ts +++ b/src/controllers/api/redeemPromoCodeController.ts @@ -1,8 +1,8 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; import type { RequestHandler } from "express"; -import glyphCodes from "@/static/fixed_responses/glyphsCodes.json"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addItem, getInventory } from "@/src/services/inventoryService"; +import glyphCodes from "../../../static/fixed_responses/glyphsCodes.json"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addItem, getInventory } from "../../services/inventoryService.ts"; export const redeemPromoCodeController: RequestHandler = async (req, res) => { const body = getJSONfromString(String(req.body)); diff --git a/src/controllers/api/releasePetController.ts b/src/controllers/api/releasePetController.ts index 3faa1ed6..fb707b7a 100644 --- a/src/controllers/api/releasePetController.ts +++ b/src/controllers/api/releasePetController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; import type { RequestHandler } from "express"; export const releasePetController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/removeFriendController.ts b/src/controllers/api/removeFriendController.ts index ccf94f0a..0631921a 100644 --- a/src/controllers/api/removeFriendController.ts +++ b/src/controllers/api/removeFriendController.ts @@ -1,11 +1,11 @@ -import { toOid } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Friendship } from "@/src/models/friendModel"; -import { Account } from "@/src/models/loginModel"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IOid } from "@/src/types/commonTypes"; -import { parallelForeach } from "@/src/utils/async-utils"; +import { toOid } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Friendship } from "../../models/friendModel.ts"; +import { Account } from "../../models/loginModel.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; +import { parallelForeach } from "../../utils/async-utils.ts"; import type { RequestHandler } from "express"; import type { Types } from "mongoose"; diff --git a/src/controllers/api/removeFromAllianceController.ts b/src/controllers/api/removeFromAllianceController.ts index 3390c736..c425a24d 100644 --- a/src/controllers/api/removeFromAllianceController.ts +++ b/src/controllers/api/removeFromAllianceController.ts @@ -1,7 +1,7 @@ -import { AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; -import { deleteAlliance } from "@/src/services/guildService"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts"; +import { deleteAlliance } from "../../services/guildService.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const removeFromAllianceController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/removeFromGuildController.ts b/src/controllers/api/removeFromGuildController.ts index bad9cca3..9535d4d7 100644 --- a/src/controllers/api/removeFromGuildController.ts +++ b/src/controllers/api/removeFromGuildController.ts @@ -1,11 +1,16 @@ -import { GuildMember } from "@/src/models/guildModel"; -import { Inbox } from "@/src/models/inboxModel"; -import { Account } from "@/src/models/loginModel"; -import { deleteGuild, getGuildForRequest, hasGuildPermission, removeDojoKeyItems } from "@/src/services/guildService"; -import { createMessage } from "@/src/services/inboxService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { GuildMember } from "../../models/guildModel.ts"; +import { Inbox } from "../../models/inboxModel.ts"; +import { Account } from "../../models/loginModel.ts"; +import { + deleteGuild, + getGuildForRequest, + hasGuildPermission, + removeDojoKeyItems +} from "../../services/guildService.ts"; +import { createMessage } from "../../services/inboxService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest, getSuffixedName } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const removeFromGuildController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/removeIgnoredUserController.ts b/src/controllers/api/removeIgnoredUserController.ts index 20fad8cb..21e0722b 100644 --- a/src/controllers/api/removeIgnoredUserController.ts +++ b/src/controllers/api/removeIgnoredUserController.ts @@ -1,6 +1,6 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Account, Ignore } from "@/src/models/loginModel"; -import { getAccountForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Account, Ignore } from "../../models/loginModel.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const removeIgnoredUserController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/renamePetController.ts b/src/controllers/api/renamePetController.ts index 6e7155f3..d1f0cc3b 100644 --- a/src/controllers/api/renamePetController.ts +++ b/src/controllers/api/renamePetController.ts @@ -1,8 +1,8 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; export const renamePetController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/rerollRandomModController.ts b/src/controllers/api/rerollRandomModController.ts index 7c3bea48..cbed0276 100644 --- a/src/controllers/api/rerollRandomModController.ts +++ b/src/controllers/api/rerollRandomModController.ts @@ -1,11 +1,11 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addMiscItems, getInventory } from "@/src/services/inventoryService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { RivenFingerprint } from "@/src/helpers/rivenHelper"; -import { createUnveiledRivenFingerprint, randomiseRivenStats } from "@/src/helpers/rivenHelper"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addMiscItems, getInventory } from "../../services/inventoryService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { RivenFingerprint } from "../../helpers/rivenHelper.ts"; +import { createUnveiledRivenFingerprint, randomiseRivenStats } from "../../helpers/rivenHelper.ts"; import { ExportUpgrades } from "warframe-public-export-plus"; -import type { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "../../types/commonTypes.ts"; export const rerollRandomModController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/retrievePetFromStasisController.ts b/src/controllers/api/retrievePetFromStasisController.ts index d02cb2cd..be4194fc 100644 --- a/src/controllers/api/retrievePetFromStasisController.ts +++ b/src/controllers/api/retrievePetFromStasisController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { Status } from "@/src/types/equipmentTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { Status } from "../../types/equipmentTypes.ts"; import type { RequestHandler } from "express"; export const retrievePetFromStasisController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/saveDialogueController.ts b/src/controllers/api/saveDialogueController.ts index 48eee78e..0df66a65 100644 --- a/src/controllers/api/saveDialogueController.ts +++ b/src/controllers/api/saveDialogueController.ts @@ -1,7 +1,7 @@ -import { addEmailItem, getDialogue, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { ICompletedDialogue } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { addEmailItem, getDialogue, getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { ICompletedDialogue } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; export const saveDialogueController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/saveLoadoutController.ts b/src/controllers/api/saveLoadoutController.ts index b8573521..60431610 100644 --- a/src/controllers/api/saveLoadoutController.ts +++ b/src/controllers/api/saveLoadoutController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; -import type { ISaveLoadoutRequest } from "@/src/types/saveLoadoutTypes"; -import { handleInventoryItemConfigChange } from "@/src/services/saveLoadoutService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; +import type { ISaveLoadoutRequest } from "../../types/saveLoadoutTypes.ts"; +import { handleInventoryItemConfigChange } from "../../services/saveLoadoutService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; export const saveLoadoutController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/saveSettingsController.ts b/src/controllers/api/saveSettingsController.ts index 42e98dee..cc99c743 100644 --- a/src/controllers/api/saveSettingsController.ts +++ b/src/controllers/api/saveSettingsController.ts @@ -1,8 +1,8 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; import type { RequestHandler } from "express"; -import type { ISettings } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { ISettings } from "../../types/inventoryTypes/inventoryTypes.ts"; interface ISaveSettingsRequest { Settings: ISettings; diff --git a/src/controllers/api/saveVaultAutoContributeController.ts b/src/controllers/api/saveVaultAutoContributeController.ts index 9133404e..7e91f5e1 100644 --- a/src/controllers/api/saveVaultAutoContributeController.ts +++ b/src/controllers/api/saveVaultAutoContributeController.ts @@ -1,9 +1,9 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Guild } from "@/src/models/guildModel"; -import { hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Guild } from "../../models/guildModel.ts"; +import { hasGuildPermission } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const saveVaultAutoContributeController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/sellController.ts b/src/controllers/api/sellController.ts index 698cb2d8..dd160c5a 100644 --- a/src/controllers/api/sellController.ts +++ b/src/controllers/api/sellController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import { getInventory, addMods, @@ -12,13 +12,13 @@ import { addFusionPoints, addCrewShipFusionPoints, addFusionTreasures -} from "@/src/services/inventoryService"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; +} from "../../services/inventoryService.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; import { ExportDojoRecipes } from "warframe-public-export-plus"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { sendWsBroadcastEx } from "@/src/services/wsService"; -import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; +import { sendWsBroadcastEx } from "../../services/wsService.ts"; +import { parseFusionTreasure } from "../../helpers/inventoryHelpers.ts"; export const sellController: RequestHandler = async (req, res) => { const payload = JSON.parse(String(req.body)) as ISellRequest; diff --git a/src/controllers/api/sendMsgToInBoxController.ts b/src/controllers/api/sendMsgToInBoxController.ts index 5598e88a..57731d56 100644 --- a/src/controllers/api/sendMsgToInBoxController.ts +++ b/src/controllers/api/sendMsgToInBoxController.ts @@ -1,6 +1,6 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { createMessage } from "@/src/services/inboxService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { createMessage } from "../../services/inboxService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const sendMsgToInBoxController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setActiveQuestController.ts b/src/controllers/api/setActiveQuestController.ts index 374bd2d4..969398b3 100644 --- a/src/controllers/api/setActiveQuestController.ts +++ b/src/controllers/api/setActiveQuestController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const setActiveQuestController: RequestHandler< diff --git a/src/controllers/api/setActiveShipController.ts b/src/controllers/api/setActiveShipController.ts index 3ae4b7a8..b21baaba 100644 --- a/src/controllers/api/setActiveShipController.ts +++ b/src/controllers/api/setActiveShipController.ts @@ -1,6 +1,6 @@ -import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { parseString } from "@/src/helpers/general"; +import { getPersonalRooms } from "../../services/personalRoomsService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { parseString } from "../../helpers/general.ts"; import type { RequestHandler } from "express"; import { Types } from "mongoose"; diff --git a/src/controllers/api/setAllianceGuildPermissionsController.ts b/src/controllers/api/setAllianceGuildPermissionsController.ts index f4a8f365..17f1555d 100644 --- a/src/controllers/api/setAllianceGuildPermissionsController.ts +++ b/src/controllers/api/setAllianceGuildPermissionsController.ts @@ -1,6 +1,6 @@ -import { AllianceMember, GuildMember } from "@/src/models/guildModel"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { AllianceMember, GuildMember } from "../../models/guildModel.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const setAllianceGuildPermissionsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setBootLocationController.ts b/src/controllers/api/setBootLocationController.ts index 5bc20f02..ecb13729 100644 --- a/src/controllers/api/setBootLocationController.ts +++ b/src/controllers/api/setBootLocationController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import type { TBootLocation } from "@/src/types/personalRoomsTypes"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getPersonalRooms } from "../../services/personalRoomsService.ts"; +import type { TBootLocation } from "../../types/personalRoomsTypes.ts"; +import { getInventory } from "../../services/inventoryService.ts"; export const setBootLocationController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setDojoComponentColorsController.ts b/src/controllers/api/setDojoComponentColorsController.ts index a68a43de..96203a9b 100644 --- a/src/controllers/api/setDojoComponentColorsController.ts +++ b/src/controllers/api/setDojoComponentColorsController.ts @@ -1,8 +1,13 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { + getDojoClient, + getGuildForRequestEx, + hasAccessToDojo, + hasGuildPermission +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const setDojoComponentColorsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setDojoComponentMessageController.ts b/src/controllers/api/setDojoComponentMessageController.ts index 2cb08ad3..04788616 100644 --- a/src/controllers/api/setDojoComponentMessageController.ts +++ b/src/controllers/api/setDojoComponentMessageController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import { getDojoClient, getGuildForRequest } from "@/src/services/guildService"; +import { getDojoClient, getGuildForRequest } from "../../services/guildService.ts"; export const setDojoComponentMessageController: RequestHandler = async (req, res) => { const guild = await getGuildForRequest(req); diff --git a/src/controllers/api/setDojoComponentSettingsController.ts b/src/controllers/api/setDojoComponentSettingsController.ts index f9d8c88e..5c8d4fa3 100644 --- a/src/controllers/api/setDojoComponentSettingsController.ts +++ b/src/controllers/api/setDojoComponentSettingsController.ts @@ -1,8 +1,13 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { + getDojoClient, + getGuildForRequestEx, + hasAccessToDojo, + hasGuildPermission +} from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const setDojoComponentSettingsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setEquippedInstrumentController.ts b/src/controllers/api/setEquippedInstrumentController.ts index f99cbe7c..3d4876e1 100644 --- a/src/controllers/api/setEquippedInstrumentController.ts +++ b/src/controllers/api/setEquippedInstrumentController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; export const setEquippedInstrumentController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setFriendNoteController.ts b/src/controllers/api/setFriendNoteController.ts index c13103ef..835963c3 100644 --- a/src/controllers/api/setFriendNoteController.ts +++ b/src/controllers/api/setFriendNoteController.ts @@ -1,6 +1,6 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Friendship } from "@/src/models/friendModel"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Friendship } from "../../models/friendModel.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const setFriendNoteController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setGuildMotdController.ts b/src/controllers/api/setGuildMotdController.ts index a0096440..8007bab0 100644 --- a/src/controllers/api/setGuildMotdController.ts +++ b/src/controllers/api/setGuildMotdController.ts @@ -1,10 +1,10 @@ -import { version_compare } from "@/src/helpers/inventoryHelpers"; -import { Alliance, Guild, GuildMember } from "@/src/models/guildModel"; -import { hasGuildPermissionEx } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService"; -import type { ILongMOTD } from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { version_compare } from "../../helpers/inventoryHelpers.ts"; +import { Alliance, Guild, GuildMember } from "../../models/guildModel.ts"; +import { hasGuildPermissionEx } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest, getSuffixedName } from "../../services/loginService.ts"; +import type { ILongMOTD } from "../../types/guildTypes.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const setGuildMotdController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setHubNpcCustomizationsController.ts b/src/controllers/api/setHubNpcCustomizationsController.ts index a84efe12..1f0326a4 100644 --- a/src/controllers/api/setHubNpcCustomizationsController.ts +++ b/src/controllers/api/setHubNpcCustomizationsController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IHubNpcCustomization } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IHubNpcCustomization } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const setHubNpcCustomizationsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setPlacedDecoInfoController.ts b/src/controllers/api/setPlacedDecoInfoController.ts index a842cb43..0281a0c2 100644 --- a/src/controllers/api/setPlacedDecoInfoController.ts +++ b/src/controllers/api/setPlacedDecoInfoController.ts @@ -1,7 +1,7 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { ISetPlacedDecoInfoRequest } from "@/src/types/personalRoomsTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { ISetPlacedDecoInfoRequest } from "../../types/personalRoomsTypes.ts"; import type { RequestHandler } from "express"; -import { handleSetPlacedDecoInfo } from "@/src/services/shipCustomizationsService"; +import { handleSetPlacedDecoInfo } from "../../services/shipCustomizationsService.ts"; export const setPlacedDecoInfoController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setShipCustomizationsController.ts b/src/controllers/api/setShipCustomizationsController.ts index a0d1d63c..de8cc40b 100644 --- a/src/controllers/api/setShipCustomizationsController.ts +++ b/src/controllers/api/setShipCustomizationsController.ts @@ -1,7 +1,7 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { setShipCustomizations } from "@/src/services/shipCustomizationsService"; -import type { ISetShipCustomizationsRequest } from "@/src/types/personalRoomsTypes"; -import { logger } from "@/src/utils/logger"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { setShipCustomizations } from "../../services/shipCustomizationsService.ts"; +import type { ISetShipCustomizationsRequest } from "../../types/personalRoomsTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; export const setShipCustomizationsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setShipFavouriteLoadoutController.ts b/src/controllers/api/setShipFavouriteLoadoutController.ts index 02d49608..1fe696bc 100644 --- a/src/controllers/api/setShipFavouriteLoadoutController.ts +++ b/src/controllers/api/setShipFavouriteLoadoutController.ts @@ -1,9 +1,9 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; -import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import type { IOid } from "@/src/types/commonTypes"; +import { getPersonalRooms } from "../../services/personalRoomsService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; import { Types } from "mongoose"; -import type { IFavouriteLoadoutDatabase, TBootLocation } from "@/src/types/personalRoomsTypes"; +import type { IFavouriteLoadoutDatabase, TBootLocation } from "../../types/personalRoomsTypes.ts"; export const setShipFavouriteLoadoutController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setShipVignetteController.ts b/src/controllers/api/setShipVignetteController.ts index 595afc29..22e2f2b1 100644 --- a/src/controllers/api/setShipVignetteController.ts +++ b/src/controllers/api/setShipVignetteController.ts @@ -1,8 +1,8 @@ -import { addMiscItems, combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { logger } from "@/src/utils/logger"; +import { addMiscItems, combineInventoryChanges, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getPersonalRooms } from "../../services/personalRoomsService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; export const setShipVignetteController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setSuitInfectionController.ts b/src/controllers/api/setSuitInfectionController.ts index 511bd968..6b9952e1 100644 --- a/src/controllers/api/setSuitInfectionController.ts +++ b/src/controllers/api/setSuitInfectionController.ts @@ -1,8 +1,8 @@ -import { fromMongoDate, fromOid } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import { fromMongoDate, fromOid } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; import type { RequestHandler } from "express"; export const setSuitInfectionController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/setSupportedSyndicateController.ts b/src/controllers/api/setSupportedSyndicateController.ts index 4107556c..53db10b9 100644 --- a/src/controllers/api/setSupportedSyndicateController.ts +++ b/src/controllers/api/setSupportedSyndicateController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; export const setSupportedSyndicateController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/setWeaponSkillTreeController.ts b/src/controllers/api/setWeaponSkillTreeController.ts index 59c587eb..2b7ae409 100644 --- a/src/controllers/api/setWeaponSkillTreeController.ts +++ b/src/controllers/api/setWeaponSkillTreeController.ts @@ -1,9 +1,9 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; +import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { equipmentKeys } from "../../types/inventoryTypes/inventoryTypes.ts"; export const setWeaponSkillTreeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/shipDecorationsController.ts b/src/controllers/api/shipDecorationsController.ts index 1259140e..ec318f82 100644 --- a/src/controllers/api/shipDecorationsController.ts +++ b/src/controllers/api/shipDecorationsController.ts @@ -1,7 +1,7 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IShipDecorationsRequest, IResetShipDecorationsRequest } from "@/src/types/personalRoomsTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IShipDecorationsRequest, IResetShipDecorationsRequest } from "../../types/personalRoomsTypes.ts"; import type { RequestHandler } from "express"; -import { handleResetShipDecorations, handleSetShipDecorations } from "@/src/services/shipCustomizationsService"; +import { handleResetShipDecorations, handleSetShipDecorations } from "../../services/shipCustomizationsService.ts"; export const shipDecorationsController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/startCollectibleEntryController.ts b/src/controllers/api/startCollectibleEntryController.ts index 1e373fa6..639d239a 100644 --- a/src/controllers/api/startCollectibleEntryController.ts +++ b/src/controllers/api/startCollectibleEntryController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IIncentiveState } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IIncentiveState } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const startCollectibleEntryController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/startDojoRecipeController.ts b/src/controllers/api/startDojoRecipeController.ts index 42a7ad67..69b9e58e 100644 --- a/src/controllers/api/startDojoRecipeController.ts +++ b/src/controllers/api/startDojoRecipeController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import type { IDojoComponentClient } from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; +import type { IDojoComponentClient } from "../../types/guildTypes.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import { getDojoClient, getGuildForRequestEx, @@ -8,12 +8,12 @@ import { hasGuildPermission, processDojoBuildMaterialsGathered, setDojoRoomLogFunded -} from "@/src/services/guildService"; +} from "../../services/guildService.ts"; import { Types } from "mongoose"; import { ExportDojoRecipes } from "warframe-public-export-plus"; -import { config } from "@/src/services/configService"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; +import { config } from "../../services/configService.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; interface IStartDojoRecipeRequest { PlacedComponent: IDojoComponentClient; diff --git a/src/controllers/api/startLibraryDailyTaskController.ts b/src/controllers/api/startLibraryDailyTaskController.ts index 3c8bb2ce..ff8b56b8 100644 --- a/src/controllers/api/startLibraryDailyTaskController.ts +++ b/src/controllers/api/startLibraryDailyTaskController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const startLibraryDailyTaskController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/startLibraryPersonalTargetController.ts b/src/controllers/api/startLibraryPersonalTargetController.ts index ac03f9b6..5eb74d78 100644 --- a/src/controllers/api/startLibraryPersonalTargetController.ts +++ b/src/controllers/api/startLibraryPersonalTargetController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const startLibraryPersonalTargetController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/startRecipeController.ts b/src/controllers/api/startRecipeController.ts index c91c7bd6..90c0bdda 100644 --- a/src/controllers/api/startRecipeController.ts +++ b/src/controllers/api/startRecipeController.ts @@ -1,17 +1,17 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { logger } from "@/src/utils/logger"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; -import { getRecipe } from "@/src/services/itemDataService"; -import { addItem, addKubrowPet, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { unixTimesInMs } from "@/src/constants/timeConstants"; +import { getRecipe } from "../../services/itemDataService.ts"; +import { addItem, addKubrowPet, freeUpSlot, getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { unixTimesInMs } from "../../constants/timeConstants.ts"; import { Types } from "mongoose"; -import type { ISpectreLoadout } from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import { fromOid, toOid } from "@/src/helpers/inventoryHelpers"; +import type { ISpectreLoadout } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { fromOid, toOid } from "../../helpers/inventoryHelpers.ts"; import { ExportWeapons } from "warframe-public-export-plus"; -import { getRandomElement } from "@/src/services/rngService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { getRandomElement } from "../../services/rngService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; interface IStartRecipeRequest { RecipeName: string; diff --git a/src/controllers/api/stepSequencersController.ts b/src/controllers/api/stepSequencersController.ts index 361e258f..5ebc9a94 100644 --- a/src/controllers/api/stepSequencersController.ts +++ b/src/controllers/api/stepSequencersController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; -import type { IStepSequencer } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import type { IStepSequencer } from "../../types/inventoryTypes/inventoryTypes.ts"; export const stepSequencersController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/syndicateSacrificeController.ts b/src/controllers/api/syndicateSacrificeController.ts index d28719d5..5aac5a61 100644 --- a/src/controllers/api/syndicateSacrificeController.ts +++ b/src/controllers/api/syndicateSacrificeController.ts @@ -1,13 +1,13 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { ISyndicateSacrifice } from "warframe-public-export-plus"; import { ExportSyndicates } from "warframe-public-export-plus"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import { addMiscItem, combineInventoryChanges, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { toStoreItem } from "@/src/services/itemDataService"; -import { logger } from "@/src/utils/logger"; +import { handleStoreItemAcquisition } from "../../services/purchaseService.ts"; +import { addMiscItem, combineInventoryChanges, getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { toStoreItem } from "../../services/itemDataService.ts"; +import { logger } from "../../utils/logger.ts"; export const syndicateSacrificeController: RequestHandler = async (request, response) => { const accountId = await getAccountIdForRequest(request); diff --git a/src/controllers/api/syndicateStandingBonusController.ts b/src/controllers/api/syndicateStandingBonusController.ts index 1e5411c6..ea04e0bc 100644 --- a/src/controllers/api/syndicateStandingBonusController.ts +++ b/src/controllers/api/syndicateStandingBonusController.ts @@ -1,13 +1,13 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addMiscItems, addStanding, freeUpSlot, getInventory } from "@/src/services/inventoryService"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IOid } from "@/src/types/commonTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addMiscItems, addStanding, freeUpSlot, getInventory } from "../../services/inventoryService.ts"; +import type { IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IOid } from "../../types/commonTypes.ts"; import { ExportSyndicates, ExportWeapons } from "warframe-public-export-plus"; -import { logger } from "@/src/utils/logger"; -import type { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; -import { EquipmentFeatures } from "@/src/types/equipmentTypes"; +import { logger } from "../../utils/logger.ts"; +import type { IAffiliationMods, IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { EquipmentFeatures } from "../../types/equipmentTypes.ts"; export const syndicateStandingBonusController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/tauntHistoryController.ts b/src/controllers/api/tauntHistoryController.ts index 24c49402..51726bfe 100644 --- a/src/controllers/api/tauntHistoryController.ts +++ b/src/controllers/api/tauntHistoryController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; -import type { ITaunt } from "@/src/types/inventoryTypes/inventoryTypes"; -import { logger } from "@/src/utils/logger"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import type { ITaunt } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { logger } from "../../utils/logger.ts"; export const tauntHistoryController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/tradingController.ts b/src/controllers/api/tradingController.ts index 27868e2e..f159a521 100644 --- a/src/controllers/api/tradingController.ts +++ b/src/controllers/api/tradingController.ts @@ -1,7 +1,7 @@ -import { getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "../../services/guildService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { GuildPermission } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const tradingController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/trainingResultController.ts b/src/controllers/api/trainingResultController.ts index 6bf37eda..8c1d55bd 100644 --- a/src/controllers/api/trainingResultController.ts +++ b/src/controllers/api/trainingResultController.ts @@ -1,11 +1,11 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import type { IMongoDate } from "@/src/types/commonTypes"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import type { IMongoDate } from "../../types/commonTypes.ts"; import type { RequestHandler } from "express"; -import { unixTimesInMs } from "@/src/constants/timeConstants"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { createMessage } from "@/src/services/inboxService"; +import { unixTimesInMs } from "../../constants/timeConstants.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { createMessage } from "../../services/inboxService.ts"; interface ITrainingResultsRequest { numLevelsGained: number; diff --git a/src/controllers/api/umbraController.ts b/src/controllers/api/umbraController.ts index 89c8e9fa..fc7a3ada 100644 --- a/src/controllers/api/umbraController.ts +++ b/src/controllers/api/umbraController.ts @@ -1,8 +1,8 @@ -import { fromMongoDate, fromOid } from "@/src/helpers/inventoryHelpers"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addMiscItem, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import { fromMongoDate, fromOid } from "../../helpers/inventoryHelpers.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addMiscItem, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; import type { RequestHandler } from "express"; export const umbraController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/unlockShipFeatureController.ts b/src/controllers/api/unlockShipFeatureController.ts index 76640b60..fb047d8d 100644 --- a/src/controllers/api/unlockShipFeatureController.ts +++ b/src/controllers/api/unlockShipFeatureController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { updateShipFeature } from "@/src/services/personalRoomsService"; -import type { IUnlockShipFeatureRequest } from "@/src/types/requestTypes"; -import { parseString } from "@/src/helpers/general"; +import { updateShipFeature } from "../../services/personalRoomsService.ts"; +import type { IUnlockShipFeatureRequest } from "../../types/requestTypes.ts"; +import { parseString } from "../../helpers/general.ts"; export const unlockShipFeatureController: RequestHandler = async (req, res) => { const accountId = parseString(req.query.accountId); diff --git a/src/controllers/api/updateAlignmentController.ts b/src/controllers/api/updateAlignmentController.ts index 4ba48f3c..79cb5d65 100644 --- a/src/controllers/api/updateAlignmentController.ts +++ b/src/controllers/api/updateAlignmentController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IAlignment } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IAlignment } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const updateAlignmentController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/updateChallengeProgressController.ts b/src/controllers/api/updateChallengeProgressController.ts index 58734251..7d43e2f6 100644 --- a/src/controllers/api/updateChallengeProgressController.ts +++ b/src/controllers/api/updateChallengeProgressController.ts @@ -1,11 +1,11 @@ import type { RequestHandler } from "express"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getAccountForRequest } from "@/src/services/loginService"; -import { addCalendarProgress, addChallenges, getInventory } from "@/src/services/inventoryService"; -import type { IChallengeProgress, ISeasonChallenge } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IAffiliationMods } from "@/src/types/purchaseTypes"; -import { getEntriesUnsafe } from "@/src/utils/ts-utils"; -import { logger } from "@/src/utils/logger"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; +import { addCalendarProgress, addChallenges, getInventory } from "../../services/inventoryService.ts"; +import type { IChallengeProgress, ISeasonChallenge } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IAffiliationMods } from "../../types/purchaseTypes.ts"; +import { getEntriesUnsafe } from "../../utils/ts-utils.ts"; +import { logger } from "../../utils/logger.ts"; export const updateChallengeProgressController: RequestHandler = async (req, res) => { const challenges = getJSONfromString(String(req.body)); diff --git a/src/controllers/api/updateQuestController.ts b/src/controllers/api/updateQuestController.ts index bcf8937b..0ca4d857 100644 --- a/src/controllers/api/updateQuestController.ts +++ b/src/controllers/api/updateQuestController.ts @@ -1,10 +1,10 @@ import type { RequestHandler } from "express"; -import { parseString } from "@/src/helpers/general"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import type { IUpdateQuestRequest } from "@/src/services/questService"; -import { updateQuestKey } from "@/src/services/questService"; -import { getInventory } from "@/src/services/inventoryService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { parseString } from "../../helpers/general.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { IUpdateQuestRequest } from "../../services/questService.ts"; +import { updateQuestKey } from "../../services/questService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; export const updateQuestController: RequestHandler = async (req, res) => { const accountId = parseString(req.query.accountId); diff --git a/src/controllers/api/updateSessionController.ts b/src/controllers/api/updateSessionController.ts index 1644f815..787f2d8c 100644 --- a/src/controllers/api/updateSessionController.ts +++ b/src/controllers/api/updateSessionController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import { updateSession } from "@/src/managers/sessionManager"; +import { updateSession } from "../../managers/sessionManager.ts"; const updateSessionGetController: RequestHandler = (_req, res) => { res.json({}); diff --git a/src/controllers/api/updateSongChallengeController.ts b/src/controllers/api/updateSongChallengeController.ts index c9cb2f2b..0fc485fd 100644 --- a/src/controllers/api/updateSongChallengeController.ts +++ b/src/controllers/api/updateSongChallengeController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { addShipDecorations, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { addShipDecorations, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { RequestHandler } from "express"; export const updateSongChallengeController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/updateThemeController.ts b/src/controllers/api/updateThemeController.ts index e3716a18..0998964b 100644 --- a/src/controllers/api/updateThemeController.ts +++ b/src/controllers/api/updateThemeController.ts @@ -1,7 +1,7 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getJSONfromString } from "@/src/helpers/stringHelpers"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; import type { RequestHandler } from "express"; -import { getInventory } from "@/src/services/inventoryService"; +import { getInventory } from "../../services/inventoryService.ts"; export const updateThemeController: RequestHandler = async (request, response) => { const accountId = await getAccountIdForRequest(request); diff --git a/src/controllers/api/upgradesController.ts b/src/controllers/api/upgradesController.ts index 0104e644..dbb9f1db 100644 --- a/src/controllers/api/upgradesController.ts +++ b/src/controllers/api/upgradesController.ts @@ -1,15 +1,15 @@ import type { RequestHandler } from "express"; -import type { IUpgradesRequest } from "@/src/types/requestTypes"; -import type { ArtifactPolarity, IAbilityOverride } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import type { IInventoryClient, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addMiscItems, addRecipes, getInventory, updateCurrency } from "@/src/services/inventoryService"; -import { getRecipeByResult } from "@/src/services/itemDataService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { addInfestedFoundryXP, applyCheatsToInfestedFoundry } from "@/src/services/infestedFoundryService"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; -import type { IEquipmentDatabase } from "@/src/types/equipmentTypes"; -import { EquipmentFeatures } from "@/src/types/equipmentTypes"; +import type { IUpgradesRequest } from "../../types/requestTypes.ts"; +import type { ArtifactPolarity, IAbilityOverride } from "../../types/inventoryTypes/commonInventoryTypes.ts"; +import type { IInventoryClient, IMiscItem } from "../../types/inventoryTypes/inventoryTypes.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addMiscItems, addRecipes, getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getRecipeByResult } from "../../services/itemDataService.ts"; +import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; +import { addInfestedFoundryXP, applyCheatsToInfestedFoundry } from "../../services/infestedFoundryService.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; +import type { IEquipmentDatabase } from "../../types/equipmentTypes.ts"; +import { EquipmentFeatures } from "../../types/equipmentTypes.ts"; export const upgradesController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/api/valenceSwapController.ts b/src/controllers/api/valenceSwapController.ts index b02c9f8c..198415a0 100644 --- a/src/controllers/api/valenceSwapController.ts +++ b/src/controllers/api/valenceSwapController.ts @@ -1,7 +1,7 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IOid } from "@/src/types/commonTypes"; -import type { IInnateDamageFingerprint, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; +import type { IInnateDamageFingerprint, TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const valenceSwapController: RequestHandler = async (req, res) => { diff --git a/src/controllers/api/wishlistController.ts b/src/controllers/api/wishlistController.ts index 3be802b9..2ff6ee52 100644 --- a/src/controllers/api/wishlistController.ts +++ b/src/controllers/api/wishlistController.ts @@ -1,6 +1,6 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const wishlistController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/abilityOverrideController.ts b/src/controllers/custom/abilityOverrideController.ts index ce100fad..47b7e13a 100644 --- a/src/controllers/custom/abilityOverrideController.ts +++ b/src/controllers/custom/abilityOverrideController.ts @@ -1,6 +1,6 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const abilityOverrideController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/addCurrencyController.ts b/src/controllers/custom/addCurrencyController.ts index 347d8c4e..dd7f472b 100644 --- a/src/controllers/custom/addCurrencyController.ts +++ b/src/controllers/custom/addCurrencyController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addFusionPoints, getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addFusionPoints, getInventory } from "../../services/inventoryService.ts"; export const addCurrencyController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/addItemsController.ts b/src/controllers/custom/addItemsController.ts index 812476fb..1dc76718 100644 --- a/src/controllers/custom/addItemsController.ts +++ b/src/controllers/custom/addItemsController.ts @@ -1,5 +1,5 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory, addItem } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory, addItem } from "../../services/inventoryService.ts"; import type { RequestHandler } from "express"; export const addItemsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/addMissingHelminthBlueprintsController.ts b/src/controllers/custom/addMissingHelminthBlueprintsController.ts index c62ffdf5..27f6dec8 100644 --- a/src/controllers/custom/addMissingHelminthBlueprintsController.ts +++ b/src/controllers/custom/addMissingHelminthBlueprintsController.ts @@ -1,5 +1,5 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory, addRecipes } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory, addRecipes } from "../../services/inventoryService.ts"; import type { RequestHandler } from "express"; import { ExportRecipes } from "warframe-public-export-plus"; diff --git a/src/controllers/custom/addMissingMaxRankModsController.ts b/src/controllers/custom/addMissingMaxRankModsController.ts index c89fa34c..46a299a3 100644 --- a/src/controllers/custom/addMissingMaxRankModsController.ts +++ b/src/controllers/custom/addMissingMaxRankModsController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; import { ExportArcanes, ExportUpgrades } from "warframe-public-export-plus"; diff --git a/src/controllers/custom/addXpController.ts b/src/controllers/custom/addXpController.ts index 876b5837..0b469168 100644 --- a/src/controllers/custom/addXpController.ts +++ b/src/controllers/custom/addXpController.ts @@ -1,8 +1,8 @@ -import { applyClientEquipmentUpdates, getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IOid } from "@/src/types/commonTypes"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { applyClientEquipmentUpdates, getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IOid } from "../../types/commonTypes.ts"; +import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; +import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; import { ExportMisc } from "warframe-public-export-plus"; diff --git a/src/controllers/custom/changeModularPartsController.ts b/src/controllers/custom/changeModularPartsController.ts index c3c43eaf..df63da13 100644 --- a/src/controllers/custom/changeModularPartsController.ts +++ b/src/controllers/custom/changeModularPartsController.ts @@ -1,6 +1,6 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const changeModularPartsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/completeAllMissionsController.ts b/src/controllers/custom/completeAllMissionsController.ts index d363e81e..e56a6780 100644 --- a/src/controllers/custom/completeAllMissionsController.ts +++ b/src/controllers/custom/completeAllMissionsController.ts @@ -1,9 +1,9 @@ -import { addString } from "@/src/helpers/stringHelpers"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addFixedLevelRewards } from "@/src/services/missionInventoryUpdateService"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import type { IMissionReward } from "@/src/types/missionTypes"; +import { addString } from "../../helpers/stringHelpers.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { addFixedLevelRewards } from "../../services/missionInventoryUpdateService.ts"; +import { handleStoreItemAcquisition } from "../../services/purchaseService.ts"; +import type { IMissionReward } from "../../types/missionTypes.ts"; import type { RequestHandler } from "express"; import { ExportRegions } from "warframe-public-export-plus"; diff --git a/src/controllers/custom/configController.ts b/src/controllers/custom/configController.ts index de1adc5c..70b61174 100644 --- a/src/controllers/custom/configController.ts +++ b/src/controllers/custom/configController.ts @@ -1,8 +1,8 @@ import type { RequestHandler } from "express"; -import { config, syncConfigWithDatabase } from "@/src/services/configService"; -import { getAccountForRequest, isAdministrator } from "@/src/services/loginService"; -import { saveConfig } from "@/src/services/configWriterService"; -import { sendWsBroadcastEx } from "@/src/services/wsService"; +import { config, syncConfigWithDatabase } from "../../services/configService.ts"; +import { getAccountForRequest, isAdministrator } from "../../services/loginService.ts"; +import { saveConfig } from "../../services/configWriterService.ts"; +import { sendWsBroadcastEx } from "../../services/wsService.ts"; export const getConfigController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/custom/createAccountController.ts b/src/controllers/custom/createAccountController.ts index e74782c2..3cae26d6 100644 --- a/src/controllers/custom/createAccountController.ts +++ b/src/controllers/custom/createAccountController.ts @@ -1,5 +1,5 @@ -import { toCreateAccount, toDatabaseAccount } from "@/src/helpers/customHelpers/customHelpers"; -import { createAccount, isNameTaken } from "@/src/services/loginService"; +import { toCreateAccount, toDatabaseAccount } from "../../helpers/customHelpers/customHelpers.ts"; +import { createAccount, isNameTaken } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; const createAccountController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/createMessageController.ts b/src/controllers/custom/createMessageController.ts index 5922f7e6..b8d744a9 100644 --- a/src/controllers/custom/createMessageController.ts +++ b/src/controllers/custom/createMessageController.ts @@ -1,5 +1,5 @@ -import type { IMessageCreationTemplate } from "@/src/services/inboxService"; -import { createMessage } from "@/src/services/inboxService"; +import type { IMessageCreationTemplate } from "../../services/inboxService.ts"; +import { createMessage } from "../../services/inboxService.ts"; import type { RequestHandler } from "express"; export const createMessageController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/deleteAccountController.ts b/src/controllers/custom/deleteAccountController.ts index f3c0869f..5b52f46f 100644 --- a/src/controllers/custom/deleteAccountController.ts +++ b/src/controllers/custom/deleteAccountController.ts @@ -1,17 +1,17 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { Account, Ignore } from "@/src/models/loginModel"; -import { Inbox } from "@/src/models/inboxModel"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; -import { PersonalRooms } from "@/src/models/personalRoomsModel"; -import { Ship } from "@/src/models/shipModel"; -import { Stats } from "@/src/models/statsModel"; -import { GuildMember } from "@/src/models/guildModel"; -import { Leaderboard } from "@/src/models/leaderboardModel"; -import { deleteGuild } from "@/src/services/guildService"; -import { Friendship } from "@/src/models/friendModel"; -import { sendWsBroadcastTo } from "@/src/services/wsService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { Account, Ignore } from "../../models/loginModel.ts"; +import { Inbox } from "../../models/inboxModel.ts"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; +import { Loadout } from "../../models/inventoryModels/loadoutModel.ts"; +import { PersonalRooms } from "../../models/personalRoomsModel.ts"; +import { Ship } from "../../models/shipModel.ts"; +import { Stats } from "../../models/statsModel.ts"; +import { GuildMember } from "../../models/guildModel.ts"; +import { Leaderboard } from "../../models/leaderboardModel.ts"; +import { deleteGuild } from "../../services/guildService.ts"; +import { Friendship } from "../../models/friendModel.ts"; +import { sendWsBroadcastTo } from "../../services/wsService.ts"; export const deleteAccountController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/editSuitInvigorationUpgradeController.ts b/src/controllers/custom/editSuitInvigorationUpgradeController.ts index 0bebc979..200b403a 100644 --- a/src/controllers/custom/editSuitInvigorationUpgradeController.ts +++ b/src/controllers/custom/editSuitInvigorationUpgradeController.ts @@ -1,5 +1,5 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; import type { RequestHandler } from "express"; const DEFAULT_UPGRADE_EXPIRY_MS = 7 * 24 * 60 * 60 * 1000; // 7 days diff --git a/src/controllers/custom/getAccountInfoController.ts b/src/controllers/custom/getAccountInfoController.ts index e4038c55..12848317 100644 --- a/src/controllers/custom/getAccountInfoController.ts +++ b/src/controllers/custom/getAccountInfoController.ts @@ -1,6 +1,6 @@ -import { AllianceMember, Guild, GuildMember } from "@/src/models/guildModel"; -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountForRequest, isAdministrator } from "@/src/services/loginService"; +import { AllianceMember, Guild, GuildMember } from "../../models/guildModel.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountForRequest, isAdministrator } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const getAccountInfoController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 3d46baff..0f24ace9 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import { getDict, getItemName, getString } from "@/src/services/itemDataService"; +import { getDict, getItemName, getString } from "../../services/itemDataService.ts"; import type { TRelicQuality } from "warframe-public-export-plus"; import { ExportAbilities, @@ -21,8 +21,8 @@ import { ExportWarframes, ExportWeapons } from "warframe-public-export-plus"; -import allIncarnons from "@/static/fixed_responses/allIncarnonList.json"; -import varzia from "@/static/fixed_responses/worldState/varzia.json"; +import allIncarnons from "../../../static/fixed_responses/allIncarnonList.json"; +import varzia from "../../../static/fixed_responses/worldState/varzia.json"; interface ListedItem { uniqueName: string; diff --git a/src/controllers/custom/getNameController.ts b/src/controllers/custom/getNameController.ts index 72a83fbc..2480e637 100644 --- a/src/controllers/custom/getNameController.ts +++ b/src/controllers/custom/getNameController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest } from "@/src/services/loginService"; +import { getAccountForRequest } from "../../services/loginService.ts"; export const getNameController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/custom/importController.ts b/src/controllers/custom/importController.ts index 70b61550..02528e64 100644 --- a/src/controllers/custom/importController.ts +++ b/src/controllers/custom/importController.ts @@ -1,10 +1,10 @@ -import { importInventory, importLoadOutPresets, importPersonalRooms } from "@/src/services/importService"; -import { getInventory } from "@/src/services/inventoryService"; -import { getLoadout } from "@/src/services/loadoutService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import type { IInventoryClient } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IGetShipResponse } from "@/src/types/personalRoomsTypes"; +import { importInventory, importLoadOutPresets, importPersonalRooms } from "../../services/importService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getLoadout } from "../../services/loadoutService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getPersonalRooms } from "../../services/personalRoomsService.ts"; +import type { IInventoryClient } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IGetShipResponse } from "../../types/personalRoomsTypes.ts"; import type { RequestHandler } from "express"; export const importController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/ircDroppedController.ts b/src/controllers/custom/ircDroppedController.ts index c0af17ca..86be32d3 100644 --- a/src/controllers/custom/ircDroppedController.ts +++ b/src/controllers/custom/ircDroppedController.ts @@ -1,4 +1,4 @@ -import { Account } from "@/src/models/loginModel"; +import { Account } from "../../models/loginModel.ts"; import type { RequestHandler } from "express"; export const ircDroppedController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/manageQuestsController.ts b/src/controllers/custom/manageQuestsController.ts index 88626935..4c7d614d 100644 --- a/src/controllers/custom/manageQuestsController.ts +++ b/src/controllers/custom/manageQuestsController.ts @@ -1,12 +1,12 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import { addQuestKey, completeQuest, giveKeyChainMissionReward, giveKeyChainStageTriggered -} from "@/src/services/questService"; -import { logger } from "@/src/utils/logger"; +} from "../../services/questService.ts"; +import { logger } from "../../utils/logger.ts"; import type { RequestHandler } from "express"; import { ExportKeys } from "warframe-public-export-plus"; diff --git a/src/controllers/custom/popArchonCrystalUpgradeController.ts b/src/controllers/custom/popArchonCrystalUpgradeController.ts index b7240682..2d5e40b9 100644 --- a/src/controllers/custom/popArchonCrystalUpgradeController.ts +++ b/src/controllers/custom/popArchonCrystalUpgradeController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; export const popArchonCrystalUpgradeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/pushArchonCrystalUpgradeController.ts b/src/controllers/custom/pushArchonCrystalUpgradeController.ts index 0dbf4d60..6eb7276e 100644 --- a/src/controllers/custom/pushArchonCrystalUpgradeController.ts +++ b/src/controllers/custom/pushArchonCrystalUpgradeController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; export const pushArchonCrystalUpgradeController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/controllers/custom/renameAccountController.ts b/src/controllers/custom/renameAccountController.ts index e850b027..a0665fd1 100644 --- a/src/controllers/custom/renameAccountController.ts +++ b/src/controllers/custom/renameAccountController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; -import { getAccountForRequest, isAdministrator, isNameTaken } from "@/src/services/loginService"; -import { config } from "@/src/services/configService"; -import { saveConfig } from "@/src/services/configWriterService"; +import { getAccountForRequest, isAdministrator, isNameTaken } from "../../services/loginService.ts"; +import { config } from "../../services/configService.ts"; +import { saveConfig } from "../../services/configWriterService.ts"; export const renameAccountController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); diff --git a/src/controllers/custom/setAccountCheatController.ts b/src/controllers/custom/setAccountCheatController.ts index 75d0a71d..5a188777 100644 --- a/src/controllers/custom/setAccountCheatController.ts +++ b/src/controllers/custom/setAccountCheatController.ts @@ -1,6 +1,6 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import type { IAccountCheats } from "@/src/types/inventoryTypes/inventoryTypes"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { IAccountCheats } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; export const setAccountCheatController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/setBoosterController.ts b/src/controllers/custom/setBoosterController.ts index daa8c623..756aad98 100644 --- a/src/controllers/custom/setBoosterController.ts +++ b/src/controllers/custom/setBoosterController.ts @@ -1,5 +1,5 @@ -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { getInventory } from "@/src/services/inventoryService"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { getInventory } from "../../services/inventoryService.ts"; import type { RequestHandler } from "express"; import { ExportBoosters } from "warframe-public-export-plus"; diff --git a/src/controllers/custom/setEvolutionProgressController.ts b/src/controllers/custom/setEvolutionProgressController.ts index 80784e0b..c68ccaff 100644 --- a/src/controllers/custom/setEvolutionProgressController.ts +++ b/src/controllers/custom/setEvolutionProgressController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const setEvolutionProgressController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/unlockAllIntrinsicsController.ts b/src/controllers/custom/unlockAllIntrinsicsController.ts index 309ef40b..8dd484ce 100644 --- a/src/controllers/custom/unlockAllIntrinsicsController.ts +++ b/src/controllers/custom/unlockAllIntrinsicsController.ts @@ -1,5 +1,5 @@ -import { getInventory } from "@/src/services/inventoryService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const unlockAllIntrinsicsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/updateFingerprintController.ts b/src/controllers/custom/updateFingerprintController.ts index 0aab7e38..f600b578 100644 --- a/src/controllers/custom/updateFingerprintController.ts +++ b/src/controllers/custom/updateFingerprintController.ts @@ -1,6 +1,6 @@ -import { getInventory } from "@/src/services/inventoryService"; -import type { WeaponTypeInternal } from "@/src/services/itemDataService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; +import { getInventory } from "../../services/inventoryService.ts"; +import type { WeaponTypeInternal } from "../../services/itemDataService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; export const updateFingerprintController: RequestHandler = async (req, res) => { diff --git a/src/controllers/custom/webuiFileChangeDetectedController.ts b/src/controllers/custom/webuiFileChangeDetectedController.ts index a9144c49..d8a3e508 100644 --- a/src/controllers/custom/webuiFileChangeDetectedController.ts +++ b/src/controllers/custom/webuiFileChangeDetectedController.ts @@ -1,5 +1,5 @@ -import { args } from "@/src/helpers/commandLineArguments"; -import { sendWsBroadcast } from "@/src/services/wsService"; +import { args } from "../../helpers/commandLineArguments.ts"; +import { sendWsBroadcast } from "../../services/wsService.ts"; import type { RequestHandler } from "express"; export const webuiFileChangeDetectedController: RequestHandler = (req, res) => { diff --git a/src/controllers/dynamic/aggregateSessionsController.ts b/src/controllers/dynamic/aggregateSessionsController.ts index a205bdf3..64d3258c 100644 --- a/src/controllers/dynamic/aggregateSessionsController.ts +++ b/src/controllers/dynamic/aggregateSessionsController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import aggregateSessions from "@/static/fixed_responses/aggregateSessions.json"; +import aggregateSessions from "../../../static/fixed_responses/aggregateSessions.json"; const aggregateSessionsController: RequestHandler = (_req, res) => { res.json(aggregateSessions); diff --git a/src/controllers/dynamic/getGuildAdsController.ts b/src/controllers/dynamic/getGuildAdsController.ts index e4684fb7..1f4cf6e2 100644 --- a/src/controllers/dynamic/getGuildAdsController.ts +++ b/src/controllers/dynamic/getGuildAdsController.ts @@ -1,6 +1,6 @@ -import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { GuildAd } from "@/src/models/guildModel"; -import type { IGuildAdInfoClient } from "@/src/types/guildTypes"; +import { toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts"; +import { GuildAd } from "../../models/guildModel.ts"; +import type { IGuildAdInfoClient } from "../../types/guildTypes.ts"; import type { RequestHandler } from "express"; export const getGuildAdsController: RequestHandler = async (req, res) => { diff --git a/src/controllers/dynamic/getProfileViewingDataController.ts b/src/controllers/dynamic/getProfileViewingDataController.ts index ccf404be..808c3242 100644 --- a/src/controllers/dynamic/getProfileViewingDataController.ts +++ b/src/controllers/dynamic/getProfileViewingDataController.ts @@ -1,14 +1,14 @@ -import { fromDbOid, toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; -import { Guild, GuildMember } from "@/src/models/guildModel"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; -import { Account } from "@/src/models/loginModel"; -import type { TStatsDatabaseDocument } from "@/src/models/statsModel"; -import { Stats } from "@/src/models/statsModel"; -import { allDailyAffiliationKeys } from "@/src/services/inventoryService"; -import type { IMongoDate, IOid } from "@/src/types/commonTypes"; +import { fromDbOid, toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts"; +import type { TGuildDatabaseDocument } from "../../models/guildModel.ts"; +import { Guild, GuildMember } from "../../models/guildModel.ts"; +import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; +import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; +import { Loadout } from "../../models/inventoryModels/loadoutModel.ts"; +import { Account } from "../../models/loginModel.ts"; +import type { TStatsDatabaseDocument } from "../../models/statsModel.ts"; +import { Stats } from "../../models/statsModel.ts"; +import { allDailyAffiliationKeys } from "../../services/inventoryService.ts"; +import type { IMongoDate, IOid } from "../../types/commonTypes.ts"; import type { IAffiliation, IAlignment, @@ -17,16 +17,16 @@ import type { IMission, IPlayerSkills, ITypeXPItem -} from "@/src/types/inventoryTypes/inventoryTypes"; -import { LoadoutIndex } from "@/src/types/inventoryTypes/inventoryTypes"; +} from "../../types/inventoryTypes/inventoryTypes.ts"; +import { LoadoutIndex } from "../../types/inventoryTypes/inventoryTypes.ts"; import type { RequestHandler } from "express"; -import { catBreadHash, getJSONfromString } from "@/src/helpers/stringHelpers"; +import { catBreadHash, getJSONfromString } from "../../helpers/stringHelpers.ts"; import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus"; -import type { IStatsClient } from "@/src/types/statTypes"; -import { toStoreItem } from "@/src/services/itemDataService"; +import type { IStatsClient } from "../../types/statTypes.ts"; +import { toStoreItem } from "../../services/itemDataService.ts"; import type { FlattenMaps } from "mongoose"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; -import type { ILoadoutConfigClient } from "@/src/types/saveLoadoutTypes"; +import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; +import type { ILoadoutConfigClient } from "../../types/saveLoadoutTypes.ts"; const getProfileViewingDataByPlayerIdImpl = async (playerId: string): Promise => { const account = await Account.findById(playerId, "DisplayName"); diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index f6b538d5..c027a52a 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; -import { getWorldState, populateDailyDeal, populateFissures } from "@/src/services/worldStateService"; -import { version_compare } from "@/src/helpers/inventoryHelpers"; +import { getWorldState, populateDailyDeal, populateFissures } from "../../services/worldStateService.ts"; +import { version_compare } from "../../helpers/inventoryHelpers.ts"; export const worldStateController: RequestHandler = async (req, res) => { const buildLabel = req.query.buildLabel as string | undefined; diff --git a/src/controllers/stats/leaderboardController.ts b/src/controllers/stats/leaderboardController.ts index cf321b1f..bd269a27 100644 --- a/src/controllers/stats/leaderboardController.ts +++ b/src/controllers/stats/leaderboardController.ts @@ -1,4 +1,4 @@ -import { getLeaderboard } from "@/src/services/leaderboardService"; +import { getLeaderboard } from "../../services/leaderboardService.ts"; import type { RequestHandler } from "express"; export const leaderboardController: RequestHandler = async (req, res) => { diff --git a/src/controllers/stats/uploadController.ts b/src/controllers/stats/uploadController.ts index 8089677e..dd7e3d77 100644 --- a/src/controllers/stats/uploadController.ts +++ b/src/controllers/stats/uploadController.ts @@ -1,7 +1,7 @@ -import { getJSONfromString } from "@/src/helpers/stringHelpers"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { updateStats } from "@/src/services/statsService"; -import type { IStatsUpdate } from "@/src/types/statTypes"; +import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { updateStats } from "../../services/statsService.ts"; +import type { IStatsUpdate } from "../../types/statTypes.ts"; import type { RequestHandler } from "express"; const uploadController: RequestHandler = async (req, res) => { diff --git a/src/controllers/stats/viewController.ts b/src/controllers/stats/viewController.ts index 3835e944..9cf29134 100644 --- a/src/controllers/stats/viewController.ts +++ b/src/controllers/stats/viewController.ts @@ -1,11 +1,11 @@ import type { RequestHandler } from "express"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { config } from "@/src/services/configService"; -import allScans from "@/static/fixed_responses/allScans.json"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import { config } from "../../services/configService.ts"; +import allScans from "../../../static/fixed_responses/allScans.json"; import { ExportEnemies } from "warframe-public-export-plus"; -import { getInventory } from "@/src/services/inventoryService"; -import { getStats } from "@/src/services/statsService"; -import type { IStatsClient } from "@/src/types/statTypes"; +import { getInventory } from "../../services/inventoryService.ts"; +import { getStats } from "../../services/statsService.ts"; +import type { IStatsClient } from "../../types/statTypes.ts"; const viewController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); diff --git a/src/helpers/customHelpers/customHelpers.ts b/src/helpers/customHelpers/customHelpers.ts index 8732b681..e0d5a483 100644 --- a/src/helpers/customHelpers/customHelpers.ts +++ b/src/helpers/customHelpers/customHelpers.ts @@ -1,7 +1,7 @@ -import type { IAccountCreation } from "@/src/types/customTypes"; -import type { IDatabaseAccountRequiredFields } from "@/src/types/loginTypes"; +import type { IAccountCreation } from "../../types/customTypes.ts"; +import type { IDatabaseAccountRequiredFields } from "../../types/loginTypes.ts"; import crypto from "crypto"; -import { isString, parseEmail, parseString } from "@/src/helpers/general"; +import { isString, parseEmail, parseString } from "../general.ts"; const getWhirlpoolHash = (rawPassword: string): string => { const whirlpool = crypto.createHash("whirlpool"); diff --git a/src/helpers/inventoryHelpers.ts b/src/helpers/inventoryHelpers.ts index 74faaf15..a5edcaf8 100644 --- a/src/helpers/inventoryHelpers.ts +++ b/src/helpers/inventoryHelpers.ts @@ -1,7 +1,7 @@ -import type { IMongoDate, IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; +import type { IMongoDate, IOid, IOidWithLegacySupport } from "../types/commonTypes.ts"; import { Types } from "mongoose"; import type { TRarity } from "warframe-public-export-plus"; -import type { IFusionTreasure } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IFusionTreasure } from "../types/inventoryTypes/inventoryTypes.ts"; export const version_compare = (a: string, b: string): number => { const a_digits = a diff --git a/src/helpers/modularWeaponHelper.ts b/src/helpers/modularWeaponHelper.ts index 2849ae55..111f85c9 100644 --- a/src/helpers/modularWeaponHelper.ts +++ b/src/helpers/modularWeaponHelper.ts @@ -1,4 +1,4 @@ -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { TEquipmentKey } from "../types/inventoryTypes/inventoryTypes.ts"; export const modularWeaponTypes: Record = { "/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimary": "LongGuns", diff --git a/src/helpers/nemesisHelpers.ts b/src/helpers/nemesisHelpers.ts index 6b50e9fe..14cb6ba8 100644 --- a/src/helpers/nemesisHelpers.ts +++ b/src/helpers/nemesisHelpers.ts @@ -1,9 +1,9 @@ import { ExportRegions, ExportWarframes } from "warframe-public-export-plus"; -import type { IInfNode, TNemesisFaction } from "@/src/types/inventoryTypes/inventoryTypes"; -import { generateRewardSeed, getRewardAtPercentage, SRng } from "@/src/services/rngService"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import type { IOid } from "@/src/types/commonTypes"; -import { isArchwingMission } from "@/src/services/worldStateService"; +import type { IInfNode, TNemesisFaction } from "../types/inventoryTypes/inventoryTypes.ts"; +import { generateRewardSeed, getRewardAtPercentage, SRng } from "../services/rngService.ts"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import type { IOid } from "../types/commonTypes.ts"; +import { isArchwingMission } from "../services/worldStateService.ts"; type TInnateDamageTag = | "InnateElectricityDamage" diff --git a/src/helpers/purchaseHelpers.ts b/src/helpers/purchaseHelpers.ts index 8a460b41..3e5c0783 100644 --- a/src/helpers/purchaseHelpers.ts +++ b/src/helpers/purchaseHelpers.ts @@ -1,4 +1,4 @@ -import type { SlotPurchase, SlotPurchaseName } from "@/src/types/purchaseTypes"; +import type { SlotPurchase, SlotPurchaseName } from "../types/purchaseTypes.ts"; export const slotPurchaseNameToSlotName: SlotPurchase = { SuitSlotItem: { name: "SuitBin", purchaseQuantity: 1 }, diff --git a/src/helpers/relicHelper.ts b/src/helpers/relicHelper.ts index 8c34e683..1fae78e1 100644 --- a/src/helpers/relicHelper.ts +++ b/src/helpers/relicHelper.ts @@ -1,14 +1,14 @@ -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import type { IVoidTearParticipantInfo } from "@/src/types/requestTypes"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import type { IVoidTearParticipantInfo } from "../types/requestTypes.ts"; import type { TRarity } from "warframe-public-export-plus"; import { ExportRelics, ExportRewards } from "warframe-public-export-plus"; -import type { IRngResult } from "@/src/services/rngService"; -import { getRandomWeightedReward } from "@/src/services/rngService"; -import { logger } from "@/src/utils/logger"; -import { addMiscItems, combineInventoryChanges } from "@/src/services/inventoryService"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { config } from "@/src/services/configService"; +import type { IRngResult } from "../services/rngService.ts"; +import { getRandomWeightedReward } from "../services/rngService.ts"; +import { logger } from "../utils/logger.ts"; +import { addMiscItems, combineInventoryChanges } from "../services/inventoryService.ts"; +import { handleStoreItemAcquisition } from "../services/purchaseService.ts"; +import type { IInventoryChanges } from "../types/purchaseTypes.ts"; +import { config } from "../services/configService.ts"; export const crackRelic = async ( inventory: TInventoryDatabaseDocument, diff --git a/src/helpers/rivenHelper.ts b/src/helpers/rivenHelper.ts index f89e9c70..61f10ccd 100644 --- a/src/helpers/rivenHelper.ts +++ b/src/helpers/rivenHelper.ts @@ -1,5 +1,5 @@ import type { IUpgrade } from "warframe-public-export-plus"; -import { getRandomElement, getRandomInt, getRandomReward } from "@/src/services/rngService"; +import { getRandomElement, getRandomInt, getRandomReward } from "../services/rngService.ts"; export type RivenFingerprint = IVeiledRivenFingerprint | IUnveiledRivenFingerprint; diff --git a/src/index.ts b/src/index.ts index 175ce189..3021b14b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ // First, init config. -import { config, configPath, loadConfig, syncConfigWithDatabase } from "@/src/services/configService"; +import { config, configPath, loadConfig, syncConfigWithDatabase } from "./services/configService.ts"; import fs from "fs"; try { loadConfig(); @@ -13,17 +13,17 @@ try { } // Now we can init the logger with the settings provided in the config. -import { logger } from "@/src/utils/logger"; +import { logger } from "./utils/logger.ts"; logger.info("Starting up..."); // Proceed with normal startup: bring up config watcher service, validate config, connect to MongoDB, and finally start listening for HTTP. import mongoose from "mongoose"; import path from "path"; import { JSONStringify } from "json-with-bigint"; -import { startWebServer } from "@/src/services/webService"; -import { validateConfig } from "@/src/services/configWatcherService"; -import { updateWorldStateCollections } from "@/src/services/worldStateService"; -import { repoDir } from "@/src/helpers/pathHelper"; +import { startWebServer } from "./services/webService.ts"; +import { validateConfig } from "./services/configWatcherService.ts"; +import { updateWorldStateCollections } from "./services/worldStateService.ts"; +import { repoDir } from "./helpers/pathHelper.ts"; JSON.stringify = JSONStringify; // Patch JSON.stringify to work flawlessly with Bigints. diff --git a/src/managers/sessionManager.ts b/src/managers/sessionManager.ts index b6a11224..a6bbee08 100644 --- a/src/managers/sessionManager.ts +++ b/src/managers/sessionManager.ts @@ -1,5 +1,5 @@ -import type { ISession, IFindSessionRequest } from "@/src/types/session"; -import { logger } from "@/src/utils/logger"; +import type { ISession, IFindSessionRequest } from "../types/session.ts"; +import { logger } from "../utils/logger.ts"; import { JSONParse } from "json-with-bigint"; import { Types } from "mongoose"; diff --git a/src/middleware/errorHandler.ts b/src/middleware/errorHandler.ts index 92c72d6c..8556e903 100644 --- a/src/middleware/errorHandler.ts +++ b/src/middleware/errorHandler.ts @@ -1,5 +1,5 @@ import type { NextFunction, Request, Response } from "express"; -import { logError } from "@/src/utils/logger"; +import { logError } from "../utils/logger.ts"; export const errorHandler = (err: Error, req: Request, res: Response, _next: NextFunction): void => { if (err.message == "Invalid accountId-nonce pair") { diff --git a/src/middleware/middleware.ts b/src/middleware/middleware.ts index e611982b..2b67c3bb 100644 --- a/src/middleware/middleware.ts +++ b/src/middleware/middleware.ts @@ -1,4 +1,4 @@ -import { logger } from "@/src/utils/logger"; +import { logger } from "../utils/logger.ts"; import type { /*NextFunction,*/ Request, Response } from "express"; const unknownEndpointHandler = (request: Request, response: Response): void => { diff --git a/src/middleware/morgenMiddleware.ts b/src/middleware/morgenMiddleware.ts index dd989258..2888d77c 100644 --- a/src/middleware/morgenMiddleware.ts +++ b/src/middleware/morgenMiddleware.ts @@ -1,5 +1,5 @@ import morgan from "morgan"; -import { logger } from "@/src/utils/logger"; +import { logger } from "../utils/logger.ts"; export const requestLogger = morgan("dev", { stream: { write: message => logger.http(message.trim()) } diff --git a/src/models/commonModel.ts b/src/models/commonModel.ts index 9c570fd2..94dd8016 100644 --- a/src/models/commonModel.ts +++ b/src/models/commonModel.ts @@ -1,5 +1,5 @@ import { Schema } from "mongoose"; -import type { IColor, IShipCustomization } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IColor, IShipCustomization } from "../types/inventoryTypes/commonInventoryTypes.ts"; export const colorSchema = new Schema( { diff --git a/src/models/friendModel.ts b/src/models/friendModel.ts index 33d7721b..a40affd1 100644 --- a/src/models/friendModel.ts +++ b/src/models/friendModel.ts @@ -1,4 +1,4 @@ -import type { IFriendship } from "@/src/types/friendTypes"; +import type { IFriendship } from "../types/friendTypes.ts"; import { model, Schema } from "mongoose"; const friendshipSchema = new Schema({ diff --git a/src/models/guildModel.ts b/src/models/guildModel.ts index 17c05203..e7d53297 100644 --- a/src/models/guildModel.ts +++ b/src/models/guildModel.ts @@ -14,14 +14,14 @@ import type { IGuildAdDatabase, IAllianceDatabase, IAllianceMemberDatabase -} from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; +} from "../types/guildTypes.ts"; +import { GuildPermission } from "../types/guildTypes.ts"; import type { Document, Model } from "mongoose"; import { model, Schema, Types } from "mongoose"; -import { fusionTreasuresSchema, typeCountSchema } from "@/src/models/inventoryModels/inventoryModel"; -import { pictureFrameInfoSchema } from "@/src/models/personalRoomsModel"; -import type { IGoalProgressClient, IGoalProgressDatabase } from "@/src/types/inventoryTypes/inventoryTypes"; -import { toOid } from "@/src/helpers/inventoryHelpers"; +import { fusionTreasuresSchema, typeCountSchema } from "./inventoryModels/inventoryModel.ts"; +import { pictureFrameInfoSchema } from "./personalRoomsModel.ts"; +import type { IGoalProgressClient, IGoalProgressDatabase } from "../types/inventoryTypes/inventoryTypes.ts"; +import { toOid } from "../helpers/inventoryHelpers.ts"; const dojoDecoSchema = new Schema({ Type: String, diff --git a/src/models/inboxModel.ts b/src/models/inboxModel.ts index 47b8a709..9adfb8ef 100644 --- a/src/models/inboxModel.ts +++ b/src/models/inboxModel.ts @@ -1,8 +1,8 @@ import type { Types } from "mongoose"; import { model, Schema } from "mongoose"; -import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { typeCountSchema } from "@/src/models/inventoryModels/inventoryModel"; -import type { IMongoDate, IOid, ITypeCount } from "@/src/types/commonTypes"; +import { toMongoDate, toOid } from "../helpers/inventoryHelpers.ts"; +import { typeCountSchema } from "./inventoryModels/inventoryModel.ts"; +import type { IMongoDate, IOid, ITypeCount } from "../types/commonTypes.ts"; export interface IMessageClient extends Omit< diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index d13c2ef0..0a39b701 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -89,9 +89,9 @@ import type { IGoalProgressClient, IKubrowPetPrintClient, IKubrowPetPrintDatabase -} from "@/src/types/inventoryTypes/inventoryTypes"; -import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IOid, ITypeCount } from "@/src/types/commonTypes"; +} from "../../types/inventoryTypes/inventoryTypes.ts"; +import { equipmentKeys } from "../../types/inventoryTypes/inventoryTypes.ts"; +import type { IOid, ITypeCount } from "../../types/commonTypes.ts"; import type { IAbilityOverride, ICrewShipCustomization, @@ -100,11 +100,11 @@ import type { ILotusCustomization, IOperatorConfigDatabase, IPolarity -} from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { fromDbOid, toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; -import { EquipmentSelectionSchema } from "@/src/models/inventoryModels/loadoutModel"; +} from "../../types/inventoryTypes/commonInventoryTypes.ts"; +import { fromDbOid, toMongoDate, toOid } from "../../helpers/inventoryHelpers.ts"; +import { EquipmentSelectionSchema } from "./loadoutModel.ts"; import type { ICountedStoreItem } from "warframe-public-export-plus"; -import { colorSchema, shipCustomizationSchema } from "@/src/models/commonModel"; +import { colorSchema, shipCustomizationSchema } from "../commonModel.ts"; import type { IArchonCrystalUpgrade, ICrewShipMemberClient, @@ -117,7 +117,7 @@ import type { IKubrowPetDetailsClient, IKubrowPetDetailsDatabase, ITraits -} from "@/src/types/equipmentTypes"; +} from "../../types/equipmentTypes.ts"; export const typeCountSchema = new Schema({ ItemType: String, ItemCount: Number }, { _id: false }); diff --git a/src/models/inventoryModels/loadoutModel.ts b/src/models/inventoryModels/loadoutModel.ts index 1bb761db..676f7389 100644 --- a/src/models/inventoryModels/loadoutModel.ts +++ b/src/models/inventoryModels/loadoutModel.ts @@ -1,7 +1,7 @@ -import { fromDbOid, toOid } from "@/src/helpers/inventoryHelpers"; -import type { IOid } from "@/src/types/commonTypes"; -import type { IEquipmentSelectionClient, IEquipmentSelectionDatabase } from "@/src/types/equipmentTypes"; -import type { ILoadoutConfigDatabase, ILoadoutDatabase } from "@/src/types/saveLoadoutTypes"; +import { fromDbOid, toOid } from "../../helpers/inventoryHelpers.ts"; +import type { IOid } from "../../types/commonTypes.ts"; +import type { IEquipmentSelectionClient, IEquipmentSelectionDatabase } from "../../types/equipmentTypes.ts"; +import type { ILoadoutConfigDatabase, ILoadoutDatabase } from "../../types/saveLoadoutTypes.ts"; import type { Document, Model, Types } from "mongoose"; import { Schema, model } from "mongoose"; diff --git a/src/models/leaderboardModel.ts b/src/models/leaderboardModel.ts index ceeb20f1..35602b13 100644 --- a/src/models/leaderboardModel.ts +++ b/src/models/leaderboardModel.ts @@ -1,6 +1,6 @@ import type { Document, Types } from "mongoose"; import { model, Schema } from "mongoose"; -import type { ILeaderboardEntryDatabase } from "@/src/types/leaderboardTypes"; +import type { ILeaderboardEntryDatabase } from "../types/leaderboardTypes.ts"; const leaderboardEntrySchema = new Schema( { diff --git a/src/models/loginModel.ts b/src/models/loginModel.ts index c7331d83..4403011d 100644 --- a/src/models/loginModel.ts +++ b/src/models/loginModel.ts @@ -1,4 +1,4 @@ -import type { IDatabaseAccountJson, IIgnore } from "@/src/types/loginTypes"; +import type { IDatabaseAccountJson, IIgnore } from "../types/loginTypes.ts"; import type { SchemaOptions } from "mongoose"; import { model, Schema } from "mongoose"; diff --git a/src/models/personalRoomsModel.ts b/src/models/personalRoomsModel.ts index 5735014c..28b9a103 100644 --- a/src/models/personalRoomsModel.ts +++ b/src/models/personalRoomsModel.ts @@ -1,4 +1,4 @@ -import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers"; +import { toMongoDate, toOid } from "../helpers/inventoryHelpers.ts"; import type { IApartmentDatabase, ICustomizationInfoDatabase, @@ -15,11 +15,11 @@ import type { IRoomDatabase, ITailorShopDatabase, PersonalRoomsModelType -} from "@/src/types/personalRoomsTypes"; +} from "../types/personalRoomsTypes.ts"; import type { Types } from "mongoose"; import { Schema, model } from "mongoose"; -import { colorSchema, shipCustomizationSchema } from "@/src/models/commonModel"; -import { loadoutConfigSchema } from "@/src/models/inventoryModels/loadoutModel"; +import { colorSchema, shipCustomizationSchema } from "./commonModel.ts"; +import { loadoutConfigSchema } from "./inventoryModels/loadoutModel.ts"; export const pictureFrameInfoSchema = new Schema( { diff --git a/src/models/shipModel.ts b/src/models/shipModel.ts index d6dd5ad9..b0c74fea 100644 --- a/src/models/shipModel.ts +++ b/src/models/shipModel.ts @@ -1,9 +1,9 @@ import type { Document, Types } from "mongoose"; import { Schema, model } from "mongoose"; -import type { IShipDatabase } from "@/src/types/shipTypes"; -import { toOid } from "@/src/helpers/inventoryHelpers"; -import { colorSchema } from "@/src/models/commonModel"; -import type { IShipInventory } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IShipDatabase } from "../types/shipTypes.ts"; +import { toOid } from "../helpers/inventoryHelpers.ts"; +import { colorSchema } from "./commonModel.ts"; +import type { IShipInventory } from "../types/inventoryTypes/inventoryTypes.ts"; const shipSchema = new Schema( { diff --git a/src/models/statsModel.ts b/src/models/statsModel.ts index 53a06228..fbc572b6 100644 --- a/src/models/statsModel.ts +++ b/src/models/statsModel.ts @@ -9,7 +9,7 @@ import type { IWeapon, IStatsDatabase, IRace -} from "@/src/types/statTypes"; +} from "../types/statTypes.ts"; const abilitySchema = new Schema( { diff --git a/src/models/worldStateModel.ts b/src/models/worldStateModel.ts index 3fae89c7..59e243c0 100644 --- a/src/models/worldStateModel.ts +++ b/src/models/worldStateModel.ts @@ -1,4 +1,4 @@ -import type { IDailyDealDatabase, IFissureDatabase } from "@/src/types/worldStateTypes"; +import type { IDailyDealDatabase, IFissureDatabase } from "../types/worldStateTypes.ts"; import { model, Schema } from "mongoose"; const fissureSchema = new Schema({ diff --git a/src/pathman.ts b/src/pathman.ts deleted file mode 100644 index 0d41bc4b..00000000 --- a/src/pathman.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Hooks node to support require from "@/" paths for `npm run build && npm run start`. -// Based on https://github.com/dividab/tsconfig-paths - -/* eslint-disable */ -const Module = require("module"); -const originalResolveFilename = Module._resolveFilename; -Module._resolveFilename = function (request: string, _parent: any): string { - if (request.substring(0, 2) == "@/") { - const modifiedArguments = [process.cwd() + "/build/" + request.substr(2), ...[].slice.call(arguments, 1)]; // Passes all arguments. Even those that is not specified above. - return originalResolveFilename.apply(this, modifiedArguments); - } - return originalResolveFilename.apply(this, arguments); -}; diff --git a/src/routes/api.ts b/src/routes/api.ts index 04d778b1..44d3cd1e 100644 --- a/src/routes/api.ts +++ b/src/routes/api.ts @@ -1,170 +1,170 @@ import express from "express"; -import { abandonLibraryDailyTaskController } from "@/src/controllers/api/abandonLibraryDailyTaskController"; -import { abortDojoComponentController } from "@/src/controllers/api/abortDojoComponentController"; -import { abortDojoComponentDestructionController } from "@/src/controllers/api/abortDojoComponentDestructionController"; -import { activateRandomModController } from "@/src/controllers/api/activateRandomModController"; -import { addFriendController } from "@/src/controllers/api/addFriendController"; -import { addFriendImageController } from "@/src/controllers/api/addFriendImageController"; -import { addIgnoredUserController } from "@/src/controllers/api/addIgnoredUserController"; -import { addPendingFriendController } from "@/src/controllers/api/addPendingFriendController"; -import { addToAllianceController } from "@/src/controllers/api/addToAllianceController"; -import { addToGuildController } from "@/src/controllers/api/addToGuildController"; -import { adoptPetController } from "@/src/controllers/api/adoptPetController"; -import { apartmentController } from "@/src/controllers/api/apartmentController"; -import { arcaneCommonController } from "@/src/controllers/api/arcaneCommonController"; -import { archonFusionController } from "@/src/controllers/api/archonFusionController"; -import { artifactsController } from "@/src/controllers/api/artifactsController"; -import { artifactTransmutationController } from "@/src/controllers/api/artifactTransmutationController"; -import { cancelGuildAdvertisementController } from "@/src/controllers/api/cancelGuildAdvertisementController"; -import { changeDojoRootController } from "@/src/controllers/api/changeDojoRootController"; -import { changeGuildRankController } from "@/src/controllers/api/changeGuildRankController"; -import { checkDailyMissionBonusController } from "@/src/controllers/api/checkDailyMissionBonusController"; -import { claimCompletedRecipeController } from "@/src/controllers/api/claimCompletedRecipeController"; -import { claimJunctionChallengeRewardController } from "@/src/controllers/api/claimJunctionChallengeRewardController"; -import { claimLibraryDailyTaskRewardController } from "@/src/controllers/api/claimLibraryDailyTaskRewardController"; -import { clearDialogueHistoryController } from "@/src/controllers/api/clearDialogueHistoryController"; -import { clearNewEpisodeRewardController } from "@/src/controllers/api/clearNewEpisodeRewardController"; -import { completeCalendarEventController } from "@/src/controllers/api/completeCalendarEventController"; -import { completeRandomModChallengeController } from "@/src/controllers/api/completeRandomModChallengeController"; -import { confirmAllianceInvitationController } from "@/src/controllers/api/confirmAllianceInvitationController"; -import { confirmGuildInvitationGetController, confirmGuildInvitationPostController } from "@/src/controllers/api/confirmGuildInvitationController"; -import { contributeGuildClassController } from "@/src/controllers/api/contributeGuildClassController"; -import { contributeToDojoComponentController } from "@/src/controllers/api/contributeToDojoComponentController"; -import { contributeToVaultController } from "@/src/controllers/api/contributeToVaultController"; -import { createAllianceController } from "@/src/controllers/api/createAllianceController"; -import { createGuildController } from "@/src/controllers/api/createGuildController"; -import { creditsController } from "@/src/controllers/api/creditsController"; -import { crewMembersController } from "@/src/controllers/api/crewMembersController"; -import { crewShipFusionController } from "@/src/controllers/api/crewShipFusionController"; -import { crewShipIdentifySalvageController } from "@/src/controllers/api/crewShipIdentifySalvageController"; -import { customizeGuildRanksController } from "@/src/controllers/api/customizeGuildRanksController"; -import { customObstacleCourseLeaderboardController } from "@/src/controllers/api/customObstacleCourseLeaderboardController"; -import { declineAllianceInviteController } from "@/src/controllers/api/declineAllianceInviteController"; -import { declineGuildInviteController } from "@/src/controllers/api/declineGuildInviteController"; -import { deleteSessionController } from "@/src/controllers/api/deleteSessionController"; -import { destroyDojoDecoController } from "@/src/controllers/api/destroyDojoDecoController"; -import { divvyAllianceVaultController } from "@/src/controllers/api/divvyAllianceVaultController"; -import { dojoComponentRushController } from "@/src/controllers/api/dojoComponentRushController"; -import { dojoController, setDojoURLController } from "@/src/controllers/api/dojoController"; -import { dronesController } from "@/src/controllers/api/dronesController"; -import { endlessXpController } from "@/src/controllers/api/endlessXpController"; -import { entratiLabConquestModeController } from "@/src/controllers/api/entratiLabConquestModeController"; -import { evolveWeaponController } from "@/src/controllers/api/evolveWeaponController"; -import { findSessionsController } from "@/src/controllers/api/findSessionsController"; -import { fishmongerController } from "@/src/controllers/api/fishmongerController"; -import { focusController } from "@/src/controllers/api/focusController"; -import { fusionTreasuresController } from "@/src/controllers/api/fusionTreasuresController"; -import { gardeningController } from "@/src/controllers/api/gardeningController"; -import { genericUpdateController } from "@/src/controllers/api/genericUpdateController"; -import { getAllianceController } from "@/src/controllers/api/getAllianceController"; -import { getDailyDealStockLevelsController } from "@/src/controllers/api/getDailyDealStockLevelsController"; -import { getFriendsController } from "@/src/controllers/api/getFriendsController"; -import { getGuildContributionsController } from "@/src/controllers/api/getGuildContributionsController"; -import { getGuildController } from "@/src/controllers/api/getGuildController"; -import { getGuildDojoController } from "@/src/controllers/api/getGuildDojoController"; -import { getGuildEventScoreController } from "@/src/controllers/api/getGuildEventScoreController"; -import { getGuildLogController } from "@/src/controllers/api/getGuildLogController"; -import { getIgnoredUsersController } from "@/src/controllers/api/getIgnoredUsersController"; -import { getNewRewardSeedController } from "@/src/controllers/api/getNewRewardSeedController"; -import { getProfileViewingDataPostController } from "@/src/controllers/dynamic/getProfileViewingDataController"; -import { getPastWeeklyChallengesController } from "@/src/controllers/api/getPastWeeklyChallengesController"; -import { getShipController } from "@/src/controllers/api/getShipController"; -import { getVendorInfoController } from "@/src/controllers/api/getVendorInfoController"; -import { getVoidProjectionRewardsController } from "@/src/controllers/api/getVoidProjectionRewardsController"; -import { giftingController } from "@/src/controllers/api/giftingController"; -import { gildWeaponController } from "@/src/controllers/api/gildWeaponController"; -import { giveKeyChainTriggeredItemsController } from "@/src/controllers/api/giveKeyChainTriggeredItemsController"; -import { giveKeyChainTriggeredMessageController } from "@/src/controllers/api/giveKeyChainTriggeredMessageController"; -import { giveQuestKeyRewardController } from "@/src/controllers/api/giveQuestKeyRewardController"; -import { giveShipDecoAndLoreFragmentController } from "@/src/controllers/api/giveShipDecoAndLoreFragmentController"; -import { giveStartingGearController } from "@/src/controllers/api/giveStartingGearController"; -import { guildTechController } from "@/src/controllers/api/guildTechController"; -import { hostSessionController } from "@/src/controllers/api/hostSessionController"; -import { hubBlessingController } from "@/src/controllers/api/hubBlessingController"; -import { hubController } from "@/src/controllers/api/hubController"; -import { hubInstancesController } from "@/src/controllers/api/hubInstancesController"; -import { inboxController } from "@/src/controllers/api/inboxController"; -import { infestedFoundryController } from "@/src/controllers/api/infestedFoundryController"; -import { inventoryController } from "@/src/controllers/api/inventoryController"; -import { inventorySlotsController } from "@/src/controllers/api/inventorySlotsController"; -import { joinSessionController } from "@/src/controllers/api/joinSessionController"; -import { loginController } from "@/src/controllers/api/loginController"; -import { loginRewardsController } from "@/src/controllers/api/loginRewardsController"; -import { loginRewardsSelectionController } from "@/src/controllers/api/loginRewardsSelectionController"; -import { logoutController } from "@/src/controllers/api/logoutController"; -import { marketRecommendationsController } from "@/src/controllers/api/marketRecommendationsController"; -import { maturePetController } from "@/src/controllers/api/maturePetController"; -import { missionInventoryUpdateController } from "@/src/controllers/api/missionInventoryUpdateController"; -import { modularWeaponCraftingController } from "@/src/controllers/api/modularWeaponCraftingController"; -import { modularWeaponSaleController } from "@/src/controllers/api/modularWeaponSaleController"; -import { nameWeaponController } from "@/src/controllers/api/nameWeaponController"; -import { nemesisController } from "@/src/controllers/api/nemesisController"; -import { placeDecoInComponentController } from "@/src/controllers/api/placeDecoInComponentController"; -import { playedParkourTutorialController } from "@/src/controllers/api/playedParkourTutorialController"; -import { playerSkillsController } from "@/src/controllers/api/playerSkillsController"; -import { postGuildAdvertisementController } from "@/src/controllers/api/postGuildAdvertisementController"; -import { projectionManagerController } from "@/src/controllers/api/projectionManagerController"; -import { purchaseController } from "@/src/controllers/api/purchaseController"; -import { questControlController } from "@/src/controllers/api/questControlController"; -import { queueDojoComponentDestructionController } from "@/src/controllers/api/queueDojoComponentDestructionController"; -import { redeemPromoCodeController } from "@/src/controllers/api/redeemPromoCodeController"; -import { releasePetController } from "@/src/controllers/api/releasePetController"; -import { removeFriendGetController, removeFriendPostController } from "@/src/controllers/api/removeFriendController"; -import { removeFromAllianceController } from "@/src/controllers/api/removeFromAllianceController"; -import { removeFromGuildController } from "@/src/controllers/api/removeFromGuildController"; -import { removeIgnoredUserController } from "@/src/controllers/api/removeIgnoredUserController"; -import { renamePetController } from "@/src/controllers/api/renamePetController"; -import { rerollRandomModController } from "@/src/controllers/api/rerollRandomModController"; -import { resetQuestProgressController } from "@/src/controllers/api/resetQuestProgressController"; -import { retrievePetFromStasisController } from "@/src/controllers/api/retrievePetFromStasisController"; -import { saveDialogueController } from "@/src/controllers/api/saveDialogueController"; -import { saveLoadoutController } from "@/src/controllers/api/saveLoadoutController"; -import { saveSettingsController } from "@/src/controllers/api/saveSettingsController"; -import { saveVaultAutoContributeController } from "@/src/controllers/api/saveVaultAutoContributeController"; -import { sellController } from "@/src/controllers/api/sellController"; -import { sendMsgToInBoxController } from "@/src/controllers/api/sendMsgToInBoxController"; -import { setActiveQuestController } from "@/src/controllers/api/setActiveQuestController"; -import { setActiveShipController } from "@/src/controllers/api/setActiveShipController"; -import { setAllianceGuildPermissionsController } from "@/src/controllers/api/setAllianceGuildPermissionsController"; -import { setBootLocationController } from "@/src/controllers/api/setBootLocationController"; -import { setDojoComponentColorsController } from "@/src/controllers/api/setDojoComponentColorsController"; -import { setDojoComponentMessageController } from "@/src/controllers/api/setDojoComponentMessageController"; -import { setDojoComponentSettingsController } from "@/src/controllers/api/setDojoComponentSettingsController"; -import { setEquippedInstrumentController } from "@/src/controllers/api/setEquippedInstrumentController"; -import { setFriendNoteController } from "@/src/controllers/api/setFriendNoteController"; -import { setGuildMotdController } from "@/src/controllers/api/setGuildMotdController"; -import { setHubNpcCustomizationsController } from "@/src/controllers/api/setHubNpcCustomizationsController"; -import { setPlacedDecoInfoController } from "@/src/controllers/api/setPlacedDecoInfoController"; -import { setShipCustomizationsController } from "@/src/controllers/api/setShipCustomizationsController"; -import { setShipFavouriteLoadoutController } from "@/src/controllers/api/setShipFavouriteLoadoutController"; -import { setShipVignetteController } from "@/src/controllers/api/setShipVignetteController"; -import { setSuitInfectionController } from "@/src/controllers/api/setSuitInfectionController"; -import { setSupportedSyndicateController } from "@/src/controllers/api/setSupportedSyndicateController"; -import { setWeaponSkillTreeController } from "@/src/controllers/api/setWeaponSkillTreeController"; -import { shipDecorationsController } from "@/src/controllers/api/shipDecorationsController"; -import { startCollectibleEntryController } from "@/src/controllers/api/startCollectibleEntryController"; -import { startDojoRecipeController } from "@/src/controllers/api/startDojoRecipeController"; -import { startLibraryDailyTaskController } from "@/src/controllers/api/startLibraryDailyTaskController"; -import { startLibraryPersonalTargetController } from "@/src/controllers/api/startLibraryPersonalTargetController"; -import { startRecipeController } from "@/src/controllers/api/startRecipeController"; -import { stepSequencersController } from "@/src/controllers/api/stepSequencersController"; -import { surveysController } from "@/src/controllers/api/surveysController"; -import { syndicateSacrificeController } from "@/src/controllers/api/syndicateSacrificeController"; -import { syndicateStandingBonusController } from "@/src/controllers/api/syndicateStandingBonusController"; -import { tauntHistoryController } from "@/src/controllers/api/tauntHistoryController"; -import { tradingController } from "@/src/controllers/api/tradingController"; -import { trainingResultController } from "@/src/controllers/api/trainingResultController"; -import { umbraController } from "@/src/controllers/api/umbraController"; -import { unlockShipFeatureController } from "@/src/controllers/api/unlockShipFeatureController"; -import { updateAlignmentController } from "@/src/controllers/api/updateAlignmentController"; -import { updateChallengeProgressController } from "@/src/controllers/api/updateChallengeProgressController"; -import { updateQuestController } from "@/src/controllers/api/updateQuestController"; -import { updateSessionGetController, updateSessionPostController } from "@/src/controllers/api/updateSessionController"; -import { updateSongChallengeController } from "@/src/controllers/api/updateSongChallengeController"; -import { updateThemeController } from "@/src/controllers/api/updateThemeController"; -import { upgradesController } from "@/src/controllers/api/upgradesController"; -import { valenceSwapController } from "@/src/controllers/api/valenceSwapController"; -import { wishlistController } from "@/src/controllers/api/wishlistController"; +import { abandonLibraryDailyTaskController } from "../controllers/api/abandonLibraryDailyTaskController.ts"; +import { abortDojoComponentController } from "../controllers/api/abortDojoComponentController.ts"; +import { abortDojoComponentDestructionController } from "../controllers/api/abortDojoComponentDestructionController.ts"; +import { activateRandomModController } from "../controllers/api/activateRandomModController.ts"; +import { addFriendController } from "../controllers/api/addFriendController.ts"; +import { addFriendImageController } from "../controllers/api/addFriendImageController.ts"; +import { addIgnoredUserController } from "../controllers/api/addIgnoredUserController.ts"; +import { addPendingFriendController } from "../controllers/api/addPendingFriendController.ts"; +import { addToAllianceController } from "../controllers/api/addToAllianceController.ts"; +import { addToGuildController } from "../controllers/api/addToGuildController.ts"; +import { adoptPetController } from "../controllers/api/adoptPetController.ts"; +import { apartmentController } from "../controllers/api/apartmentController.ts"; +import { arcaneCommonController } from "../controllers/api/arcaneCommonController.ts"; +import { archonFusionController } from "../controllers/api/archonFusionController.ts"; +import { artifactsController } from "../controllers/api/artifactsController.ts"; +import { artifactTransmutationController } from "../controllers/api/artifactTransmutationController.ts"; +import { cancelGuildAdvertisementController } from "../controllers/api/cancelGuildAdvertisementController.ts"; +import { changeDojoRootController } from "../controllers/api/changeDojoRootController.ts"; +import { changeGuildRankController } from "../controllers/api/changeGuildRankController.ts"; +import { checkDailyMissionBonusController } from "../controllers/api/checkDailyMissionBonusController.ts"; +import { claimCompletedRecipeController } from "../controllers/api/claimCompletedRecipeController.ts"; +import { claimJunctionChallengeRewardController } from "../controllers/api/claimJunctionChallengeRewardController.ts"; +import { claimLibraryDailyTaskRewardController } from "../controllers/api/claimLibraryDailyTaskRewardController.ts"; +import { clearDialogueHistoryController } from "../controllers/api/clearDialogueHistoryController.ts"; +import { clearNewEpisodeRewardController } from "../controllers/api/clearNewEpisodeRewardController.ts"; +import { completeCalendarEventController } from "../controllers/api/completeCalendarEventController.ts"; +import { completeRandomModChallengeController } from "../controllers/api/completeRandomModChallengeController.ts"; +import { confirmAllianceInvitationController } from "../controllers/api/confirmAllianceInvitationController.ts"; +import { confirmGuildInvitationGetController, confirmGuildInvitationPostController } from "../controllers/api/confirmGuildInvitationController.ts"; +import { contributeGuildClassController } from "../controllers/api/contributeGuildClassController.ts"; +import { contributeToDojoComponentController } from "../controllers/api/contributeToDojoComponentController.ts"; +import { contributeToVaultController } from "../controllers/api/contributeToVaultController.ts"; +import { createAllianceController } from "../controllers/api/createAllianceController.ts"; +import { createGuildController } from "../controllers/api/createGuildController.ts"; +import { creditsController } from "../controllers/api/creditsController.ts"; +import { crewMembersController } from "../controllers/api/crewMembersController.ts"; +import { crewShipFusionController } from "../controllers/api/crewShipFusionController.ts"; +import { crewShipIdentifySalvageController } from "../controllers/api/crewShipIdentifySalvageController.ts"; +import { customizeGuildRanksController } from "../controllers/api/customizeGuildRanksController.ts"; +import { customObstacleCourseLeaderboardController } from "../controllers/api/customObstacleCourseLeaderboardController.ts"; +import { declineAllianceInviteController } from "../controllers/api/declineAllianceInviteController.ts"; +import { declineGuildInviteController } from "../controllers/api/declineGuildInviteController.ts"; +import { deleteSessionController } from "../controllers/api/deleteSessionController.ts"; +import { destroyDojoDecoController } from "../controllers/api/destroyDojoDecoController.ts"; +import { divvyAllianceVaultController } from "../controllers/api/divvyAllianceVaultController.ts"; +import { dojoComponentRushController } from "../controllers/api/dojoComponentRushController.ts"; +import { dojoController, setDojoURLController } from "../controllers/api/dojoController.ts"; +import { dronesController } from "../controllers/api/dronesController.ts"; +import { endlessXpController } from "../controllers/api/endlessXpController.ts"; +import { entratiLabConquestModeController } from "../controllers/api/entratiLabConquestModeController.ts"; +import { evolveWeaponController } from "../controllers/api/evolveWeaponController.ts"; +import { findSessionsController } from "../controllers/api/findSessionsController.ts"; +import { fishmongerController } from "../controllers/api/fishmongerController.ts"; +import { focusController } from "../controllers/api/focusController.ts"; +import { fusionTreasuresController } from "../controllers/api/fusionTreasuresController.ts"; +import { gardeningController } from "../controllers/api/gardeningController.ts"; +import { genericUpdateController } from "../controllers/api/genericUpdateController.ts"; +import { getAllianceController } from "../controllers/api/getAllianceController.ts"; +import { getDailyDealStockLevelsController } from "../controllers/api/getDailyDealStockLevelsController.ts"; +import { getFriendsController } from "../controllers/api/getFriendsController.ts"; +import { getGuildContributionsController } from "../controllers/api/getGuildContributionsController.ts"; +import { getGuildController } from "../controllers/api/getGuildController.ts"; +import { getGuildDojoController } from "../controllers/api/getGuildDojoController.ts"; +import { getGuildEventScoreController } from "../controllers/api/getGuildEventScoreController.ts"; +import { getGuildLogController } from "../controllers/api/getGuildLogController.ts"; +import { getIgnoredUsersController } from "../controllers/api/getIgnoredUsersController.ts"; +import { getNewRewardSeedController } from "../controllers/api/getNewRewardSeedController.ts"; +import { getProfileViewingDataPostController } from "../controllers/dynamic/getProfileViewingDataController.ts"; +import { getPastWeeklyChallengesController } from "../controllers/api/getPastWeeklyChallengesController.ts"; +import { getShipController } from "../controllers/api/getShipController.ts"; +import { getVendorInfoController } from "../controllers/api/getVendorInfoController.ts"; +import { getVoidProjectionRewardsController } from "../controllers/api/getVoidProjectionRewardsController.ts"; +import { giftingController } from "../controllers/api/giftingController.ts"; +import { gildWeaponController } from "../controllers/api/gildWeaponController.ts"; +import { giveKeyChainTriggeredItemsController } from "../controllers/api/giveKeyChainTriggeredItemsController.ts"; +import { giveKeyChainTriggeredMessageController } from "../controllers/api/giveKeyChainTriggeredMessageController.ts"; +import { giveQuestKeyRewardController } from "../controllers/api/giveQuestKeyRewardController.ts"; +import { giveShipDecoAndLoreFragmentController } from "../controllers/api/giveShipDecoAndLoreFragmentController.ts"; +import { giveStartingGearController } from "../controllers/api/giveStartingGearController.ts"; +import { guildTechController } from "../controllers/api/guildTechController.ts"; +import { hostSessionController } from "../controllers/api/hostSessionController.ts"; +import { hubBlessingController } from "../controllers/api/hubBlessingController.ts"; +import { hubController } from "../controllers/api/hubController.ts"; +import { hubInstancesController } from "../controllers/api/hubInstancesController.ts"; +import { inboxController } from "../controllers/api/inboxController.ts"; +import { infestedFoundryController } from "../controllers/api/infestedFoundryController.ts"; +import { inventoryController } from "../controllers/api/inventoryController.ts"; +import { inventorySlotsController } from "../controllers/api/inventorySlotsController.ts"; +import { joinSessionController } from "../controllers/api/joinSessionController.ts"; +import { loginController } from "../controllers/api/loginController.ts"; +import { loginRewardsController } from "../controllers/api/loginRewardsController.ts"; +import { loginRewardsSelectionController } from "../controllers/api/loginRewardsSelectionController.ts"; +import { logoutController } from "../controllers/api/logoutController.ts"; +import { marketRecommendationsController } from "../controllers/api/marketRecommendationsController.ts"; +import { maturePetController } from "../controllers/api/maturePetController.ts"; +import { missionInventoryUpdateController } from "../controllers/api/missionInventoryUpdateController.ts"; +import { modularWeaponCraftingController } from "../controllers/api/modularWeaponCraftingController.ts"; +import { modularWeaponSaleController } from "../controllers/api/modularWeaponSaleController.ts"; +import { nameWeaponController } from "../controllers/api/nameWeaponController.ts"; +import { nemesisController } from "../controllers/api/nemesisController.ts"; +import { placeDecoInComponentController } from "../controllers/api/placeDecoInComponentController.ts"; +import { playedParkourTutorialController } from "../controllers/api/playedParkourTutorialController.ts"; +import { playerSkillsController } from "../controllers/api/playerSkillsController.ts"; +import { postGuildAdvertisementController } from "../controllers/api/postGuildAdvertisementController.ts"; +import { projectionManagerController } from "../controllers/api/projectionManagerController.ts"; +import { purchaseController } from "../controllers/api/purchaseController.ts"; +import { questControlController } from "../controllers/api/questControlController.ts"; +import { queueDojoComponentDestructionController } from "../controllers/api/queueDojoComponentDestructionController.ts"; +import { redeemPromoCodeController } from "../controllers/api/redeemPromoCodeController.ts"; +import { releasePetController } from "../controllers/api/releasePetController.ts"; +import { removeFriendGetController, removeFriendPostController } from "../controllers/api/removeFriendController.ts"; +import { removeFromAllianceController } from "../controllers/api/removeFromAllianceController.ts"; +import { removeFromGuildController } from "../controllers/api/removeFromGuildController.ts"; +import { removeIgnoredUserController } from "../controllers/api/removeIgnoredUserController.ts"; +import { renamePetController } from "../controllers/api/renamePetController.ts"; +import { rerollRandomModController } from "../controllers/api/rerollRandomModController.ts"; +import { resetQuestProgressController } from "../controllers/api/resetQuestProgressController.ts"; +import { retrievePetFromStasisController } from "../controllers/api/retrievePetFromStasisController.ts"; +import { saveDialogueController } from "../controllers/api/saveDialogueController.ts"; +import { saveLoadoutController } from "../controllers/api/saveLoadoutController.ts"; +import { saveSettingsController } from "../controllers/api/saveSettingsController.ts"; +import { saveVaultAutoContributeController } from "../controllers/api/saveVaultAutoContributeController.ts"; +import { sellController } from "../controllers/api/sellController.ts"; +import { sendMsgToInBoxController } from "../controllers/api/sendMsgToInBoxController.ts"; +import { setActiveQuestController } from "../controllers/api/setActiveQuestController.ts"; +import { setActiveShipController } from "../controllers/api/setActiveShipController.ts"; +import { setAllianceGuildPermissionsController } from "../controllers/api/setAllianceGuildPermissionsController.ts"; +import { setBootLocationController } from "../controllers/api/setBootLocationController.ts"; +import { setDojoComponentColorsController } from "../controllers/api/setDojoComponentColorsController.ts"; +import { setDojoComponentMessageController } from "../controllers/api/setDojoComponentMessageController.ts"; +import { setDojoComponentSettingsController } from "../controllers/api/setDojoComponentSettingsController.ts"; +import { setEquippedInstrumentController } from "../controllers/api/setEquippedInstrumentController.ts"; +import { setFriendNoteController } from "../controllers/api/setFriendNoteController.ts"; +import { setGuildMotdController } from "../controllers/api/setGuildMotdController.ts"; +import { setHubNpcCustomizationsController } from "../controllers/api/setHubNpcCustomizationsController.ts"; +import { setPlacedDecoInfoController } from "../controllers/api/setPlacedDecoInfoController.ts"; +import { setShipCustomizationsController } from "../controllers/api/setShipCustomizationsController.ts"; +import { setShipFavouriteLoadoutController } from "../controllers/api/setShipFavouriteLoadoutController.ts"; +import { setShipVignetteController } from "../controllers/api/setShipVignetteController.ts"; +import { setSuitInfectionController } from "../controllers/api/setSuitInfectionController.ts"; +import { setSupportedSyndicateController } from "../controllers/api/setSupportedSyndicateController.ts"; +import { setWeaponSkillTreeController } from "../controllers/api/setWeaponSkillTreeController.ts"; +import { shipDecorationsController } from "../controllers/api/shipDecorationsController.ts"; +import { startCollectibleEntryController } from "../controllers/api/startCollectibleEntryController.ts"; +import { startDojoRecipeController } from "../controllers/api/startDojoRecipeController.ts"; +import { startLibraryDailyTaskController } from "../controllers/api/startLibraryDailyTaskController.ts"; +import { startLibraryPersonalTargetController } from "../controllers/api/startLibraryPersonalTargetController.ts"; +import { startRecipeController } from "../controllers/api/startRecipeController.ts"; +import { stepSequencersController } from "../controllers/api/stepSequencersController.ts"; +import { surveysController } from "../controllers/api/surveysController.ts"; +import { syndicateSacrificeController } from "../controllers/api/syndicateSacrificeController.ts"; +import { syndicateStandingBonusController } from "../controllers/api/syndicateStandingBonusController.ts"; +import { tauntHistoryController } from "../controllers/api/tauntHistoryController.ts"; +import { tradingController } from "../controllers/api/tradingController.ts"; +import { trainingResultController } from "../controllers/api/trainingResultController.ts"; +import { umbraController } from "../controllers/api/umbraController.ts"; +import { unlockShipFeatureController } from "../controllers/api/unlockShipFeatureController.ts"; +import { updateAlignmentController } from "../controllers/api/updateAlignmentController.ts"; +import { updateChallengeProgressController } from "../controllers/api/updateChallengeProgressController.ts"; +import { updateQuestController } from "../controllers/api/updateQuestController.ts"; +import { updateSessionGetController, updateSessionPostController } from "../controllers/api/updateSessionController.ts"; +import { updateSongChallengeController } from "../controllers/api/updateSongChallengeController.ts"; +import { updateThemeController } from "../controllers/api/updateThemeController.ts"; +import { upgradesController } from "../controllers/api/upgradesController.ts"; +import { valenceSwapController } from "../controllers/api/valenceSwapController.ts"; +import { wishlistController } from "../controllers/api/wishlistController.ts"; const apiRouter = express.Router(); diff --git a/src/routes/cache.ts b/src/routes/cache.ts index 622d361f..7c450ac6 100644 --- a/src/routes/cache.ts +++ b/src/routes/cache.ts @@ -1,5 +1,5 @@ import express from "express"; -import { buildConfig } from "@/src/services/buildConfigService"; +import { buildConfig } from "../services/buildConfigService.ts"; import fs from "fs/promises"; const cacheRouter = express.Router(); diff --git a/src/routes/custom.ts b/src/routes/custom.ts index 262fdaa7..58ab5c3c 100644 --- a/src/routes/custom.ts +++ b/src/routes/custom.ts @@ -1,36 +1,36 @@ import express from "express"; -import { tunablesController } from "@/src/controllers/custom/tunablesController"; -import { getItemListsController } from "@/src/controllers/custom/getItemListsController"; -import { pushArchonCrystalUpgradeController } from "@/src/controllers/custom/pushArchonCrystalUpgradeController"; -import { popArchonCrystalUpgradeController } from "@/src/controllers/custom/popArchonCrystalUpgradeController"; -import { deleteAccountController } from "@/src/controllers/custom/deleteAccountController"; -import { getNameController } from "@/src/controllers/custom/getNameController"; -import { getAccountInfoController } from "@/src/controllers/custom/getAccountInfoController"; -import { renameAccountController } from "@/src/controllers/custom/renameAccountController"; -import { ircDroppedController } from "@/src/controllers/custom/ircDroppedController"; -import { unlockAllIntrinsicsController } from "@/src/controllers/custom/unlockAllIntrinsicsController"; -import { addMissingMaxRankModsController } from "@/src/controllers/custom/addMissingMaxRankModsController"; -import { webuiFileChangeDetectedController } from "@/src/controllers/custom/webuiFileChangeDetectedController"; -import { completeAllMissionsController } from "@/src/controllers/custom/completeAllMissionsController"; -import { addMissingHelminthBlueprintsController } from "@/src/controllers/custom/addMissingHelminthBlueprintsController"; +import { tunablesController } from "../controllers/custom/tunablesController.ts"; +import { getItemListsController } from "../controllers/custom/getItemListsController.ts"; +import { pushArchonCrystalUpgradeController } from "../controllers/custom/pushArchonCrystalUpgradeController.ts"; +import { popArchonCrystalUpgradeController } from "../controllers/custom/popArchonCrystalUpgradeController.ts"; +import { deleteAccountController } from "../controllers/custom/deleteAccountController.ts"; +import { getNameController } from "../controllers/custom/getNameController.ts"; +import { getAccountInfoController } from "../controllers/custom/getAccountInfoController.ts"; +import { renameAccountController } from "../controllers/custom/renameAccountController.ts"; +import { ircDroppedController } from "../controllers/custom/ircDroppedController.ts"; +import { unlockAllIntrinsicsController } from "../controllers/custom/unlockAllIntrinsicsController.ts"; +import { addMissingMaxRankModsController } from "../controllers/custom/addMissingMaxRankModsController.ts"; +import { webuiFileChangeDetectedController } from "../controllers/custom/webuiFileChangeDetectedController.ts"; +import { completeAllMissionsController } from "../controllers/custom/completeAllMissionsController.ts"; +import { addMissingHelminthBlueprintsController } from "../controllers/custom/addMissingHelminthBlueprintsController.ts"; -import { abilityOverrideController } from "@/src/controllers/custom/abilityOverrideController"; -import { createAccountController } from "@/src/controllers/custom/createAccountController"; -import { createMessageController } from "@/src/controllers/custom/createMessageController"; -import { addCurrencyController } from "@/src/controllers/custom/addCurrencyController"; -import { addItemsController } from "@/src/controllers/custom/addItemsController"; -import { addXpController } from "@/src/controllers/custom/addXpController"; -import { importController } from "@/src/controllers/custom/importController"; -import { manageQuestsController } from "@/src/controllers/custom/manageQuestsController"; -import { setEvolutionProgressController } from "@/src/controllers/custom/setEvolutionProgressController"; -import { setBoosterController } from "@/src/controllers/custom/setBoosterController"; -import { updateFingerprintController } from "@/src/controllers/custom/updateFingerprintController"; -import { changeModularPartsController } from "@/src/controllers/custom/changeModularPartsController"; -import { editSuitInvigorationUpgradeController } from "@/src/controllers/custom/editSuitInvigorationUpgradeController"; -import { setAccountCheatController } from "@/src/controllers/custom/setAccountCheatController"; +import { abilityOverrideController } from "../controllers/custom/abilityOverrideController.ts"; +import { createAccountController } from "../controllers/custom/createAccountController.ts"; +import { createMessageController } from "../controllers/custom/createMessageController.ts"; +import { addCurrencyController } from "../controllers/custom/addCurrencyController.ts"; +import { addItemsController } from "../controllers/custom/addItemsController.ts"; +import { addXpController } from "../controllers/custom/addXpController.ts"; +import { importController } from "../controllers/custom/importController.ts"; +import { manageQuestsController } from "../controllers/custom/manageQuestsController.ts"; +import { setEvolutionProgressController } from "../controllers/custom/setEvolutionProgressController.ts"; +import { setBoosterController } from "../controllers/custom/setBoosterController.ts"; +import { updateFingerprintController } from "../controllers/custom/updateFingerprintController.ts"; +import { changeModularPartsController } from "../controllers/custom/changeModularPartsController.ts"; +import { editSuitInvigorationUpgradeController } from "../controllers/custom/editSuitInvigorationUpgradeController.ts"; +import { setAccountCheatController } from "../controllers/custom/setAccountCheatController.ts"; -import { getConfigController, setConfigController } from "@/src/controllers/custom/configController"; +import { getConfigController, setConfigController } from "../controllers/custom/configController.ts"; const customRouter = express.Router(); diff --git a/src/routes/dynamic.ts b/src/routes/dynamic.ts index c6950a16..d9120f46 100644 --- a/src/routes/dynamic.ts +++ b/src/routes/dynamic.ts @@ -1,8 +1,8 @@ import express from "express"; -import { aggregateSessionsController } from "@/src/controllers/dynamic/aggregateSessionsController"; -import { getGuildAdsController } from "@/src/controllers/dynamic/getGuildAdsController"; -import { getProfileViewingDataGetController } from "@/src/controllers/dynamic/getProfileViewingDataController"; -import { worldStateController } from "@/src/controllers/dynamic/worldStateController"; +import { aggregateSessionsController } from "../controllers/dynamic/aggregateSessionsController.ts"; +import { getGuildAdsController } from "../controllers/dynamic/getGuildAdsController.ts"; +import { getProfileViewingDataGetController } from "../controllers/dynamic/getProfileViewingDataController.ts"; +import { worldStateController } from "../controllers/dynamic/worldStateController.ts"; const dynamicController = express.Router(); diff --git a/src/routes/pay.ts b/src/routes/pay.ts index 1a8af754..6d62fdf8 100644 --- a/src/routes/pay.ts +++ b/src/routes/pay.ts @@ -1,7 +1,7 @@ import express from "express"; -import { getSkuCatalogController } from "@/src/controllers/pay/getSkuCatalogController"; -import { steamPacksController } from "@/src/controllers/pay/steamPacksController"; +import { getSkuCatalogController } from "../controllers/pay/getSkuCatalogController.ts"; +import { steamPacksController } from "../controllers/pay/steamPacksController.ts"; const payRouter = express.Router(); diff --git a/src/routes/stats.ts b/src/routes/stats.ts index d0ecc647..22d54d28 100644 --- a/src/routes/stats.ts +++ b/src/routes/stats.ts @@ -1,7 +1,7 @@ import express from "express"; -import { viewController } from "@/src/controllers/stats/viewController"; -import { uploadController } from "@/src/controllers/stats/uploadController"; -import { leaderboardController } from "@/src/controllers/stats/leaderboardController"; +import { viewController } from "../controllers/stats/viewController.ts"; +import { uploadController } from "../controllers/stats/uploadController.ts"; +import { leaderboardController } from "../controllers/stats/leaderboardController.ts"; const statsRouter = express.Router(); diff --git a/src/routes/webui.ts b/src/routes/webui.ts index 1e19c276..b31b2746 100644 --- a/src/routes/webui.ts +++ b/src/routes/webui.ts @@ -1,7 +1,7 @@ import express from "express"; import path from "path"; -import { repoDir, rootDir } from "@/src/helpers/pathHelper"; -import { args } from "@/src/helpers/commandLineArguments"; +import { repoDir, rootDir } from "../helpers/pathHelper.ts"; +import { args } from "../helpers/commandLineArguments.ts"; const baseDir = args.dev ? repoDir : rootDir; diff --git a/src/services/buildConfigService.ts b/src/services/buildConfigService.ts index 007b1bed..81c76cc4 100644 --- a/src/services/buildConfigService.ts +++ b/src/services/buildConfigService.ts @@ -1,6 +1,6 @@ import path from "path"; import fs from "fs"; -import { repoDir } from "@/src/helpers/pathHelper"; +import { repoDir } from "../helpers/pathHelper.ts"; interface IBuildConfig { version: string; diff --git a/src/services/configService.ts b/src/services/configService.ts index dabb8af7..ac1a260a 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -1,8 +1,8 @@ import fs from "fs"; import path from "path"; -import { repoDir } from "@/src/helpers/pathHelper"; -import { args } from "@/src/helpers/commandLineArguments"; -import { Inbox } from "@/src/models/inboxModel"; +import { repoDir } from "../helpers/pathHelper.ts"; +import { args } from "../helpers/commandLineArguments.ts"; +import { Inbox } from "../models/inboxModel.ts"; export interface IConfig extends IConfigRemovedOptions { mongodbUrl: string; diff --git a/src/services/configWatcherService.ts b/src/services/configWatcherService.ts index 19b5c870..67a38df9 100644 --- a/src/services/configWatcherService.ts +++ b/src/services/configWatcherService.ts @@ -1,16 +1,10 @@ import chokidar from "chokidar"; -import { logger } from "@/src/utils/logger"; -import { - config, - configPath, - configRemovedOptionsKeys, - loadConfig, - syncConfigWithDatabase -} from "@/src/services/configService"; -import { saveConfig, shouldReloadConfig } from "@/src/services/configWriterService"; -import { getWebPorts, startWebServer, stopWebServer } from "@/src/services/webService"; -import { sendWsBroadcast } from "@/src/services/wsService"; -import varzia from "@/static/fixed_responses/worldState/varzia.json"; +import { logger } from "../utils/logger.ts"; +import { config, configPath, configRemovedOptionsKeys, loadConfig, syncConfigWithDatabase } from "./configService.ts"; +import { saveConfig, shouldReloadConfig } from "./configWriterService.ts"; +import { getWebPorts, startWebServer, stopWebServer } from "./webService.ts"; +import { sendWsBroadcast } from "./wsService.ts"; +import varzia from "../../static/fixed_responses/worldState/varzia.json"; chokidar.watch(configPath).on("change", () => { if (shouldReloadConfig()) { diff --git a/src/services/configWriterService.ts b/src/services/configWriterService.ts index 43b00187..60ffdf5e 100644 --- a/src/services/configWriterService.ts +++ b/src/services/configWriterService.ts @@ -1,5 +1,5 @@ import fsPromises from "fs/promises"; -import { config, configPath } from "@/src/services/configService"; +import { config, configPath } from "./configService.ts"; let amnesia = false; diff --git a/src/services/friendService.ts b/src/services/friendService.ts index fd8e24bb..445e4321 100644 --- a/src/services/friendService.ts +++ b/src/services/friendService.ts @@ -1,10 +1,10 @@ -import type { IFriendInfo } from "@/src/types/friendTypes"; -import { getInventory } from "@/src/services/inventoryService"; -import { config } from "@/src/services/configService"; -import { Account } from "@/src/models/loginModel"; +import type { IFriendInfo } from "../types/friendTypes.ts"; +import { getInventory } from "./inventoryService.ts"; +import { config } from "./configService.ts"; +import { Account } from "../models/loginModel.ts"; import type { Types } from "mongoose"; -import { Friendship } from "@/src/models/friendModel"; -import { fromOid, toMongoDate } from "@/src/helpers/inventoryHelpers"; +import { Friendship } from "../models/friendModel.ts"; +import { fromOid, toMongoDate } from "../helpers/inventoryHelpers.ts"; export const addAccountDataToFriendInfo = async (info: IFriendInfo): Promise => { const account = (await Account.findById(fromOid(info._id), "DisplayName LastLogin"))!; diff --git a/src/services/guildService.ts b/src/services/guildService.ts index d1276202..c354717b 100644 --- a/src/services/guildService.ts +++ b/src/services/guildService.ts @@ -1,10 +1,10 @@ import type { Request } from "express"; -import type { TAccountDocument } from "@/src/services/loginService"; -import { getAccountIdForRequest } from "@/src/services/loginService"; -import { addLevelKeys, addRecipes, combineInventoryChanges, getInventory } from "@/src/services/inventoryService"; -import type { TGuildDatabaseDocument } from "@/src/models/guildModel"; -import { Alliance, AllianceMember, Guild, GuildAd, GuildMember } from "@/src/models/guildModel"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TAccountDocument } from "./loginService.ts"; +import { getAccountIdForRequest } from "./loginService.ts"; +import { addLevelKeys, addRecipes, combineInventoryChanges, getInventory } from "./inventoryService.ts"; +import type { TGuildDatabaseDocument } from "../models/guildModel.ts"; +import { Alliance, AllianceMember, Guild, GuildAd, GuildMember } from "../models/guildModel.ts"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; import type { IAllianceClient, IAllianceDatabase, @@ -20,23 +20,23 @@ import type { IGuildMemberDatabase, IGuildVault, ITechProjectDatabase -} from "@/src/types/guildTypes"; -import { GuildPermission } from "@/src/types/guildTypes"; -import { toMongoDate, toOid, toOid2 } from "@/src/helpers/inventoryHelpers"; +} from "../types/guildTypes.ts"; +import { GuildPermission } from "../types/guildTypes.ts"; +import { toMongoDate, toOid, toOid2 } from "../helpers/inventoryHelpers.ts"; import type { Types } from "mongoose"; import type { IDojoBuild, IDojoResearch } from "warframe-public-export-plus"; import { ExportDojoRecipes, ExportResources } from "warframe-public-export-plus"; -import { logger } from "@/src/utils/logger"; -import { config } from "@/src/services/configService"; -import { getRandomInt } from "@/src/services/rngService"; -import { Inbox } from "@/src/models/inboxModel"; -import type { IFusionTreasure } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import { parallelForeach } from "@/src/utils/async-utils"; -import allDecoRecipes from "@/static/fixed_responses/allDecoRecipes.json"; -import { createMessage } from "@/src/services/inboxService"; -import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "@/src/services/friendService"; -import type { ITypeCount } from "@/src/types/commonTypes"; +import { logger } from "../utils/logger.ts"; +import { config } from "./configService.ts"; +import { getRandomInt } from "./rngService.ts"; +import { Inbox } from "../models/inboxModel.ts"; +import type { IFusionTreasure } from "../types/inventoryTypes/inventoryTypes.ts"; +import type { IInventoryChanges } from "../types/purchaseTypes.ts"; +import { parallelForeach } from "../utils/async-utils.ts"; +import allDecoRecipes from "../../static/fixed_responses/allDecoRecipes.json"; +import { createMessage } from "./inboxService.ts"; +import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "./friendService.ts"; +import type { ITypeCount } from "../types/commonTypes.ts"; export const getGuildForRequest = async (req: Request): Promise => { const accountId = await getAccountIdForRequest(req); diff --git a/src/services/importService.ts b/src/services/importService.ts index 493f8735..3783607f 100644 --- a/src/services/importService.ts +++ b/src/services/importService.ts @@ -3,8 +3,8 @@ import type { IItemConfig, IOperatorConfigClient, IOperatorConfigDatabase -} from "@/src/types/inventoryTypes/commonInventoryTypes"; -import type { IMongoDate } from "@/src/types/commonTypes"; +} from "../types/inventoryTypes/commonInventoryTypes.ts"; +import type { IMongoDate } from "../types/commonTypes.ts"; import type { IDialogueClient, IDialogueDatabase, @@ -24,16 +24,16 @@ import type { IUpgradeDatabase, IWeaponSkinClient, IWeaponSkinDatabase -} from "@/src/types/inventoryTypes/inventoryTypes"; -import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +} from "../types/inventoryTypes/inventoryTypes.ts"; +import { equipmentKeys } from "../types/inventoryTypes/inventoryTypes.ts"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; import type { ILoadoutConfigClient, ILoadoutConfigDatabase, ILoadoutDatabase, ILoadOutPresets -} from "@/src/types/saveLoadoutTypes"; -import { slotNames } from "@/src/types/purchaseTypes"; +} from "../types/saveLoadoutTypes.ts"; +import { slotNames } from "../types/purchaseTypes.ts"; import type { ICrewShipMemberClient, ICrewShipMemberDatabase, @@ -49,7 +49,7 @@ import type { IEquipmentSelectionDatabase, IKubrowPetDetailsClient, IKubrowPetDetailsDatabase -} from "@/src/types/equipmentTypes"; +} from "../types/equipmentTypes.ts"; import type { IApartmentClient, IApartmentDatabase, @@ -71,7 +71,7 @@ import type { IRoomDatabase, ITailorShop, ITailorShopDatabase -} from "@/src/types/personalRoomsTypes"; +} from "../types/personalRoomsTypes.ts"; const convertDate = (value: IMongoDate): Date => { return new Date(parseInt(value.$date.$numberLong)); diff --git a/src/services/inboxService.ts b/src/services/inboxService.ts index f503fdd0..fca255ad 100644 --- a/src/services/inboxService.ts +++ b/src/services/inboxService.ts @@ -1,11 +1,11 @@ -import type { IMessageDatabase } from "@/src/models/inboxModel"; -import { Inbox } from "@/src/models/inboxModel"; -import { getAccountForRequest } from "@/src/services/loginService"; +import type { IMessageDatabase } from "../models/inboxModel.ts"; +import { Inbox } from "../models/inboxModel.ts"; +import { getAccountForRequest } from "./loginService.ts"; import type { HydratedDocument } from "mongoose"; import { Types } from "mongoose"; import type { Request } from "express"; -import { unixTimesInMs } from "@/src/constants/timeConstants"; -import { config } from "@/src/services/configService"; +import { unixTimesInMs } from "../constants/timeConstants.ts"; +import { config } from "./configService.ts"; export const getAllMessagesSorted = async (accountId: string): Promise[]> => { const inbox = await Inbox.find({ ownerId: accountId }).sort({ date: -1 }); diff --git a/src/services/infestedFoundryService.ts b/src/services/infestedFoundryService.ts index 66177e25..08afc3b8 100644 --- a/src/services/infestedFoundryService.ts +++ b/src/services/infestedFoundryService.ts @@ -1,12 +1,12 @@ import { ExportRecipes } from "warframe-public-export-plus"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; import type { IAccountCheats, IInfestedFoundryClient, IInfestedFoundryDatabase -} from "@/src/types/inventoryTypes/inventoryTypes"; -import { addRecipes } from "@/src/services/inventoryService"; -import type { ITypeCount } from "@/src/types/commonTypes"; +} from "../types/inventoryTypes/inventoryTypes.ts"; +import { addRecipes } from "./inventoryService.ts"; +import type { ITypeCount } from "../types/commonTypes.ts"; export const addInfestedFoundryXP = (infestedFoundry: IInfestedFoundryDatabase, delta: number): ITypeCount[] => { const recipeChanges: ITypeCount[] = []; diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 9069e9d6..ecc0a81a 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -1,9 +1,9 @@ -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { Inventory } from "@/src/models/inventoryModels/inventoryModel"; -import { config } from "@/src/services/configService"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import { Inventory } from "../models/inventoryModels/inventoryModel.ts"; +import { config } from "./configService.ts"; import { Types } from "mongoose"; -import type { SlotNames, IInventoryChanges, IBinChanges, IAffiliationMods } from "@/src/types/purchaseTypes"; -import { slotNames } from "@/src/types/purchaseTypes"; +import type { SlotNames, IInventoryChanges, IBinChanges, IAffiliationMods } from "../types/purchaseTypes.ts"; +import { slotNames } from "../types/purchaseTypes.ts"; import type { IChallengeProgress, IMiscItem, @@ -27,13 +27,13 @@ import type { INemesisPetTargetFingerprint, IDialogueDatabase, IKubrowPetPrintClient -} from "@/src/types/inventoryTypes/inventoryTypes"; -import { InventorySlot, equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IGenericUpdate, IUpdateNodeIntrosResponse } from "@/src/types/genericUpdate"; -import type { IKeyChainRequest, IMissionInventoryUpdateRequest } from "@/src/types/requestTypes"; -import { logger } from "@/src/utils/logger"; -import { convertInboxMessage, fromStoreItem, getKeyChainItems } from "@/src/services/itemDataService"; -import type { IFlavourItem, IItemConfig } from "@/src/types/inventoryTypes/commonInventoryTypes"; +} from "../types/inventoryTypes/inventoryTypes.ts"; +import { InventorySlot, equipmentKeys } from "../types/inventoryTypes/inventoryTypes.ts"; +import type { IGenericUpdate, IUpdateNodeIntrosResponse } from "../types/genericUpdate.ts"; +import type { IKeyChainRequest, IMissionInventoryUpdateRequest } from "../types/requestTypes.ts"; +import { logger } from "../utils/logger.ts"; +import { convertInboxMessage, fromStoreItem, getKeyChainItems } from "./itemDataService.ts"; +import type { IFlavourItem, IItemConfig } from "../types/inventoryTypes/commonInventoryTypes.ts"; import type { IDefaultUpgrade, IPowersuit, ISentinel, TStandingLimitBin } from "warframe-public-export-plus"; import { ExportArcanes, @@ -58,8 +58,8 @@ import { ExportWarframes, ExportWeapons } from "warframe-public-export-plus"; -import { createShip } from "@/src/services/shipService"; -import type { TTraitsPool } from "@/src/helpers/inventoryHelpers"; +import { createShip } from "./shipService.ts"; +import type { TTraitsPool } from "../helpers/inventoryHelpers.ts"; import { catbrowDetails, fromDbOid, @@ -69,35 +69,29 @@ import { kubrowFurPatternsWeights, kubrowWeights, toOid -} from "@/src/helpers/inventoryHelpers"; -import { addQuestKey, completeQuest } from "@/src/services/questService"; -import { handleBundleAcqusition } from "@/src/services/purchaseService"; -import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json"; -import { - generateRewardSeed, - getRandomElement, - getRandomInt, - getRandomWeightedReward, - SRng -} from "@/src/services/rngService"; -import type { IMessageCreationTemplate } from "@/src/services/inboxService"; -import { createMessage } from "@/src/services/inboxService"; -import { getMaxStanding, getMinStanding } from "@/src/helpers/syndicateStandingHelper"; -import { getNightwaveSyndicateTag, getWorldState } from "@/src/services/worldStateService"; -import type { ICalendarSeason } from "@/src/types/worldStateTypes"; -import type { INemesisProfile } from "@/src/helpers/nemesisHelpers"; -import { generateNemesisProfile } from "@/src/helpers/nemesisHelpers"; -import type { TAccountDocument } from "@/src/services/loginService"; -import { unixTimesInMs } from "@/src/constants/timeConstants"; -import { addString } from "@/src/helpers/stringHelpers"; +} from "../helpers/inventoryHelpers.ts"; +import { addQuestKey, completeQuest } from "./questService.ts"; +import { handleBundleAcqusition } from "./purchaseService.ts"; +import libraryDailyTasks from "../../static/fixed_responses/libraryDailyTasks.json"; +import { generateRewardSeed, getRandomElement, getRandomInt, getRandomWeightedReward, SRng } from "./rngService.ts"; +import type { IMessageCreationTemplate } from "./inboxService.ts"; +import { createMessage } from "./inboxService.ts"; +import { getMaxStanding, getMinStanding } from "../helpers/syndicateStandingHelper.ts"; +import { getNightwaveSyndicateTag, getWorldState } from "./worldStateService.ts"; +import type { ICalendarSeason } from "../types/worldStateTypes.ts"; +import type { INemesisProfile } from "../helpers/nemesisHelpers.ts"; +import { generateNemesisProfile } from "../helpers/nemesisHelpers.ts"; +import type { TAccountDocument } from "./loginService.ts"; +import { unixTimesInMs } from "../constants/timeConstants.ts"; +import { addString } from "../helpers/stringHelpers.ts"; import type { IEquipmentClient, IEquipmentDatabase, IKubrowPetDetailsDatabase, ITraits -} from "@/src/types/equipmentTypes"; -import { EquipmentFeatures, Status } from "@/src/types/equipmentTypes"; -import type { ITypeCount } from "@/src/types/commonTypes"; +} from "../types/equipmentTypes.ts"; +import { EquipmentFeatures, Status } from "../types/equipmentTypes.ts"; +import type { ITypeCount } from "../types/commonTypes.ts"; export const createInventory = async ( accountOwnerId: Types.ObjectId, diff --git a/src/services/itemDataService.ts b/src/services/itemDataService.ts index ccb0175c..bb11b611 100644 --- a/src/services/itemDataService.ts +++ b/src/services/itemDataService.ts @@ -1,4 +1,4 @@ -import type { IKeyChainRequest } from "@/src/types/requestTypes"; +import type { IKeyChainRequest } from "../types/requestTypes.ts"; import type { IDefaultUpgrade, IInboxMessage, @@ -36,8 +36,8 @@ import { ExportWarframes, ExportWeapons } from "warframe-public-export-plus"; -import type { IMessage } from "@/src/models/inboxModel"; -import { logger } from "@/src/utils/logger"; +import type { IMessage } from "../models/inboxModel.ts"; +import { logger } from "../utils/logger.ts"; export type WeaponTypeInternal = | "LongGuns" diff --git a/src/services/leaderboardService.ts b/src/services/leaderboardService.ts index 17507597..2ee36b92 100644 --- a/src/services/leaderboardService.ts +++ b/src/services/leaderboardService.ts @@ -1,9 +1,9 @@ -import { Guild } from "@/src/models/guildModel"; -import type { TLeaderboardEntryDocument } from "@/src/models/leaderboardModel"; -import { Leaderboard } from "@/src/models/leaderboardModel"; -import type { ILeaderboardEntryClient } from "@/src/types/leaderboardTypes"; -import { handleGuildGoalProgress } from "@/src/services/guildService"; -import { getWorldState } from "@/src/services/worldStateService"; +import { Guild } from "../models/guildModel.ts"; +import type { TLeaderboardEntryDocument } from "../models/leaderboardModel.ts"; +import { Leaderboard } from "../models/leaderboardModel.ts"; +import type { ILeaderboardEntryClient } from "../types/leaderboardTypes.ts"; +import { handleGuildGoalProgress } from "./guildService.ts"; +import { getWorldState } from "./worldStateService.ts"; import { Types } from "mongoose"; export const submitLeaderboardScore = async ( diff --git a/src/services/loadoutService.ts b/src/services/loadoutService.ts index 49f86149..a84836c3 100644 --- a/src/services/loadoutService.ts +++ b/src/services/loadoutService.ts @@ -1,5 +1,5 @@ -import type { TLoadoutDatabaseDocument } from "@/src/models/inventoryModels/loadoutModel"; -import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; +import type { TLoadoutDatabaseDocument } from "../models/inventoryModels/loadoutModel.ts"; +import { Loadout } from "../models/inventoryModels/loadoutModel.ts"; export const getLoadout = async (accountId: string): Promise => { const loadout = await Loadout.findOne({ loadoutOwnerId: accountId }); diff --git a/src/services/loginRewardService.ts b/src/services/loginRewardService.ts index 27e3e368..21befb10 100644 --- a/src/services/loginRewardService.ts +++ b/src/services/loginRewardService.ts @@ -1,10 +1,10 @@ -import randomRewards from "@/static/fixed_responses/loginRewards/randomRewards.json"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import type { TAccountDocument } from "@/src/services/loginService"; -import { mixSeeds, SRng } from "@/src/services/rngService"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { addBooster, updateCurrency } from "@/src/services/inventoryService"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; +import randomRewards from "../../static/fixed_responses/loginRewards/randomRewards.json"; +import type { IInventoryChanges } from "../types/purchaseTypes.ts"; +import type { TAccountDocument } from "./loginService.ts"; +import { mixSeeds, SRng } from "./rngService.ts"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import { addBooster, updateCurrency } from "./inventoryService.ts"; +import { handleStoreItemAcquisition } from "./purchaseService.ts"; import { ExportBoosterPacks, ExportBoosters, @@ -12,7 +12,7 @@ import { ExportWarframes, ExportWeapons } from "warframe-public-export-plus"; -import { toStoreItem } from "@/src/services/itemDataService"; +import { toStoreItem } from "./itemDataService.ts"; export interface ILoginRewardsReponse { DailyTributeInfo: { diff --git a/src/services/loginService.ts b/src/services/loginService.ts index c41ac4e7..b9e200cf 100644 --- a/src/services/loginService.ts +++ b/src/services/loginService.ts @@ -1,13 +1,13 @@ -import { Account } from "@/src/models/loginModel"; -import { createInventory } from "@/src/services/inventoryService"; -import type { IDatabaseAccountJson, IDatabaseAccountRequiredFields } from "@/src/types/loginTypes"; -import { createShip } from "@/src/services/shipService"; +import { Account } from "../models/loginModel.ts"; +import { createInventory } from "./inventoryService.ts"; +import type { IDatabaseAccountJson, IDatabaseAccountRequiredFields } from "../types/loginTypes.ts"; +import { createShip } from "./shipService.ts"; import type { Document, Types } from "mongoose"; -import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; -import { PersonalRooms } from "@/src/models/personalRoomsModel"; +import { Loadout } from "../models/inventoryModels/loadoutModel.ts"; +import { PersonalRooms } from "../models/personalRoomsModel.ts"; import type { Request } from "express"; -import { config } from "@/src/services/configService"; -import { createStats } from "@/src/services/statsService"; +import { config } from "./configService.ts"; +import { createStats } from "./statsService.ts"; import crc32 from "crc-32"; export const isCorrectPassword = (requestPassword: string, databasePassword: string): boolean => { diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index f4158eae..c840e5d9 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -6,12 +6,12 @@ import { ExportRelics, ExportRewards } from "warframe-public-export-plus"; -import type { IMissionInventoryUpdateRequest, IRewardInfo } from "@/src/types/requestTypes"; -import { logger } from "@/src/utils/logger"; -import type { IRngResult } from "@/src/services/rngService"; -import { SRng, generateRewardSeed, getRandomElement, getRandomReward } from "@/src/services/rngService"; -import type { IMission, TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; +import type { IMissionInventoryUpdateRequest, IRewardInfo } from "../types/requestTypes.ts"; +import { logger } from "../utils/logger.ts"; +import type { IRngResult } from "./rngService.ts"; +import { SRng, generateRewardSeed, getRandomElement, getRandomReward } from "./rngService.ts"; +import type { IMission, TEquipmentKey } from "../types/inventoryTypes/inventoryTypes.ts"; +import { equipmentKeys } from "../types/inventoryTypes/inventoryTypes.ts"; import { addBooster, addCalendarProgress, @@ -41,22 +41,22 @@ import { updateCurrency, updateEntratiVault, updateSyndicate -} from "@/src/services/inventoryService"; -import { updateQuestKey } from "@/src/services/questService"; +} from "./inventoryService.ts"; +import { updateQuestKey } from "./questService.ts"; import { Types } from "mongoose"; -import type { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; -import { fromStoreItem, getLevelKeyRewards, isStoreItem, toStoreItem } from "@/src/services/itemDataService"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { getEntriesUnsafe } from "@/src/utils/ts-utils"; -import { handleStoreItemAcquisition } from "@/src/services/purchaseService"; -import type { IMissionCredits, IMissionReward } from "@/src/types/missionTypes"; -import { crackRelic } from "@/src/helpers/relicHelper"; -import type { IMessageCreationTemplate } from "@/src/services/inboxService"; -import { createMessage } from "@/src/services/inboxService"; -import kuriaMessage50 from "@/static/fixed_responses/kuriaMessages/fiftyPercent.json"; -import kuriaMessage75 from "@/static/fixed_responses/kuriaMessages/seventyFivePercent.json"; -import kuriaMessage100 from "@/static/fixed_responses/kuriaMessages/oneHundredPercent.json"; -import conservationAnimals from "@/static/fixed_responses/conservationAnimals.json"; +import type { IAffiliationMods, IInventoryChanges } from "../types/purchaseTypes.ts"; +import { fromStoreItem, getLevelKeyRewards, isStoreItem, toStoreItem } from "./itemDataService.ts"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import { getEntriesUnsafe } from "../utils/ts-utils.ts"; +import { handleStoreItemAcquisition } from "./purchaseService.ts"; +import type { IMissionCredits, IMissionReward } from "../types/missionTypes.ts"; +import { crackRelic } from "../helpers/relicHelper.ts"; +import type { IMessageCreationTemplate } from "./inboxService.ts"; +import { createMessage } from "./inboxService.ts"; +import kuriaMessage50 from "../../static/fixed_responses/kuriaMessages/fiftyPercent.json"; +import kuriaMessage75 from "../../static/fixed_responses/kuriaMessages/seventyFivePercent.json"; +import kuriaMessage100 from "../../static/fixed_responses/kuriaMessages/oneHundredPercent.json"; +import conservationAnimals from "../../static/fixed_responses/conservationAnimals.json"; import { generateNemesisProfile, getInfestedLichItemRewards, @@ -64,8 +64,8 @@ import { getKillTokenRewardCount, getNemesisManifest, getNemesisPasscode -} from "@/src/helpers/nemesisHelpers"; -import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; +} from "../helpers/nemesisHelpers.ts"; +import { Loadout } from "../models/inventoryModels/loadoutModel.ts"; import { getLiteSortie, getSortie, @@ -74,17 +74,17 @@ import { idToDay, idToWeek, pushClassicBounties -} from "@/src/services/worldStateService"; -import { config } from "@/src/services/configService"; -import libraryDailyTasks from "@/static/fixed_responses/libraryDailyTasks.json"; -import type { IGoal, ISyndicateMissionInfo } from "@/src/types/worldStateTypes"; -import { fromOid } from "@/src/helpers/inventoryHelpers"; -import type { TAccountDocument } from "@/src/services/loginService"; -import type { ITypeCount } from "@/src/types/commonTypes"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; -import { Guild } from "@/src/models/guildModel"; -import { handleGuildGoalProgress } from "@/src/services/guildService"; -import { importLoadOutConfig } from "@/src/services/importService"; +} from "./worldStateService.ts"; +import { config } from "./configService.ts"; +import libraryDailyTasks from "../../static/fixed_responses/libraryDailyTasks.json"; +import type { IGoal, ISyndicateMissionInfo } from "../types/worldStateTypes.ts"; +import { fromOid } from "../helpers/inventoryHelpers.ts"; +import type { TAccountDocument } from "./loginService.ts"; +import type { ITypeCount } from "../types/commonTypes.ts"; +import type { IEquipmentClient } from "../types/equipmentTypes.ts"; +import { Guild } from "../models/guildModel.ts"; +import { handleGuildGoalProgress } from "./guildService.ts"; +import { importLoadOutConfig } from "./importService.ts"; const getRotations = (rewardInfo: IRewardInfo, tierOverride?: number): number[] => { // Disruption missions just tell us (https://onlyg.it/OpenWF/SpaceNinjaServer/issues/2599) diff --git a/src/services/personalRoomsService.ts b/src/services/personalRoomsService.ts index 55c9c23f..56c32af9 100644 --- a/src/services/personalRoomsService.ts +++ b/src/services/personalRoomsService.ts @@ -1,7 +1,7 @@ -import { PersonalRooms } from "@/src/models/personalRoomsModel"; -import { addItem, getInventory } from "@/src/services/inventoryService"; -import type { IGardeningDatabase, TPersonalRoomsDatabaseDocument } from "@/src/types/personalRoomsTypes"; -import { getRandomElement } from "@/src/services/rngService"; +import { PersonalRooms } from "../models/personalRoomsModel.ts"; +import { addItem, getInventory } from "./inventoryService.ts"; +import type { IGardeningDatabase, TPersonalRoomsDatabaseDocument } from "../types/personalRoomsTypes.ts"; +import { getRandomElement } from "./rngService.ts"; export const getPersonalRooms = async ( accountId: string, diff --git a/src/services/purchaseService.ts b/src/services/purchaseService.ts index ec8680fb..4d7a0cf8 100644 --- a/src/services/purchaseService.ts +++ b/src/services/purchaseService.ts @@ -1,5 +1,5 @@ -import { parseSlotPurchaseName, slotPurchaseNameToSlotName } from "@/src/helpers/purchaseHelpers"; -import { getSubstringFromKeyword } from "@/src/helpers/stringHelpers"; +import { parseSlotPurchaseName, slotPurchaseNameToSlotName } from "../helpers/purchaseHelpers.ts"; +import { getSubstringFromKeyword } from "../helpers/stringHelpers.ts"; import { addBooster, addItem, @@ -7,19 +7,19 @@ import { combineInventoryChanges, updateCurrency, updateSlots -} from "@/src/services/inventoryService"; -import { getRandomReward, getRandomWeightedRewardUc } from "@/src/services/rngService"; -import { applyStandingToVendorManifest, getVendorManifestByOid } from "@/src/services/serversideVendorsService"; -import type { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes"; +} from "./inventoryService.ts"; +import { getRandomReward, getRandomWeightedRewardUc } from "./rngService.ts"; +import { applyStandingToVendorManifest, getVendorManifestByOid } from "./serversideVendorsService.ts"; +import type { IMiscItem } from "../types/inventoryTypes/inventoryTypes.ts"; import type { IPurchaseRequest, IPurchaseResponse, IInventoryChanges, IPurchaseParams -} from "@/src/types/purchaseTypes"; -import { PurchaseSource } from "@/src/types/purchaseTypes"; -import { logger } from "@/src/utils/logger"; -import { getWorldState } from "@/src/services/worldStateService"; +} from "../types/purchaseTypes.ts"; +import { PurchaseSource } from "../types/purchaseTypes.ts"; +import { logger } from "../utils/logger.ts"; +import { getWorldState } from "./worldStateService.ts"; import type { TRarity } from "warframe-public-export-plus"; import { ExportBoosterPacks, @@ -31,12 +31,12 @@ import { ExportSyndicates, ExportVendors } from "warframe-public-export-plus"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { fromStoreItem, toStoreItem } from "@/src/services/itemDataService"; -import { DailyDeal } from "@/src/models/worldStateModel"; -import { fromMongoDate, toMongoDate } from "@/src/helpers/inventoryHelpers"; -import { Guild } from "@/src/models/guildModel"; -import { handleGuildGoalProgress } from "@/src/services/guildService"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import { fromStoreItem, toStoreItem } from "./itemDataService.ts"; +import { DailyDeal } from "../models/worldStateModel.ts"; +import { fromMongoDate, toMongoDate } from "../helpers/inventoryHelpers.ts"; +import { Guild } from "../models/guildModel.ts"; +import { handleGuildGoalProgress } from "./guildService.ts"; import { Types } from "mongoose"; export const getStoreItemCategory = (storeItem: string): string => { diff --git a/src/services/questService.ts b/src/services/questService.ts index f1f05060..296e2f56 100644 --- a/src/services/questService.ts +++ b/src/services/questService.ts @@ -1,17 +1,17 @@ -import type { IKeyChainRequest } from "@/src/types/requestTypes"; -import { isEmptyObject } from "@/src/helpers/general"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { createMessage } from "@/src/services/inboxService"; -import { addItem, addItems, addKeyChainItems, setupKahlSyndicate } from "@/src/services/inventoryService"; -import { fromStoreItem, getKeyChainMessage, getLevelKeyRewards } from "@/src/services/itemDataService"; -import type { IQuestKeyClient, IQuestKeyDatabase, IQuestStage } from "@/src/types/inventoryTypes/inventoryTypes"; -import { logger } from "@/src/utils/logger"; +import type { IKeyChainRequest } from "../types/requestTypes.ts"; +import { isEmptyObject } from "../helpers/general.ts"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import { createMessage } from "./inboxService.ts"; +import { addItem, addItems, addKeyChainItems, setupKahlSyndicate } from "./inventoryService.ts"; +import { fromStoreItem, getKeyChainMessage, getLevelKeyRewards } from "./itemDataService.ts"; +import type { IQuestKeyClient, IQuestKeyDatabase, IQuestStage } from "../types/inventoryTypes/inventoryTypes.ts"; +import { logger } from "../utils/logger.ts"; import type { Types } from "mongoose"; import { ExportKeys } from "warframe-public-export-plus"; -import { addFixedLevelRewards } from "@/src/services/missionInventoryUpdateService"; -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; -import questCompletionItems from "@/static/fixed_responses/questCompletionRewards.json"; -import type { ITypeCount } from "@/src/types/commonTypes"; +import { addFixedLevelRewards } from "./missionInventoryUpdateService.ts"; +import type { IInventoryChanges } from "../types/purchaseTypes.ts"; +import questCompletionItems from "../../static/fixed_responses/questCompletionRewards.json"; +import type { ITypeCount } from "../types/commonTypes.ts"; export interface IUpdateQuestRequest { QuestKeys: Omit[]; diff --git a/src/services/saveLoadoutService.ts b/src/services/saveLoadoutService.ts index c55aed6b..506a5444 100644 --- a/src/services/saveLoadoutService.ts +++ b/src/services/saveLoadoutService.ts @@ -4,17 +4,17 @@ import type { ILoadoutEntry, IOperatorConfigEntry, ISaveLoadoutRequestNoUpgradeVer -} from "@/src/types/saveLoadoutTypes"; -import { Loadout } from "@/src/models/inventoryModels/loadoutModel"; -import { getInventory } from "@/src/services/inventoryService"; -import type { IOid } from "@/src/types/commonTypes"; +} from "../types/saveLoadoutTypes.ts"; +import { Loadout } from "../models/inventoryModels/loadoutModel.ts"; +import { getInventory } from "./inventoryService.ts"; +import type { IOid } from "../types/commonTypes.ts"; import { Types } from "mongoose"; -import { isEmptyObject } from "@/src/helpers/general"; -import { logger } from "@/src/utils/logger"; -import type { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes"; -import { equipmentKeys } from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IItemConfig } from "@/src/types/inventoryTypes/commonInventoryTypes"; -import { importCrewShipMembers, importCrewShipWeapon, importLoadOutConfig } from "@/src/services/importService"; +import { isEmptyObject } from "../helpers/general.ts"; +import { logger } from "../utils/logger.ts"; +import type { TEquipmentKey } from "../types/inventoryTypes/inventoryTypes.ts"; +import { equipmentKeys } from "../types/inventoryTypes/inventoryTypes.ts"; +import type { IItemConfig } from "../types/inventoryTypes/commonInventoryTypes.ts"; +import { importCrewShipMembers, importCrewShipWeapon, importLoadOutConfig } from "./importService.ts"; //TODO: setup default items on account creation or like originally in giveStartingItems.php diff --git a/src/services/serversideVendorsService.ts b/src/services/serversideVendorsService.ts index ad641dc9..761adb21 100644 --- a/src/services/serversideVendorsService.ts +++ b/src/services/serversideVendorsService.ts @@ -1,13 +1,13 @@ -import { unixTimesInMs } from "@/src/constants/timeConstants"; -import { args } from "@/src/helpers/commandLineArguments"; -import { catBreadHash } from "@/src/helpers/stringHelpers"; -import type { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel"; -import { mixSeeds, SRng } from "@/src/services/rngService"; -import type { IItemManifest, IVendorInfo, IVendorManifest } from "@/src/types/vendorTypes"; -import { logger } from "@/src/utils/logger"; +import { unixTimesInMs } from "../constants/timeConstants.ts"; +import { args } from "../helpers/commandLineArguments.ts"; +import { catBreadHash } from "../helpers/stringHelpers.ts"; +import type { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel.ts"; +import { mixSeeds, SRng } from "./rngService.ts"; +import type { IItemManifest, IVendorInfo, IVendorManifest } from "../types/vendorTypes.ts"; +import { logger } from "../utils/logger.ts"; import type { IRange, IVendor, IVendorOffer } from "warframe-public-export-plus"; import { ExportVendors } from "warframe-public-export-plus"; -import { config } from "@/src/services/configService"; +import { config } from "./configService.ts"; interface IGeneratableVendorInfo extends Omit { cycleOffset?: number; diff --git a/src/services/shipCustomizationsService.ts b/src/services/shipCustomizationsService.ts index 12ede5e6..2358fe41 100644 --- a/src/services/shipCustomizationsService.ts +++ b/src/services/shipCustomizationsService.ts @@ -1,5 +1,5 @@ -import { getPersonalRooms } from "@/src/services/personalRoomsService"; -import { getShip } from "@/src/services/shipService"; +import { getPersonalRooms } from "./personalRoomsService.ts"; +import { getShip } from "./shipService.ts"; import type { IResetShipDecorationsRequest, IResetShipDecorationsResponse, @@ -10,16 +10,16 @@ import type { RoomsType, TBootLocation, TPersonalRoomsDatabaseDocument -} from "@/src/types/personalRoomsTypes"; -import { logger } from "@/src/utils/logger"; +} from "../types/personalRoomsTypes.ts"; +import { logger } from "../utils/logger.ts"; import { Types } from "mongoose"; -import { addFusionTreasures, addShipDecorations, getInventory } from "@/src/services/inventoryService"; -import { config } from "@/src/services/configService"; -import { Guild } from "@/src/models/guildModel"; -import { hasGuildPermission } from "@/src/services/guildService"; -import { GuildPermission } from "@/src/types/guildTypes"; +import { addFusionTreasures, addShipDecorations, getInventory } from "./inventoryService.ts"; +import { config } from "./configService.ts"; +import { Guild } from "../models/guildModel.ts"; +import { hasGuildPermission } from "./guildService.ts"; +import { GuildPermission } from "../types/guildTypes.ts"; import { ExportResources } from "warframe-public-export-plus"; -import { convertCustomizationInfo } from "@/src/services/importService"; +import { convertCustomizationInfo } from "./importService.ts"; export const setShipCustomizations = async ( accountId: string, diff --git a/src/services/shipService.ts b/src/services/shipService.ts index 6c8ad60e..56bf4c31 100644 --- a/src/services/shipService.ts +++ b/src/services/shipService.ts @@ -1,5 +1,5 @@ -import type { TShipDatabaseDocument } from "@/src/models/shipModel"; -import { Ship } from "@/src/models/shipModel"; +import type { TShipDatabaseDocument } from "../models/shipModel.ts"; +import { Ship } from "../models/shipModel.ts"; import type { Types } from "mongoose"; export const createShip = async ( diff --git a/src/services/statsService.ts b/src/services/statsService.ts index abf5d25f..35fbc369 100644 --- a/src/services/statsService.ts +++ b/src/services/statsService.ts @@ -1,5 +1,5 @@ -import type { TStatsDatabaseDocument } from "@/src/models/statsModel"; -import { Stats } from "@/src/models/statsModel"; +import type { TStatsDatabaseDocument } from "../models/statsModel.ts"; +import { Stats } from "../models/statsModel.ts"; import type { IStatsAdd, IStatsMax, @@ -8,10 +8,10 @@ import type { IStatsUpdate, IUploadEntry, IWeapon -} from "@/src/types/statTypes"; -import { logger } from "@/src/utils/logger"; -import { addEmailItem, getInventory } from "@/src/services/inventoryService"; -import { submitLeaderboardScore } from "@/src/services/leaderboardService"; +} from "../types/statTypes.ts"; +import { logger } from "../utils/logger.ts"; +import { addEmailItem, getInventory } from "./inventoryService.ts"; +import { submitLeaderboardScore } from "./leaderboardService.ts"; export const createStats = async (accountId: string): Promise => { const stats = new Stats({ accountOwnerId: accountId }); diff --git a/src/services/webService.ts b/src/services/webService.ts index af1e49bf..6dd1a5dd 100644 --- a/src/services/webService.ts +++ b/src/services/webService.ts @@ -1,12 +1,12 @@ import http from "http"; import https from "https"; import fs from "node:fs"; -import { config } from "@/src/services/configService"; -import { logger } from "@/src/utils/logger"; -import { app } from "@/src/app"; +import { config } from "./configService.ts"; +import { logger } from "../utils/logger.ts"; +import { app } from "../app.ts"; import type { AddressInfo } from "node:net"; import { Agent, WebSocket as UnidiciWebSocket } from "undici"; -import { startWsServer, startWssServer, stopWsServers } from "@/src/services/wsService"; +import { startWsServer, startWssServer, stopWsServers } from "./wsService.ts"; let httpServer: http.Server | undefined; let httpsServer: https.Server | undefined; diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index d08c9c9b..49f31190 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -1,18 +1,18 @@ -import staticWorldState from "@/static/fixed_responses/worldState/worldState.json"; -import baro from "@/static/fixed_responses/worldState/baro.json"; -import varzia from "@/static/fixed_responses/worldState/varzia.json"; -import fissureMissions from "@/static/fixed_responses/worldState/fissureMissions.json"; -import sortieTilesets from "@/static/fixed_responses/worldState/sortieTilesets.json"; -import sortieTilesetMissions from "@/static/fixed_responses/worldState/sortieTilesetMissions.json"; -import syndicateMissions from "@/static/fixed_responses/worldState/syndicateMissions.json"; -import darvoDeals from "@/static/fixed_responses/worldState/darvoDeals.json"; -import invasionNodes from "@/static/fixed_responses/worldState/invasionNodes.json"; -import invasionRewards from "@/static/fixed_responses/worldState/invasionRewards.json"; -import pvpChallenges from "@/static/fixed_responses/worldState/pvpChallenges.json"; -import { buildConfig } from "@/src/services/buildConfigService"; -import { unixTimesInMs } from "@/src/constants/timeConstants"; -import { config } from "@/src/services/configService"; -import { getRandomElement, getRandomInt, sequentiallyUniqueRandomElement, SRng } from "@/src/services/rngService"; +import staticWorldState from "../../static/fixed_responses/worldState/worldState.json"; +import baro from "../../static/fixed_responses/worldState/baro.json"; +import varzia from "../../static/fixed_responses/worldState/varzia.json"; +import fissureMissions from "../../static/fixed_responses/worldState/fissureMissions.json"; +import sortieTilesets from "../../static/fixed_responses/worldState/sortieTilesets.json"; +import sortieTilesetMissions from "../../static/fixed_responses/worldState/sortieTilesetMissions.json"; +import syndicateMissions from "../../static/fixed_responses/worldState/syndicateMissions.json"; +import darvoDeals from "../../static/fixed_responses/worldState/darvoDeals.json"; +import invasionNodes from "../../static/fixed_responses/worldState/invasionNodes.json"; +import invasionRewards from "../../static/fixed_responses/worldState/invasionRewards.json"; +import pvpChallenges from "../../static/fixed_responses/worldState/pvpChallenges.json"; +import { buildConfig } from "./buildConfigService.ts"; +import { unixTimesInMs } from "../constants/timeConstants.ts"; +import { config } from "./configService.ts"; +import { getRandomElement, getRandomInt, sequentiallyUniqueRandomElement, SRng } from "./rngService.ts"; import type { IMissionReward, IRegion } from "warframe-public-export-plus"; import { eMissionType, ExportRegions, ExportSyndicates } from "warframe-public-export-plus"; import type { @@ -35,10 +35,10 @@ import type { IVoidTraderOffer, IWorldState, TCircuitGameMode -} from "@/src/types/worldStateTypes"; -import { toMongoDate, toOid, version_compare } from "@/src/helpers/inventoryHelpers"; -import { logger } from "@/src/utils/logger"; -import { DailyDeal, Fissure } from "@/src/models/worldStateModel"; +} from "../types/worldStateTypes.ts"; +import { toMongoDate, toOid, version_compare } from "../helpers/inventoryHelpers.ts"; +import { logger } from "../utils/logger.ts"; +import { DailyDeal, Fissure } from "../models/worldStateModel.ts"; const sortieBosses = [ "SORTIE_BOSS_HYENA", diff --git a/src/services/wsService.ts b/src/services/wsService.ts index 930ee84a..8a8cb8c9 100644 --- a/src/services/wsService.ts +++ b/src/services/wsService.ts @@ -1,11 +1,11 @@ import type http from "http"; import type https from "https"; import ws from "ws"; -import { Account } from "@/src/models/loginModel"; -import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "@/src/services/loginService"; -import type { IDatabaseAccountJson } from "@/src/types/loginTypes"; +import { Account } from "../models/loginModel.ts"; +import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "./loginService.ts"; +import type { IDatabaseAccountJson } from "../types/loginTypes.ts"; import type { HydratedDocument } from "mongoose"; -import { logError } from "@/src/utils/logger"; +import { logError } from "../utils/logger.ts"; let wsServer: ws.Server | undefined; let wssServer: ws.Server | undefined; diff --git a/src/types/equipmentTypes.ts b/src/types/equipmentTypes.ts index 3ee5c42c..1515756f 100644 --- a/src/types/equipmentTypes.ts +++ b/src/types/equipmentTypes.ts @@ -1,11 +1,11 @@ import type { Types } from "mongoose"; -import type { IMongoDate, IOid, IOidWithLegacySupport } from "@/src/types/commonTypes"; +import type { IMongoDate, IOid, IOidWithLegacySupport } from "./commonTypes.ts"; import type { ICrewShipCustomization, IFlavourItem, IItemConfig, IPolarity -} from "@/src/types/inventoryTypes/commonInventoryTypes"; +} from "./inventoryTypes/commonInventoryTypes.ts"; export interface IEquipmentSelectionClient { ItemId?: IOid; diff --git a/src/types/friendTypes.ts b/src/types/friendTypes.ts index 666293ce..74d81469 100644 --- a/src/types/friendTypes.ts +++ b/src/types/friendTypes.ts @@ -1,5 +1,5 @@ import type { Types } from "mongoose"; -import type { IMongoDate, IOidWithLegacySupport } from "@/src/types/commonTypes"; +import type { IMongoDate, IOidWithLegacySupport } from "./commonTypes.ts"; export interface IFriendInfo { _id: IOidWithLegacySupport; diff --git a/src/types/genericUpdate.ts b/src/types/genericUpdate.ts index 006de5f5..5cd1819e 100644 --- a/src/types/genericUpdate.ts +++ b/src/types/genericUpdate.ts @@ -1,4 +1,4 @@ -import type { IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IInventoryChanges } from "./purchaseTypes.ts"; export interface IGenericUpdate { NodeIntrosCompleted: string | string[]; diff --git a/src/types/guildTypes.ts b/src/types/guildTypes.ts index e392e697..366e661c 100644 --- a/src/types/guildTypes.ts +++ b/src/types/guildTypes.ts @@ -1,13 +1,13 @@ import type { Types } from "mongoose"; -import type { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "@/src/types/commonTypes"; +import type { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "./commonTypes.ts"; import type { IFusionTreasure, IMiscItem, IGoalProgressDatabase, IGoalProgressClient -} from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IPictureFrameInfo } from "@/src/types/personalRoomsTypes"; -import type { IFriendInfo } from "@/src/types/friendTypes"; +} from "./inventoryTypes/inventoryTypes.ts"; +import type { IPictureFrameInfo } from "./personalRoomsTypes.ts"; +import type { IFriendInfo } from "./friendTypes.ts"; export interface IGuildClient { _id: IOidWithLegacySupport; diff --git a/src/types/inventoryTypes/commonInventoryTypes.ts b/src/types/inventoryTypes/commonInventoryTypes.ts index 0f72ecf2..f0d139f5 100644 --- a/src/types/inventoryTypes/commonInventoryTypes.ts +++ b/src/types/inventoryTypes/commonInventoryTypes.ts @@ -1,4 +1,4 @@ -import type { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "../commonTypes.ts"; import type { Types } from "mongoose"; export interface IPolarity { diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index 33a0bfa8..89f493f4 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -1,5 +1,5 @@ import type { Types } from "mongoose"; -import type { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "@/src/types/commonTypes"; +import type { IOid, IMongoDate, IOidWithLegacySupport, ITypeCount } from "../commonTypes.ts"; import type { IColor, IItemConfig, @@ -8,12 +8,12 @@ import type { IFlavourItem, ILotusCustomization, IShipCustomization -} from "@/src/types/inventoryTypes/commonInventoryTypes"; -import type { IFingerprintStat, RivenFingerprint } from "@/src/helpers/rivenHelper"; -import type { IOrbiterClient } from "@/src/types/personalRoomsTypes"; +} from "./commonInventoryTypes.ts"; +import type { IFingerprintStat, RivenFingerprint } from "../../helpers/rivenHelper.ts"; +import type { IOrbiterClient } from "../personalRoomsTypes.ts"; import type { ICountedStoreItem } from "warframe-public-export-plus"; -import type { IEquipmentClient, IEquipmentDatabase, ITraits } from "@/src/types/equipmentTypes"; -import type { ILoadOutPresets } from "@/src/types/saveLoadoutTypes"; +import type { IEquipmentClient, IEquipmentDatabase, ITraits } from "../equipmentTypes.ts"; +import type { ILoadOutPresets } from "../saveLoadoutTypes.ts"; export type InventoryDatabaseEquipment = { [_ in TEquipmentKey]: IEquipmentDatabase[]; diff --git a/src/types/missionTypes.ts b/src/types/missionTypes.ts index c8e796ec..c1f08d65 100644 --- a/src/types/missionTypes.ts +++ b/src/types/missionTypes.ts @@ -1,4 +1,4 @@ -import type { IAffiliationMods, IInventoryChanges } from "@/src/types/purchaseTypes"; +import type { IAffiliationMods, IInventoryChanges } from "./purchaseTypes.ts"; export const inventoryFields = ["RawUpgrades", "MiscItems", "Consumables", "Recipes"] as const; export type IInventoryFieldType = (typeof inventoryFields)[number]; diff --git a/src/types/personalRoomsTypes.ts b/src/types/personalRoomsTypes.ts index 1e8ea8c0..e0cdc0d1 100644 --- a/src/types/personalRoomsTypes.ts +++ b/src/types/personalRoomsTypes.ts @@ -1,7 +1,7 @@ -import type { IColor, IShipAttachments, IShipCustomization } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IColor, IShipAttachments, IShipCustomization } from "./inventoryTypes/commonInventoryTypes.ts"; import type { Document, Model, Types } from "mongoose"; -import type { ILoadoutClient, ILoadoutConfigClient, ILoadoutConfigDatabase } from "@/src/types/saveLoadoutTypes"; -import type { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { ILoadoutClient, ILoadoutConfigClient, ILoadoutConfigDatabase } from "./saveLoadoutTypes.ts"; +import type { IMongoDate, IOid } from "./commonTypes.ts"; export interface IGetShipResponse { ShipOwnerId: string; diff --git a/src/types/purchaseTypes.ts b/src/types/purchaseTypes.ts index c7588010..d9b19c8f 100644 --- a/src/types/purchaseTypes.ts +++ b/src/types/purchaseTypes.ts @@ -1,5 +1,5 @@ -import type { ITypeCount } from "@/src/types/commonTypes"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +import type { ITypeCount } from "./commonTypes.ts"; +import type { IEquipmentClient } from "./equipmentTypes.ts"; import type { IDroneClient, IInfestedFoundryClient, @@ -10,7 +10,7 @@ import type { ICrewMemberClient, IKubrowPetPrintClient, IUpgradeClient -} from "@/src/types/inventoryTypes/inventoryTypes"; +} from "./inventoryTypes/inventoryTypes.ts"; export enum PurchaseSource { Market = 0, diff --git a/src/types/requestTypes.ts b/src/types/requestTypes.ts index 26554e61..c8244b25 100644 --- a/src/types/requestTypes.ts +++ b/src/types/requestTypes.ts @@ -1,5 +1,5 @@ -import type { IOid, ITypeCount } from "@/src/types/commonTypes"; -import type { ArtifactPolarity, IPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IOid, ITypeCount } from "./commonTypes.ts"; +import type { ArtifactPolarity, IPolarity } from "./inventoryTypes/commonInventoryTypes.ts"; import type { IBooster, IChallengeProgress, @@ -22,10 +22,10 @@ import type { IWeaponSkinClient, IKubrowPetEggClient, INemesisClient -} from "@/src/types/inventoryTypes/inventoryTypes"; -import type { IGroup } from "@/src/types/loginTypes"; -import type { ILoadOutPresets } from "@/src/types/saveLoadoutTypes"; -import type { IEquipmentClient } from "@/src/types/equipmentTypes"; +} from "./inventoryTypes/inventoryTypes.ts"; +import type { IGroup } from "./loginTypes.ts"; +import type { ILoadOutPresets } from "./saveLoadoutTypes.ts"; +import type { IEquipmentClient } from "./equipmentTypes.ts"; export interface IAffiliationChange { Tag: string; diff --git a/src/types/saveLoadoutTypes.ts b/src/types/saveLoadoutTypes.ts index 68c51a39..3e0fca46 100644 --- a/src/types/saveLoadoutTypes.ts +++ b/src/types/saveLoadoutTypes.ts @@ -1,18 +1,18 @@ -import type { IOid } from "@/src/types/commonTypes"; +import type { IOid } from "./commonTypes.ts"; import type { ICrewShipCustomization, IFlavourItem, IItemConfig, ILotusCustomization, IOperatorConfigClient -} from "@/src/types/inventoryTypes/commonInventoryTypes"; +} from "./inventoryTypes/commonInventoryTypes.ts"; import type { Types } from "mongoose"; import type { ICrewShipMembersClient, ICrewShipWeaponClient, IEquipmentSelectionClient, IEquipmentSelectionDatabase -} from "@/src/types/equipmentTypes"; +} from "./equipmentTypes.ts"; export interface ISaveLoadoutRequest { LoadOuts: ILoadoutClient; diff --git a/src/types/shipTypes.ts b/src/types/shipTypes.ts index 5649f4f7..6cda3b93 100644 --- a/src/types/shipTypes.ts +++ b/src/types/shipTypes.ts @@ -1,5 +1,5 @@ import type { Types } from "mongoose"; -import type { IColor, IShipAttachments } from "@/src/types/inventoryTypes/commonInventoryTypes"; +import type { IColor, IShipAttachments } from "./inventoryTypes/commonInventoryTypes.ts"; export interface IShipDatabase { ItemType: string; diff --git a/src/types/vendorTypes.ts b/src/types/vendorTypes.ts index 2a74488c..bb31dd75 100644 --- a/src/types/vendorTypes.ts +++ b/src/types/vendorTypes.ts @@ -1,4 +1,4 @@ -import type { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IMongoDate, IOid } from "./commonTypes.ts"; export interface IItemPrice { ItemType: string; diff --git a/src/types/worldStateTypes.ts b/src/types/worldStateTypes.ts index f1d7d7d2..f39c4bf7 100644 --- a/src/types/worldStateTypes.ts +++ b/src/types/worldStateTypes.ts @@ -1,5 +1,5 @@ import type { IMissionReward } from "warframe-public-export-plus"; -import type { IMongoDate, IOid } from "@/src/types/commonTypes"; +import type { IMongoDate, IOid } from "./commonTypes.ts"; export interface IWorldState { Version: number; // for goals diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 52644079..64d95ce3 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -1,9 +1,9 @@ import type { Logger, LeveledLogMethod } from "winston"; import { createLogger, format, transports, addColors } from "winston"; import "winston-daily-rotate-file"; -import { config } from "@/src/services/configService"; +import { config } from "../services/configService.ts"; import * as util from "util"; -import { isEmptyObject } from "@/src/helpers/general"; +import { isEmptyObject } from "../helpers/general.ts"; // const combineMessageAndSplat = () => { // return { diff --git a/tsconfig.json b/tsconfig.json index 349cffc0..4364b46c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -35,7 +35,8 @@ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + "allowImportingTsExtensions": true, + "rewriteRelativeImportExtensions": true, // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ From 1ead04ddc1071d0a7f838e45725f766ee05d665b Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Tue, 26 Aug 2025 04:29:06 -0700 Subject: [PATCH 02/22] chore: switch to esm, support raw running via node (#2696) Using ESM so the `import` syntax we use is actually valid without compilation. Now, Node can run the TypeScript code directly, albeit without typechecking and requiring use of an experimental feature. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2696 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- package-lock.json | 8 +++---- package.json | 14 +++++++----- scripts/{dev.js => dev.cjs} | 2 +- scripts/{fix-imports.js => fix-imports.cjs} | 0 ...ranslations.js => update-translations.cjs} | 0 src/controllers/api/getShipController.ts | 2 +- src/controllers/api/inventoryController.ts | 2 +- .../api/redeemPromoCodeController.ts | 2 +- .../custom/getItemListsController.ts | 4 ++-- .../dynamic/aggregateSessionsController.ts | 2 +- src/controllers/stats/viewController.ts | 2 +- src/helpers/pathHelper.ts | 2 +- src/services/configWatcherService.ts | 2 +- src/services/guildService.ts | 2 +- src/services/inventoryService.ts | 2 +- src/services/loginRewardService.ts | 2 +- src/services/missionInventoryUpdateService.ts | 10 ++++----- src/services/questService.ts | 2 +- src/services/worldStateService.ts | 22 +++++++++---------- src/services/wsService.ts | 11 +++++----- tsconfig.json | 2 +- 21 files changed, 49 insertions(+), 46 deletions(-) rename scripts/{dev.js => dev.cjs} (97%) rename scripts/{fix-imports.js => fix-imports.cjs} (100%) rename scripts/{update-translations.js => update-translations.cjs} (100%) diff --git a/package-lock.json b/package-lock.json index b072d3d6..d1fddf5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "ncp": "^2.0.0", "typescript": "^5.7", "undici": "^7.10.0", - "warframe-public-export-plus": "^0.5.82", + "warframe-public-export-plus": "^0.5.83", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", @@ -5507,9 +5507,9 @@ } }, "node_modules/warframe-public-export-plus": { - "version": "0.5.82", - "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.82.tgz", - "integrity": "sha512-hZa9KpMDA2wy0Hn03y9Nfyzbjxer1I6Rvb52b363uzrqS0cvDO56rhiDo71JbraeV34qF6yo+Vca1zwFmw2srA==" + "version": "0.5.83", + "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.83.tgz", + "integrity": "sha512-SJgw6NxQaiLgMfnKGML8mRY9lT3wJb3HEABSvuCd/XiKpUqPgqTCp7EwPhbG3D/FMtN+IZjBQgykLD5R7/MSRA==" }, "node_modules/warframe-riven-info": { "version": "0.1.2", diff --git a/package.json b/package.json index 3c2ce7cd..0e55719c 100644 --- a/package.json +++ b/package.json @@ -11,20 +11,22 @@ "build:dev:tsc": "tsc --incremental --sourceMap", "build-and-start": "npm run build && npm run start", "build-and-start:bun": "npm run verify && npm run bun-run", - "dev": "node scripts/dev.js", - "dev:bun": "bun scripts/dev.js", + "dev": "node scripts/dev.cjs", + "dev:bun": "bun scripts/dev.cjs", "verify": "tsgo --noEmit", "verify:tsc": "tsc --noEmit", - "bun-run": "bun src/index.ts", + "raw": "node --experimental-transform-types src/index.ts", + "raw:bun": "bun src/index.ts", "lint": "eslint --ext .ts .", "lint:ci": "eslint --ext .ts --rule \"prettier/prettier: off\" .", "lint:fix": "eslint --fix --ext .ts .", "prettier": "prettier --write .", - "update-translations": "cd scripts && node update-translations.js", - "fix-imports": "cd scripts && node fix-imports.js", + "update-translations": "cd scripts && node update-translations.cjs", + "fix-imports": "cd scripts && node fix-imports.cjs", "fix": "npm run update-translations && npm run fix-imports && npm run prettier" }, "license": "GNU", + "type": "module", "dependencies": { "@types/express": "^5", "@types/morgan": "^1.9.9", @@ -40,7 +42,7 @@ "ncp": "^2.0.0", "typescript": "^5.7", "undici": "^7.10.0", - "warframe-public-export-plus": "^0.5.82", + "warframe-public-export-plus": "^0.5.83", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", diff --git a/scripts/dev.js b/scripts/dev.cjs similarity index 97% rename from scripts/dev.js rename to scripts/dev.cjs index 542528f1..7931df6b 100644 --- a/scripts/dev.js +++ b/scripts/dev.cjs @@ -39,7 +39,7 @@ function run(changedFile) { buildproc = undefined; if (code === 0) { console.log(`${process.versions.bun ? "Verified" : "Built"} in ${Date.now() - thisbuildstart} ms`); - runproc = spawn("npm", ["run", process.versions.bun ? "bun-run" : "start", "--", ...args], spawnopts); + runproc = spawn("npm", ["run", process.versions.bun ? "raw:bun" : "start", "--", ...args], spawnopts); runproc.on("exit", () => { runproc = undefined; }); diff --git a/scripts/fix-imports.js b/scripts/fix-imports.cjs similarity index 100% rename from scripts/fix-imports.js rename to scripts/fix-imports.cjs diff --git a/scripts/update-translations.js b/scripts/update-translations.cjs similarity index 100% rename from scripts/update-translations.js rename to scripts/update-translations.cjs diff --git a/src/controllers/api/getShipController.ts b/src/controllers/api/getShipController.ts index b411db68..3166655c 100644 --- a/src/controllers/api/getShipController.ts +++ b/src/controllers/api/getShipController.ts @@ -1,6 +1,6 @@ import type { RequestHandler } from "express"; import { config } from "../../services/configService.ts"; -import allShipFeatures from "../../../static/fixed_responses/allShipFeatures.json"; +import allShipFeatures from "../../../static/fixed_responses/allShipFeatures.json" with { type: "json" }; import { getAccountIdForRequest } from "../../services/loginService.ts"; import { createGarden, getPersonalRooms } from "../../services/personalRoomsService.ts"; import type { IGetShipResponse, IPersonalRoomsClient } from "../../types/personalRoomsTypes.ts"; diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 1dd64fbf..fb935c38 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -3,7 +3,7 @@ import { getAccountForRequest } from "../../services/loginService.ts"; import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; import { Inventory } from "../../models/inventoryModels/inventoryModel.ts"; import { config } from "../../services/configService.ts"; -import allDialogue from "../../../static/fixed_responses/allDialogue.json"; +import allDialogue from "../../../static/fixed_responses/allDialogue.json" with { type: "json" }; import type { ILoadoutDatabase } from "../../types/saveLoadoutTypes.ts"; import type { IInventoryClient, IShipInventory } from "../../types/inventoryTypes/inventoryTypes.ts"; import { equipmentKeys } from "../../types/inventoryTypes/inventoryTypes.ts"; diff --git a/src/controllers/api/redeemPromoCodeController.ts b/src/controllers/api/redeemPromoCodeController.ts index 733ded0b..b81177b8 100644 --- a/src/controllers/api/redeemPromoCodeController.ts +++ b/src/controllers/api/redeemPromoCodeController.ts @@ -1,6 +1,6 @@ import { getJSONfromString } from "../../helpers/stringHelpers.ts"; import type { RequestHandler } from "express"; -import glyphCodes from "../../../static/fixed_responses/glyphsCodes.json"; +import glyphCodes from "../../../static/fixed_responses/glyphsCodes.json" with { type: "json" }; import { getAccountIdForRequest } from "../../services/loginService.ts"; import { addItem, getInventory } from "../../services/inventoryService.ts"; diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 0f24ace9..5c96dfbb 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -21,8 +21,8 @@ import { ExportWarframes, ExportWeapons } from "warframe-public-export-plus"; -import allIncarnons from "../../../static/fixed_responses/allIncarnonList.json"; -import varzia from "../../../static/fixed_responses/worldState/varzia.json"; +import allIncarnons from "../../../static/fixed_responses/allIncarnonList.json" with { type: "json" }; +import varzia from "../../../static/fixed_responses/worldState/varzia.json" with { type: "json" }; interface ListedItem { uniqueName: string; diff --git a/src/controllers/dynamic/aggregateSessionsController.ts b/src/controllers/dynamic/aggregateSessionsController.ts index 64d3258c..2162c731 100644 --- a/src/controllers/dynamic/aggregateSessionsController.ts +++ b/src/controllers/dynamic/aggregateSessionsController.ts @@ -1,5 +1,5 @@ import type { RequestHandler } from "express"; -import aggregateSessions from "../../../static/fixed_responses/aggregateSessions.json"; +import aggregateSessions from "../../../static/fixed_responses/aggregateSessions.json" with { type: "json" }; const aggregateSessionsController: RequestHandler = (_req, res) => { res.json(aggregateSessions); diff --git a/src/controllers/stats/viewController.ts b/src/controllers/stats/viewController.ts index 9cf29134..52d5e97f 100644 --- a/src/controllers/stats/viewController.ts +++ b/src/controllers/stats/viewController.ts @@ -1,7 +1,7 @@ import type { RequestHandler } from "express"; import { getAccountIdForRequest } from "../../services/loginService.ts"; import { config } from "../../services/configService.ts"; -import allScans from "../../../static/fixed_responses/allScans.json"; +import allScans from "../../../static/fixed_responses/allScans.json" with { type: "json" }; import { ExportEnemies } from "warframe-public-export-plus"; import { getInventory } from "../../services/inventoryService.ts"; import { getStats } from "../../services/statsService.ts"; diff --git a/src/helpers/pathHelper.ts b/src/helpers/pathHelper.ts index 37e87dff..69b0c373 100644 --- a/src/helpers/pathHelper.ts +++ b/src/helpers/pathHelper.ts @@ -1,4 +1,4 @@ import path from "path"; -export const rootDir = path.join(__dirname, "../.."); +export const rootDir = path.join(import.meta.dirname, "../.."); export const repoDir = path.basename(rootDir) != "build" ? rootDir : path.join(rootDir, ".."); diff --git a/src/services/configWatcherService.ts b/src/services/configWatcherService.ts index 67a38df9..1788d58a 100644 --- a/src/services/configWatcherService.ts +++ b/src/services/configWatcherService.ts @@ -4,7 +4,7 @@ import { config, configPath, configRemovedOptionsKeys, loadConfig, syncConfigWit import { saveConfig, shouldReloadConfig } from "./configWriterService.ts"; import { getWebPorts, startWebServer, stopWebServer } from "./webService.ts"; import { sendWsBroadcast } from "./wsService.ts"; -import varzia from "../../static/fixed_responses/worldState/varzia.json"; +import varzia from "../../static/fixed_responses/worldState/varzia.json" with { type: "json" }; chokidar.watch(configPath).on("change", () => { if (shouldReloadConfig()) { diff --git a/src/services/guildService.ts b/src/services/guildService.ts index c354717b..630f675a 100644 --- a/src/services/guildService.ts +++ b/src/services/guildService.ts @@ -33,7 +33,7 @@ import { Inbox } from "../models/inboxModel.ts"; import type { IFusionTreasure } from "../types/inventoryTypes/inventoryTypes.ts"; import type { IInventoryChanges } from "../types/purchaseTypes.ts"; import { parallelForeach } from "../utils/async-utils.ts"; -import allDecoRecipes from "../../static/fixed_responses/allDecoRecipes.json"; +import allDecoRecipes from "../../static/fixed_responses/allDecoRecipes.json" with { type: "json" }; import { createMessage } from "./inboxService.ts"; import { addAccountDataToFriendInfo, addInventoryDataToFriendInfo } from "./friendService.ts"; import type { ITypeCount } from "../types/commonTypes.ts"; diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index ecc0a81a..c8e25c1b 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -72,7 +72,7 @@ import { } from "../helpers/inventoryHelpers.ts"; import { addQuestKey, completeQuest } from "./questService.ts"; import { handleBundleAcqusition } from "./purchaseService.ts"; -import libraryDailyTasks from "../../static/fixed_responses/libraryDailyTasks.json"; +import libraryDailyTasks from "../../static/fixed_responses/libraryDailyTasks.json" with { type: "json" }; import { generateRewardSeed, getRandomElement, getRandomInt, getRandomWeightedReward, SRng } from "./rngService.ts"; import type { IMessageCreationTemplate } from "./inboxService.ts"; import { createMessage } from "./inboxService.ts"; diff --git a/src/services/loginRewardService.ts b/src/services/loginRewardService.ts index 21befb10..3ea615fc 100644 --- a/src/services/loginRewardService.ts +++ b/src/services/loginRewardService.ts @@ -1,4 +1,4 @@ -import randomRewards from "../../static/fixed_responses/loginRewards/randomRewards.json"; +import randomRewards from "../../static/fixed_responses/loginRewards/randomRewards.json" with { type: "json" }; import type { IInventoryChanges } from "../types/purchaseTypes.ts"; import type { TAccountDocument } from "./loginService.ts"; import { mixSeeds, SRng } from "./rngService.ts"; diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index c840e5d9..2498c0f6 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -53,10 +53,10 @@ import type { IMissionCredits, IMissionReward } from "../types/missionTypes.ts"; import { crackRelic } from "../helpers/relicHelper.ts"; import type { IMessageCreationTemplate } from "./inboxService.ts"; import { createMessage } from "./inboxService.ts"; -import kuriaMessage50 from "../../static/fixed_responses/kuriaMessages/fiftyPercent.json"; -import kuriaMessage75 from "../../static/fixed_responses/kuriaMessages/seventyFivePercent.json"; -import kuriaMessage100 from "../../static/fixed_responses/kuriaMessages/oneHundredPercent.json"; -import conservationAnimals from "../../static/fixed_responses/conservationAnimals.json"; +import kuriaMessage50 from "../../static/fixed_responses/kuriaMessages/fiftyPercent.json" with { type: "json" }; +import kuriaMessage75 from "../../static/fixed_responses/kuriaMessages/seventyFivePercent.json" with { type: "json" }; +import kuriaMessage100 from "../../static/fixed_responses/kuriaMessages/oneHundredPercent.json" with { type: "json" }; +import conservationAnimals from "../../static/fixed_responses/conservationAnimals.json" with { type: "json" }; import { generateNemesisProfile, getInfestedLichItemRewards, @@ -76,7 +76,7 @@ import { pushClassicBounties } from "./worldStateService.ts"; import { config } from "./configService.ts"; -import libraryDailyTasks from "../../static/fixed_responses/libraryDailyTasks.json"; +import libraryDailyTasks from "../../static/fixed_responses/libraryDailyTasks.json" with { type: "json" }; import type { IGoal, ISyndicateMissionInfo } from "../types/worldStateTypes.ts"; import { fromOid } from "../helpers/inventoryHelpers.ts"; import type { TAccountDocument } from "./loginService.ts"; diff --git a/src/services/questService.ts b/src/services/questService.ts index 296e2f56..f79eb131 100644 --- a/src/services/questService.ts +++ b/src/services/questService.ts @@ -10,7 +10,7 @@ import type { Types } from "mongoose"; import { ExportKeys } from "warframe-public-export-plus"; import { addFixedLevelRewards } from "./missionInventoryUpdateService.ts"; import type { IInventoryChanges } from "../types/purchaseTypes.ts"; -import questCompletionItems from "../../static/fixed_responses/questCompletionRewards.json"; +import questCompletionItems from "../../static/fixed_responses/questCompletionRewards.json" with { type: "json" }; import type { ITypeCount } from "../types/commonTypes.ts"; export interface IUpdateQuestRequest { diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 49f31190..26343116 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -1,14 +1,14 @@ -import staticWorldState from "../../static/fixed_responses/worldState/worldState.json"; -import baro from "../../static/fixed_responses/worldState/baro.json"; -import varzia from "../../static/fixed_responses/worldState/varzia.json"; -import fissureMissions from "../../static/fixed_responses/worldState/fissureMissions.json"; -import sortieTilesets from "../../static/fixed_responses/worldState/sortieTilesets.json"; -import sortieTilesetMissions from "../../static/fixed_responses/worldState/sortieTilesetMissions.json"; -import syndicateMissions from "../../static/fixed_responses/worldState/syndicateMissions.json"; -import darvoDeals from "../../static/fixed_responses/worldState/darvoDeals.json"; -import invasionNodes from "../../static/fixed_responses/worldState/invasionNodes.json"; -import invasionRewards from "../../static/fixed_responses/worldState/invasionRewards.json"; -import pvpChallenges from "../../static/fixed_responses/worldState/pvpChallenges.json"; +import staticWorldState from "../../static/fixed_responses/worldState/worldState.json" with { type: "json" }; +import baro from "../../static/fixed_responses/worldState/baro.json" with { type: "json" }; +import varzia from "../../static/fixed_responses/worldState/varzia.json" with { type: "json" }; +import fissureMissions from "../../static/fixed_responses/worldState/fissureMissions.json" with { type: "json" }; +import sortieTilesets from "../../static/fixed_responses/worldState/sortieTilesets.json" with { type: "json" }; +import sortieTilesetMissions from "../../static/fixed_responses/worldState/sortieTilesetMissions.json" with { type: "json" }; +import syndicateMissions from "../../static/fixed_responses/worldState/syndicateMissions.json" with { type: "json" }; +import darvoDeals from "../../static/fixed_responses/worldState/darvoDeals.json" with { type: "json" }; +import invasionNodes from "../../static/fixed_responses/worldState/invasionNodes.json" with { type: "json" }; +import invasionRewards from "../../static/fixed_responses/worldState/invasionRewards.json" with { type: "json" }; +import pvpChallenges from "../../static/fixed_responses/worldState/pvpChallenges.json" with { type: "json" }; import { buildConfig } from "./buildConfigService.ts"; import { unixTimesInMs } from "../constants/timeConstants.ts"; import { config } from "./configService.ts"; diff --git a/src/services/wsService.ts b/src/services/wsService.ts index 8a8cb8c9..b80cd81e 100644 --- a/src/services/wsService.ts +++ b/src/services/wsService.ts @@ -1,22 +1,23 @@ import type http from "http"; import type https from "https"; -import ws from "ws"; +import type { default as ws } from "ws"; +import { WebSocketServer } from "ws"; import { Account } from "../models/loginModel.ts"; import { createAccount, createNonce, getUsernameFromEmail, isCorrectPassword } from "./loginService.ts"; import type { IDatabaseAccountJson } from "../types/loginTypes.ts"; import type { HydratedDocument } from "mongoose"; import { logError } from "../utils/logger.ts"; -let wsServer: ws.Server | undefined; -let wssServer: ws.Server | undefined; +let wsServer: WebSocketServer | undefined; +let wssServer: WebSocketServer | undefined; export const startWsServer = (httpServer: http.Server): void => { - wsServer = new ws.Server({ server: httpServer }); + wsServer = new WebSocketServer({ server: httpServer }); wsServer.on("connection", wsOnConnect); }; export const startWssServer = (httpsServer: https.Server): void => { - wssServer = new ws.Server({ server: httpsServer }); + wssServer = new WebSocketServer({ server: httpsServer }); wssServer.on("connection", wsOnConnect); }; diff --git a/tsconfig.json b/tsconfig.json index 4364b46c..6bef1f6b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -25,7 +25,7 @@ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ /* Modules */ - "module": "node16" /* Specify what module code is generated. */, + "module": "node18" /* Specify what module code is generated. */, // "rootDir": "./", /* Specify the root folder within your source files. */ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ From 78b8cf4c7751f1e44b9901fcfe410a48dc211f76 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Tue, 26 Aug 2025 04:29:14 -0700 Subject: [PATCH 03/22] fix: bump DuviriInfo.NumCompletions when completing one of its modes (#2698) Closes #2697 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2698 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/services/missionInventoryUpdateService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 2498c0f6..74948a95 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -801,6 +801,7 @@ export const addMissionInventoryUpdates = async ( // Duviri cave offers (generated with the duviri seed) change after completing one of its game modes (not when aborting). if (inventoryUpdates.MissionStatus != "GS_QUIT") { inventory.DuviriInfo!.Seed = generateRewardSeed(); + inventory.DuviriInfo!.NumCompletions += 1; } break; } From 8b8d66ab2e5625bf734dd2ab437f468822a24eb7 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Tue, 26 Aug 2025 13:44:44 -0700 Subject: [PATCH 04/22] chore: add worldState endpoint for U39.1 (#2701) U39.1 wants world state from `/worldState.php` not from `/dynamic/worldState.php` as before. Before bootstrapper update you need to replace `/static/data/buildConfig.json` to match latest version. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2701 Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> --- src/app.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.ts b/src/app.ts index 971fe210..b9cca576 100644 --- a/src/app.ts +++ b/src/app.ts @@ -13,6 +13,8 @@ import { payRouter } from "./routes/pay.ts"; import { statsRouter } from "./routes/stats.ts"; import { webuiRouter } from "./routes/webui.ts"; +import { worldStateController } from "./controllers/dynamic/worldStateController.ts"; + const app = express(); app.use((req, _res, next) => { @@ -45,6 +47,9 @@ app.use("/pay", payRouter); app.use("/stats", statsRouter); app.use("/", webuiRouter); +// U39.1+ gets worldState from that location +app.get("/worldState.php", worldStateController); + app.use(unknownEndpointHandler); app.use(errorHandler); From 9d034824f705ff38eb7d9102b011bdbcbb8620b6 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:25:20 +0200 Subject: [PATCH 05/22] chore: npm update --- package-lock.json | 251 +++++++++++++++++++++++----------------------- 1 file changed, 127 insertions(+), 124 deletions(-) diff --git a/package-lock.json b/package-lock.json index d1fddf5a..51a7aa3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -415,12 +415,12 @@ } }, "node_modules/@types/node": { - "version": "24.0.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.15.tgz", - "integrity": "sha512-oaeTSbCef7U/z7rDeJA138xpG3NuKc64/rZ2qmUFkFJmnMsAPaluIifqyWd8hSSMxyP9oie3dLAqYPblag9KgA==", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", + "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==", "license": "MIT", "dependencies": { - "undici-types": "~7.8.0" + "undici-types": "~7.10.0" } }, "node_modules/@types/qs": { @@ -496,17 +496,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.37.0.tgz", - "integrity": "sha512-jsuVWeIkb6ggzB+wPCsR4e6loj+rM72ohW6IBn2C+5NCvfUVY8s33iFPySSVXqtm5Hu29Ne/9bnA0JmyLmgenA==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz", + "integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.37.0", - "@typescript-eslint/type-utils": "8.37.0", - "@typescript-eslint/utils": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/type-utils": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -520,22 +520,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.37.0", + "@typescript-eslint/parser": "^8.41.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.37.0.tgz", - "integrity": "sha512-kVIaQE9vrN9RLCQMQ3iyRlVJpTiDUY6woHGb30JDkfJErqrQEmtdWH3gV0PBAfGZgQXoqzXOO0T3K6ioApbbAA==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz", + "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.37.0", - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/typescript-estree": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", "debug": "^4.3.4" }, "engines": { @@ -547,18 +547,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.37.0.tgz", - "integrity": "sha512-BIUXYsbkl5A1aJDdYJCBAo8rCEbAvdquQ8AnLb6z5Lp1u3x5PNgSSx9A/zqYc++Xnr/0DVpls8iQ2cJs/izTXA==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz", + "integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.37.0", - "@typescript-eslint/types": "^8.37.0", + "@typescript-eslint/tsconfig-utils": "^8.41.0", + "@typescript-eslint/types": "^8.41.0", "debug": "^4.3.4" }, "engines": { @@ -569,18 +569,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.37.0.tgz", - "integrity": "sha512-0vGq0yiU1gbjKob2q691ybTg9JX6ShiVXAAfm2jGf3q0hdP6/BruaFjL/ManAR/lj05AvYCH+5bbVo0VtzmjOA==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz", + "integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0" + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -591,9 +591,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.37.0.tgz", - "integrity": "sha512-1/YHvAVTimMM9mmlPvTec9NP4bobA1RkDbMydxG8omqwJJLEW/Iy2C4adsAESIXU3WGLXFHSZUU+C9EoFWl4Zg==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz", + "integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==", "dev": true, "license": "MIT", "engines": { @@ -604,19 +604,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.37.0.tgz", - "integrity": "sha512-SPkXWIkVZxhgwSwVq9rqj/4VFo7MnWwVaRNznfQDc/xPYHjXnPfLWn+4L6FF1cAz6e7dsqBeMawgl7QjUMj4Ow==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz", + "integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/typescript-estree": "8.37.0", - "@typescript-eslint/utils": "8.37.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -629,13 +629,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.37.0.tgz", - "integrity": "sha512-ax0nv7PUF9NOVPs+lmQ7yIE7IQmAf8LGcXbMvHX5Gm+YJUYNAl340XkGnrimxZ0elXyoQJuN5sbg6C4evKA4SQ==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz", + "integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==", "dev": true, "license": "MIT", "engines": { @@ -647,16 +647,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.37.0.tgz", - "integrity": "sha512-zuWDMDuzMRbQOM+bHyU4/slw27bAUEcKSKKs3hcv2aNnc/tvE/h7w60dwVw8vnal2Pub6RT1T7BI8tFZ1fE+yg==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz", + "integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.37.0", - "@typescript-eslint/tsconfig-utils": "8.37.0", - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/visitor-keys": "8.37.0", + "@typescript-eslint/project-service": "8.41.0", + "@typescript-eslint/tsconfig-utils": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -672,20 +672,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.37.0.tgz", - "integrity": "sha512-TSFvkIW6gGjN2p6zbXo20FzCABbyUAuq6tBvNRGsKdsSQ6a7rnV6ADfZ7f4iI3lIiXc4F4WWvtUfDw9CJ9pO5A==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz", + "integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.37.0", - "@typescript-eslint/types": "8.37.0", - "@typescript-eslint/typescript-estree": "8.37.0" + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -696,17 +696,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.37.0.tgz", - "integrity": "sha512-YzfhzcTnZVPiLfP/oeKtDp2evwvHLMe0LOy7oe+hb9KKIumLNohYS9Hgp1ifwpu42YWxhZE8yieggz6JpqO/1w==", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz", + "integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.37.0", + "@typescript-eslint/types": "8.41.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -731,9 +731,9 @@ } }, "node_modules/@typescript/native-preview": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview/-/native-preview-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-23wUnyj+BfVMSty9nsgTcVSlmI1ToS8P8qKS2g7ss0DUrnXN2tiJtbffDpmafMLEKEtfY42mVjmHPrZXHPdaOg==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview/-/native-preview-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-+NuzOfk/lu6pLYSCio+R7uzJ9pfOasc1fshxVmLp6wgcB8yuUYYvBaT7CoHapUnNBYZXkJ9u0UOECnq3dbzgSQ==", "license": "Apache-2.0", "bin": { "tsgo": "bin/tsgo.js" @@ -742,19 +742,19 @@ "node": ">=20.6.0" }, "optionalDependencies": { - "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20250719.1", - "@typescript/native-preview-darwin-x64": "7.0.0-dev.20250719.1", - "@typescript/native-preview-linux-arm": "7.0.0-dev.20250719.1", - "@typescript/native-preview-linux-arm64": "7.0.0-dev.20250719.1", - "@typescript/native-preview-linux-x64": "7.0.0-dev.20250719.1", - "@typescript/native-preview-win32-arm64": "7.0.0-dev.20250719.1", - "@typescript/native-preview-win32-x64": "7.0.0-dev.20250719.1" + "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20250826.1", + "@typescript/native-preview-darwin-x64": "7.0.0-dev.20250826.1", + "@typescript/native-preview-linux-arm": "7.0.0-dev.20250826.1", + "@typescript/native-preview-linux-arm64": "7.0.0-dev.20250826.1", + "@typescript/native-preview-linux-x64": "7.0.0-dev.20250826.1", + "@typescript/native-preview-win32-arm64": "7.0.0-dev.20250826.1", + "@typescript/native-preview-win32-x64": "7.0.0-dev.20250826.1" } }, "node_modules/@typescript/native-preview-darwin-arm64": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-8BOaK/9MJx6qN8DSj7ooDQ56j1HTdGCgs5gzT+rOfv1dJZuhy96rFe1DDd3RwX3ufrNpuLE969GM1tmhaHGLag==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-UTkmzj0+NpraW4GcgG5PECJZ25SASkiK7TP90lUx9/RZRidrClhHqyf/A3NPpI+1pqoKqGXxIt3+jV+BY15KyQ==", "cpu": [ "arm64" ], @@ -768,9 +768,9 @@ } }, "node_modules/@typescript/native-preview-darwin-x64": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-cs+/yOFQlkbT5Z5SY8gr5TOk+mporqYAHgRBMXeWWOOStIA1gH3iLKO3aLw85GclgmFBEoFaOTm61RI/ugwD3w==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-9UyLnKkJMW2T118FmS8Jj1djWDXgXGz2d9gUA/d+AdTAOaTBc1TmWhiUVcyKgIzG3+OAFIY+pVLeBWxNpFQu4Q==", "cpu": [ "x64" ], @@ -784,9 +784,9 @@ } }, "node_modules/@typescript/native-preview-linux-arm": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-KDRPvXXgks6JLf1zO4KCI4Zw1ZjAS3jM+YxF5EdTnw2v6+Hff+ritUo4FQHbgQOo2OLnmqity3Qsxxb5i4DaRg==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-CRH103rrFme+V917lftxtcttiT69fDNZPcnNzHeuj1z6/G3eIY6Hmon4xQb/Q4CjgblcO/BIEz6zDVphlas3dA==", "cpu": [ "arm" ], @@ -800,9 +800,9 @@ } }, "node_modules/@typescript/native-preview-linux-arm64": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-Yv8xeongAOJRy8UQaPH6TVbje+IXpu24KgIffjNW90ygMAJSrCNZXjnkRSXAelydD8RPCEas4O+qJR0Z2vElUQ==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-GFcWo//t482UhZW+K1Nqlp/eOO2NS1uAIR77UyPn1FK/NOQBaxg8w4AZk0OG5ZHzvut4iZwQa2Gp+8zbNnfAIA==", "cpu": [ "arm64" ], @@ -816,9 +816,9 @@ } }, "node_modules/@typescript/native-preview-linux-x64": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-GsGCL8KubbCOXfD9CyhHkMgZQVBLVXfeCnRID5UIgessmDBnd3Q158wbKIEZSLHVK2PffP9wKdfWMBGnU1X5BQ==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-ePQiUwa9YpUUc5g8lu77kCOgZyAseJn14B+5Uwz7n7CFPJn48L0mcKvjr3jVP8sER0r6rFmndEr2uyHnc+Qj2w==", "cpu": [ "x64" ], @@ -832,9 +832,9 @@ } }, "node_modules/@typescript/native-preview-win32-arm64": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-TP7ulNmZdAd2jgVLrIsmUoxwvQnpzsdWlRnTr0R6wEj+4Ob4Moyl75/1DrIkXO7yC6zaklhzLqgbHPz+H37ffg==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-kL3qH6CeOPdtAgZw1cuFgwpyup3VSkAM+ayZGk08SM42Zd90VMTDf736kXm/xxAcpvmCQ0YrH1FDIG0dPiRCAw==", "cpu": [ "arm64" ], @@ -848,9 +848,9 @@ } }, "node_modules/@typescript/native-preview-win32-x64": { - "version": "7.0.0-dev.20250719.1", - "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20250719.1.tgz", - "integrity": "sha512-QIQAbcojUatTTxPriscWi7PBem5GsSKHS4lc1tosLXeC1o3jYITu0MHjFRtXyyO91I0xhJKE899Oh3Y/lqmn4A==", + "version": "7.0.0-dev.20250826.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20250826.1.tgz", + "integrity": "sha512-WPiCnQDz64ZtwUEZ/ezXLHjhZTOetdfZI16ZbjZGkeZ5O3DNMaHrwzvvqqIq7gPxICEOK+6pM9eQ92I6wDq0qQ==", "cpu": [ "x64" ], @@ -2287,9 +2287,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.3.tgz", - "integrity": "sha512-NAdMYww51ehKfDyDhv59/eIItUVzU0Io9H2E8nHNGKEeeqlnci+1gCvrHib6EmZdf6GxF+LCV5K7UC65Ezvw7w==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", "dev": true, "license": "MIT", "dependencies": { @@ -3833,9 +3833,9 @@ } }, "node_modules/mongodb": { - "version": "6.17.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.17.0.tgz", - "integrity": "sha512-neerUzg/8U26cgruLysKEjJvoNSXhyID3RvzvdcpsIi2COYM3FS3o9nlH7fxFtefTb942dX3W9i37oPfCVj4wA==", + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.18.0.tgz", + "integrity": "sha512-fO5ttN9VC8P0F5fqtQmclAkgXZxbIkYRTUi1j8JO6IYwvamkhtYDilJr35jOPELR49zqCJgXZWwCtW7B+TM8vQ==", "license": "Apache-2.0", "dependencies": { "@mongodb-js/saslprep": "^1.1.9", @@ -3889,14 +3889,14 @@ } }, "node_modules/mongoose": { - "version": "8.16.4", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.16.4.tgz", - "integrity": "sha512-jslgdQ8pY2vcNSKPv3Dbi5ogo/NT8zcvf6kPDyD8Sdsjsa1at3AFAF0F5PT+jySPGSPbvlNaQ49nT9h+Kx2UDA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.18.0.tgz", + "integrity": "sha512-3TixPihQKBdyaYDeJqRjzgb86KbilEH07JmzV8SoSjgoskNTpa6oTBmDxeoF9p8YnWQoz7shnCyPkSV/48y3yw==", "license": "MIT", "dependencies": { "bson": "^6.10.4", "kareem": "2.6.3", - "mongodb": "~6.17.0", + "mongodb": "~6.18.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", @@ -3981,9 +3981,9 @@ "license": "MIT" }, "node_modules/napi-postinstall": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.2.tgz", - "integrity": "sha512-tWVJxJHmBWLy69PvO96TZMZDrzmw5KeiZBz3RHmiM2XZ9grBJ2WgMAFVVg25nqp3ZjTFUs2Ftw1JhscL3Teliw==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.3.tgz", + "integrity": "sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow==", "dev": true, "license": "MIT", "bin": { @@ -5158,11 +5158,14 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -5391,9 +5394,9 @@ } }, "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -5423,18 +5426,18 @@ } }, "node_modules/undici": { - "version": "7.12.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.12.0.tgz", - "integrity": "sha512-GrKEsc3ughskmGA9jevVlIOPMiiAHJ4OFUtaAH+NhfTUSiZ1wMPIQqQvAJUrJspFXJt3EBWgpAeoHEDVT1IBug==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.15.0.tgz", + "integrity": "sha512-7oZJCPvvMvTd0OlqWsIxTuItTpJBpU1tcbVl24FMn3xt3+VSunwUasmfPJRE57oNO1KsZ4PgA1xTdAX4hq8NyQ==", "license": "MIT", "engines": { "node": ">=20.18.1" } }, "node_modules/undici-types": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", - "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", "license": "MIT" }, "node_modules/unpipe": { @@ -5507,9 +5510,9 @@ } }, "node_modules/warframe-public-export-plus": { - "version": "0.5.83", - "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.83.tgz", - "integrity": "sha512-SJgw6NxQaiLgMfnKGML8mRY9lT3wJb3HEABSvuCd/XiKpUqPgqTCp7EwPhbG3D/FMtN+IZjBQgykLD5R7/MSRA==" + "version": "0.5.84", + "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.84.tgz", + "integrity": "sha512-ZpI1Y5CgWDmCwM4/oQpv9u0GD6KFvsJ9f1vJVXYhm5VD9DdOJcFzXgXgg98HXJ5JHbO16ZGIj83117qdpd0RQA==" }, "node_modules/warframe-riven-info": { "version": "0.1.2", From 15578b04d2c566ef4f337a5afdda9140a9f61bee Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Wed, 27 Aug 2025 01:29:38 -0700 Subject: [PATCH 06/22] chore: move baro cheats to worldstate section (#2695) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2695 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> --- config-vanilla.json | 11 ++++++----- src/services/configService.ts | 12 +++++++----- src/services/inboxService.ts | 2 +- src/services/worldStateService.ts | 4 ++-- static/webui/index.html | 16 ++++++++-------- 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/config-vanilla.json b/config-vanilla.json index 4ecb5aec..2d96af5f 100644 --- a/config-vanilla.json +++ b/config-vanilla.json @@ -19,8 +19,6 @@ "unlockAllSkins": false, "unlockAllCapturaScenes": false, "fullyStockedVendors": false, - "baroAlwaysAvailable": false, - "baroFullyStocked": false, "unlockAllProfitTakerStages": false, "skipClanKeyCrafting": false, "noDojoRoomBuildStage": false, @@ -45,6 +43,10 @@ "affinityBoost": false, "resourceBoost": false, "tennoLiveRelay": false, + "baroTennoConRelay": false, + "baroAlwaysAvailable": false, + "baroFullyStocked": false, + "varziaFullyStocked": false, "wolfHunt": false, "orphixVenom": false, "longShadow": false, @@ -71,10 +73,9 @@ "duviriOverride": "", "nightwaveOverride": "", "allTheFissures": "", - "circuitGameModes": null, - "darvoStockMultiplier": 1, "varziaOverride": "", - "varziaFullyStocked": false + "circuitGameModes": null, + "darvoStockMultiplier": 1 }, "dev": { "keepVendorsExpired": false diff --git a/src/services/configService.ts b/src/services/configService.ts index ac1a260a..75953730 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -27,8 +27,6 @@ export interface IConfig extends IConfigRemovedOptions { unlockAllCapturaScenes?: boolean; unlockAllDecoRecipes?: boolean; fullyStockedVendors?: boolean; - baroAlwaysAvailable?: boolean; - baroFullyStocked?: boolean; unlockAllProfitTakerStages?: boolean; skipClanKeyCrafting?: boolean; noDojoRoomBuildStage?: boolean; @@ -57,6 +55,9 @@ export interface IConfig extends IConfigRemovedOptions { resourceBoost?: boolean; tennoLiveRelay?: boolean; baroTennoConRelay?: boolean; + baroAlwaysAvailable?: boolean; + baroFullyStocked?: boolean; + varziaFullyStocked?: boolean; wolfHunt?: boolean; orphixVenom?: boolean; longShadow?: boolean; @@ -83,10 +84,9 @@ export interface IConfig extends IConfigRemovedOptions { duviriOverride?: string; nightwaveOverride?: string; allTheFissures?: string; + varziaOverride?: string; circuitGameModes?: string[]; darvoStockMultiplier?: number; - varziaOverride?: string; - varziaFullyStocked?: boolean; }; dev?: { keepVendorsExpired?: boolean; @@ -120,7 +120,9 @@ export const configRemovedOptionsKeys = [ "syndicateMissionsRepeatable", "instantFinishRivenChallenge", "instantResourceExtractorDrones", - "noResourceExtractorDronesDamage" + "noResourceExtractorDronesDamage", + "baroAlwaysAvailable", + "baroFullyStocked" ] as const; type IConfigRemovedOptions = { diff --git a/src/services/inboxService.ts b/src/services/inboxService.ts index fca255ad..38053c0d 100644 --- a/src/services/inboxService.ts +++ b/src/services/inboxService.ts @@ -36,7 +36,7 @@ export const createNewEventMessages = async (req: Request): Promise => { // Baro const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14)); const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000; - const baroActualStart = baroStart + unixTimesInMs.day * (config.baroAlwaysAvailable ? 0 : 12); + const baroActualStart = baroStart + unixTimesInMs.day * (config.worldState?.baroAlwaysAvailable ? 0 : 12); if (Date.now() >= baroActualStart && account.LatestEventMessageDate.getTime() < baroActualStart) { newEventMessages.push({ sndr: "/Lotus/Language/G1Quests/VoidTraderName", diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 26343116..cbedf363 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -2933,7 +2933,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => { { const baroIndex = Math.trunc((Date.now() - 910800000) / (unixTimesInMs.day * 14)); const baroStart = baroIndex * (unixTimesInMs.day * 14) + 910800000; - const baroActualStart = baroStart + unixTimesInMs.day * (config.baroAlwaysAvailable ? 0 : 12); + const baroActualStart = baroStart + unixTimesInMs.day * (config.worldState?.baroAlwaysAvailable ? 0 : 12); const baroEnd = baroStart + unixTimesInMs.day * 14; const baroNode = ["EarthHUB", "MercuryHUB", "SaturnHUB", "PlutoHUB"][baroIndex % 4]; const vt: IVoidTrader = { @@ -2946,7 +2946,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => { }; worldState.VoidTraders.push(vt); if (isBeforeNextExpectedWorldStateRefresh(timeMs, baroActualStart)) { - if (config.baroFullyStocked) { + if (config.worldState?.baroFullyStocked) { fullyStockBaro(vt); } else { const rng = new SRng(new SRng(baroIndex).randomInt(0, 100_000)); diff --git a/static/webui/index.html b/static/webui/index.html index 52e278f2..543ffaf9 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -822,14 +822,6 @@ -
- - -
-
- - -
@@ -933,6 +925,14 @@
+
+ + +
+
+ + +
From 30398021b3fcc1e3a13192a14819d6c9b259d071 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 01:29:46 -0700 Subject: [PATCH 07/22] feat: claim all recipes (#2700) Closes #2699 tried to make it a cleaner diff, but this is the best I could do Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2700 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- .../api/claimCompletedRecipeController.ts | 449 +++++++++--------- 1 file changed, 232 insertions(+), 217 deletions(-) diff --git a/src/controllers/api/claimCompletedRecipeController.ts b/src/controllers/api/claimCompletedRecipeController.ts index 7deb7b09..39782101 100644 --- a/src/controllers/api/claimCompletedRecipeController.ts +++ b/src/controllers/api/claimCompletedRecipeController.ts @@ -4,8 +4,9 @@ import type { RequestHandler } from "express"; import { logger } from "../../utils/logger.ts"; import { getRecipe } from "../../services/itemDataService.ts"; -import type { IOid, IOidWithLegacySupport } from "../../types/commonTypes.ts"; +import type { IOidWithLegacySupport } from "../../types/commonTypes.ts"; import { getJSONfromString } from "../../helpers/stringHelpers.ts"; +import type { TAccountDocument } from "../../services/loginService.ts"; import { getAccountForRequest } from "../../services/loginService.ts"; import { getInventory, @@ -21,240 +22,254 @@ import { import type { IInventoryChanges } from "../../types/purchaseTypes.ts"; import type { IPendingRecipeDatabase } from "../../types/inventoryTypes/inventoryTypes.ts"; import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts"; -import { toOid2 } from "../../helpers/inventoryHelpers.ts"; +import { fromOid, toOid2 } from "../../helpers/inventoryHelpers.ts"; import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts"; import type { IRecipe } from "warframe-public-export-plus"; import type { IEquipmentClient } from "../../types/equipmentTypes.ts"; import { EquipmentFeatures, Status } from "../../types/equipmentTypes.ts"; interface IClaimCompletedRecipeRequest { - RecipeIds: IOid[]; + RecipeIds: IOidWithLegacySupport[]; +} + +interface IClaimCompletedRecipeResponse { + InventoryChanges: IInventoryChanges; + BrandedSuits?: IOidWithLegacySupport[]; } export const claimCompletedRecipeController: RequestHandler = async (req, res) => { const claimCompletedRecipeRequest = getJSONfromString(String(req.body)); const account = await getAccountForRequest(req); const inventory = await getInventory(account._id.toString()); - const pendingRecipe = inventory.PendingRecipes.id(claimCompletedRecipeRequest.RecipeIds[0].$oid); - if (!pendingRecipe) { - throw new Error(`no pending recipe found with id ${claimCompletedRecipeRequest.RecipeIds[0].$oid}`); - } - - //check recipe is indeed ready to be completed - // if (pendingRecipe.CompletionDate > new Date()) { - // throw new Error(`recipe ${pendingRecipe._id} is not ready to be completed`); - // } - - inventory.PendingRecipes.pull(pendingRecipe._id); - - const recipe = getRecipe(pendingRecipe.ItemType); - if (!recipe) { - throw new Error(`no completed item found for recipe ${pendingRecipe._id.toString()}`); - } - - if (req.query.cancel) { - const inventoryChanges: IInventoryChanges = {}; - await refundRecipeIngredients(inventory, inventoryChanges, recipe, pendingRecipe); - await inventory.save(); - res.json(inventoryChanges); // Not a bug: In the specific case of cancelling a recipe, InventoryChanges are expected to be the root. - } else { - logger.debug("Claiming Recipe", { recipe, pendingRecipe }); - - let BrandedSuits: undefined | IOidWithLegacySupport[]; - if (recipe.secretIngredientAction == "SIA_SPECTRE_LOADOUT_COPY") { - inventory.PendingSpectreLoadouts ??= []; - inventory.SpectreLoadouts ??= []; - - const pendingLoadoutIndex = inventory.PendingSpectreLoadouts.findIndex( - x => x.ItemType == recipe.resultType - ); - if (pendingLoadoutIndex != -1) { - const loadoutIndex = inventory.SpectreLoadouts.findIndex(x => x.ItemType == recipe.resultType); - if (loadoutIndex != -1) { - inventory.SpectreLoadouts.splice(loadoutIndex, 1); - } - logger.debug( - "moving spectre loadout from pending to active", - inventory.toJSON().PendingSpectreLoadouts![pendingLoadoutIndex] - ); - inventory.SpectreLoadouts.push(inventory.PendingSpectreLoadouts[pendingLoadoutIndex]); - inventory.PendingSpectreLoadouts.splice(pendingLoadoutIndex, 1); - } - } else if (recipe.secretIngredientAction == "SIA_UNBRAND") { - inventory.BrandedSuits!.splice( - inventory.BrandedSuits!.findIndex(x => x.equals(pendingRecipe.SuitToUnbrand)), - 1 - ); - BrandedSuits = [toOid2(pendingRecipe.SuitToUnbrand!, account.BuildLabel)]; + const resp: IClaimCompletedRecipeResponse = { + InventoryChanges: {} + }; + for (const recipeId of claimCompletedRecipeRequest.RecipeIds) { + const pendingRecipe = inventory.PendingRecipes.id(fromOid(recipeId)); + if (!pendingRecipe) { + throw new Error(`no pending recipe found with id ${fromOid(recipeId)}`); } - let InventoryChanges: IInventoryChanges = {}; - if (recipe.consumeOnUse) { - addRecipes(inventory, [ + //check recipe is indeed ready to be completed + // if (pendingRecipe.CompletionDate > new Date()) { + // throw new Error(`recipe ${pendingRecipe._id} is not ready to be completed`); + // } + + inventory.PendingRecipes.pull(pendingRecipe._id); + + const recipe = getRecipe(pendingRecipe.ItemType); + if (!recipe) { + throw new Error(`no completed item found for recipe ${pendingRecipe._id.toString()}`); + } + + if (req.query.cancel) { + const inventoryChanges: IInventoryChanges = {}; + await refundRecipeIngredients(inventory, inventoryChanges, recipe, pendingRecipe); + await inventory.save(); + res.json(inventoryChanges); // Not a bug: In the specific case of cancelling a recipe, InventoryChanges are expected to be the root. + return; + } + + await claimCompletedRecipe(account, inventory, recipe, pendingRecipe, resp, req.query.rush); + } + await inventory.save(); + res.json(resp); +}; + +const claimCompletedRecipe = async ( + account: TAccountDocument, + inventory: TInventoryDatabaseDocument, + recipe: IRecipe, + pendingRecipe: IPendingRecipeDatabase, + resp: IClaimCompletedRecipeResponse, + rush: any +): Promise => { + logger.debug("Claiming Recipe", { recipe, pendingRecipe }); + + if (recipe.secretIngredientAction == "SIA_SPECTRE_LOADOUT_COPY") { + inventory.PendingSpectreLoadouts ??= []; + inventory.SpectreLoadouts ??= []; + + const pendingLoadoutIndex = inventory.PendingSpectreLoadouts.findIndex(x => x.ItemType == recipe.resultType); + if (pendingLoadoutIndex != -1) { + const loadoutIndex = inventory.SpectreLoadouts.findIndex(x => x.ItemType == recipe.resultType); + if (loadoutIndex != -1) { + inventory.SpectreLoadouts.splice(loadoutIndex, 1); + } + logger.debug( + "moving spectre loadout from pending to active", + inventory.toJSON().PendingSpectreLoadouts![pendingLoadoutIndex] + ); + inventory.SpectreLoadouts.push(inventory.PendingSpectreLoadouts[pendingLoadoutIndex]); + inventory.PendingSpectreLoadouts.splice(pendingLoadoutIndex, 1); + } + } else if (recipe.secretIngredientAction == "SIA_UNBRAND") { + inventory.BrandedSuits!.splice( + inventory.BrandedSuits!.findIndex(x => x.equals(pendingRecipe.SuitToUnbrand)), + 1 + ); + resp.BrandedSuits = [toOid2(pendingRecipe.SuitToUnbrand!, account.BuildLabel)]; + } + + if (recipe.consumeOnUse) { + addRecipes(inventory, [ + { + ItemType: pendingRecipe.ItemType, + ItemCount: -1 + } + ]); + } + + if (rush) { + const end = Math.trunc(pendingRecipe.CompletionDate.getTime() / 1000); + const start = end - recipe.buildTime; + const secondsElapsed = Math.trunc(Date.now() / 1000) - start; + const progress = secondsElapsed / recipe.buildTime; + logger.debug(`rushing recipe at ${Math.trunc(progress * 100)}% completion`); + const cost = + progress > 0.5 ? Math.round(recipe.skipBuildTimePrice * (1 - (progress - 0.5))) : recipe.skipBuildTimePrice; + combineInventoryChanges(resp.InventoryChanges, updateCurrency(inventory, cost, true)); + } + + if (recipe.secretIngredientAction == "SIA_CREATE_KUBROW") { + const pet = inventory.KubrowPets.id(pendingRecipe.KubrowPet!)!; + if (pet.Details!.HatchDate!.getTime() > Date.now()) { + pet.Details!.HatchDate = new Date(); + } + let canSetActive = true; + for (const pet of inventory.KubrowPets) { + if (pet.Details!.Status == Status.StatusAvailable) { + canSetActive = false; + break; + } + } + pet.Details!.Status = canSetActive ? Status.StatusAvailable : Status.StatusStasis; + } else if (recipe.secretIngredientAction == "SIA_DISTILL_PRINT") { + const pet = inventory.KubrowPets.id(pendingRecipe.KubrowPet!)!; + addKubrowPetPrint(inventory, pet, resp.InventoryChanges); + } else if (recipe.secretIngredientAction != "SIA_UNBRAND") { + if (recipe.resultType == "/Lotus/Powersuits/Excalibur/ExcaliburUmbra") { + // Quite the special case here... + // We don't just get Umbra, but also Skiajati and Umbra Mods. Both items are max rank, potatoed, and with the mods are pre-installed. + // Source: https://wiki.warframe.com/w/The_Sacrifice, https://wiki.warframe.com/w/Excalibur/Umbra, https://wiki.warframe.com/w/Skiajati + + const umbraModA = ( + await addItem( + inventory, + "/Lotus/Upgrades/Mods/Sets/Umbra/WarframeUmbraModA", + 1, + false, + undefined, + `{"lvl":5}` + ) + ).Upgrades![0]; + const umbraModB = ( + await addItem( + inventory, + "/Lotus/Upgrades/Mods/Sets/Umbra/WarframeUmbraModB", + 1, + false, + undefined, + `{"lvl":5}` + ) + ).Upgrades![0]; + const umbraModC = ( + await addItem( + inventory, + "/Lotus/Upgrades/Mods/Sets/Umbra/WarframeUmbraModC", + 1, + false, + undefined, + `{"lvl":5}` + ) + ).Upgrades![0]; + const sacrificeModA = ( + await addItem( + inventory, + "/Lotus/Upgrades/Mods/Sets/Sacrifice/MeleeSacrificeModA", + 1, + false, + undefined, + `{"lvl":5}` + ) + ).Upgrades![0]; + const sacrificeModB = ( + await addItem( + inventory, + "/Lotus/Upgrades/Mods/Sets/Sacrifice/MeleeSacrificeModB", + 1, + false, + undefined, + `{"lvl":5}` + ) + ).Upgrades![0]; + resp.InventoryChanges.Upgrades ??= []; + resp.InventoryChanges.Upgrades.push(umbraModA, umbraModB, umbraModC, sacrificeModA, sacrificeModB); + + await addPowerSuit( + inventory, + "/Lotus/Powersuits/Excalibur/ExcaliburUmbra", { - ItemType: pendingRecipe.ItemType, - ItemCount: -1 - } - ]); - } - if (req.query.rush) { - const end = Math.trunc(pendingRecipe.CompletionDate.getTime() / 1000); - const start = end - recipe.buildTime; - const secondsElapsed = Math.trunc(Date.now() / 1000) - start; - const progress = secondsElapsed / recipe.buildTime; - logger.debug(`rushing recipe at ${Math.trunc(progress * 100)}% completion`); - const cost = - progress > 0.5 - ? Math.round(recipe.skipBuildTimePrice * (1 - (progress - 0.5))) - : recipe.skipBuildTimePrice; - InventoryChanges = { - ...InventoryChanges, - ...updateCurrency(inventory, cost, true) - }; - } + Configs: [ + { + Upgrades: [ + "", + "", + "", + "", + "", + umbraModA.ItemId.$oid, + umbraModB.ItemId.$oid, + umbraModC.ItemId.$oid + ] + } + ], + XP: 900_000, + Features: EquipmentFeatures.DOUBLE_CAPACITY + }, + resp.InventoryChanges + ); + inventory.XPInfo.push({ + ItemType: "/Lotus/Powersuits/Excalibur/ExcaliburUmbra", + XP: 900_000 + }); - if (recipe.secretIngredientAction == "SIA_CREATE_KUBROW") { - const pet = inventory.KubrowPets.id(pendingRecipe.KubrowPet!)!; - if (pet.Details!.HatchDate!.getTime() > Date.now()) { - pet.Details!.HatchDate = new Date(); - } - let canSetActive = true; - for (const pet of inventory.KubrowPets) { - if (pet.Details!.Status == Status.StatusAvailable) { - canSetActive = false; - break; - } - } - pet.Details!.Status = canSetActive ? Status.StatusAvailable : Status.StatusStasis; - } else if (recipe.secretIngredientAction == "SIA_DISTILL_PRINT") { - const pet = inventory.KubrowPets.id(pendingRecipe.KubrowPet!)!; - addKubrowPetPrint(inventory, pet, InventoryChanges); - } else if (recipe.secretIngredientAction != "SIA_UNBRAND") { - if (recipe.resultType == "/Lotus/Powersuits/Excalibur/ExcaliburUmbra") { - // Quite the special case here... - // We don't just get Umbra, but also Skiajati and Umbra Mods. Both items are max rank, potatoed, and with the mods are pre-installed. - // Source: https://wiki.warframe.com/w/The_Sacrifice, https://wiki.warframe.com/w/Excalibur/Umbra, https://wiki.warframe.com/w/Skiajati - - const umbraModA = ( - await addItem( - inventory, - "/Lotus/Upgrades/Mods/Sets/Umbra/WarframeUmbraModA", - 1, - false, - undefined, - `{"lvl":5}` - ) - ).Upgrades![0]; - const umbraModB = ( - await addItem( - inventory, - "/Lotus/Upgrades/Mods/Sets/Umbra/WarframeUmbraModB", - 1, - false, - undefined, - `{"lvl":5}` - ) - ).Upgrades![0]; - const umbraModC = ( - await addItem( - inventory, - "/Lotus/Upgrades/Mods/Sets/Umbra/WarframeUmbraModC", - 1, - false, - undefined, - `{"lvl":5}` - ) - ).Upgrades![0]; - const sacrificeModA = ( - await addItem( - inventory, - "/Lotus/Upgrades/Mods/Sets/Sacrifice/MeleeSacrificeModA", - 1, - false, - undefined, - `{"lvl":5}` - ) - ).Upgrades![0]; - const sacrificeModB = ( - await addItem( - inventory, - "/Lotus/Upgrades/Mods/Sets/Sacrifice/MeleeSacrificeModB", - 1, - false, - undefined, - `{"lvl":5}` - ) - ).Upgrades![0]; - InventoryChanges.Upgrades ??= []; - InventoryChanges.Upgrades.push(umbraModA, umbraModB, umbraModC, sacrificeModA, sacrificeModB); - - await addPowerSuit( + addEquipment( + inventory, + "Melee", + "/Lotus/Weapons/Tenno/Melee/Swords/UmbraKatana/UmbraKatana", + { + Configs: [ + { Upgrades: ["", "", "", "", "", "", sacrificeModA.ItemId.$oid, sacrificeModB.ItemId.$oid] } + ], + XP: 450_000, + Features: EquipmentFeatures.DOUBLE_CAPACITY + }, + resp.InventoryChanges + ); + inventory.XPInfo.push({ + ItemType: "/Lotus/Weapons/Tenno/Melee/Swords/UmbraKatana/UmbraKatana", + XP: 450_000 + }); + } else { + combineInventoryChanges( + resp.InventoryChanges, + await addItem( inventory, - "/Lotus/Powersuits/Excalibur/ExcaliburUmbra", - { - Configs: [ - { - Upgrades: [ - "", - "", - "", - "", - "", - umbraModA.ItemId.$oid, - umbraModB.ItemId.$oid, - umbraModC.ItemId.$oid - ] - } - ], - XP: 900_000, - Features: EquipmentFeatures.DOUBLE_CAPACITY - }, - InventoryChanges - ); - inventory.XPInfo.push({ - ItemType: "/Lotus/Powersuits/Excalibur/ExcaliburUmbra", - XP: 900_000 - }); - - addEquipment( - inventory, - "Melee", - "/Lotus/Weapons/Tenno/Melee/Swords/UmbraKatana/UmbraKatana", - { - Configs: [ - { Upgrades: ["", "", "", "", "", "", sacrificeModA.ItemId.$oid, sacrificeModB.ItemId.$oid] } - ], - XP: 450_000, - Features: EquipmentFeatures.DOUBLE_CAPACITY - }, - InventoryChanges - ); - inventory.XPInfo.push({ - ItemType: "/Lotus/Weapons/Tenno/Melee/Swords/UmbraKatana/UmbraKatana", - XP: 450_000 - }); - } else { - InventoryChanges = { - ...InventoryChanges, - ...(await addItem( - inventory, - recipe.resultType, - recipe.num, - false, - undefined, - pendingRecipe.TargetFingerprint - )) - }; - } + recipe.resultType, + recipe.num, + false, + undefined, + pendingRecipe.TargetFingerprint + ) + ); } - if ( - inventory.claimingBlueprintRefundsIngredients && - recipe.secretIngredientAction != "SIA_CREATE_KUBROW" // Can't refund the egg - ) { - await refundRecipeIngredients(inventory, InventoryChanges, recipe, pendingRecipe); - } - await inventory.save(); - res.json({ InventoryChanges, BrandedSuits }); + } + if ( + inventory.claimingBlueprintRefundsIngredients && + recipe.secretIngredientAction != "SIA_CREATE_KUBROW" // Can't refund the egg + ) { + await refundRecipeIngredients(inventory, resp.InventoryChanges, recipe, pendingRecipe); } }; From 287acab8926d357017916a8962b9681de7487a39 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 01:30:19 -0700 Subject: [PATCH 08/22] chore: abort update and start scripts when .git folder is missing (#2702) In that case, updating is obviously not possible. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2702 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- UPDATE AND START SERVER.bat | 35 +++++++++++++++++++---------------- UPDATE AND START SERVER.sh | 35 ++++++++++++++++++----------------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/UPDATE AND START SERVER.bat b/UPDATE AND START SERVER.bat index 7f0bd170..ac8b2515 100644 --- a/UPDATE AND START SERVER.bat +++ b/UPDATE AND START SERVER.bat @@ -2,24 +2,27 @@ echo Updating SpaceNinjaServer... git fetch --prune -git stash -git checkout -f origin/main - -if exist static\data\0\ ( - echo Updating stripped assets... - cd static\data\0\ - git pull - cd ..\..\..\ -) - -echo Updating dependencies... -call npm i --omit=dev - -call npm run build if %errorlevel% == 0 ( - call npm run start - echo SpaceNinjaServer seems to have crashed. + git stash + git checkout -f origin/main + + if exist static\data\0\ ( + echo Updating stripped assets... + cd static\data\0\ + git pull + cd ..\..\..\ + ) + + echo Updating dependencies... + call npm i --omit=dev + + call npm run build + if %errorlevel% == 0 ( + call npm run start + echo SpaceNinjaServer seems to have crashed. + ) ) + :a pause > nul goto a diff --git a/UPDATE AND START SERVER.sh b/UPDATE AND START SERVER.sh index e57c8061..fd77f973 100755 --- a/UPDATE AND START SERVER.sh +++ b/UPDATE AND START SERVER.sh @@ -2,22 +2,23 @@ echo "Updating SpaceNinjaServer..." git fetch --prune -git stash -git checkout -f origin/main - -if [ -d "static/data/0/" ]; then - echo "Updating stripped assets..." - cd static/data/0/ - git pull - cd ../../../ -fi - -echo "Updating dependencies..." -npm i --omit=dev - -npm run build if [ $? -eq 0 ]; then - npm run start - echo "SpaceNinjaServer seems to have crashed." -fi + git stash + git checkout -f origin/main + if [ -d "static/data/0/" ]; then + echo "Updating stripped assets..." + cd static/data/0/ + git pull + cd ../../../ + fi + + echo "Updating dependencies..." + npm i --omit=dev + + npm run build + if [ $? -eq 0 ]; then + npm run start + echo "SpaceNinjaServer seems to have crashed." + fi +fi From c9cc1fa089ea1f29bfeca7ff5a1fbc1124cba298 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 01:30:36 -0700 Subject: [PATCH 09/22] chore: define node version constraints (#2703) `>=20.18.1` is required for `npm i && npm run build && npm run start` to succeed. `npm run raw` would require `>=22.7.0`. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2703 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- package.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29b60ea1..ff9785bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v4.0.2 with: - node-version: ">=20.6.0" + node-version: ">=20.18.1" - run: npm ci - run: cp config-vanilla.json config.json - run: npm run verify diff --git a/package.json b/package.json index 0e55719c..02946d3b 100644 --- a/package.json +++ b/package.json @@ -57,5 +57,8 @@ "eslint-plugin-prettier": "^5.2.5", "prettier": "^3.5.3", "tree-kill": "^1.2.2" + }, + "engines": { + "node": ">=20.18.1" } } From 1ade801e7c3bf3415499e03a170bd2f90f3417ee Mon Sep 17 00:00:00 2001 From: AlexisinGit Date: Wed, 27 Aug 2025 13:05:49 -0700 Subject: [PATCH 10/22] fix: 5 disinfection progress per mission until 95 for Technocyte Coda (#2705) Co-authored-by: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2705 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AlexisinGit Co-committed-by: AlexisinGit --- src/services/missionInventoryUpdateService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 74948a95..0ab878b2 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -1417,9 +1417,12 @@ export const addMissionRewards = async ( if (inventory.Nemesis.Faction == "FC_INFESTATION") { inventory.Nemesis.MissionCount += 1; + inventory.Nemesis.HenchmenKilled = Math.min(inventory.Nemesis.HenchmenKilled + 5, 95); // 5 progress per mission until 95 inventoryChanges.Nemesis.MissionCount ??= 0; inventoryChanges.Nemesis.MissionCount += 1; + inventoryChanges.Nemesis.HenchmenKilled ??= 0; + inventoryChanges.Nemesis.HenchmenKilled = inventory.Nemesis.HenchmenKilled; } inventoryChanges.Nemesis.InfNodes = inventory.Nemesis.InfNodes; From a9a197b00564e47695943e18a3efe1282c873d44 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:06:01 -0700 Subject: [PATCH 11/22] chore: add some missing entries to .dockerignore (#2706) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2706 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- .dockerignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.dockerignore b/.dockerignore index ca89b6ae..a9a423e6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,3 +3,6 @@ Dockerfile* .* docker-data/ +node_modules/ +static/data/ +logs/ From 5396eefe75d9b5c36155fb87af96aeacdfe9cba1 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:06:18 -0700 Subject: [PATCH 12/22] chore: move dependencies only required for build to 'optional' (#2707) This is a bit of a misnomer because npm installs them just like dev deps unless an appropriate --omit flag is added. Anyway, these deps are ~55 MB, so being able to omit that chunk for raw running might be good. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2707 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- package-lock.json | 41 ++++++++++++++++++++++++++++++----------- package.json | 14 ++++++++------ 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51a7aa3a..d3e201dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,11 +9,6 @@ "version": "0.1.0", "license": "GNU", "dependencies": { - "@types/express": "^5", - "@types/morgan": "^1.9.9", - "@types/websocket": "^1.0.10", - "@types/ws": "^8.18.1", - "@typescript/native-preview": "^7.0.0-dev.20250625.1", "chokidar": "^4.0.3", "crc-32": "^1.2.2", "express": "^5", @@ -21,7 +16,6 @@ "mongoose": "^8.11.0", "morgan": "^1.10.0", "ncp": "^2.0.0", - "typescript": "^5.7", "undici": "^7.10.0", "warframe-public-export-plus": "^0.5.83", "warframe-riven-info": "^0.1.2", @@ -38,6 +32,14 @@ "eslint-plugin-prettier": "^5.2.5", "prettier": "^3.5.3", "tree-kill": "^1.2.2" + }, + "optionalDependencies": { + "@types/express": "^5", + "@types/morgan": "^1.9.9", + "@types/websocket": "^1.0.10", + "@types/ws": "^8.18.1", + "@typescript/native-preview": "^7.0.0-dev.20250625.1", + "typescript": "^5.7" } }, "node_modules/@colors/colors": { @@ -349,6 +351,7 @@ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", "license": "MIT", + "optional": true, "dependencies": { "@types/connect": "*", "@types/node": "*" @@ -359,6 +362,7 @@ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "license": "MIT", + "optional": true, "dependencies": { "@types/node": "*" } @@ -368,6 +372,7 @@ "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.3.tgz", "integrity": "sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==", "license": "MIT", + "optional": true, "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^5.0.0", @@ -379,6 +384,7 @@ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz", "integrity": "sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==", "license": "MIT", + "optional": true, "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -390,7 +396,8 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/@types/json5": { "version": "0.0.29", @@ -403,13 +410,15 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/@types/morgan": { "version": "1.9.10", "resolved": "https://registry.npmjs.org/@types/morgan/-/morgan-1.9.10.tgz", "integrity": "sha512-sS4A1zheMvsADRVfT0lYbJ4S9lmsey8Zo2F7cnbYjWHP67Q0AwMYuuzLlkIM2N8gAbb9cubhIVFwcIN2XyYCkA==", "license": "MIT", + "optional": true, "dependencies": { "@types/node": "*" } @@ -419,6 +428,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==", "license": "MIT", + "optional": true, "dependencies": { "undici-types": "~7.10.0" } @@ -427,19 +437,22 @@ "version": "6.14.0", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/@types/range-parser": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/@types/send": { "version": "0.17.5", "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", "license": "MIT", + "optional": true, "dependencies": { "@types/mime": "^1", "@types/node": "*" @@ -450,6 +463,7 @@ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", "license": "MIT", + "optional": true, "dependencies": { "@types/http-errors": "*", "@types/node": "*", @@ -473,6 +487,7 @@ "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.10.tgz", "integrity": "sha512-svjGZvPB7EzuYS94cI7a+qhwgGU1y89wUgjT6E2wVUfmAGIvRfT7obBvRtnhXCSsoMdlG4gBFGE7MfkIXZLoww==", "license": "MIT", + "optional": true, "dependencies": { "@types/node": "*" } @@ -491,6 +506,7 @@ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", "license": "MIT", + "optional": true, "dependencies": { "@types/node": "*" } @@ -735,6 +751,7 @@ "resolved": "https://registry.npmjs.org/@typescript/native-preview/-/native-preview-7.0.0-dev.20250826.1.tgz", "integrity": "sha512-+NuzOfk/lu6pLYSCio+R7uzJ9pfOasc1fshxVmLp6wgcB8yuUYYvBaT7CoHapUnNBYZXkJ9u0UOECnq3dbzgSQ==", "license": "Apache-2.0", + "optional": true, "bin": { "tsgo": "bin/tsgo.js" }, @@ -5397,6 +5414,7 @@ "version": "5.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "devOptional": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -5438,7 +5456,8 @@ "version": "7.10.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/unpipe": { "version": "1.0.0", diff --git a/package.json b/package.json index 02946d3b..c4bbee86 100644 --- a/package.json +++ b/package.json @@ -28,11 +28,6 @@ "license": "GNU", "type": "module", "dependencies": { - "@types/express": "^5", - "@types/morgan": "^1.9.9", - "@types/websocket": "^1.0.10", - "@types/ws": "^8.18.1", - "@typescript/native-preview": "^7.0.0-dev.20250625.1", "chokidar": "^4.0.3", "crc-32": "^1.2.2", "express": "^5", @@ -40,7 +35,6 @@ "mongoose": "^8.11.0", "morgan": "^1.10.0", "ncp": "^2.0.0", - "typescript": "^5.7", "undici": "^7.10.0", "warframe-public-export-plus": "^0.5.83", "warframe-riven-info": "^0.1.2", @@ -48,6 +42,14 @@ "winston-daily-rotate-file": "^5.0.0", "ws": "^8.18.2" }, + "optionalDependencies": { + "@types/express": "^5", + "@types/morgan": "^1.9.9", + "@types/websocket": "^1.0.10", + "@types/ws": "^8.18.1", + "@typescript/native-preview": "^7.0.0-dev.20250625.1", + "typescript": "^5.7" + }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^8.28.0", "@typescript-eslint/parser": "^8.28.0", From 0d791ad145b692358cf9b90d36f5e8c59145c6f2 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:06:28 -0700 Subject: [PATCH 13/22] fix: incorrect ordering of relicQualitySuffixes (#2708) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2708 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/controllers/custom/getItemListsController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/custom/getItemListsController.ts b/src/controllers/custom/getItemListsController.ts index 5c96dfbb..dc2d6c4f 100644 --- a/src/controllers/custom/getItemListsController.ts +++ b/src/controllers/custom/getItemListsController.ts @@ -64,9 +64,9 @@ interface ItemLists { const relicQualitySuffixes: Record = { VPQ_BRONZE: "", - VPQ_SILVER: " [Flawless]", - VPQ_GOLD: " [Radiant]", - VPQ_PLATINUM: " [Exceptional]" + VPQ_SILVER: " [Exceptional]", + VPQ_GOLD: " [Flawless]", + VPQ_PLATINUM: " [Radiant]" }; /*const toTitleCase = (str: string): string => { From 0bf142ed5042981b3fecbdb3fb3483e6dca2cb26 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 13:06:36 -0700 Subject: [PATCH 14/22] fix: view profile on U39.1+ (#2709) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2709 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/app.ts | 5 ----- src/controllers/api/loginController.ts | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app.ts b/src/app.ts index b9cca576..971fe210 100644 --- a/src/app.ts +++ b/src/app.ts @@ -13,8 +13,6 @@ import { payRouter } from "./routes/pay.ts"; import { statsRouter } from "./routes/stats.ts"; import { webuiRouter } from "./routes/webui.ts"; -import { worldStateController } from "./controllers/dynamic/worldStateController.ts"; - const app = express(); app.use((req, _res, next) => { @@ -47,9 +45,6 @@ app.use("/pay", payRouter); app.use("/stats", statsRouter); app.use("/", webuiRouter); -// U39.1+ gets worldState from that location -app.get("/worldState.php", worldStateController); - app.use(unknownEndpointHandler); app.use(errorHandler); diff --git a/src/controllers/api/loginController.ts b/src/controllers/api/loginController.ts index 20c33d7a..f3c6548a 100644 --- a/src/controllers/api/loginController.ts +++ b/src/controllers/api/loginController.ts @@ -140,7 +140,11 @@ const createLoginResponse = ( resp.MatchmakingBuildId = buildConfig.matchmakingBuildId; } if (version_compare(buildLabel, "2023.04.25.23.40") >= 0) { - resp.platformCDNs = [`${myUrlBase}/`]; + if (version_compare(buildLabel, "2025.08.26.09.49") >= 0) { + resp.platformCDNs = [`${myUrlBase}/dynamic/`]; + } else { + resp.platformCDNs = [`${myUrlBase}/`]; + } } return resp; }; From c52f7dcedc3da496e7431430f18925dcc5269406 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 22:31:22 +0200 Subject: [PATCH 15/22] fixup: remove paths from tsconfig --- tsconfig.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 6bef1f6b..07f9feaf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -105,9 +105,6 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */, - "paths": { - "@/*": ["./*"] - } + "skipLibCheck": true /* Skip type checking all .d.ts files. */ } } From f13de810e509ccd4431b25c1d12a1500ef91eb5f Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 22:33:55 +0200 Subject: [PATCH 16/22] fixup: use eslint:fix instead of prettier in fix script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c4bbee86..65abb6ae 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "prettier": "prettier --write .", "update-translations": "cd scripts && node update-translations.cjs", "fix-imports": "cd scripts && node fix-imports.cjs", - "fix": "npm run update-translations && npm run fix-imports && npm run prettier" + "fix": "npm run update-translations && npm run fix-imports && npm run lint:fix" }, "license": "GNU", "type": "module", From 6771a129f53bfaf76ba89fa1365529b0ebd9bdea Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 22:35:23 +0200 Subject: [PATCH 17/22] fixup: remove fix-imports --- .github/workflows/build.yml | 1 - package.json | 3 +- scripts/fix-imports.cjs | 75 ------------------------------------- 3 files changed, 1 insertion(+), 78 deletions(-) delete mode 100644 scripts/fix-imports.cjs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff9785bd..10fe1c52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,6 @@ jobs: - run: npm run lint:ci - run: npm run prettier - run: npm run update-translations - - run: npm run fix-imports - name: Fail if there are uncommitted changes run: | if [[ -n "$(git status --porcelain)" ]]; then diff --git a/package.json b/package.json index 65abb6ae..1659e0aa 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,7 @@ "lint:fix": "eslint --fix --ext .ts .", "prettier": "prettier --write .", "update-translations": "cd scripts && node update-translations.cjs", - "fix-imports": "cd scripts && node fix-imports.cjs", - "fix": "npm run update-translations && npm run fix-imports && npm run lint:fix" + "fix": "npm run update-translations && npm run lint:fix" }, "license": "GNU", "type": "module", diff --git a/scripts/fix-imports.cjs b/scripts/fix-imports.cjs deleted file mode 100644 index 7859ba44..00000000 --- a/scripts/fix-imports.cjs +++ /dev/null @@ -1,75 +0,0 @@ -/* eslint-disable */ -const fs = require("fs"); -const path = require("path"); - -const root = path.join(process.cwd(), ".."); - -function listFiles(dir) { - const entries = fs.readdirSync(dir, { withFileTypes: true }); - let results = []; - for (const entry of entries) { - const fullPath = path.join(dir, entry.name); - if (entry.isDirectory()) { - results = results.concat(listFiles(fullPath)); - } else { - results.push(fullPath); - } - } - return results; -} - -const files = listFiles(path.join(root, "src")); - -for (const file of files) { - let content; - try { - content = fs.readFileSync(file, "utf8"); - } catch (e) { - continue; - } - const dir = path.dirname(file); - const fixedContent = content.replaceAll(/from "([^"]+)";/g, (sub, importPath) => { - if (importPath.startsWith("@/") || importPath.startsWith(".")) { - const base = importPath.startsWith("@/") - ? path.join(root, importPath.slice(2)) - : path.resolve(dir, importPath); - let target = base; - - if (fs.existsSync(target)) { - const stat = fs.statSync(target); - if (stat.isDirectory()) { - if (fs.existsSync(path.join(target, "index.ts"))) { - target = path.join(target, "index.ts"); - } else { - return sub; - } - } else { - const ext = path.extname(target); - if (!ext) { - target += ".ts"; - } - } - } else if (fs.existsSync(target + ".ts")) { - target += ".ts"; - } else if (fs.existsSync(path.join(target, "index.ts"))) { - target = path.join(target, "index.ts"); - } else { - return sub; - } - - let relative = path.relative(dir, target).replace(/\\/g, "/"); - if (!path.extname(relative)) { - relative += ".ts"; - } - if (!relative.startsWith(".")) { - relative = "./" + relative; - } - console.log(`${importPath} -> ${relative}`); - return sub.split(importPath).join(relative); - } - return sub; - }); - if (content != fixedContent) { - fs.writeFileSync(file, fixedContent, "utf8"); - } -} From 1439fdc0830d6ffe72e2f0eaab89ea00e187e243 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 27 Aug 2025 22:59:03 +0200 Subject: [PATCH 18/22] chore(vscode): set typescript.preferences.preferTypeOnlyAutoImports --- .vscode/settings.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..e3cf3d5a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "typescript.preferences.preferTypeOnlyAutoImports": true +} From dc401de1e950baf320913ba5180a2192034390ea Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 28 Aug 2025 05:50:06 -0700 Subject: [PATCH 19/22] chore: use raw running in docker image (#2711) We can rely on having up-to-date Node.js here, and reducing the size by like ~55 MiB seems decent. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2711 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- Dockerfile | 3 +-- docker-entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45f00f80..d4d7b1a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,7 @@ RUN apk add --no-cache bash jq COPY . /app WORKDIR /app -RUN npm i --omit=dev -RUN npm run build +RUN npm i --omit=dev --omit=optional RUN date '+%d %B %Y' > BUILD_DATE ENTRYPOINT ["/app/docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 27abf98d..e67508c2 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -5,4 +5,4 @@ if [ ! -f conf/config.json ]; then jq --arg value "mongodb://openwfagent:spaceninjaserver@mongodb:27017/" '.mongodbUrl = $value' /app/config-vanilla.json > /app/conf/config.json fi -exec npm run start -- --configPath conf/config.json +exec npm run raw -- --configPath conf/config.json From 4b2b184b8fefc25ecdd969826132953b111c5ac8 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 28 Aug 2025 05:50:13 -0700 Subject: [PATCH 20/22] feat: additional operator appearance slots (#2712) Closes #2710 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2712 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/controllers/api/upgradeOperatorController.ts | 16 ++++++++++++++++ src/models/inventoryModels/inventoryModel.ts | 1 + src/routes/api.ts | 2 ++ src/types/inventoryTypes/inventoryTypes.ts | 1 + 4 files changed, 20 insertions(+) create mode 100644 src/controllers/api/upgradeOperatorController.ts diff --git a/src/controllers/api/upgradeOperatorController.ts b/src/controllers/api/upgradeOperatorController.ts new file mode 100644 index 00000000..4aedef6f --- /dev/null +++ b/src/controllers/api/upgradeOperatorController.ts @@ -0,0 +1,16 @@ +import { getInventory, updateCurrency } from "../../services/inventoryService.ts"; +import { getAccountIdForRequest } from "../../services/loginService.ts"; +import type { RequestHandler } from "express"; + +export const upgradeOperatorController: RequestHandler = async (req, res) => { + const accountId = await getAccountIdForRequest(req); + const inventory = await getInventory( + accountId, + "OperatorCustomizationSlotPurchases PremiumCredits PremiumCreditsFree" + ); + inventory.OperatorCustomizationSlotPurchases ??= 0; + inventory.OperatorCustomizationSlotPurchases += 1; + const inventoryChanges = updateCurrency(inventory, 10, true); + await inventory.save(); + res.json({ InventoryChanges: inventoryChanges }); +}; diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index 0a39b701..ac17359e 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -1564,6 +1564,7 @@ const inventorySchema = new Schema( OperatorLoadOuts: [operatorConfigSchema], //Drifter AdultOperatorLoadOuts: [operatorConfigSchema], + OperatorCustomizationSlotPurchases: Number, // Kahl KahlLoadOuts: [operatorConfigSchema], diff --git a/src/routes/api.ts b/src/routes/api.ts index 44d3cd1e..a9c84b84 100644 --- a/src/routes/api.ts +++ b/src/routes/api.ts @@ -162,6 +162,7 @@ import { updateQuestController } from "../controllers/api/updateQuestController. import { updateSessionGetController, updateSessionPostController } from "../controllers/api/updateSessionController.ts"; import { updateSongChallengeController } from "../controllers/api/updateSongChallengeController.ts"; import { updateThemeController } from "../controllers/api/updateThemeController.ts"; +import { upgradeOperatorController } from "../controllers/api/upgradeOperatorController.ts"; import { upgradesController } from "../controllers/api/upgradesController.ts"; import { valenceSwapController } from "../controllers/api/valenceSwapController.ts"; import { wishlistController } from "../controllers/api/wishlistController.ts"; @@ -229,6 +230,7 @@ apiRouter.get("/startLibraryPersonalTarget.php", startLibraryPersonalTargetContr apiRouter.get("/surveys.php", surveysController); apiRouter.get("/trading.php", tradingController); apiRouter.get("/updateSession.php", updateSessionGetController); +apiRouter.get("/upgradeOperator.php", upgradeOperatorController); // post apiRouter.post("/abortDojoComponent.php", abortDojoComponentController); diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index 89f493f4..ffa0d533 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -374,6 +374,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu CrewMembers: ICrewMemberClient[]; LotusCustomization?: ILotusCustomization; UseAdultOperatorLoadout?: boolean; + OperatorCustomizationSlotPurchases?: number; NemesisAbandonedRewards: string[]; LastInventorySync?: IOid; NextRefill?: IMongoDate; From 5a2fa2c2c38656f5be503dcccd8b5a3023947263 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 28 Aug 2025 05:50:21 -0700 Subject: [PATCH 21/22] chore: move a few more cheat toggles to be per-account (#2713) Re #2361 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2713 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- config-vanilla.json | 3 - src/controllers/api/inventoryController.ts | 2 +- src/controllers/api/loginRewardsController.ts | 66 +++++++++---------- src/helpers/relicHelper.ts | 6 +- src/models/inventoryModels/inventoryModel.ts | 6 ++ src/services/configService.ts | 14 ++-- src/services/missionInventoryUpdateService.ts | 2 +- src/types/inventoryTypes/inventoryTypes.ts | 6 ++ static/webui/index.html | 56 ++++++++-------- 9 files changed, 85 insertions(+), 76 deletions(-) diff --git a/config-vanilla.json b/config-vanilla.json index 2d96af5f..d13eb84e 100644 --- a/config-vanilla.json +++ b/config-vanilla.json @@ -11,7 +11,6 @@ "administratorNames": [], "autoCreateAccount": true, "skipTutorial": false, - "skipAllDialogue": false, "unlockAllScans": false, "unlockAllShipFeatures": false, "unlockAllShipDecorations": false, @@ -27,9 +26,7 @@ "noDojoResearchCosts": false, "noDojoResearchTime": false, "fastClanAscension": false, - "missionsCanGiveAllRelics": false, "unlockAllSimarisResearchEntries": false, - "disableDailyTribute": false, "spoofMasteryRank": -1, "relicRewardItemCountMultiplier": 1, "nightwaveStandingMultiplier": 1, diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index fb935c38..5a508f04 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -306,7 +306,7 @@ export const getInventoryResponse = async ( inventoryResponse.PrimeTokens = 999999999; } - if (config.skipAllDialogue) { + if (inventory.skipAllDialogue) { inventoryResponse.TauntHistory = [ { node: "TreasureTutorial", diff --git a/src/controllers/api/loginRewardsController.ts b/src/controllers/api/loginRewardsController.ts index 3145a462..d412a5ae 100644 --- a/src/controllers/api/loginRewardsController.ts +++ b/src/controllers/api/loginRewardsController.ts @@ -8,7 +8,6 @@ import { setAccountGotLoginRewardToday } from "../../services/loginRewardService.ts"; import { getInventory } from "../../services/inventoryService.ts"; -import { config } from "../../services/configService.ts"; import { sendWsBroadcastTo } from "../../services/wsService.ts"; export const loginRewardsController: RequestHandler = async (req, res) => { @@ -17,41 +16,42 @@ export const loginRewardsController: RequestHandler = async (req, res) => { const isMilestoneDay = account.LoginDays == 5 || account.LoginDays % 50 == 0; const nextMilestoneDay = account.LoginDays < 5 ? 5 : (Math.trunc(account.LoginDays / 50) + 1) * 50; - if (today == account.LastLoginRewardDate || config.disableDailyTribute) { - res.json({ - DailyTributeInfo: { - IsMilestoneDay: isMilestoneDay, - IsChooseRewardSet: isLoginRewardAChoice(account), - LoginDays: account.LoginDays, - NextMilestoneReward: "", - NextMilestoneDay: nextMilestoneDay - } - } satisfies ILoginRewardsReponse); - return; - } + if (today != account.LastLoginRewardDate) { + const inventory = await getInventory(account._id.toString()); + if (!inventory.disableDailyTribute) { + const randomRewards = getRandomLoginRewards(account, inventory); + const response: ILoginRewardsReponse = { + DailyTributeInfo: { + Rewards: randomRewards, + IsMilestoneDay: isMilestoneDay, + IsChooseRewardSet: randomRewards.length != 1, + LoginDays: account.LoginDays, + NextMilestoneReward: "", + NextMilestoneDay: nextMilestoneDay, + HasChosenReward: false + }, + LastLoginRewardDate: today + }; + if (!isMilestoneDay && randomRewards.length == 1) { + response.DailyTributeInfo.HasChosenReward = true; + response.DailyTributeInfo.ChosenReward = randomRewards[0]; + response.DailyTributeInfo.NewInventory = await claimLoginReward(inventory, randomRewards[0]); + setAccountGotLoginRewardToday(account); + await Promise.all([inventory.save(), account.save()]); - const inventory = await getInventory(account._id.toString()); - const randomRewards = getRandomLoginRewards(account, inventory); - const response: ILoginRewardsReponse = { + sendWsBroadcastTo(account._id.toString(), { update_inventory: true }); + } + res.json(response); + return; + } + } + res.json({ DailyTributeInfo: { - Rewards: randomRewards, IsMilestoneDay: isMilestoneDay, - IsChooseRewardSet: randomRewards.length != 1, + IsChooseRewardSet: isLoginRewardAChoice(account), LoginDays: account.LoginDays, NextMilestoneReward: "", - NextMilestoneDay: nextMilestoneDay, - HasChosenReward: false - }, - LastLoginRewardDate: today - }; - if (!isMilestoneDay && randomRewards.length == 1) { - response.DailyTributeInfo.HasChosenReward = true; - response.DailyTributeInfo.ChosenReward = randomRewards[0]; - response.DailyTributeInfo.NewInventory = await claimLoginReward(inventory, randomRewards[0]); - setAccountGotLoginRewardToday(account); - await Promise.all([inventory.save(), account.save()]); - - sendWsBroadcastTo(account._id.toString(), { update_inventory: true }); - } - res.json(response); + NextMilestoneDay: nextMilestoneDay + } + } satisfies ILoginRewardsReponse); }; diff --git a/src/helpers/relicHelper.ts b/src/helpers/relicHelper.ts index 1fae78e1..964e43e2 100644 --- a/src/helpers/relicHelper.ts +++ b/src/helpers/relicHelper.ts @@ -17,11 +17,11 @@ export const crackRelic = async ( ): Promise => { const relic = ExportRelics[participant.VoidProjection]; let weights = refinementToWeights[relic.quality]; - if (relic.quality == "VPQ_SILVER" && config.exceptionalRelicsAlwaysGiveBronzeReward) { + if (relic.quality == "VPQ_SILVER" && inventory.exceptionalRelicsAlwaysGiveBronzeReward) { weights = { COMMON: 1, UNCOMMON: 0, RARE: 0, LEGENDARY: 0 }; - } else if (relic.quality == "VPQ_GOLD" && config.flawlessRelicsAlwaysGiveSilverReward) { + } else if (relic.quality == "VPQ_GOLD" && inventory.flawlessRelicsAlwaysGiveSilverReward) { weights = { COMMON: 0, UNCOMMON: 1, RARE: 0, LEGENDARY: 0 }; - } else if (relic.quality == "VPQ_PLATINUM" && config.radiantRelicsAlwaysGiveGoldReward) { + } else if (relic.quality == "VPQ_PLATINUM" && inventory.radiantRelicsAlwaysGiveGoldReward) { weights = { COMMON: 0, UNCOMMON: 0, RARE: 1, LEGENDARY: 0 }; } logger.debug(`opening a relic of quality ${relic.quality}; rarity weights are`, weights); diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index ac17359e..96b0f28d 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -1428,6 +1428,7 @@ const inventorySchema = new Schema( accountOwnerId: Schema.Types.ObjectId, // SNS account cheats + skipAllDialogue: Boolean, dontSubtractPurchaseCreditCost: Boolean, dontSubtractPurchasePlatinumCost: Boolean, dontSubtractPurchaseItemCost: Boolean, @@ -1455,6 +1456,11 @@ const inventorySchema = new Schema( claimingBlueprintRefundsIngredients: Boolean, instantResourceExtractorDrones: Boolean, noResourceExtractorDronesDamage: Boolean, + missionsCanGiveAllRelics: Boolean, + exceptionalRelicsAlwaysGiveBronzeReward: Boolean, + flawlessRelicsAlwaysGiveSilverReward: Boolean, + radiantRelicsAlwaysGiveGoldReward: Boolean, + disableDailyTribute: Boolean, SubscribedToEmails: { type: Number, default: 0 }, SubscribedToEmailsPersonalized: { type: Number, default: 0 }, diff --git a/src/services/configService.ts b/src/services/configService.ts index 75953730..a75c5f2c 100644 --- a/src/services/configService.ts +++ b/src/services/configService.ts @@ -18,7 +18,6 @@ export interface IConfig extends IConfigRemovedOptions { administratorNames?: string[]; autoCreateAccount?: boolean; skipTutorial?: boolean; - skipAllDialogue?: boolean; unlockAllScans?: boolean; unlockAllShipFeatures?: boolean; unlockAllShipDecorations?: boolean; @@ -35,12 +34,7 @@ export interface IConfig extends IConfigRemovedOptions { noDojoResearchCosts?: boolean; noDojoResearchTime?: boolean; fastClanAscension?: boolean; - missionsCanGiveAllRelics?: boolean; - exceptionalRelicsAlwaysGiveBronzeReward?: boolean; - flawlessRelicsAlwaysGiveSilverReward?: boolean; - radiantRelicsAlwaysGiveGoldReward?: boolean; unlockAllSimarisResearchEntries?: boolean; - disableDailyTribute?: boolean; spoofMasteryRank?: number; relicRewardItemCountMultiplier?: number; nightwaveStandingMultiplier?: number; @@ -94,6 +88,7 @@ export interface IConfig extends IConfigRemovedOptions { } export const configRemovedOptionsKeys = [ + "skipAllDialogue", "infiniteCredits", "infinitePlatinum", "infiniteEndo", @@ -122,7 +117,12 @@ export const configRemovedOptionsKeys = [ "instantResourceExtractorDrones", "noResourceExtractorDronesDamage", "baroAlwaysAvailable", - "baroFullyStocked" + "baroFullyStocked", + "missionsCanGiveAllRelics", + "exceptionalRelicsAlwaysGiveBronzeReward", + "flawlessRelicsAlwaysGiveSilverReward", + "radiantRelicsAlwaysGiveGoldReward", + "disableDailyTribute" ] as const; type IConfigRemovedOptions = { diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 0ab878b2..9a1df3cd 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -2197,7 +2197,7 @@ function getRandomMissionDrops( } } - if (config.missionsCanGiveAllRelics) { + if (inventory.missionsCanGiveAllRelics) { for (const drop of drops) { const itemType = fromStoreItem(drop.StoreItem); if (itemType in ExportRelics) { diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index ffa0d533..115b80c1 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -21,6 +21,7 @@ export type InventoryDatabaseEquipment = { // Fields specific to SNS export interface IAccountCheats { + skipAllDialogue?: boolean; dontSubtractPurchaseCreditCost?: boolean; dontSubtractPurchasePlatinumCost?: boolean; dontSubtractPurchaseItemCost?: boolean; @@ -48,6 +49,11 @@ export interface IAccountCheats { claimingBlueprintRefundsIngredients?: boolean; instantResourceExtractorDrones?: boolean; noResourceExtractorDronesDamage?: boolean; + missionsCanGiveAllRelics?: boolean; + exceptionalRelicsAlwaysGiveBronzeReward?: boolean; + flawlessRelicsAlwaysGiveSilverReward?: boolean; + radiantRelicsAlwaysGiveGoldReward?: boolean; + disableDailyTribute?: boolean; } export interface IInventoryDatabase diff --git a/static/webui/index.html b/static/webui/index.html index 543ffaf9..ef74222b 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -647,6 +647,10 @@
+
+ + +
@@ -754,6 +758,30 @@
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
@@ -786,10 +814,6 @@
-
- - -
@@ -854,30 +878,6 @@
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
From a2171c80a5f21c889a025b5a1441fab3d2ae3c2b Mon Sep 17 00:00:00 2001 From: AlexisinGit Date: Thu, 28 Aug 2025 05:50:28 -0700 Subject: [PATCH 22/22] fix: CrewShipFusion bug with SubroutineIndex (#2714) Crewship fusion didn't agree with player's choice. Expected results: ![image.png](/attachments/a61c96c7-1624-4dd4-9e4c-c6199d5af95a) What I actually get: ![image.png](/attachments/cf58aed4-18d9-4d97-8894-6c53762f366d) ``` export interface ICrewShipComponentFingerprint extends IInnateDamageFingerprint { SubroutineIndex?: number; } ``` The interface already demand SubroutineIndex to exist, so it would be unnecessary to check. Meanwhile, inferiorFingerprint.SubroutineIndex could be 0, 1, 2... and might be handled incorrectly as true/ false. Co-authored-by: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2714 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AlexisinGit Co-committed-by: AlexisinGit --- src/controllers/api/crewShipFusionController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/api/crewShipFusionController.ts b/src/controllers/api/crewShipFusionController.ts index c0981f4f..a7b697c3 100644 --- a/src/controllers/api/crewShipFusionController.ts +++ b/src/controllers/api/crewShipFusionController.ts @@ -81,7 +81,7 @@ export const crewShipFusionController: RequestHandler = async (req, res) => { const newFval = (newPerc - rangeA[0]) / (rangeA[1] - rangeA[0]); buffA.Value = Math.trunc(newFval * 0x3fffffff); } - if (inferiorFingerprint.SubroutineIndex) { + if (inferiorFingerprint.SubroutineIndex !== undefined) { const useSuperiorSubroutine = tierA < tierB ? !payload.UseSubroutineA : payload.UseSubroutineA; if (!useSuperiorSubroutine) { fingerprint.SubroutineIndex = inferiorFingerprint.SubroutineIndex;