forked from OpenWF/SpaceNinjaServer
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			main
			...
			level-key-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 324e12303a | 
@ -3,6 +3,3 @@
 | 
			
		||||
Dockerfile*
 | 
			
		||||
.*
 | 
			
		||||
docker-data/
 | 
			
		||||
node_modules/
 | 
			
		||||
static/data/
 | 
			
		||||
logs/
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,6 @@
 | 
			
		||||
        "node": true
 | 
			
		||||
    },
 | 
			
		||||
    "rules": {
 | 
			
		||||
        "@typescript-eslint/consistent-type-imports": "error",
 | 
			
		||||
        "@typescript-eslint/explicit-function-return-type": "error",
 | 
			
		||||
        "@typescript-eslint/restrict-template-expressions": "error",
 | 
			
		||||
        "@typescript-eslint/restrict-plus-operands": "error",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -12,13 +12,14 @@ jobs:
 | 
			
		||||
            - name: Setup Node.js environment
 | 
			
		||||
              uses: actions/setup-node@v4.0.2
 | 
			
		||||
              with:
 | 
			
		||||
                  node-version: ">=20.18.1"
 | 
			
		||||
                  node-version: ">=20.6.0"
 | 
			
		||||
            - run: npm ci
 | 
			
		||||
            - run: cp config-vanilla.json config.json
 | 
			
		||||
            - run: npm run verify
 | 
			
		||||
            - 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
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "typescript.preferences.preferTypeOnlyAutoImports": true
 | 
			
		||||
}
 | 
			
		||||
@ -5,7 +5,8 @@ RUN apk add --no-cache bash jq
 | 
			
		||||
COPY . /app
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
RUN npm i --omit=dev --omit=optional
 | 
			
		||||
RUN npm i --omit=dev
 | 
			
		||||
RUN npm run build
 | 
			
		||||
RUN date '+%d %B %Y' > BUILD_DATE
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
 | 
			
		||||
 | 
			
		||||
@ -2,27 +2,24 @@
 | 
			
		||||
 | 
			
		||||
echo Updating SpaceNinjaServer...
 | 
			
		||||
git fetch --prune
 | 
			
		||||
if %errorlevel% == 0 (
 | 
			
		||||
	git stash
 | 
			
		||||
	git checkout -f origin/main
 | 
			
		||||
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.
 | 
			
		||||
	)
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
@ -2,23 +2,22 @@
 | 
			
		||||
 | 
			
		||||
echo "Updating SpaceNinjaServer..."
 | 
			
		||||
git fetch --prune
 | 
			
		||||
if [ $? -eq 0 ]; then
 | 
			
		||||
    git stash
 | 
			
		||||
    git checkout -f origin/main
 | 
			
		||||
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
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -11,14 +11,39 @@
 | 
			
		||||
  "administratorNames": [],
 | 
			
		||||
  "autoCreateAccount": true,
 | 
			
		||||
  "skipTutorial": false,
 | 
			
		||||
  "skipAllDialogue": false,
 | 
			
		||||
  "unlockAllScans": false,
 | 
			
		||||
  "claimingBlueprintRefundsIngredients": false,
 | 
			
		||||
  "dontSubtractPurchaseCreditCost": false,
 | 
			
		||||
  "dontSubtractPurchasePlatinumCost": false,
 | 
			
		||||
  "dontSubtractPurchaseItemCost": false,
 | 
			
		||||
  "dontSubtractPurchaseStandingCost": false,
 | 
			
		||||
  "dontSubtractVoidTraces": false,
 | 
			
		||||
  "dontSubtractConsumables": false,
 | 
			
		||||
  "unlockAllShipFeatures": false,
 | 
			
		||||
  "unlockAllShipDecorations": false,
 | 
			
		||||
  "unlockAllFlavourItems": false,
 | 
			
		||||
  "unlockAllSkins": false,
 | 
			
		||||
  "unlockAllCapturaScenes": false,
 | 
			
		||||
  "universalPolarityEverywhere": false,
 | 
			
		||||
  "unlockDoubleCapacityPotatoesEverywhere": false,
 | 
			
		||||
  "unlockExilusEverywhere": false,
 | 
			
		||||
  "unlockArcanesEverywhere": false,
 | 
			
		||||
  "noDailyStandingLimits": false,
 | 
			
		||||
  "noDailyFocusLimit": false,
 | 
			
		||||
  "noArgonCrystalDecay": false,
 | 
			
		||||
  "noMasteryRankUpCooldown": false,
 | 
			
		||||
  "noVendorPurchaseLimits": false,
 | 
			
		||||
  "noDeathMarks": false,
 | 
			
		||||
  "noKimCooldowns": false,
 | 
			
		||||
  "fullyStockedVendors": false,
 | 
			
		||||
  "baroAlwaysAvailable": false,
 | 
			
		||||
  "baroFullyStocked": false,
 | 
			
		||||
  "syndicateMissionsRepeatable": false,
 | 
			
		||||
  "unlockAllProfitTakerStages": false,
 | 
			
		||||
  "instantFinishRivenChallenge": false,
 | 
			
		||||
  "instantResourceExtractorDrones": false,
 | 
			
		||||
  "noResourceExtractorDronesDamage": false,
 | 
			
		||||
  "skipClanKeyCrafting": false,
 | 
			
		||||
  "noDojoRoomBuildStage": false,
 | 
			
		||||
  "noDecoBuildStage": false,
 | 
			
		||||
@ -26,7 +51,9 @@
 | 
			
		||||
  "noDojoResearchCosts": false,
 | 
			
		||||
  "noDojoResearchTime": false,
 | 
			
		||||
  "fastClanAscension": false,
 | 
			
		||||
  "missionsCanGiveAllRelics": false,
 | 
			
		||||
  "unlockAllSimarisResearchEntries": false,
 | 
			
		||||
  "disableDailyTribute": false,
 | 
			
		||||
  "spoofMasteryRank": -1,
 | 
			
		||||
  "relicRewardItemCountMultiplier": 1,
 | 
			
		||||
  "nightwaveStandingMultiplier": 1,
 | 
			
		||||
@ -40,10 +67,6 @@
 | 
			
		||||
    "affinityBoost": false,
 | 
			
		||||
    "resourceBoost": false,
 | 
			
		||||
    "tennoLiveRelay": false,
 | 
			
		||||
    "baroTennoConRelay": false,
 | 
			
		||||
    "baroAlwaysAvailable": false,
 | 
			
		||||
    "baroFullyStocked": false,
 | 
			
		||||
    "varziaFullyStocked": false,
 | 
			
		||||
    "wolfHunt": false,
 | 
			
		||||
    "orphixVenom": false,
 | 
			
		||||
    "longShadow": false,
 | 
			
		||||
@ -63,16 +86,15 @@
 | 
			
		||||
    "bellyOfTheBeastProgressOverride": 0,
 | 
			
		||||
    "eightClaw": false,
 | 
			
		||||
    "eightClawProgressOverride": 0,
 | 
			
		||||
    "thermiaFracturesOverride": null,
 | 
			
		||||
    "thermiaFracturesProgressOverride": 0,
 | 
			
		||||
    "eidolonOverride": "",
 | 
			
		||||
    "vallisOverride": "",
 | 
			
		||||
    "duviriOverride": "",
 | 
			
		||||
    "nightwaveOverride": "",
 | 
			
		||||
    "allTheFissures": "",
 | 
			
		||||
    "varziaOverride": "",
 | 
			
		||||
    "circuitGameModes": null,
 | 
			
		||||
    "darvoStockMultiplier": 1
 | 
			
		||||
    "darvoStockMultiplier": 1,
 | 
			
		||||
    "varziaOverride": "",
 | 
			
		||||
    "varziaFullyStocked": false
 | 
			
		||||
  },
 | 
			
		||||
  "dev": {
 | 
			
		||||
    "keepVendorsExpired": false
 | 
			
		||||
 | 
			
		||||
@ -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 raw -- --configPath conf/config.json
 | 
			
		||||
exec npm run start -- --configPath conf/config.json
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										294
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										294
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -9,6 +9,11 @@
 | 
			
		||||
      "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",
 | 
			
		||||
@ -16,8 +21,9 @@
 | 
			
		||||
        "mongoose": "^8.11.0",
 | 
			
		||||
        "morgan": "^1.10.0",
 | 
			
		||||
        "ncp": "^2.0.0",
 | 
			
		||||
        "typescript": "^5.5",
 | 
			
		||||
        "undici": "^7.10.0",
 | 
			
		||||
        "warframe-public-export-plus": "^0.5.83",
 | 
			
		||||
        "warframe-public-export-plus": "^0.5.81",
 | 
			
		||||
        "warframe-riven-info": "^0.1.2",
 | 
			
		||||
        "winston": "^3.17.0",
 | 
			
		||||
        "winston-daily-rotate-file": "^5.0.0",
 | 
			
		||||
@ -32,14 +38,6 @@
 | 
			
		||||
        "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": {
 | 
			
		||||
@ -351,7 +349,6 @@
 | 
			
		||||
      "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": "*"
 | 
			
		||||
@ -362,7 +359,6 @@
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",
 | 
			
		||||
      "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "optional": true,
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@types/node": "*"
 | 
			
		||||
      }
 | 
			
		||||
@ -372,7 +368,6 @@
 | 
			
		||||
      "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",
 | 
			
		||||
@ -384,7 +379,6 @@
 | 
			
		||||
      "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": "*",
 | 
			
		||||
@ -396,8 +390,7 @@
 | 
			
		||||
      "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",
 | 
			
		||||
      "optional": true
 | 
			
		||||
      "license": "MIT"
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@types/json5": {
 | 
			
		||||
      "version": "0.0.29",
 | 
			
		||||
@ -410,49 +403,43 @@
 | 
			
		||||
      "version": "1.3.5",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz",
 | 
			
		||||
      "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "optional": true
 | 
			
		||||
      "license": "MIT"
 | 
			
		||||
    },
 | 
			
		||||
    "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": "*"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@types/node": {
 | 
			
		||||
      "version": "24.3.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
 | 
			
		||||
      "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
 | 
			
		||||
      "version": "24.0.15",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.15.tgz",
 | 
			
		||||
      "integrity": "sha512-oaeTSbCef7U/z7rDeJA138xpG3NuKc64/rZ2qmUFkFJmnMsAPaluIifqyWd8hSSMxyP9oie3dLAqYPblag9KgA==",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "optional": true,
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "undici-types": "~7.10.0"
 | 
			
		||||
        "undici-types": "~7.8.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@types/qs": {
 | 
			
		||||
      "version": "6.14.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz",
 | 
			
		||||
      "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "optional": true
 | 
			
		||||
      "license": "MIT"
 | 
			
		||||
    },
 | 
			
		||||
    "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",
 | 
			
		||||
      "optional": true
 | 
			
		||||
      "license": "MIT"
 | 
			
		||||
    },
 | 
			
		||||
    "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": "*"
 | 
			
		||||
@ -463,7 +450,6 @@
 | 
			
		||||
      "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": "*",
 | 
			
		||||
@ -487,7 +473,6 @@
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.10.tgz",
 | 
			
		||||
      "integrity": "sha512-svjGZvPB7EzuYS94cI7a+qhwgGU1y89wUgjT6E2wVUfmAGIvRfT7obBvRtnhXCSsoMdlG4gBFGE7MfkIXZLoww==",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "optional": true,
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@types/node": "*"
 | 
			
		||||
      }
 | 
			
		||||
@ -506,23 +491,22 @@
 | 
			
		||||
      "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": "*"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/eslint-plugin": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@eslint-community/regexpp": "^4.10.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",
 | 
			
		||||
        "@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",
 | 
			
		||||
        "graphemer": "^1.4.0",
 | 
			
		||||
        "ignore": "^7.0.0",
 | 
			
		||||
        "natural-compare": "^1.4.0",
 | 
			
		||||
@ -536,22 +520,22 @@
 | 
			
		||||
        "url": "https://opencollective.com/typescript-eslint"
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "@typescript-eslint/parser": "^8.41.0",
 | 
			
		||||
        "@typescript-eslint/parser": "^8.37.0",
 | 
			
		||||
        "eslint": "^8.57.0 || ^9.0.0",
 | 
			
		||||
        "typescript": ">=4.8.4 <6.0.0"
 | 
			
		||||
        "typescript": ">=4.8.4 <5.9.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/parser": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==",
 | 
			
		||||
      "version": "8.37.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.37.0.tgz",
 | 
			
		||||
      "integrity": "sha512-kVIaQE9vrN9RLCQMQ3iyRlVJpTiDUY6woHGb30JDkfJErqrQEmtdWH3gV0PBAfGZgQXoqzXOO0T3K6ioApbbAA==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@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",
 | 
			
		||||
        "@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",
 | 
			
		||||
        "debug": "^4.3.4"
 | 
			
		||||
      },
 | 
			
		||||
      "engines": {
 | 
			
		||||
@ -563,18 +547,18 @@
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "eslint": "^8.57.0 || ^9.0.0",
 | 
			
		||||
        "typescript": ">=4.8.4 <6.0.0"
 | 
			
		||||
        "typescript": ">=4.8.4 <5.9.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/project-service": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@typescript-eslint/tsconfig-utils": "^8.41.0",
 | 
			
		||||
        "@typescript-eslint/types": "^8.41.0",
 | 
			
		||||
        "@typescript-eslint/tsconfig-utils": "^8.37.0",
 | 
			
		||||
        "@typescript-eslint/types": "^8.37.0",
 | 
			
		||||
        "debug": "^4.3.4"
 | 
			
		||||
      },
 | 
			
		||||
      "engines": {
 | 
			
		||||
@ -585,18 +569,18 @@
 | 
			
		||||
        "url": "https://opencollective.com/typescript-eslint"
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "typescript": ">=4.8.4 <6.0.0"
 | 
			
		||||
        "typescript": ">=4.8.4 <5.9.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/scope-manager": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@typescript-eslint/types": "8.41.0",
 | 
			
		||||
        "@typescript-eslint/visitor-keys": "8.41.0"
 | 
			
		||||
        "@typescript-eslint/types": "8.37.0",
 | 
			
		||||
        "@typescript-eslint/visitor-keys": "8.37.0"
 | 
			
		||||
      },
 | 
			
		||||
      "engines": {
 | 
			
		||||
        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
 | 
			
		||||
@ -607,9 +591,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/tsconfig-utils": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "engines": {
 | 
			
		||||
@ -620,19 +604,19 @@
 | 
			
		||||
        "url": "https://opencollective.com/typescript-eslint"
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "typescript": ">=4.8.4 <6.0.0"
 | 
			
		||||
        "typescript": ">=4.8.4 <5.9.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/type-utils": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@typescript-eslint/types": "8.41.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "8.41.0",
 | 
			
		||||
        "@typescript-eslint/utils": "8.41.0",
 | 
			
		||||
        "@typescript-eslint/types": "8.37.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "8.37.0",
 | 
			
		||||
        "@typescript-eslint/utils": "8.37.0",
 | 
			
		||||
        "debug": "^4.3.4",
 | 
			
		||||
        "ts-api-utils": "^2.1.0"
 | 
			
		||||
      },
 | 
			
		||||
@ -645,13 +629,13 @@
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "eslint": "^8.57.0 || ^9.0.0",
 | 
			
		||||
        "typescript": ">=4.8.4 <6.0.0"
 | 
			
		||||
        "typescript": ">=4.8.4 <5.9.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/types": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==",
 | 
			
		||||
      "version": "8.37.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.37.0.tgz",
 | 
			
		||||
      "integrity": "sha512-ax0nv7PUF9NOVPs+lmQ7yIE7IQmAf8LGcXbMvHX5Gm+YJUYNAl340XkGnrimxZ0elXyoQJuN5sbg6C4evKA4SQ==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "engines": {
 | 
			
		||||
@ -663,16 +647,16 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/typescript-estree": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@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",
 | 
			
		||||
        "@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",
 | 
			
		||||
        "debug": "^4.3.4",
 | 
			
		||||
        "fast-glob": "^3.3.2",
 | 
			
		||||
        "is-glob": "^4.0.3",
 | 
			
		||||
@ -688,20 +672,20 @@
 | 
			
		||||
        "url": "https://opencollective.com/typescript-eslint"
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "typescript": ">=4.8.4 <6.0.0"
 | 
			
		||||
        "typescript": ">=4.8.4 <5.9.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/utils": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==",
 | 
			
		||||
      "version": "8.37.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.37.0.tgz",
 | 
			
		||||
      "integrity": "sha512-TSFvkIW6gGjN2p6zbXo20FzCABbyUAuq6tBvNRGsKdsSQ6a7rnV6ADfZ7f4iI3lIiXc4F4WWvtUfDw9CJ9pO5A==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@eslint-community/eslint-utils": "^4.7.0",
 | 
			
		||||
        "@typescript-eslint/scope-manager": "8.41.0",
 | 
			
		||||
        "@typescript-eslint/types": "8.41.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "8.41.0"
 | 
			
		||||
        "@typescript-eslint/scope-manager": "8.37.0",
 | 
			
		||||
        "@typescript-eslint/types": "8.37.0",
 | 
			
		||||
        "@typescript-eslint/typescript-estree": "8.37.0"
 | 
			
		||||
      },
 | 
			
		||||
      "engines": {
 | 
			
		||||
        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
 | 
			
		||||
@ -712,17 +696,17 @@
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "eslint": "^8.57.0 || ^9.0.0",
 | 
			
		||||
        "typescript": ">=4.8.4 <6.0.0"
 | 
			
		||||
        "typescript": ">=4.8.4 <5.9.0"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript-eslint/visitor-keys": {
 | 
			
		||||
      "version": "8.41.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz",
 | 
			
		||||
      "integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@typescript-eslint/types": "8.41.0",
 | 
			
		||||
        "@typescript-eslint/types": "8.37.0",
 | 
			
		||||
        "eslint-visitor-keys": "^4.2.1"
 | 
			
		||||
      },
 | 
			
		||||
      "engines": {
 | 
			
		||||
@ -747,11 +731,10 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "license": "Apache-2.0",
 | 
			
		||||
      "optional": true,
 | 
			
		||||
      "bin": {
 | 
			
		||||
        "tsgo": "bin/tsgo.js"
 | 
			
		||||
      },
 | 
			
		||||
@ -759,19 +742,19 @@
 | 
			
		||||
        "node": ">=20.6.0"
 | 
			
		||||
      },
 | 
			
		||||
      "optionalDependencies": {
 | 
			
		||||
        "@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"
 | 
			
		||||
        "@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"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview-darwin-arm64": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "cpu": [
 | 
			
		||||
        "arm64"
 | 
			
		||||
      ],
 | 
			
		||||
@ -785,9 +768,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview-darwin-x64": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "cpu": [
 | 
			
		||||
        "x64"
 | 
			
		||||
      ],
 | 
			
		||||
@ -801,9 +784,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview-linux-arm": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "cpu": [
 | 
			
		||||
        "arm"
 | 
			
		||||
      ],
 | 
			
		||||
@ -817,9 +800,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview-linux-arm64": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "cpu": [
 | 
			
		||||
        "arm64"
 | 
			
		||||
      ],
 | 
			
		||||
@ -833,9 +816,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview-linux-x64": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "cpu": [
 | 
			
		||||
        "x64"
 | 
			
		||||
      ],
 | 
			
		||||
@ -849,9 +832,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview-win32-arm64": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "cpu": [
 | 
			
		||||
        "arm64"
 | 
			
		||||
      ],
 | 
			
		||||
@ -865,9 +848,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/@typescript/native-preview-win32-x64": {
 | 
			
		||||
      "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==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "cpu": [
 | 
			
		||||
        "x64"
 | 
			
		||||
      ],
 | 
			
		||||
@ -2304,9 +2287,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/eslint-plugin-prettier": {
 | 
			
		||||
      "version": "5.5.4",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz",
 | 
			
		||||
      "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==",
 | 
			
		||||
      "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==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
@ -3850,9 +3833,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/mongodb": {
 | 
			
		||||
      "version": "6.18.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.18.0.tgz",
 | 
			
		||||
      "integrity": "sha512-fO5ttN9VC8P0F5fqtQmclAkgXZxbIkYRTUi1j8JO6IYwvamkhtYDilJr35jOPELR49zqCJgXZWwCtW7B+TM8vQ==",
 | 
			
		||||
      "version": "6.17.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.17.0.tgz",
 | 
			
		||||
      "integrity": "sha512-neerUzg/8U26cgruLysKEjJvoNSXhyID3RvzvdcpsIi2COYM3FS3o9nlH7fxFtefTb942dX3W9i37oPfCVj4wA==",
 | 
			
		||||
      "license": "Apache-2.0",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "@mongodb-js/saslprep": "^1.1.9",
 | 
			
		||||
@ -3906,14 +3889,14 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/mongoose": {
 | 
			
		||||
      "version": "8.18.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.18.0.tgz",
 | 
			
		||||
      "integrity": "sha512-3TixPihQKBdyaYDeJqRjzgb86KbilEH07JmzV8SoSjgoskNTpa6oTBmDxeoF9p8YnWQoz7shnCyPkSV/48y3yw==",
 | 
			
		||||
      "version": "8.16.4",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.16.4.tgz",
 | 
			
		||||
      "integrity": "sha512-jslgdQ8pY2vcNSKPv3Dbi5ogo/NT8zcvf6kPDyD8Sdsjsa1at3AFAF0F5PT+jySPGSPbvlNaQ49nT9h+Kx2UDA==",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
        "bson": "^6.10.4",
 | 
			
		||||
        "kareem": "2.6.3",
 | 
			
		||||
        "mongodb": "~6.18.0",
 | 
			
		||||
        "mongodb": "~6.17.0",
 | 
			
		||||
        "mpath": "0.9.0",
 | 
			
		||||
        "mquery": "5.0.0",
 | 
			
		||||
        "ms": "2.1.3",
 | 
			
		||||
@ -3998,9 +3981,9 @@
 | 
			
		||||
      "license": "MIT"
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/napi-postinstall": {
 | 
			
		||||
      "version": "0.3.3",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.3.tgz",
 | 
			
		||||
      "integrity": "sha512-uTp172LLXSxuSYHv/kou+f6KW3SMppU9ivthaVTXian9sOt3XM/zHYHpRZiLgQoxeWfYUnslNWQHF1+G71xcow==",
 | 
			
		||||
      "version": "0.3.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.2.tgz",
 | 
			
		||||
      "integrity": "sha512-tWVJxJHmBWLy69PvO96TZMZDrzmw5KeiZBz3RHmiM2XZ9grBJ2WgMAFVVg25nqp3ZjTFUs2Ftw1JhscL3Teliw==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "bin": {
 | 
			
		||||
@ -5175,14 +5158,11 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/tinyglobby/node_modules/fdir": {
 | 
			
		||||
      "version": "6.5.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
 | 
			
		||||
      "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
 | 
			
		||||
      "version": "6.4.6",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
 | 
			
		||||
      "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
 | 
			
		||||
      "dev": true,
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "engines": {
 | 
			
		||||
        "node": ">=12.0.0"
 | 
			
		||||
      },
 | 
			
		||||
      "peerDependencies": {
 | 
			
		||||
        "picomatch": "^3 || ^4"
 | 
			
		||||
      },
 | 
			
		||||
@ -5411,10 +5391,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/typescript": {
 | 
			
		||||
      "version": "5.9.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz",
 | 
			
		||||
      "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
 | 
			
		||||
      "devOptional": true,
 | 
			
		||||
      "version": "5.8.3",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
 | 
			
		||||
      "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
 | 
			
		||||
      "license": "Apache-2.0",
 | 
			
		||||
      "bin": {
 | 
			
		||||
        "tsc": "bin/tsc",
 | 
			
		||||
@ -5444,20 +5423,19 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/undici": {
 | 
			
		||||
      "version": "7.15.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/undici/-/undici-7.15.0.tgz",
 | 
			
		||||
      "integrity": "sha512-7oZJCPvvMvTd0OlqWsIxTuItTpJBpU1tcbVl24FMn3xt3+VSunwUasmfPJRE57oNO1KsZ4PgA1xTdAX4hq8NyQ==",
 | 
			
		||||
      "version": "7.12.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/undici/-/undici-7.12.0.tgz",
 | 
			
		||||
      "integrity": "sha512-GrKEsc3ughskmGA9jevVlIOPMiiAHJ4OFUtaAH+NhfTUSiZ1wMPIQqQvAJUrJspFXJt3EBWgpAeoHEDVT1IBug==",
 | 
			
		||||
      "license": "MIT",
 | 
			
		||||
      "engines": {
 | 
			
		||||
        "node": ">=20.18.1"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/undici-types": {
 | 
			
		||||
      "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",
 | 
			
		||||
      "optional": true
 | 
			
		||||
      "version": "7.8.0",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
 | 
			
		||||
      "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
 | 
			
		||||
      "license": "MIT"
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/unpipe": {
 | 
			
		||||
      "version": "1.0.0",
 | 
			
		||||
@ -5529,9 +5507,9 @@
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/warframe-public-export-plus": {
 | 
			
		||||
      "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=="
 | 
			
		||||
      "version": "0.5.81",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.81.tgz",
 | 
			
		||||
      "integrity": "sha512-kh3e21XThVDSwdC3TJsMsXZnlZ4B/21HdeJkKcjuTygpCd842EPEKS3lRZl3mpXFOmdha744vAW1XEyHfiLofg=="
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/warframe-riven-info": {
 | 
			
		||||
      "version": "0.1.2",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										34
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								package.json
									
									
									
									
									
								
							@ -4,29 +4,33 @@
 | 
			
		||||
  "description": "WF Emulator",
 | 
			
		||||
  "main": "index.ts",
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "start": "node --enable-source-maps build/src/index.js",
 | 
			
		||||
    "start": "node --enable-source-maps --import ./build/src/pathman.js 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",
 | 
			
		||||
    "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.cjs",
 | 
			
		||||
    "dev:bun": "bun scripts/dev.cjs",
 | 
			
		||||
    "dev": "node scripts/dev.js",
 | 
			
		||||
    "dev:bun": "bun scripts/dev.js",
 | 
			
		||||
    "verify": "tsgo --noEmit",
 | 
			
		||||
    "verify:tsc": "tsc --noEmit",
 | 
			
		||||
    "raw": "node --experimental-transform-types src/index.ts",
 | 
			
		||||
    "raw:bun": "bun src/index.ts",
 | 
			
		||||
    "bun-run": "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.cjs",
 | 
			
		||||
    "fix": "npm run update-translations && npm run lint:fix"
 | 
			
		||||
    "update-translations": "cd scripts && node update-translations.js",
 | 
			
		||||
    "fix-imports": "cd scripts && node fix-imports.js",
 | 
			
		||||
    "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",
 | 
			
		||||
    "@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",
 | 
			
		||||
@ -34,21 +38,14 @@
 | 
			
		||||
    "mongoose": "^8.11.0",
 | 
			
		||||
    "morgan": "^1.10.0",
 | 
			
		||||
    "ncp": "^2.0.0",
 | 
			
		||||
    "typescript": "^5.5",
 | 
			
		||||
    "undici": "^7.10.0",
 | 
			
		||||
    "warframe-public-export-plus": "^0.5.83",
 | 
			
		||||
    "warframe-public-export-plus": "^0.5.81",
 | 
			
		||||
    "warframe-riven-info": "^0.1.2",
 | 
			
		||||
    "winston": "^3.17.0",
 | 
			
		||||
    "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",
 | 
			
		||||
@ -58,8 +55,5 @@
 | 
			
		||||
    "eslint-plugin-prettier": "^5.2.5",
 | 
			
		||||
    "prettier": "^3.5.3",
 | 
			
		||||
    "tree-kill": "^1.2.2"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=20.18.1"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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 ? "raw:bun" : "start", "--", ...args], spawnopts);
 | 
			
		||||
            runproc = spawn("npm", ["run", process.versions.bun ? "bun-run" : "start", "--", ...args], spawnopts);
 | 
			
		||||
            runproc.on("exit", () => {
 | 
			
		||||
                runproc = undefined;
 | 
			
		||||
            });
 | 
			
		||||
							
								
								
									
										46
									
								
								scripts/fix-imports.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								scripts/fix-imports.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,46 @@
 | 
			
		||||
/* 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("@/")) {
 | 
			
		||||
            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);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return sub;
 | 
			
		||||
    });
 | 
			
		||||
    if (content != fixedContent) {
 | 
			
		||||
        fs.writeFileSync(file, fixedContent, "utf8");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										20
									
								
								src/app.ts
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								src/app.ts
									
									
									
									
									
								
							@ -1,17 +1,17 @@
 | 
			
		||||
import express from "express";
 | 
			
		||||
 | 
			
		||||
import bodyParser from "body-parser";
 | 
			
		||||
import { unknownEndpointHandler } from "./middleware/middleware.ts";
 | 
			
		||||
import { requestLogger } from "./middleware/morgenMiddleware.ts";
 | 
			
		||||
import { errorHandler } from "./middleware/errorHandler.ts";
 | 
			
		||||
import { unknownEndpointHandler } from "@/src/middleware/middleware";
 | 
			
		||||
import { requestLogger } from "@/src/middleware/morgenMiddleware";
 | 
			
		||||
import { errorHandler } from "@/src/middleware/errorHandler";
 | 
			
		||||
 | 
			
		||||
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";
 | 
			
		||||
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";
 | 
			
		||||
 | 
			
		||||
const app = express();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -5,11 +5,11 @@ import {
 | 
			
		||||
    hasGuildPermission,
 | 
			
		||||
    removeDojoDeco,
 | 
			
		||||
    removeDojoRoom
 | 
			
		||||
} 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";
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission } from "@/src/types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const abortDojoComponentController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,19 +1,20 @@
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import {
 | 
			
		||||
    createVeiledRivenFingerprint,
 | 
			
		||||
    createUnveiledRivenFingerprint,
 | 
			
		||||
    rivenRawToRealWeighted
 | 
			
		||||
} 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";
 | 
			
		||||
} 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";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportUpgrades } from "warframe-public-export-plus";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
 | 
			
		||||
export const activateRandomModController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
    const inventory = await getInventory(accountId, "RawUpgrades Upgrades instantFinishRivenChallenge");
 | 
			
		||||
    const inventory = await getInventory(accountId);
 | 
			
		||||
    const request = getJSONfromString<IActiveRandomModRequest>(String(req.body));
 | 
			
		||||
    addMods(inventory, [
 | 
			
		||||
        {
 | 
			
		||||
@ -22,7 +23,7 @@ export const activateRandomModController: RequestHandler = async (req, res) => {
 | 
			
		||||
        }
 | 
			
		||||
    ]);
 | 
			
		||||
    const rivenType = getRandomElement(rivenRawToRealWeighted[request.ItemType])!;
 | 
			
		||||
    const fingerprint = inventory.instantFinishRivenChallenge
 | 
			
		||||
    const fingerprint = config.instantFinishRivenChallenge
 | 
			
		||||
        ? createUnveiledRivenFingerprint(ExportUpgrades[rivenType])
 | 
			
		||||
        : createVeiledRivenFingerprint(ExportUpgrades[rivenType]);
 | 
			
		||||
    const upgradeIndex =
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const addFriendController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
 | 
			
		||||
export const addFriendImageController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const addIgnoredUserController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,12 +1,12 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const addPendingFriendController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const payload = getJSONfromString<IAddPendingFriendRequest>(String(req.body));
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
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 { 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 { RequestHandler } from "express";
 | 
			
		||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const addToAllianceController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,16 +1,15 @@
 | 
			
		||||
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 { 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 { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { GuildPermission, IGuildMemberClient } from "@/src/types/guildTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const addToGuildController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const adoptPetController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { getPersonalRooms } from "../../services/personalRoomsService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const apartmentController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory, addMods } from "@/src/services/inventoryService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
 | 
			
		||||
export const arcaneCommonController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { colorToShard, combineColors, shardToColor } from "@/src/helpers/shardHelper";
 | 
			
		||||
 | 
			
		||||
export const archonFusionController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,12 +1,11 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IUpgradeFromClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportBoosterPacks, ExportUpgrades, TRarity } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const artifactTransmutationController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import type { IInventoryClient, IUpgradeClient } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
			
		||||
import { addMods, getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { IInventoryClient, IUpgradeClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { addMods, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
 | 
			
		||||
export const artifactsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const cancelGuildAdvertisementController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,16 +1,10 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { GuildPermission, IDojoComponentDatabase } from "@/src/types/guildTypes";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
 | 
			
		||||
export const changeDojoRootController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const changeGuildRankController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const checkDailyMissionBonusController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,12 @@
 | 
			
		||||
//this is a controller for the claimCompletedRecipe route
 | 
			
		||||
//it will claim a recipe for the user
 | 
			
		||||
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { logger } from "../../utils/logger.ts";
 | 
			
		||||
import { getRecipe } from "../../services/itemDataService.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 { RequestHandler } from "express";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { getRecipe } from "@/src/services/itemDataService";
 | 
			
		||||
import { IOid, IOidWithLegacySupport } from "@/src/types/commonTypes";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import {
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency,
 | 
			
		||||
@ -18,258 +17,243 @@ import {
 | 
			
		||||
    addKubrowPetPrint,
 | 
			
		||||
    addPowerSuit,
 | 
			
		||||
    addEquipment
 | 
			
		||||
} 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 { 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";
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { InventorySlot, IPendingRecipeDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { toOid2 } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { IRecipe } from "warframe-public-export-plus";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { EquipmentFeatures, IEquipmentClient, Status } from "@/src/types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
interface IClaimCompletedRecipeRequest {
 | 
			
		||||
    RecipeIds: IOidWithLegacySupport[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
interface IClaimCompletedRecipeResponse {
 | 
			
		||||
    InventoryChanges: IInventoryChanges;
 | 
			
		||||
    BrandedSuits?: IOidWithLegacySupport[];
 | 
			
		||||
    RecipeIds: IOid[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const claimCompletedRecipeController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const claimCompletedRecipeRequest = getJSONfromString<IClaimCompletedRecipeRequest>(String(req.body));
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
    const inventory = await getInventory(account._id.toString());
 | 
			
		||||
    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)}`);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //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);
 | 
			
		||||
    const pendingRecipe = inventory.PendingRecipes.id(claimCompletedRecipeRequest.RecipeIds[0].$oid);
 | 
			
		||||
    if (!pendingRecipe) {
 | 
			
		||||
        throw new Error(`no pending recipe found with id ${claimCompletedRecipeRequest.RecipeIds[0].$oid}`);
 | 
			
		||||
    }
 | 
			
		||||
    await inventory.save();
 | 
			
		||||
    res.json(resp);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const claimCompletedRecipe = async (
 | 
			
		||||
    account: TAccountDocument,
 | 
			
		||||
    inventory: TInventoryDatabaseDocument,
 | 
			
		||||
    recipe: IRecipe,
 | 
			
		||||
    pendingRecipe: IPendingRecipeDatabase,
 | 
			
		||||
    resp: IClaimCompletedRecipeResponse,
 | 
			
		||||
    rush: any
 | 
			
		||||
): Promise<void> => {
 | 
			
		||||
    logger.debug("Claiming Recipe", { recipe, pendingRecipe });
 | 
			
		||||
    //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`);
 | 
			
		||||
    // }
 | 
			
		||||
 | 
			
		||||
    if (recipe.secretIngredientAction == "SIA_SPECTRE_LOADOUT_COPY") {
 | 
			
		||||
        inventory.PendingSpectreLoadouts ??= [];
 | 
			
		||||
        inventory.SpectreLoadouts ??= [];
 | 
			
		||||
    inventory.PendingRecipes.pull(pendingRecipe._id);
 | 
			
		||||
 | 
			
		||||
        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]
 | 
			
		||||
    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
 | 
			
		||||
            );
 | 
			
		||||
            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 (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);
 | 
			
		||||
            }
 | 
			
		||||
        ]);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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();
 | 
			
		||||
        } else if (recipe.secretIngredientAction == "SIA_UNBRAND") {
 | 
			
		||||
            inventory.BrandedSuits!.splice(
 | 
			
		||||
                inventory.BrandedSuits!.findIndex(x => x.equals(pendingRecipe.SuitToUnbrand)),
 | 
			
		||||
                1
 | 
			
		||||
            );
 | 
			
		||||
            BrandedSuits = [toOid2(pendingRecipe.SuitToUnbrand!, account.BuildLabel)];
 | 
			
		||||
        }
 | 
			
		||||
        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",
 | 
			
		||||
        let InventoryChanges: IInventoryChanges = {};
 | 
			
		||||
        if (recipe.consumeOnUse) {
 | 
			
		||||
            addRecipes(inventory, [
 | 
			
		||||
                {
 | 
			
		||||
                    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
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            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,
 | 
			
		||||
                    recipe.resultType,
 | 
			
		||||
                    recipe.num,
 | 
			
		||||
                    false,
 | 
			
		||||
                    undefined,
 | 
			
		||||
                    pendingRecipe.TargetFingerprint
 | 
			
		||||
                )
 | 
			
		||||
            );
 | 
			
		||||
                    ItemType: pendingRecipe.ItemType,
 | 
			
		||||
                    ItemCount: -1
 | 
			
		||||
                }
 | 
			
		||||
            ]);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    if (
 | 
			
		||||
        inventory.claimingBlueprintRefundsIngredients &&
 | 
			
		||||
        recipe.secretIngredientAction != "SIA_CREATE_KUBROW" // Can't refund the egg
 | 
			
		||||
    ) {
 | 
			
		||||
        await refundRecipeIngredients(inventory, resp.InventoryChanges, recipe, pendingRecipe);
 | 
			
		||||
        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)
 | 
			
		||||
            };
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        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(
 | 
			
		||||
                    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
 | 
			
		||||
                    ))
 | 
			
		||||
                };
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (
 | 
			
		||||
            config.claimingBlueprintRefundsIngredients &&
 | 
			
		||||
            recipe.secretIngredientAction != "SIA_CREATE_KUBROW" // Can't refund the egg
 | 
			
		||||
        ) {
 | 
			
		||||
            await refundRecipeIngredients(inventory, InventoryChanges, recipe, pendingRecipe);
 | 
			
		||||
        }
 | 
			
		||||
        await inventory.save();
 | 
			
		||||
        res.json({ InventoryChanges, BrandedSuits });
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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 { 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 { RequestHandler } from "express";
 | 
			
		||||
import { ExportChallenges } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const claimJunctionChallengeRewardController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { addFusionPoints, getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { addFusionPoints, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const claimLibraryDailyTaskRewardController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const clearDialogueHistoryController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
// example req.body: {"NewEpisodeReward":true,"crossPlaySetting":"ENABLED"}
 | 
			
		||||
export const clearNewEpisodeRewardController: RequestHandler = (_req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
// GET request; query parameters: CompletedEventIdx=0&Iteration=4&Version=19&Season=CST_SUMMER
 | 
			
		||||
export const completeCalendarEventController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IVeiledRivenFingerprint } from "@/src/helpers/rivenHelper";
 | 
			
		||||
 | 
			
		||||
export const completeRandomModChallengeController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
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";
 | 
			
		||||
import { Alliance, AllianceMember, Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAllianceClient } from "@/src/services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const confirmAllianceInvitationController: RequestHandler = async (req, res) => {
 | 
			
		||||
    // Check requester is a warlord in their guild
 | 
			
		||||
 | 
			
		||||
@ -1,18 +1,18 @@
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
			
		||||
import { Guild, GuildMember } from "../../models/guildModel.ts";
 | 
			
		||||
import { Account } from "../../models/loginModel.ts";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Guild, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import {
 | 
			
		||||
    deleteGuild,
 | 
			
		||||
    getGuildClient,
 | 
			
		||||
    giveClanKey,
 | 
			
		||||
    hasGuildPermission,
 | 
			
		||||
    removeDojoKeyItems
 | 
			
		||||
} 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";
 | 
			
		||||
} 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 { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
// GET request: A player accepting an invite they got in their inbox.
 | 
			
		||||
@ -95,10 +95,7 @@ export const confirmGuildInvitationPostController: RequestHandler = async (req,
 | 
			
		||||
        await GuildMember.deleteMany({ accountId: guildMember.accountId, status: 1 });
 | 
			
		||||
 | 
			
		||||
        // Update inventory of new member
 | 
			
		||||
        const inventory = await getInventory(
 | 
			
		||||
            guildMember.accountId.toString(),
 | 
			
		||||
            "GuildId LevelKeys Recipes skipClanKeyCrafting"
 | 
			
		||||
        );
 | 
			
		||||
        const inventory = await getInventory(guildMember.accountId.toString(), "GuildId LevelKeys Recipes");
 | 
			
		||||
        inventory.GuildId = new Types.ObjectId(req.query.clanId as string);
 | 
			
		||||
        giveClanKey(inventory);
 | 
			
		||||
        await inventory.save();
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
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 { 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 { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
export const contributeGuildClassController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,5 @@
 | 
			
		||||
import type { TGuildDatabaseDocument } from "../../models/guildModel.ts";
 | 
			
		||||
import { GuildMember } from "../../models/guildModel.ts";
 | 
			
		||||
import type { TInventoryDatabaseDocument } from "../../models/inventoryModels/inventoryModel.ts";
 | 
			
		||||
import { GuildMember, TGuildDatabaseDocument } from "@/src/models/guildModel";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import {
 | 
			
		||||
    addGuildMemberMiscItemContribution,
 | 
			
		||||
    getDojoClient,
 | 
			
		||||
@ -9,15 +8,14 @@ import {
 | 
			
		||||
    processDojoBuildMaterialsGathered,
 | 
			
		||||
    scaleRequiredCount,
 | 
			
		||||
    setDojoRoomLogFunded
 | 
			
		||||
} 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";
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { addMiscItems, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IDojoContributable, IGuildMemberDatabase } from "@/src/types/guildTypes";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
interface IContributeToDojoComponentRequest {
 | 
			
		||||
    ComponentId: string;
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,10 @@
 | 
			
		||||
import type { TGuildDatabaseDocument, TGuildMemberDatabaseDocument } from "../../models/guildModel.ts";
 | 
			
		||||
import { Alliance, Guild, GuildMember } from "../../models/guildModel.ts";
 | 
			
		||||
import {
 | 
			
		||||
    Alliance,
 | 
			
		||||
    Guild,
 | 
			
		||||
    GuildMember,
 | 
			
		||||
    TGuildDatabaseDocument,
 | 
			
		||||
    TGuildMemberDatabaseDocument
 | 
			
		||||
} from "@/src/models/guildModel";
 | 
			
		||||
import {
 | 
			
		||||
    addGuildMemberMiscItemContribution,
 | 
			
		||||
    addGuildMemberShipDecoContribution,
 | 
			
		||||
@ -7,18 +12,18 @@ import {
 | 
			
		||||
    addVaultMiscItems,
 | 
			
		||||
    addVaultShipDecos,
 | 
			
		||||
    getGuildForRequestEx
 | 
			
		||||
} from "../../services/guildService.ts";
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import {
 | 
			
		||||
    addFusionTreasures,
 | 
			
		||||
    addMiscItems,
 | 
			
		||||
    addShipDecorations,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} 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";
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { ITypeCount } from "@/src/types/commonTypes";
 | 
			
		||||
import { IFusionTreasure, IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const contributeToVaultController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const createAllianceController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { 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 { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
 | 
			
		||||
export const createGuildController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
@ -27,7 +27,7 @@ export const createGuildController: RequestHandler = async (req, res) => {
 | 
			
		||||
        rank: 0
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    const inventory = await getInventory(account._id.toString(), "GuildId LevelKeys Recipes skipClanKeyCrafting");
 | 
			
		||||
    const inventory = await getInventory(account._id.toString(), "GuildId LevelKeys Recipes");
 | 
			
		||||
    inventory.GuildId = guild._id;
 | 
			
		||||
    const inventoryChanges: IInventoryChanges = {};
 | 
			
		||||
    giveClanKey(inventory, inventoryChanges);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
 | 
			
		||||
export const creditsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const inventory = (
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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 { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { ICrewMemberClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
 | 
			
		||||
export const crewMembersController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,10 @@
 | 
			
		||||
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 { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, freeUpSlot, getInventory, updateCurrency } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { ICrewShipComponentFingerprint, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const crewShipFusionController: RequestHandler = async (req, res) => {
 | 
			
		||||
@ -81,7 +80,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 !== undefined) {
 | 
			
		||||
        if (inferiorFingerprint.SubroutineIndex) {
 | 
			
		||||
            const useSuperiorSubroutine = tierA < tierB ? !payload.UseSubroutineA : payload.UseSubroutineA;
 | 
			
		||||
            if (!useSuperiorSubroutine) {
 | 
			
		||||
                fingerprint.SubroutineIndex = inferiorFingerprint.SubroutineIndex;
 | 
			
		||||
 | 
			
		||||
@ -3,19 +3,16 @@ import {
 | 
			
		||||
    addCrewShipRawSalvage,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    addEquipment
 | 
			
		||||
} from "../../services/inventoryService.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import type {
 | 
			
		||||
    ICrewShipComponentFingerprint,
 | 
			
		||||
    IInnateDamageFingerprint
 | 
			
		||||
} from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ICrewShipComponentFingerprint, IInnateDamageFingerprint } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ExportCustoms, ExportRailjackWeapons, ExportUpgrades } from "warframe-public-export-plus";
 | 
			
		||||
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";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { getRandomInt } from "@/src/services/rngService";
 | 
			
		||||
import { IFingerprintStat } from "@/src/helpers/rivenHelper";
 | 
			
		||||
import { IEquipmentDatabase } from "@/src/types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
export const crewShipIdentifySalvageController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const customObstacleCourseLeaderboardController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const data = getJSONfromString<ICustomObstacleCourseLeaderboardRequest>(String(req.body));
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,7 @@
 | 
			
		||||
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";
 | 
			
		||||
import { getGuildForRequest, hasGuildPermission } from "@/src/services/guildService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { GuildPermission, IGuildRank } from "@/src/types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const customizeGuildRanksController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { AllianceMember, GuildMember } from "../../models/guildModel.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { AllianceMember, GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const declineAllianceInviteController: RequestHandler = async (req, res) => {
 | 
			
		||||
    // Check requester is a warlord in their guild
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
import { GuildMember } from "../../models/guildModel.ts";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const declineGuildInviteController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { deleteSession } from "../../managers/sessionManager.ts";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { deleteSession } from "@/src/managers/sessionManager";
 | 
			
		||||
 | 
			
		||||
const deleteSessionController: RequestHandler = (_req, res) => {
 | 
			
		||||
    deleteSession(_req.query.sessionId as string);
 | 
			
		||||
 | 
			
		||||
@ -5,12 +5,12 @@ import {
 | 
			
		||||
    hasGuildPermission,
 | 
			
		||||
    refundDojoDeco,
 | 
			
		||||
    removeDojoDeco
 | 
			
		||||
} 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";
 | 
			
		||||
} 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";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const destroyDojoDecoController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const divvyAllianceVaultController: RequestHandler = async (req, res) => {
 | 
			
		||||
    // Afaict, there's no way to put anything other than credits in the alliance vault (anymore?), so just no-op if this is not a request to divvy credits.
 | 
			
		||||
 | 
			
		||||
@ -1,17 +1,10 @@
 | 
			
		||||
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";
 | 
			
		||||
import { GuildMember, TGuildDatabaseDocument } 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 { IDojoContributable } from "@/src/types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportDojoRecipes, IDojoBuild } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
interface IDojoComponentRushRequest {
 | 
			
		||||
    DecoType?: string;
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
// Arbiter Dojo endpoints, not really used by us as we don't provide a ContentURL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,12 +1,13 @@
 | 
			
		||||
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 { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
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 { IMongoDate, IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IDroneClient } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportDrones, ExportResources, ExportSystems } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const dronesController: RequestHandler = async (req, res) => {
 | 
			
		||||
@ -38,13 +39,10 @@ export const dronesController: RequestHandler = async (req, res) => {
 | 
			
		||||
            ActiveDrones: activeDrones
 | 
			
		||||
        });
 | 
			
		||||
    } else if ("droneId" in req.query && "systemIndex" in req.query) {
 | 
			
		||||
        const inventory = await getInventory(
 | 
			
		||||
            accountId,
 | 
			
		||||
            "Drones instantResourceExtractorDrones noResourceExtractorDronesDamage"
 | 
			
		||||
        );
 | 
			
		||||
        const inventory = await getInventory(accountId, "Drones");
 | 
			
		||||
        const drone = inventory.Drones.id(req.query.droneId as string)!;
 | 
			
		||||
        const droneMeta = ExportDrones[drone.ItemType];
 | 
			
		||||
        drone.DeployTime = inventory.instantResourceExtractorDrones ? new Date(0) : new Date();
 | 
			
		||||
        drone.DeployTime = config.instantResourceExtractorDrones ? new Date(0) : new Date();
 | 
			
		||||
        if (drone.RepairStart) {
 | 
			
		||||
            const repairMinutes = (Date.now() - drone.RepairStart.getTime()) / 60_000;
 | 
			
		||||
            const hpPerMinute = droneMeta.repairRate / 60;
 | 
			
		||||
@ -53,11 +51,11 @@ export const dronesController: RequestHandler = async (req, res) => {
 | 
			
		||||
        }
 | 
			
		||||
        drone.System = parseInt(req.query.systemIndex as string);
 | 
			
		||||
        const system = ExportSystems[drone.System - 1];
 | 
			
		||||
        drone.DamageTime = inventory.instantResourceExtractorDrones
 | 
			
		||||
        drone.DamageTime = config.instantResourceExtractorDrones
 | 
			
		||||
            ? new Date()
 | 
			
		||||
            : new Date(Date.now() + getRandomInt(3 * 3600 * 1000, 4 * 3600 * 1000));
 | 
			
		||||
        drone.PendingDamage =
 | 
			
		||||
            !inventory.noResourceExtractorDronesDamage && Math.random() < system.damageChance
 | 
			
		||||
            !config.noResourceExtractorDronesDamage && Math.random() < system.damageChance
 | 
			
		||||
                ? getRandomInt(system.droneDamage.minValue, system.droneDamage.maxValue)
 | 
			
		||||
                : 0;
 | 
			
		||||
        const resource = getRandomWeightedRewardUc(system.resources, droneMeta.probabilities)!;
 | 
			
		||||
 | 
			
		||||
@ -1,18 +1,13 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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 "../../services/rngService.ts";
 | 
			
		||||
import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
			
		||||
import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { combineInventoryChanges, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IEndlessXpReward, IInventoryClient, TEndlessXpCategory } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { ExportRewards, ICountedStoreItem } from "warframe-public-export-plus";
 | 
			
		||||
import { getRandomElement } from "@/src/services/rngService";
 | 
			
		||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
 | 
			
		||||
export const endlessXpController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const entratiLabConquestModeController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
@ -11,7 +11,26 @@ export const entratiLabConquestModeController: RequestHandler = async (req, res)
 | 
			
		||||
        "EntratiVaultCountResetDate EntratiVaultCountLastPeriod EntratiLabConquestUnlocked EchoesHexConquestUnlocked EchoesHexConquestActiveFrameVariants EchoesHexConquestActiveStickers EntratiLabConquestActiveFrameVariants EntratiLabConquestCacheScoreMission EchoesHexConquestCacheScoreMission"
 | 
			
		||||
    );
 | 
			
		||||
    const body = getJSONfromString<IEntratiLabConquestModeRequest>(String(req.body));
 | 
			
		||||
    updateEntratiVault(inventory);
 | 
			
		||||
    if (!inventory.EntratiVaultCountResetDate || Date.now() >= inventory.EntratiVaultCountResetDate.getTime()) {
 | 
			
		||||
        const EPOCH = 1734307200 * 1000; // Mondays, amirite?
 | 
			
		||||
        const day = Math.trunc((Date.now() - EPOCH) / 86400000);
 | 
			
		||||
        const week = Math.trunc(day / 7);
 | 
			
		||||
        const weekStart = EPOCH + week * 604800000;
 | 
			
		||||
        const weekEnd = weekStart + 604800000;
 | 
			
		||||
        inventory.EntratiVaultCountLastPeriod = 0;
 | 
			
		||||
        inventory.EntratiVaultCountResetDate = new Date(weekEnd);
 | 
			
		||||
        if (inventory.EntratiLabConquestUnlocked) {
 | 
			
		||||
            inventory.EntratiLabConquestUnlocked = 0;
 | 
			
		||||
            inventory.EntratiLabConquestCacheScoreMission = 0;
 | 
			
		||||
            inventory.EntratiLabConquestActiveFrameVariants = [];
 | 
			
		||||
        }
 | 
			
		||||
        if (inventory.EchoesHexConquestUnlocked) {
 | 
			
		||||
            inventory.EchoesHexConquestUnlocked = 0;
 | 
			
		||||
            inventory.EchoesHexConquestCacheScoreMission = 0;
 | 
			
		||||
            inventory.EchoesHexConquestActiveFrameVariants = [];
 | 
			
		||||
            inventory.EchoesHexConquestActiveStickers = [];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    if (body.BuyMode) {
 | 
			
		||||
        inventory.EntratiVaultCountLastPeriod! += 2;
 | 
			
		||||
        if (body.IsEchoesDeepArchemedea) {
 | 
			
		||||
@ -32,7 +51,7 @@ export const entratiLabConquestModeController: RequestHandler = async (req, res)
 | 
			
		||||
    }
 | 
			
		||||
    await inventory.save();
 | 
			
		||||
    res.json({
 | 
			
		||||
        EntratiVaultCountResetDate: toMongoDate(inventory.EntratiVaultCountResetDate!),
 | 
			
		||||
        EntratiVaultCountResetDate: toMongoDate(inventory.EntratiVaultCountResetDate),
 | 
			
		||||
        EntratiVaultCountLastPeriod: inventory.EntratiVaultCountLastPeriod,
 | 
			
		||||
        EntratiLabConquestUnlocked: inventory.EntratiLabConquestUnlocked,
 | 
			
		||||
        EntratiLabConquestCacheScoreMission: inventory.EntratiLabConquestCacheScoreMission,
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,9 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { getRecipe, WeaponTypeInternal } from "@/src/services/itemDataService";
 | 
			
		||||
import { EquipmentFeatures } from "@/src/types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
export const evolveWeaponController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getSession } from "../../managers/sessionManager.ts";
 | 
			
		||||
import { logger } from "../../utils/logger.ts";
 | 
			
		||||
import type { IFindSessionRequest } from "../../types/session.ts";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getSession } from "@/src/managers/sessionManager";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { IFindSessionRequest } from "@/src/types/session";
 | 
			
		||||
 | 
			
		||||
export const findSessionsController: RequestHandler = (_req, res) => {
 | 
			
		||||
    const req = JSON.parse(String(_req.body)) as IFindSessionRequest;
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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 { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addMiscItems, addStanding, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportResources } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const fishmongerController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,10 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory, addMiscItems, addEquipment, occupySlot } from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem, TFocusPolarity, TEquipmentKey, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { ExportFocusUpgrades } from "warframe-public-export-plus";
 | 
			
		||||
import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
 | 
			
		||||
export const focusController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportResources } from "warframe-public-export-plus";
 | 
			
		||||
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";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { addFusionTreasures, addMiscItems, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { parseFusionTreasure } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
 | 
			
		||||
interface IFusionTreasureRequest {
 | 
			
		||||
    oldTreasureName: string;
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,14 @@
 | 
			
		||||
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 { 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 { IMongoDate } from "@/src/types/commonTypes";
 | 
			
		||||
import { IMissionReward } from "@/src/types/missionTypes";
 | 
			
		||||
import { IGardeningClient, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { dict_en, ExportResources } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const gardeningController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { updateGeneric } from "../../services/inventoryService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "../../helpers/stringHelpers.ts";
 | 
			
		||||
import type { IGenericUpdate } from "../../types/genericUpdate.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { updateGeneric } from "@/src/services/inventoryService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { IGenericUpdate } from "@/src/types/genericUpdate";
 | 
			
		||||
 | 
			
		||||
// 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.
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getAllianceController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { DailyDeal } from "../../models/worldStateModel.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { DailyDeal } from "@/src/models/worldStateModel";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getDailyDealStockLevelsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const dailyDeal = (await DailyDeal.findOne({ StoreItem: req.query.productName }, "AmountSold"))!;
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { Request, RequestHandler, Response } from "express";
 | 
			
		||||
 | 
			
		||||
// POST with {} instead of GET as of 38.5.0
 | 
			
		||||
export const getFriendsController: RequestHandler = async (req: Request, res: Response) => {
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
import { GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IGuildMemberClient } from "@/src/types/guildTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getGuildContributionsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { 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";
 | 
			
		||||
 | 
			
		||||
export const getGuildController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Types } from "mongoose";
 | 
			
		||||
import { Guild } from "../../models/guildModel.ts";
 | 
			
		||||
import { getDojoClient } from "../../services/guildService.ts";
 | 
			
		||||
import { Account } from "../../models/loginModel.ts";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
import { getDojoClient } from "@/src/services/guildService";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
 | 
			
		||||
export const getGuildDojoController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const guildId = req.query.guildId as string;
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import { Guild } from "../../models/guildModel.ts";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { Guild } from "@/src/models/guildModel";
 | 
			
		||||
 | 
			
		||||
export const getGuildEventScoreController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IMongoDate } from "@/src/types/commonTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getGuildLogController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { Account, Ignore } from "@/src/models/loginModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IFriendInfo } from "@/src/types/friendTypes";
 | 
			
		||||
import { parallelForeach } from "@/src/utils/async-utils";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getIgnoredUsersController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
import { Inventory } from "../../models/inventoryModels/inventoryModel.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { generateRewardSeed } from "../../services/rngService.ts";
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { generateRewardSeed } from "@/src/services/rngService";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getNewRewardSeedController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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 { 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 { ISeasonChallenge } from "@/src/types/worldStateTypes";
 | 
			
		||||
import { ExportChallenges } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const getPastWeeklyChallengesController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { config } from "../../services/configService.ts";
 | 
			
		||||
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";
 | 
			
		||||
import { getLoadout } from "../../services/loadoutService.ts";
 | 
			
		||||
import { toOid } from "../../helpers/inventoryHelpers.ts";
 | 
			
		||||
import { 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 { IGetShipResponse, IPersonalRoomsClient } from "@/src/types/personalRoomsTypes";
 | 
			
		||||
import { getLoadout } from "@/src/services/loadoutService";
 | 
			
		||||
import { toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
 | 
			
		||||
export const getShipController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { 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";
 | 
			
		||||
 | 
			
		||||
export const getVendorInfoController: RequestHandler = async (req, res) => {
 | 
			
		||||
    let manifest = getVendorManifestByTypeName(req.query.vendor as string);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
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 { IVoidTearParticipantInfo } from "@/src/types/requestTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const getVoidProjectionRewardsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,19 +1,18 @@
 | 
			
		||||
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 { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { Account } from "@/src/models/loginModel";
 | 
			
		||||
import { areFriends } from "@/src/services/friendService";
 | 
			
		||||
import { createMessage } from "@/src/services/inboxService";
 | 
			
		||||
import {
 | 
			
		||||
    combineInventoryChanges,
 | 
			
		||||
    getEffectiveAvatarImageType,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} 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";
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountForRequest, getSuffixedName } from "@/src/services/loginService";
 | 
			
		||||
import { handleDailyDealPurchase, handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { IPurchaseParams, IPurchaseResponse, PurchaseSource } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { ExportBundles, ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
const checkPurchaseParams = (params: IPurchaseParams): boolean => {
 | 
			
		||||
 | 
			
		||||
@ -1,14 +1,13 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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 { 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 { TEquipmentKey } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ArtifactPolarity } from "@/src/types/inventoryTypes/commonInventoryTypes";
 | 
			
		||||
import { ExportRecipes } from "warframe-public-export-plus";
 | 
			
		||||
import type { IInventoryChanges } from "../../types/purchaseTypes.ts";
 | 
			
		||||
import type { IEquipmentClient } from "../../types/equipmentTypes.ts";
 | 
			
		||||
import { EquipmentFeatures } from "../../types/equipmentTypes.ts";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { EquipmentFeatures, IEquipmentClient } from "@/src/types/equipmentTypes";
 | 
			
		||||
 | 
			
		||||
interface IGildWeaponRequest {
 | 
			
		||||
    ItemName: string;
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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";
 | 
			
		||||
import { 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 { IKeyChainRequest } from "@/src/types/requestTypes";
 | 
			
		||||
 | 
			
		||||
export const giveKeyChainTriggeredItemsController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = parseString(req.query.accountId);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
import { getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { giveKeyChainMessage } from "@/src/services/questService";
 | 
			
		||||
import { IKeyChainRequest } from "@/src/types/requestTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addItem, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveQuestKeyRewardController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,9 @@
 | 
			
		||||
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";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addLoreFragmentScans, addShipDecorations, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { ITypeCount } from "@/src/types/commonTypes";
 | 
			
		||||
import { ILoreFragmentScan } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveShipDecoAndLoreFragmentController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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";
 | 
			
		||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import { addStartingGear, getInventory } from "@/src/services/inventoryService";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
export const giveStartingGearController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import {
 | 
			
		||||
    addGuildMemberMiscItemContribution,
 | 
			
		||||
    getGuildForRequestEx,
 | 
			
		||||
@ -11,9 +11,9 @@ import {
 | 
			
		||||
    removePigmentsFromGuildMembers,
 | 
			
		||||
    scaleRequiredCount,
 | 
			
		||||
    setGuildTechLogState
 | 
			
		||||
} from "../../services/guildService.ts";
 | 
			
		||||
} from "@/src/services/guildService";
 | 
			
		||||
import { ExportDojoRecipes, ExportRailjackWeapons } from "warframe-public-export-plus";
 | 
			
		||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
 | 
			
		||||
import { getAccountIdForRequest } from "@/src/services/loginService";
 | 
			
		||||
import {
 | 
			
		||||
    addCrewShipWeaponSkin,
 | 
			
		||||
    addEquipment,
 | 
			
		||||
@ -24,17 +24,15 @@ import {
 | 
			
		||||
    getInventory,
 | 
			
		||||
    occupySlot,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} 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";
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { IMiscItem, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { IInventoryChanges } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { config } from "@/src/services/configService";
 | 
			
		||||
import { GuildPermission, ITechProjectClient } from "@/src/types/guildTypes";
 | 
			
		||||
import { GuildMember } from "@/src/models/guildModel";
 | 
			
		||||
import { toMongoDate, toOid } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
 | 
			
		||||
 | 
			
		||||
export const guildTechController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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 { RequestHandler } from "express";
 | 
			
		||||
import { getAccountForRequest } from "@/src/services/loginService";
 | 
			
		||||
import { createNewSession } from "@/src/managers/sessionManager";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { ISession } from "@/src/types/session";
 | 
			
		||||
import { JSONParse } from "json-with-bigint";
 | 
			
		||||
import { toOid2, version_compare } from "../../helpers/inventoryHelpers.ts";
 | 
			
		||||
import { toOid2, version_compare } from "@/src/helpers/inventoryHelpers";
 | 
			
		||||
 | 
			
		||||
const hostSessionController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,8 @@
 | 
			
		||||
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 { 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 { RequestHandler } from "express";
 | 
			
		||||
import { ExportBoosters } from "warframe-public-export-plus";
 | 
			
		||||
 | 
			
		||||
export const hubBlessingController: RequestHandler = async (req, res) => {
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
const hubController: RequestHandler = (_req, res) => {
 | 
			
		||||
    res.json("hub 127.0.0.1:6952");
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
 | 
			
		||||
const hubInstancesController: RequestHandler = (_req, res) => {
 | 
			
		||||
    res.json("list 50 1 0 0 scenarios 0 0 0 0 0 0");
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
import { Inbox } from "../../models/inboxModel.ts";
 | 
			
		||||
import { RequestHandler } from "express";
 | 
			
		||||
import { Inbox } from "@/src/models/inboxModel";
 | 
			
		||||
import {
 | 
			
		||||
    createMessage,
 | 
			
		||||
    createNewEventMessages,
 | 
			
		||||
@ -7,20 +7,20 @@ import {
 | 
			
		||||
    deleteMessageRead,
 | 
			
		||||
    getAllMessagesSorted,
 | 
			
		||||
    getMessage
 | 
			
		||||
} from "../../services/inboxService.ts";
 | 
			
		||||
import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "../../services/loginService.ts";
 | 
			
		||||
} from "@/src/services/inboxService";
 | 
			
		||||
import { getAccountForRequest, getAccountFromSuffixedName, getSuffixedName } from "@/src/services/loginService";
 | 
			
		||||
import {
 | 
			
		||||
    addItems,
 | 
			
		||||
    combineInventoryChanges,
 | 
			
		||||
    getEffectiveAvatarImageType,
 | 
			
		||||
    getInventory,
 | 
			
		||||
    updateCurrency
 | 
			
		||||
} from "../../services/inventoryService.ts";
 | 
			
		||||
import { logger } from "../../utils/logger.ts";
 | 
			
		||||
} from "@/src/services/inventoryService";
 | 
			
		||||
import { logger } from "@/src/utils/logger";
 | 
			
		||||
import { ExportFlavour } from "warframe-public-export-plus";
 | 
			
		||||
import { handleStoreItemAcquisition } from "../../services/purchaseService.ts";
 | 
			
		||||
import { fromStoreItem, isStoreItem } from "../../services/itemDataService.ts";
 | 
			
		||||
import type { IOid } from "../../types/commonTypes.ts";
 | 
			
		||||
import { handleStoreItemAcquisition } from "@/src/services/purchaseService";
 | 
			
		||||
import { fromStoreItem, isStoreItem } from "@/src/services/itemDataService";
 | 
			
		||||
import { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
 | 
			
		||||
export const inboxController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const { deleteId, lastMessage: latestClientMessageId, messageId } = req.query;
 | 
			
		||||
 | 
			
		||||
@ -1,25 +1,25 @@
 | 
			
		||||
import type { RequestHandler } from "express";
 | 
			
		||||
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 {
 | 
			
		||||
import { 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 { IOid } from "@/src/types/commonTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IConsumedSuit,
 | 
			
		||||
    IHelminthFoodRecord,
 | 
			
		||||
    IInventoryClient,
 | 
			
		||||
    IMiscItem
 | 
			
		||||
} from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
			
		||||
import { InventorySlot } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
			
		||||
    IMiscItem,
 | 
			
		||||
    InventorySlot
 | 
			
		||||
} from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import { ExportMisc } from "warframe-public-export-plus";
 | 
			
		||||
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 { 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 {
 | 
			
		||||
    addInfestedFoundryXP,
 | 
			
		||||
    applyCheatsToInfestedFoundry,
 | 
			
		||||
    handleSubsumeCompletion
 | 
			
		||||
} from "../../services/infestedFoundryService.ts";
 | 
			
		||||
} from "@/src/services/infestedFoundryService";
 | 
			
		||||
 | 
			
		||||
export const infestedFoundryController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const account = await getAccountForRequest(req);
 | 
			
		||||
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user