fix: missing vendor infos #565

Merged
VampireKitten merged 5 commits from add-vendor-info into main 2024-10-18 09:13:53 -07:00
23 changed files with 4153 additions and 2 deletions

View File

@ -1,22 +1,132 @@
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import { RequestHandler } from "express"; import { RequestHandler } from "express";
import ArchimedeanVendorManifest from "@/static/fixed_responses/getVendorInfo/ArchimedeanVendorManifest.json"; import ArchimedeanVendorManifest from "@/static/fixed_responses/getVendorInfo/ArchimedeanVendorManifest.json";
import DeimosEntratiFragmentVendorProductsManifest from "@/static/fixed_responses/getVendorInfo/DeimosEntratiFragmentVendorProductsManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/DeimosFishmongerVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosHivemindCommisionsManifestFishmonger from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestFishmonger.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosHivemindCommisionsManifestPetVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestPetVendor.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosHivemindCommisionsManifestProspector from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestProspector.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosHivemindCommisionsManifestTokenVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestTokenVendor.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosHivemindCommisionsManifestWeaponsmith from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestWeaponsmith.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 08:47:36 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the spelling of 'Commisions' to 'Commissions' in import statements

The word 'Commisions' is misspelled in the import statements on lines 5 to 9. It should be 'Commissions'. Correcting the spelling will ensure consistency and prevent potential import errors.

Apply this diff to correct the spelling:

-import DeimosHivemindCommisionsManifestFishmonger from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestFishmonger.json";
+import DeimosHivemindCommissionsManifestFishmonger from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestFishmonger.json";
-import DeimosHivemindCommisionsManifestPetVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestPetVendor.json";
+import DeimosHivemindCommissionsManifestPetVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestPetVendor.json";
-import DeimosHivemindCommisionsManifestProspector from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestProspector.json";
+import DeimosHivemindCommissionsManifestProspector from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestProspector.json";
-import DeimosHivemindCommisionsManifestTokenVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestTokenVendor.json";
+import DeimosHivemindCommissionsManifestTokenVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestTokenVendor.json";
-import DeimosHivemindCommisionsManifestWeaponsmith from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestWeaponsmith.json";
+import DeimosHivemindCommissionsManifestWeaponsmith from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestWeaponsmith.json";

Committable suggestion was skipped due to low confidence.

_:warning: Potential issue_ **Correct the spelling of 'Commisions' to 'Commissions' in import statements** The word 'Commisions' is misspelled in the import statements on lines 5 to 9. It should be 'Commissions'. Correcting the spelling will ensure consistency and prevent potential import errors. Apply this diff to correct the spelling: ```diff -import DeimosHivemindCommisionsManifestFishmonger from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestFishmonger.json"; +import DeimosHivemindCommissionsManifestFishmonger from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestFishmonger.json"; -import DeimosHivemindCommisionsManifestPetVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestPetVendor.json"; +import DeimosHivemindCommissionsManifestPetVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestPetVendor.json"; -import DeimosHivemindCommisionsManifestProspector from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestProspector.json"; +import DeimosHivemindCommissionsManifestProspector from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestProspector.json"; -import DeimosHivemindCommisionsManifestTokenVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestTokenVendor.json"; +import DeimosHivemindCommissionsManifestTokenVendor from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestTokenVendor.json"; -import DeimosHivemindCommisionsManifestWeaponsmith from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestWeaponsmith.json"; +import DeimosHivemindCommissionsManifestWeaponsmith from "@/static/fixed_responses/getVendorInfo/DeimosHivemindCommissionsManifestWeaponsmith.json"; ``` > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosHivemindTokenVendorManifest from "@/static/fixed_responses/getVendorInfo/DeimosHivemindTokenVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosPetVendorManifest from "@/static/fixed_responses/getVendorInfo/DeimosPetVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DeimosProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/DeimosProspectorVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import DuviriAcrithisVendorManifest from "@/static/fixed_responses/getVendorInfo/DuviriAcrithisVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import EntratiLabsEntratiLabsCommisionsManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabsCommisionsManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import EntratiLabsEntratiLabVendorManifest from "@/static/fixed_responses/getVendorInfo/EntratiLabsEntratiLabVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import HubsIronwakeDondaVendorManifest from "@/static/fixed_responses/getVendorInfo/HubsIronwakeDondaVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import HubsRailjackCrewMemberVendorManifest from "@/static/fixed_responses/getVendorInfo/HubsRailjackCrewMemberVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import MaskSalesmanManifest from "@/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json"; import MaskSalesmanManifest from "@/static/fixed_responses/getVendorInfo/MaskSalesmanManifest.json";
import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import SolarisFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/SolarisFishmongerVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import SolarisProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/SolarisProspectorVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import SolarisDebtTokenVendorManifest from "@/static/fixed_responses/getVendorInfo/SolarisDebtTokenVendorManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import SolarisDebtTokenVendorRepossessionsManifest from "@/static/fixed_responses/getVendorInfo/SolarisDebtTokenVendorRepossessionsManifest.json";
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
import ZarimanCommisionsManifestArchimedean from "@/static/fixed_responses/getVendorInfo/ZarimanCommisionsManifestArchimedean.json"; import ZarimanCommisionsManifestArchimedean from "@/static/fixed_responses/getVendorInfo/ZarimanCommisionsManifestArchimedean.json";
export const getVendorInfoController: RequestHandler = (req, res) => { export const getVendorInfoController: RequestHandler = (req, res) => {
switch (req.query.vendor as string) { switch (req.query.vendor as string) {
case "/Lotus/Types/Game/VendorManifests/Zariman/ArchimedeanVendorManifest": case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(ArchimedeanVendorManifest); res.json(OstronFishmongerVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(OstronProspectorVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(OstronPetVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break; break;
case "/Lotus/Types/Game/VendorManifests/Ostron/MaskSalesmanManifest": case "/Lotus/Types/Game/VendorManifests/Ostron/MaskSalesmanManifest":
res.json(MaskSalesmanManifest); res.json(MaskSalesmanManifest);
break; break;
case "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(SolarisFishmongerVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(SolarisProspectorVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Solaris/DebtTokenVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(SolarisDebtTokenVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Solaris/DebtTokenVendorRepossessionsManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(SolarisDebtTokenVendorRepossessionsManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 08:47:36 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Missing Vendor Manifest for 'Ticker'

According to issue #560, the vendor 'Ticker' does not have a vendor manifest included in the controller. It appears that 'Ticker' is still missing from the getVendorInfoController. To fully resolve the linked issue, please include the 'Ticker' vendor manifest.

Would you like assistance in adding the 'Ticker' vendor manifest to the controller?

_:warning: Potential issue_ **Missing Vendor Manifest for 'Ticker'** According to issue #560, the vendor 'Ticker' does not have a vendor manifest included in the controller. It appears that 'Ticker' is still missing from the `getVendorInfoController`. To fully resolve the linked issue, please include the 'Ticker' vendor manifest. Would you like assistance in adding the 'Ticker' vendor manifest to the controller? <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Hubs/RailjackCrewMemberVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(HubsRailjackCrewMemberVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestWeaponsmith":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosHivemindCommisionsManifestWeaponsmith);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestFishmonger":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosHivemindCommisionsManifestFishmonger);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/FishmongerVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosFishmongerVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestProspector":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosHivemindCommisionsManifestProspector);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/ProspectorVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosProspectorVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestPetVendor":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosHivemindCommisionsManifestPetVendor);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/PetVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosPetVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestTokenVendor":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosHivemindCommisionsManifestTokenVendor);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/EntratiFragmentVendorProductsManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosEntratiFragmentVendorProductsManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

💡 Codebase verification

Typographical Error in "Commisions"

Detected inconsistent usage of "HivemindCommisionsManifest" in src/controllers/api/getVendorInfoController.ts. It appears "Commisions" is a typo and should be "Commissions". Please update all relevant filenames, imports, and references accordingly.

🔗 Analysis chain

Check for consistency in vendor manifest filenames and imports

Several imports and case statements use "HivemindCommisionsManifest" with potential typos in "Commisions". Ensure that all filenames, imports, and references are consistently named and free of typographical errors.

Run the following script to identify all occurrences of "Commisions" to verify spelling:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find all occurrences of "Commisions" in filenames and content.

# Expected: Confirm whether "Commisions" should be "Commissions".
fd -e json 'Commisions' --exec echo "Filename: {}"
rg 'Commisions' --type ts --globals

Length of output: 627

_:bulb: Codebase verification_ **Typographical Error in "Commisions"** Detected inconsistent usage of "HivemindCommisionsManifest" in `src/controllers/api/getVendorInfoController.ts`. It appears "Commisions" is a typo and should be "Commissions". Please update all relevant filenames, imports, and references accordingly. <details> <summary>🔗 Analysis chain</summary> **Check for consistency in vendor manifest filenames and imports** Several imports and case statements use "HivemindCommisionsManifest" with potential typos in "Commisions". Ensure that all filenames, imports, and references are consistently named and free of typographical errors. Run the following script to identify all occurrences of "Commisions" to verify spelling: </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Find all occurrences of "Commisions" in filenames and content. # Expected: Confirm whether "Commisions" should be "Commissions". fd -e json 'Commisions' --exec echo "Filename: {}" rg 'Commisions' --type ts --globals ``` Length of output: 627 </details> <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Deimos/HivemindTokenVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DeimosHivemindTokenVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(HubsIronwakeDondaVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Zariman/ArchimedeanVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(ArchimedeanVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Duviri/AcrithisVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(DuviriAcrithisVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/Zariman/ZarimanCommisionsManifestArchimedean": case "/Lotus/Types/Game/VendorManifests/Zariman/ZarimanCommisionsManifestArchimedean":
res.json(ZarimanCommisionsManifestArchimedean); res.json(ZarimanCommisionsManifestArchimedean);
break; break;
case "/Lotus/Types/Game/VendorManifests/EntratiLabs/EntratiLabVendorManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(EntratiLabsEntratiLabVendorManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
case "/Lotus/Types/Game/VendorManifests/EntratiLabs/EntratiLabsCommisionsManifest":
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
res.json(EntratiLabsEntratiLabsCommisionsManifest);
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
break;
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
default: default:
throw new Error(`Unknown vendor: ${req.query.vendor}`); throw new Error(`Unknown vendor: ${req.query.vendor}`);
} }

coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Correct the import paths for Ostron manifests

The imports for OstronProspectorVendorManifest and OstronPetVendorManifest are both importing from the OstronFishmongerVendorManifest.json file. This seems incorrect. Each manifest should be imported from its corresponding JSON file.

Apply this diff to correct the import paths:

 import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
-import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
+import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
+import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json";
import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json";
import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json";
_:warning: Potential issue_ **Correct the import paths for Ostron manifests** The imports for `OstronProspectorVendorManifest` and `OstronPetVendorManifest` are both importing from the `OstronFishmongerVendorManifest.json` file. This seems incorrect. Each manifest should be imported from its corresponding JSON file. Apply this diff to correct the import paths: ```diff import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; -import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; +import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; +import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion import OstronFishmongerVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronFishmongerVendorManifest.json"; import OstronProspectorVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronProspectorVendorManifest.json"; import OstronPetVendorManifest from "@/static/fixed_responses/getVendorInfo/OstronPetVendorManifest.json"; ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider refactoring the switch statement for better maintainability

The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests.

Here's an example of how you might refactor the switch statement:

+const vendorManifestMap: { [key: string]: any } = {
+    "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest,
+    "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest,
+    // Include all other vendor paths and their corresponding manifests
+};

export const getVendorInfoController: RequestHandler = (req, res) => {
-    switch (req.query.vendor as string) {
-        case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest":
-            res.json(OstronFishmongerVendorManifest);
-            break;
-        case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest":
-            res.json(OstronProspectorVendorManifest);
-            break;
-        // ... other cases ...
-        default:
-            throw new Error(`Unknown vendor: ${req.query.vendor}`);
-    }
+    const vendorPath = req.query.vendor as string;
+    const manifest = vendorManifestMap[vendorPath];
+    if (manifest) {
+        res.json(manifest);
+    } else {
+        throw new Error(`Unknown vendor: ${vendorPath}`);
+    }
};

This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future.

Committable suggestion was skipped due to low confidence.

_:hammer_and_wrench: Refactor suggestion_ **Consider refactoring the switch statement for better maintainability** The switch statement has grown significantly with many cases, which could impact maintainability and readability. Consider refactoring this logic by using a mapping object to associate vendor paths with their corresponding manifests. Here's an example of how you might refactor the switch statement: ```diff +const vendorManifestMap: { [key: string]: any } = { + "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": OstronFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": OstronProspectorVendorManifest, + "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest": OstronPetVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest": SolarisFishmongerVendorManifest, + "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest": SolarisProspectorVendorManifest, + // Include all other vendor paths and their corresponding manifests +}; export const getVendorInfoController: RequestHandler = (req, res) => { - switch (req.query.vendor as string) { - case "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest": - res.json(OstronFishmongerVendorManifest); - break; - case "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest": - res.json(OstronProspectorVendorManifest); - break; - // ... other cases ... - default: - throw new Error(`Unknown vendor: ${req.query.vendor}`); - } + const vendorPath = req.query.vendor as string; + const manifest = vendorManifestMap[vendorPath]; + if (manifest) { + res.json(manifest); + } else { + throw new Error(`Unknown vendor: ${vendorPath}`); + } }; ``` This refactor simplifies the controller, enhances readability, and makes it easier to add or remove vendors in the future. > Committable suggestion was skipped due to low confidence. <!-- This is an auto-generated comment by CodeRabbit -->

View File

@ -0,0 +1,300 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e01c96976e97d6b802e"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/EntratiFragmentVendorProductsManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/SeriglassShard",
"ItemPrices": [
{
"ItemCount": 20,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e8390"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/PhotoboothTileDeimosBouncy",
"ItemPrices": [
{
"ItemCount": 50,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e8391"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/PhotoboothTileDeimosBreakthrough",
"ItemPrices": [
{
"ItemCount": 50,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e8392"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/PhotoboothTileDeimosCatacombs",
"ItemPrices": [
{
"ItemCount": 50,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e8393"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/PhotoboothTileDeimosDownfall",
"ItemPrices": [
{
"ItemCount": 50,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e8394"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/PhotoboothTileDeimosObsession",
"ItemPrices": [
{
"ItemCount": 50,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e8395"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/PhotoboothTileDeimosTunnels",
"ItemPrices": [
{
"ItemCount": 50,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e8396"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Deimos/FatherTokenShipDeco",
"ItemPrices": [
{
"ItemCount": 10,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonA",
"ProductCategory": "MiscItems"
},
{
"ItemCount": 5,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e83f1"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Deimos/LisetPropEntratiLamp",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonB",
"ItemCount": 12,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e83f2"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Deimos/LisetPropInfestedCrate",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonA",
"ItemCount": 11,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e83f3"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Deimos/LisetPropInfestedCystC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e83f4"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/StoreItems/AvatarImages/RequiemRisGlyph",
"ItemPrices": [
{
"ItemCount": 15,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b10ba592c4c95e83f5"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Deimos/MotherTokenShipDeco",
"ItemPrices": [
{
"ItemCount": 10,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB",
"ProductCategory": "MiscItems"
},
{
"ItemCount": 5,
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentRareA",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e83f6"
}
}
],
"PropertyTextHash": "DB953EE163A65B3BCC0552902321D791",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,106 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e01c96976e97d6b8016"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/FishmongerVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Deimos/FishParts/DeimosOrokinFishAPartItem",
"PremiumPrice": [9, 9],
"Bin": "BIN_1",
"QuantityMultiplier": 10,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e91b9"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishDPartItem",
"PremiumPrice": [17, 17],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e91ba"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"PremiumPrice": [10, 10],
"Bin": "BIN_1",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e91bb"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishBPartItem",
"PremiumPrice": [6, 6],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e91bc"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishAPartItem",
"PremiumPrice": [5, 5],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e91bd"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Deimos/FishParts/DeimosGenericSharedFishPartItem",
"PremiumPrice": [7, 7],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e91be"
}
}
coderabbitai[bot] commented 2024-10-18 06:38:25 -07:00 (Migrated from github.com)
Review

💡 Codebase verification

Inconsistencies found in vendor manifest properties.

The AllowMultipurchase property is not consistently set to true across all items, with 300 instances deviating. Additionally, both Expiry and Bin properties have multiple unique values, indicating varying configurations. Please review these properties to ensure they align with the intended behavior and consider documenting their purposes for clarity.

🔗 Analysis chain

Consider optimizing redundant properties and clarify the use of certain fields.

The store items are well-structured and provide comprehensive information. However, there are a few points to consider:

  1. AllowMultipurchase is set to true for all items. If this is always the case for this vendor, consider moving it to the VendorInfo level to reduce redundancy.

  2. All Expiry dates are set to a far-future date. If this is a default value meaning "never expires", consider using a more explicit representation or moving it to the VendorInfo level if it applies to all items.

  3. The use of "BIN_0" and "BIN_1" for the Bin property is not immediately clear. Please add a comment explaining the significance of these values.

To verify the consistency of these properties across other vendor manifests, please run the following script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency of AllowMultipurchase, Expiry, and Bin properties across vendor manifests

# Test: Check if AllowMultipurchase is always true
echo "Checking AllowMultipurchase:"
rg '"AllowMultipurchase":' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c

# Test: Check for unique Expiry values
echo "Checking unique Expiry values:"
rg '"Expiry":' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c

# Test: Check for unique Bin values
echo "Checking unique Bin values:"
rg '"Bin":' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c

Length of output: 2527


Script:

#!/bin/bash
# Description: Check for consistency of AllowMultipurchase, Expiry, and Bin properties across vendor manifests

# Test: Check if AllowMultipurchase is always true
echo "Checking AllowMultipurchase consistency:"
rg '"AllowMultipurchase"\s*:' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | grep -v '"AllowMultipurchase": true' | wc -l

# Test: Check for unique Expiry values
echo "Checking unique Expiry values:"
rg '"Expiry"\s*:' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c

# Test: Check for unique Bin values
echo "Checking unique Bin values:"
rg '"Bin"\s*:' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c

Length of output: 1023

_:bulb: Codebase verification_ **Inconsistencies found in vendor manifest properties.** The `AllowMultipurchase` property is not consistently set to `true` across all items, with 300 instances deviating. Additionally, both `Expiry` and `Bin` properties have multiple unique values, indicating varying configurations. Please review these properties to ensure they align with the intended behavior and consider documenting their purposes for clarity. <details> <summary>🔗 Analysis chain</summary> **Consider optimizing redundant properties and clarify the use of certain fields.** The store items are well-structured and provide comprehensive information. However, there are a few points to consider: 1. `AllowMultipurchase` is set to `true` for all items. If this is always the case for this vendor, consider moving it to the `VendorInfo` level to reduce redundancy. 2. All `Expiry` dates are set to a far-future date. If this is a default value meaning "never expires", consider using a more explicit representation or moving it to the `VendorInfo` level if it applies to all items. 3. The use of "BIN_0" and "BIN_1" for the `Bin` property is not immediately clear. Please add a comment explaining the significance of these values. To verify the consistency of these properties across other vendor manifests, please run the following script: </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Check for consistency of AllowMultipurchase, Expiry, and Bin properties across vendor manifests # Test: Check if AllowMultipurchase is always true echo "Checking AllowMultipurchase:" rg '"AllowMultipurchase":' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c # Test: Check for unique Expiry values echo "Checking unique Expiry values:" rg '"Expiry":' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c # Test: Check for unique Bin values echo "Checking unique Bin values:" rg '"Bin":' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c ``` Length of output: 2527 --- Script: ```shell #!/bin/bash # Description: Check for consistency of AllowMultipurchase, Expiry, and Bin properties across vendor manifests # Test: Check if AllowMultipurchase is always true echo "Checking AllowMultipurchase consistency:" rg '"AllowMultipurchase"\s*:' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | grep -v '"AllowMultipurchase": true' | wc -l # Test: Check for unique Expiry values echo "Checking unique Expiry values:" rg '"Expiry"\s*:' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c # Test: Check for unique Bin values echo "Checking unique Bin values:" rg '"Bin"\s*:' static/fixed_responses/getVendorInfo/ --json | jq -r '.data.lines.text' | sort | uniq -c ``` Length of output: 1023 </details> <!-- This is an auto-generated comment by CodeRabbit -->
],
"PropertyTextHash": "6DF13A7FB573C25B4B4F989CBEFFC615",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,241 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e01c96976e97d6b8009"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestFishmonger",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishFPartItem",
"ItemCount": 6,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 16,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 63978959,
"Id": {
"$oid": "66fd60b10ba592c4c95e82cc"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishBPartItem",
"ItemCount": 5,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishDPartItem",
"ItemCount": 4,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3808064409,
"Id": {
"$oid": "66fd60b10ba592c4c95e82cd"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishEPartItem",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 2,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3849710569,
"Id": {
"$oid": "66fd60b10ba592c4c95e82d0"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosGenericInfestedFishPartItem",
"ItemCount": 5,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 4,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1687111317,
"Id": {
"$oid": "66fd60b10ba592c4c95e82d1"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishAPartItem",
"ItemCount": 4,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishBPartItem",
"ItemCount": 4,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2267414276,
"Id": {
"$oid": "66fd60b10ba592c4c95e82d2"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosGenericInfestedFishPartItem",
"ItemCount": 6,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosGenericSharedFishPartItem",
"ItemCount": 6,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1497494256,
"Id": {
"$oid": "66fd60b10ba592c4c95e82d3"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosGenericInfestedFishPartItem",
"ItemCount": 5,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 2,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2883527039,
"Id": {
"$oid": "66fd60b10ba592c4c95e82d4"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Daughter/DaughterTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishGPartItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 12,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 4116691539,
"Id": {
"$oid": "66fd60b10ba592c4c95e82d5"
}
}
],
"PropertyTextHash": "54B6992C6314367F8EEA74B7F1A1C352",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,287 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e03c96976e97d6b80a3"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestPetVendor",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedMaggotRare",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedMaggotCommon",
"ItemCount": 4,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2707699975,
"Id": {
"$oid": "66fd60b10ba592c4c95e8897"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedPredatorCommon",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedMaggotCommon",
"ItemCount": 4,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3610714639,
"Id": {
"$oid": "66fd60b10ba592c4c95e8898"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedPredatorCommon",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedMaggotRare",
"ItemCount": 1,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1782149988,
"Id": {
"$oid": "66fd60b10ba592c4c95e8899"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedMergooCommon",
"ItemCount": 3,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2149416825,
"Id": {
"$oid": "66fd60b10ba592c4c95e889a"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedCritterRare",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedKdriveUncommon",
"ItemCount": 2,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 890863265,
"Id": {
"$oid": "66fd60b10ba592c4c95e889b"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedCritterCommon",
"ItemCount": 4,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedPredatorCommon",
"ItemCount": 4,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2507606934,
"Id": {
"$oid": "66fd60b10ba592c4c95e889c"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedPredatorRare",
"ItemCount": 5,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1037784729,
"Id": {
"$oid": "66fd60b10ba592c4c95e889e"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedMaggotCommon",
"ItemCount": 4,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedCritterCommon",
"ItemCount": 4,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2048707501,
"Id": {
"$oid": "66fd60b10ba592c4c95e889f"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedKdriveRare",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedPredatorCommon",
"ItemCount": 2,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 4038149313,
"Id": {
"$oid": "66fd60b10ba592c4c95e88a0"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Son/SonTaskD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedMergooCommon",
"ItemCount": 3,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/AnimalTagInfestedPredatorRare",
"ItemCount": 3,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_3",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2155290001,
"Id": {
"$oid": "66fd60b10ba592c4c95e88a1"
}
}
],
"PropertyTextHash": "61E66B4E9E5A121DD06A476AE2A81B24",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,312 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e01c96976e97d6b7ff1"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestProspector",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreAItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemBItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1370972414,
"Id": {
"$oid": "66fd60b20ba592c4c95e8ef8"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreBItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosUncommonGemAItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosUncommonOreAItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2361790143,
"Id": {
"$oid": "66fd60b20ba592c4c95e8ef9"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemAItem",
"ItemCount": 6,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreAItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 472210739,
"Id": {
"$oid": "66fd60b20ba592c4c95e8efb"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreBItem",
"ItemCount": 12,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreAItem",
"ItemCount": 15,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3072462886,
"Id": {
"$oid": "66fd60b20ba592c4c95e8efd"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemAItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreAItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 767765909,
"Id": {
"$oid": "66fd60b20ba592c4c95e8efe"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosEidolonGemAItem",
"ItemCount": 5,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosEidolonGemBItem",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosRareOreAItem",
"ItemCount": 22,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_3",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 512512880,
"Id": {
"$oid": "66fd60b20ba592c4c95e8eff"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreAItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemAItem",
"ItemCount": 6,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2037734419,
"Id": {
"$oid": "66fd60b20ba592c4c95e8f00"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosUncommonOreAItem",
"ItemCount": 13,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreAItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1433662587,
"Id": {
"$oid": "66fd60b20ba592c4c95e8f01"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonOreAItem",
"ItemCount": 12,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemAItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1618492734,
"Id": {
"$oid": "66fd60b20ba592c4c95e8f02"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Otak/OtakTaskD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosUncommonGemAItem",
"ItemCount": 7,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemBItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosRareOreAItem",
"ItemCount": 12,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_3",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 4032699594,
"Id": {
"$oid": "66fd60b20ba592c4c95e8f03"
}
}
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

💡 Codebase verification

Duplicate StoreItem and Bin Combinations Found

The ItemManifest contains 3 instances where the combination of StoreItem and Bin is not unique. This duplication may cause conflicts or unexpected behavior in the vendor system's dynamic pricing and availability mechanisms.

  • Ensure that each StoreItem is uniquely associated with a single Bin to maintain data integrity.
🔗 Analysis chain

LGTM! Clarify the purpose of repeated StoreItem values.

The content of the ItemManifest array provides a diverse range of items with varying prices and bins, which allows for a flexible and dynamic vendor system.

Could you please clarify the purpose of having multiple entries with the same StoreItem value but different Bin values and ItemPrices? This structure suggests a dynamic pricing or availability system, but it would be helpful to understand the specific use case. For example, how are these different entries for the same StoreItem used in the application?

To verify the uniqueness of combinations, you can run the following script:

This script will return the number of non-unique combinations of StoreItem and Bin. If the result is 0, all combinations are unique.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for unique combinations of StoreItem and Bin

jq '.VendorInfo.ItemManifest | group_by(.StoreItem + .Bin) | map(select(length > 1)) | length' static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestProspector.json

Length of output: 183

_:bulb: Codebase verification_ **Duplicate `StoreItem` and `Bin` Combinations Found** The `ItemManifest` contains 3 instances where the combination of `StoreItem` and `Bin` is not unique. This duplication may cause conflicts or unexpected behavior in the vendor system's dynamic pricing and availability mechanisms. - Ensure that each `StoreItem` is uniquely associated with a single `Bin` to maintain data integrity. <details> <summary>🔗 Analysis chain</summary> **LGTM! Clarify the purpose of repeated `StoreItem` values.** The content of the `ItemManifest` array provides a diverse range of items with varying prices and bins, which allows for a flexible and dynamic vendor system. Could you please clarify the purpose of having multiple entries with the same `StoreItem` value but different `Bin` values and `ItemPrices`? This structure suggests a dynamic pricing or availability system, but it would be helpful to understand the specific use case. For example, how are these different entries for the same `StoreItem` used in the application? To verify the uniqueness of combinations, you can run the following script: This script will return the number of non-unique combinations of `StoreItem` and `Bin`. If the result is 0, all combinations are unique. </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Check for unique combinations of StoreItem and Bin jq '.VendorInfo.ItemManifest | group_by(.StoreItem + .Bin) | map(select(length > 1)) | length' static/fixed_responses/getVendorInfo/DeimosHivemindCommisionsManifestProspector.json ``` Length of output: 183 </details> <!-- This is an auto-generated comment by CodeRabbit -->
],
"PropertyTextHash": "0AC3C284471037011B36EC51238D13A9",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,223 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e03c96976e97d6b80d2"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestTokenVendor",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Grandmother/GrandmotherTaskD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonC",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonA",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonA",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1415858946,
"Id": {
"$oid": "670a47b1872b2325705e746c"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Grandmother/GrandmotherTaskD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonB",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonA",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonA",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3178511462,
"Id": {
"$oid": "670a47b1872b2325705e746e"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Grandmother/GrandmotherTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonA",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonC",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3313207881,
"Id": {
"$oid": "670a47b1872b2325705e7471"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Grandmother/GrandmotherTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonB",
"ItemCount": 2,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2241288767,
"Id": {
"$oid": "670a47b1872b2325705e7472"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Grandmother/GrandmotherTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3395082536,
"Id": {
"$oid": "670a47b1872b2325705e7473"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Grandmother/GrandmotherTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonC",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 493457277,
"Id": {
"$oid": "670a47b1872b2325705e7474"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Grandmother/GrandmotherTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Deimos/EntratiFragmentCommonB",
"ItemCount": 2,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 4225814786,
"Id": {
"$oid": "670a47b1872b2325705e7475"
}
}
],
"PropertyTextHash": "58884EC7ECE7D22AD4BD9E9B436C37A8",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,254 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e02c96976e97d6b8049"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/HivemindCommisionsManifestWeaponsmith",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfGorgaricusSeedItem",
"ItemCount": 16,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2438288725,
"Id": {
"$oid": "66fd60b00ba592c4c95e7caf"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Game/FishBait/Infested/OrokinFishBaitA",
"ItemCount": 6,
"ProductCategory": "Consumables"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfMapricoFruitItem",
"ItemCount": 21,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Game/FishBait/Infested/InfestedFishBaitA",
"ItemCount": 6,
"ProductCategory": "Consumables"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2431016296,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb2"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfMapricoFruitItem",
"ItemCount": 16,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 18484856,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb3"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfMapricoFruitItem",
"ItemCount": 14,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2278976516,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb4"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Game/FishBait/Infested/OrokinFishBaitA",
"ItemCount": 7,
"ProductCategory": "Consumables"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/OrbStoneItem",
"ItemCount": 25,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Game/FishBait/Infested/InfestedFishBaitA",
"ItemCount": 6,
"ProductCategory": "Consumables"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3150323898,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb5"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfMapricoFruitItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 3971758486,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb6"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfGorgaricusSeedItem",
"ItemCount": 17,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/OrbStoneItem",
"ItemCount": 18,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2512835718,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb7"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/OrbStoneItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 825411410,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb8"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Father/FatherTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfGorgaricusSeedItem",
"ItemCount": 22,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/OrbStoneItem",
"ItemCount": 12,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2383349671,
"Id": {
"$oid": "66fd60b00ba592c4c95e7cb9"
}
}
],
"PropertyTextHash": "CE9413585756FA39B793A9814E74E49F",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,286 @@
{
"VendorInfo": {
"_id": {
"$oid": "5fb70313c96976e97d6be6fe"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/HivemindTokenVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedySonB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishBPartItem",
"ItemCount": 36,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishEPartItem",
"ItemCount": 36,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 379215713,
"Id": {
"$oid": "66fd60b20ba592c4c95e9308"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedyMotherB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosGenericInfestedFishPartItem",
"ItemCount": 80,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfGorgaricusSeedItem",
"ItemCount": 32,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 28,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2534781881,
"Id": {
"$oid": "66fd60b20ba592c4c95e9309"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedyDaughterB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosUncommonGemAItem",
"ItemCount": 28,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 32,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishAPartItem",
"ItemCount": 32,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 1507786123,
"Id": {
"$oid": "66fd60b20ba592c4c95e930a"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedySonA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosRareGemAItem",
"ItemCount": 15,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemAItem",
"ItemCount": 30,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfGorgaricusSeedItem",
"ItemCount": 21,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 616241643,
"Id": {
"$oid": "66fd60b20ba592c4c95e930b"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedyOtakA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishBPartItem",
"ItemCount": 21,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishCPartItem",
"ItemCount": 27,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishEPartItem",
"ItemCount": 27,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2888479655,
"Id": {
"$oid": "66fd60b20ba592c4c95e930c"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedyGrandmotherA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemBItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishBPartItem",
"ItemCount": 28,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfGorgaricusSeedItem",
"ItemCount": 24,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosCommonGemAItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2874726481,
"Id": {
"$oid": "66fd60b20ba592c4c95e930d"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedyFatherA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosGenericSharedFishPartItem",
"ItemCount": 75,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Deimos/DeimosUncommonGemAItem",
"ItemCount": 27,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/OrbStoneItem",
"ItemCount": 30,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 274676857,
"Id": {
"$oid": "66fd60b20ba592c4c95e930e"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/Deimos/Remedies/RemedyDaughterA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/InfestedMicroplanet/Resources/InfGorgaricusSeedItem",
"ItemCount": 24,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosInfestedFishBPartItem",
"ItemCount": 30,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Deimos/FishParts/DeimosGenericSharedFishPartItem",
"ItemCount": 51,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"LocTagRandSeed": 2487943761,
"Id": {
"$oid": "66fd60b20ba592c4c95e930f"
}
}
],
"PropertyTextHash": "C34BF0BEDEAF7CBB0EEBFFECDFD6646D",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,136 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e02c96976e97d6b8080"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/PetVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedNexiferaRare",
"PremiumPrice": [35, 35],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89f6"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedNexiferaUncommon",
"PremiumPrice": [22, 22],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89f7"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedMergooUncommon",
"PremiumPrice": [28, 28],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89f8"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedKdriveUncommon",
"PremiumPrice": [25, 25],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89f9"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedZongroCommon",
"PremiumPrice": [14, 14],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89fa"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedPredatorCommon",
"PremiumPrice": [12, 12],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89fb"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedMergooCommon",
"PremiumPrice": [13, 13],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89fc"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Deimos/AnimalTagInfestedKdriveCommon",
"PremiumPrice": [14, 14],
"Bin": "BIN_0",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b10ba592c4c95e89fd"
}
}
],
"PropertyTextHash": "F14C6B6A61D7585A10537995661F5220",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,61 @@
{
"VendorInfo": {
"_id": {
"$oid": "5f456e00c96976e97d6b7fd7"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Deimos/ProspectorVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Deimos/DeimosUncommonGemACutItem",
"PremiumPrice": [13, 13],
"Bin": "BIN_1",
"QuantityMultiplier": 10,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e93a8"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Deimos/DeimosCommonGemBCutItem",
"PremiumPrice": [7, 7],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e93a9"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Deimos/DeimosCommonGemACutItem",
"PremiumPrice": [7, 7],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e93aa"
}
}
],
"PropertyTextHash": "2BBC116116C757F6AF4FBC3B9BF754C8",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,321 @@
{
"VendorInfo": {
"_id": {
"$oid": "64493ca759e9b164c86a2e14"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Duviri/AcrithisVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/DangerRoom/DangerRoomTileDuviriDragonArena",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriDragonDropItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_5",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b00ba592c4c95e7d88"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Recipes/Components/FormaBlueprint",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriDragonDropItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b00ba592c4c95e7deb"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/UtilityUnlocker",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriDragonDropItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b00ba592c4c95e7dec"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/Kuva",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriDragonDropItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 5000,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b00ba592c4c95e7ded"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/WeaponUtilityUnlocker",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriDragonDropItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b00ba592c4c95e7dee"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/Kuva",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriDragonDropItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 5000,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "670c5e12576f461f1e5e739c"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/Plastids",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriPlantItemD",
"ItemCount": 40,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"Id": {
"$oid": "6710c312fa0b2c5cd85e73c3"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Duviri/DUVxPlanterHangingPot",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriPlantItemE",
"ItemCount": 51,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "6710c312fa0b2c5cd85e73c6"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Duviri/DUVxPlanterPotB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriRockItem",
"ItemCount": 44,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "6710c312fa0b2c5cd85e73c7"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/NeuralSensor",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriPlantItemA",
"ItemCount": 52,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 3,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"Id": {
"$oid": "6710c312fa0b2c5cd85e73c8"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/ControlModule",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriPlantItemF",
"ItemCount": 42,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 3,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"Id": {
"$oid": "6710c312fa0b2c5cd85e73c9"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/PhotoboothTileDuviriArenaOpera",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriProcessedItem",
"ItemCount": 240,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b00ba592c4c95e7ddd"
}
},
{
"StoreItem": "/Lotus/StoreItems/Upgrades/CosmeticEnhancers/Utility/HealthWhileUsingChanneledAbilities",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriDragonDropItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_3",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b00ba592c4c95e7e01"
}
},
{
"StoreItem": "/Lotus/StoreItems/Upgrades/Boons/DuviriVendorBoonItem",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Duviri/Resource/DuviriPlantItemG",
"ItemCount": 50,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_4",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"Id": {
"$oid": "6711a412ba1ba01e405e739c"
}
}
],
"PropertyTextHash": "9EE40048EB685549ACA3D01AB1F65BF2",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

💡 Codebase verification

Duplicate "Kuva" Entry Detected in DuviriAcrithisVendorManifest.json

The DuviriAcrithisVendorManifest.json contains two entries for the "Kuva" item, whereas other vendor manifests have at most one or none. This duplication appears to be unintended and may require correction to maintain consistency across all vendor manifests.

  • Action Required: Remove the redundant "Kuva" entry from DuviriAcrithisVendorManifest.json unless there's a documented reason for having duplicates.

This adjustment will ensure uniformity and prevent potential issues related to item pricing or availability.

🔗 Analysis chain

Overall LGTM: Acrithis vendor manifest addresses PR objectives with minor verification needed.

This new JSON file successfully provides the missing Acrithis vendor manifest, directly addressing the issue #562 mentioned in the PR objectives. The structure is consistent and well-formed, offering a diverse range of items with appropriate pricing and purchase rules.

However, there's one point that requires verification:

  1. There appears to be a duplicate entry for the "Kuva" item. Please confirm if this is intentional or if one of the entries should be modified or removed.

Once this point is addressed, the file will fully meet the requirements for the Acrithis vendor manifest.

To assist in verifying the duplicate Kuva entry, you can run the following command to check if this pattern exists in other vendor manifests:

This script will output the count of Kuva entries for each vendor manifest. If other manifests also have multiple Kuva entries, it might indicate that this is an intentional design choice.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for duplicate Kuva entries across all vendor manifests
for file in static/fixed_responses/getVendorInfo/*.json; do
  echo "Checking $file:"
  jq '.VendorInfo.ItemManifest[] | select(.StoreItem == "/Lotus/StoreItems/Types/Items/MiscItems/Kuva")' "$file" | jq -s 'length'
done

Length of output: 10535

_:bulb: Codebase verification_ **Duplicate "Kuva" Entry Detected in DuviriAcrithisVendorManifest.json** The `DuviriAcrithisVendorManifest.json` contains two entries for the "Kuva" item, whereas other vendor manifests have at most one or none. This duplication appears to be unintended and may require correction to maintain consistency across all vendor manifests. - **Action Required:** Remove the redundant "Kuva" entry from `DuviriAcrithisVendorManifest.json` unless there's a documented reason for having duplicates. This adjustment will ensure uniformity and prevent potential issues related to item pricing or availability. <details> <summary>🔗 Analysis chain</summary> **Overall LGTM: Acrithis vendor manifest addresses PR objectives with minor verification needed.** This new JSON file successfully provides the missing Acrithis vendor manifest, directly addressing the issue #562 mentioned in the PR objectives. The structure is consistent and well-formed, offering a diverse range of items with appropriate pricing and purchase rules. However, there's one point that requires verification: 1. There appears to be a duplicate entry for the "Kuva" item. Please confirm if this is intentional or if one of the entries should be modified or removed. Once this point is addressed, the file will fully meet the requirements for the Acrithis vendor manifest. To assist in verifying the duplicate Kuva entry, you can run the following command to check if this pattern exists in other vendor manifests: This script will output the count of Kuva entries for each vendor manifest. If other manifests also have multiple Kuva entries, it might indicate that this is an intentional design choice. </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Check for duplicate Kuva entries across all vendor manifests for file in static/fixed_responses/getVendorInfo/*.json; do echo "Checking $file:" jq '.VendorInfo.ItemManifest[] | select(.StoreItem == "/Lotus/StoreItems/Types/Items/MiscItems/Kuva")' "$file" | jq -s 'length' done ``` Length of output: 10535 </details> <!-- This is an auto-generated comment by CodeRabbit -->

View File

@ -0,0 +1,245 @@
{
"VendorInfo": {
"_id": {
"$oid": "6579d82b553a20c6fc0067ca"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/EntratiLabs/EntratiLabVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Gameplay/NarmerSorties/ArchonCrystalAmar",
"Bin": "BIN_3",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"RotatedWeekly": true,
"Affiliation": "EntratiLabSyndicate",
"MinAffiliationRank": 5,
"ReductionPerPositiveRank": 0,
"IncreasePerNegativeRank": 0,
"StandingCost": 30000,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b20ba592c4c95e920d"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Gameplay/NarmerSorties/ArchonCrystalBoreal",
"Bin": "BIN_3",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"RotatedWeekly": true,
"Affiliation": "EntratiLabSyndicate",
"MinAffiliationRank": 5,
"ReductionPerPositiveRank": 0,
"IncreasePerNegativeRank": 0,
"StandingCost": 30000,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b20ba592c4c95e920e"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Gameplay/NarmerSorties/ArchonCrystalNira",
"Bin": "BIN_3",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"RotatedWeekly": true,
"Affiliation": "EntratiLabSyndicate",
"MinAffiliationRank": 5,
"ReductionPerPositiveRank": 0,
"IncreasePerNegativeRank": 0,
"StandingCost": 30000,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b20ba592c4c95e920f"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/EntratiLabs/ORKxLabStool",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabDogTagUncommon",
"ItemCount": 2,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemA",
"ItemCount": 22,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/MurmurItem",
"ItemCount": 18,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9270"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/EntratiLabs/ORKxLabChairA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/MurmurItem",
"ItemCount": 15,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemA",
"ItemCount": 19,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemB",
"ItemCount": 19,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9271"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/EntratiLabs/ORKxLabLightWallCandleA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/MurmurItem",
"ItemCount": 12,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabDogTagCommon",
"ItemCount": 3,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9272"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/EntratiLabs/ORKxLabLightChandelierD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemB",
"ItemCount": 8,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabDogTagCommon",
"ItemCount": 3,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9273"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/EntratiLabs/ORKxLabLightChandelierB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemA",
"ItemCount": 12,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabDogTagCommon",
"ItemCount": 2,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9274"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/EntratiLabs/ORKxLabLightChandelierA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/MurmurItem",
"ItemCount": 15,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemA",
"ItemCount": 13,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9275"
}
}
],
"PropertyTextHash": "44DA3839E6F7BDB32ACED53F2B0BE14E",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,97 @@
{
"VendorInfo": {
"_id": {
"$oid": "6579d82b553a20c6fc0067ae"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/EntratiLabs/EntratiLabsCommisionsManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/EntratiLabs/LoidTaskC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemB",
"ItemCount": 17,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/MurmurItem",
"ItemCount": 30,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "670a2b928ac7854ac55e73d3"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/EntratiLabs/LoidTaskB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/MurmurItem",
"ItemCount": 20,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/EntratiLabMiscItemA",
"ItemCount": 228,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "670a2b928ac7854ac55e73d4"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/Tasks/EntratiLabs/LoidTaskA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/EntratiLab/Resources/MurmurItem",
"ItemCount": 15,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Gameplay/Zariman/Resources/ZarimanMiscItemB",
"ItemCount": 1,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "670a2b928ac7854ac55e73d5"
}
}
],
"PropertyTextHash": "60C4D85A8DE5E6538AD23CDDFEEF0422",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,125 @@
{
"VendorInfo": {
"_id": {
"$oid": "5dbb4c41e966f7886c3ce939"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Hubs/IronwakeDondaVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/HarrowQuestKeyOrnament",
"ItemPrices": [
{
"ItemCount": 25,
"ItemType": "/Lotus/Types/Items/MiscItems/PrimeBucks",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e945f"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack",
"ItemPrices": [
{
"ItemCount": 10,
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b20ba592c4c95e9468"
}
},
coderabbitai[bot] commented 2024-10-18 08:47:36 -07:00 (Migrated from github.com)
Review

⚠️ Potential issue

Remove duplicate RivenModPack entry.

There are two identical entries for the RivenModPack item in the ItemManifest. This appears to be a duplication error. Please remove one of these entries to avoid confusion and potential issues with the vendor's inventory.

To fix this, remove one of the RivenModPack entries (lines 29-50 or lines 96-116).

Also applies to: 96-116

_:warning: Potential issue_ **Remove duplicate RivenModPack entry.** There are two identical entries for the RivenModPack item in the ItemManifest. This appears to be a duplication error. Please remove one of these entries to avoid confusion and potential issues with the vendor's inventory. To fix this, remove one of the RivenModPack entries (lines 29-50 or lines 96-116). Also applies to: 96-116 <!-- This is an auto-generated comment by CodeRabbit -->
{
"StoreItem": "/Lotus/StoreItems/Types/StoreItems/CreditBundles/150000Credits",
"ItemPrices": [
{
"ItemCount": 5,
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b20ba592c4c95e9469"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/MiscItems/Kuva",
"ItemPrices": [
{
"ItemCount": 10,
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 35000,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b20ba592c4c95e946a"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/BoosterPacks/RivenModPack",
"ItemPrices": [
{
"ItemCount": 10,
"ItemType": "/Lotus/Types/Items/MiscItems/RivenFragment",
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": false,
"Id": {
"$oid": "66fd60b20ba592c4c95e946b"
}
}
],
"PropertyTextHash": "62B64A8065B7C0FA345895D4BC234621",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,244 @@
{
"VendorInfo": {
"_id": {
"$oid": "5fb70313c96976e97d6be787"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Hubs/RailjackCrewMemberVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/SteelMeridianCrewMemberGeneratorStrong",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/RailjackMiscItems/IsosRailjackItem",
"ItemCount": 2220,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [2180000, 2180000],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "SteelMeridianSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 4185144421,
"Id": {
"$oid": "670daf92d21f34757a5e73da"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/NewLokaCrewMemberGeneratorStrong",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/RailjackMiscItems/IsosRailjackItem",
"ItemCount": 2130,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [1890000, 1890000],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "NewLokaSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 496053258,
"Id": {
"$oid": "670daf92d21f34757a5e73db"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/SteelMeridianCrewMemberGeneratorMediumVersionTwo",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/RailjackMiscItems/IsosRailjackItem",
"ItemCount": 440,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "SteelMeridianSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 2078883475,
"Id": {
"$oid": "670daf92d21f34757a5e73dc"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/NewLokaCrewMemberGeneratorMediumVersionTwo",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/RailjackMiscItems/AsteriteRailjackItem",
"ItemCount": 730,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "NewLokaSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 3890380934,
"Id": {
"$oid": "670daf92d21f34757a5e73dd"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/CephalonSudaCrewMemberGeneratorMediumVersionTwo",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/RailjackMiscItems/AsteriteRailjackItem",
"ItemCount": 720,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "CephalonSudaSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 3425148044,
"Id": {
"$oid": "670daf92d21f34757a5e73de"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/ArbitersCrewMemberGeneratorMediumVersionTwo",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/RailjackMiscItems/CubicsRailjackItem",
"ItemCount": 6500,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "ArbitersSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 2472754512,
"Id": {
"$oid": "670daf92d21f34757a5e73df"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/PerrinCrewMemberGeneratorVersionTwo",
"RegularPrice": [105000, 105000],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "PerrinSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 966238763,
"Id": {
"$oid": "670daf92d21f34757a5e73e0"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/NewLokaCrewMemberGeneratorVersionTwo",
"RegularPrice": [120000, 120000],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "NewLokaSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 356717213,
"Id": {
"$oid": "670daf92d21f34757a5e73e1"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Game/CrewShip/CrewMember/ArbitersCrewMemberGeneratorVersionTwo",
"RegularPrice": [120000, 120000],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"Affiliation": "ArbitersSyndicate",
"MinAffiliationRank": 0,
"ReductionPerPositiveRank": 0.1,
"IncreasePerNegativeRank": 0.5,
"AllowMultipurchase": false,
"LocTagRandSeed": 1969797050,
"Id": {
"$oid": "670daf92d21f34757a5e73e2"
}
}
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

💡 Codebase verification

⚠️ Potential issue

Address inconsistency in pricing structure across items.

There's an inconsistency in how prices are specified across different items in the manifest:

  • Some items (e.g., Steel Meridian, New Loka) use both ItemPrices and RegularPrice.
  • Others (e.g., Perrin, New Loka version two) only use RegularPrice.

This inconsistency could lead to confusion or potential bugs in the pricing logic. Consider standardizing the pricing structure across all items or documenting the reason for the differences.

Currency usage for different syndicate items has been verified.

Different syndicate items use various currencies:

  • IsosRailjackItem
  • AsteriteRailjackItem
  • CubicsRailjackItem

The usage of multiple currencies appears intentional and aligns with the game's economy design, supporting balanced and diverse syndicate interactions.

🔗 Analysis chain

Address inconsistency in pricing structure across items.

There's an inconsistency in how prices are specified across different items in the manifest:

  • Some items (e.g., Steel Meridian, New Loka) use both ItemPrices and RegularPrice.
  • Others (e.g., Perrin, New Loka version two) only use RegularPrice.

This inconsistency could lead to confusion or potential bugs in the pricing logic. Consider standardizing the pricing structure across all items or documenting the reason for the differences.

Verify the currency usage for different syndicate items.

Different syndicate items use various currencies:

  • IsosRailjackItem
  • AsteriteRailjackItem
  • CubicsRailjackItem

While this diversity can be good for game balance, please verify that the currency assignments are intentional and align with the game's economy design.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify currency usage across different syndicate items

echo "Currency usage for different syndicates:"
grep -n "ItemType.*RailjackItem" static/fixed_responses/getVendorInfo/HubsRailjackCrewMemberVendorManifest.json

Length of output: 720

_:bulb: Codebase verification_ _:warning: Potential issue_ **Address inconsistency in pricing structure across items.** There's an inconsistency in how prices are specified across different items in the manifest: - Some items (e.g., Steel Meridian, New Loka) use both `ItemPrices` and `RegularPrice`. - Others (e.g., Perrin, New Loka version two) only use `RegularPrice`. This inconsistency could lead to confusion or potential bugs in the pricing logic. Consider standardizing the pricing structure across all items or documenting the reason for the differences. **Currency usage for different syndicate items has been verified.** Different syndicate items use various currencies: - IsosRailjackItem - AsteriteRailjackItem - CubicsRailjackItem The usage of multiple currencies appears intentional and aligns with the game's economy design, supporting balanced and diverse syndicate interactions. <details> <summary>🔗 Analysis chain</summary> **Address inconsistency in pricing structure across items.** There's an inconsistency in how prices are specified across different items in the manifest: - Some items (e.g., Steel Meridian, New Loka) use both `ItemPrices` and `RegularPrice`. - Others (e.g., Perrin, New Loka version two) only use `RegularPrice`. This inconsistency could lead to confusion or potential bugs in the pricing logic. Consider standardizing the pricing structure across all items or documenting the reason for the differences. **Verify the currency usage for different syndicate items.** Different syndicate items use various currencies: - IsosRailjackItem - AsteriteRailjackItem - CubicsRailjackItem While this diversity can be good for game balance, please verify that the currency assignments are intentional and align with the game's economy design. </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify currency usage across different syndicate items echo "Currency usage for different syndicates:" grep -n "ItemType.*RailjackItem" static/fixed_responses/getVendorInfo/HubsRailjackCrewMemberVendorManifest.json ``` Length of output: 720 </details> <!-- This is an auto-generated comment by CodeRabbit -->
],
"PropertyTextHash": "BE543CCC0A4F50A1D80CD2B523796EAE",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,106 @@
{
"VendorInfo": {
"_id": {
"$oid": "59d6e27ebcc718474eb17115"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Ostron/FishmongerVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Eidolon/FishParts/DayUncommonFishAPartItem",
"PremiumPrice": [14, 14],
"Bin": "BIN_1",
"QuantityMultiplier": 10,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
coderabbitai[bot] commented 2024-10-18 06:38:25 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Reconsider the expiry strategy for individual items

Similar to the main VendorInfo object, each item in the ItemManifest has an Expiry field set to a very distant future date. This approach might lead to maintenance issues in the long run.

Consider implementing one of these alternatives:

  1. Remove the Expiry field from individual items if it's always the same as the main VendorInfo object's expiry.
  2. Implement a more dynamic expiry system that allows for easier updates and maintenance.
  3. Use null or a specific flag to indicate "never expires" instead of an extremely far future date.

Example implementation for option 3:

"Expiry": null

Where null could be interpreted as "never expires" in your application logic.

Also applies to: 28-32, 43-47, 58-62, 73-77, 88-92

_:hammer_and_wrench: Refactor suggestion_ **Reconsider the expiry strategy for individual items** Similar to the main `VendorInfo` object, each item in the `ItemManifest` has an `Expiry` field set to a very distant future date. This approach might lead to maintenance issues in the long run. Consider implementing one of these alternatives: 1. Remove the `Expiry` field from individual items if it's always the same as the main `VendorInfo` object's expiry. 2. Implement a more dynamic expiry system that allows for easier updates and maintenance. 3. Use `null` or a specific flag to indicate "never expires" instead of an extremely far future date. Example implementation for option 3: ```json "Expiry": null ``` Where `null` could be interpreted as "never expires" in your application logic. Also applies to: 28-32, 43-47, 58-62, 73-77, 88-92 <!-- This is an auto-generated comment by CodeRabbit -->
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9808"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Eidolon/FishParts/BothUncommonFishBPartItem",
"PremiumPrice": [12, 12],
"Bin": "BIN_1",
"QuantityMultiplier": 10,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9809"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Eidolon/FishParts/DayCommonFishCPartItem",
"PremiumPrice": [8, 8],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e980a"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Eidolon/FishParts/DayCommonFishBPartItem",
"PremiumPrice": [7, 7],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e980b"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Eidolon/FishParts/DayCommonFishAPartItem",
"PremiumPrice": [10, 10],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e980c"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Eidolon/FishParts/BothCommonFishBPartItem",
"PremiumPrice": [8, 8],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e980d"
}
}
],
"PropertyTextHash": "CC3B9DAFB38F412998E90A41421A8986",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
coderabbitai[bot] commented 2024-10-18 06:38:25 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider adjusting the vendor expiry date

The current expiry date is set to a very distant future (9999999000000). While this effectively means "never expires", it might be more maintainable to use a more reasonable timeframe or implement a different mechanism for permanent items.

Consider one of these alternatives:

  1. Set an expiry date 1-2 years in the future and implement a system to automatically extend it.
  2. Use a specific flag or value to indicate "never expires" instead of an extremely far future date.

Example implementation for option 2:

"Expiry": null

Where null could be interpreted as "never expires" in your application logic.

_:hammer_and_wrench: Refactor suggestion_ **Consider adjusting the vendor expiry date** The current expiry date is set to a very distant future (`9999999000000`). While this effectively means "never expires", it might be more maintainable to use a more reasonable timeframe or implement a different mechanism for permanent items. Consider one of these alternatives: 1. Set an expiry date 1-2 years in the future and implement a system to automatically extend it. 2. Use a specific flag or value to indicate "never expires" instead of an extremely far future date. Example implementation for option 2: ```json "Expiry": null ``` Where `null` could be interpreted as "never expires" in your application logic. <!-- This is an auto-generated comment by CodeRabbit -->
}
}

View File

@ -0,0 +1,94 @@
{
"VendorInfo": {
"_id": {
"$oid": "5991d5e6bcc718474ee90c15"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Ostron/PetVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/LisetPropOstBirdCage",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/UncommonOreAAlloyAItem",
"ItemCount": 10,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayUncommonFishBPartItem",
"ItemCount": 8,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9a8e"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/KubrowColorPackDrahk",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/DayCommonFishBPartItem",
"ItemCount": 14,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothCommonFishBPartItem",
"ItemCount": 13,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9a8f"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/KubrowColorPackFeral",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Eidolon/FishParts/BothCommonFishAPartItem",
"ItemCount": 19,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Eidolon/CommonOreBAlloyBItem",
"ItemCount": 34,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9a90"
}
}
],
"PropertyTextHash": "3D85F1A0A2B62734AE90370DEC214C26",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,62 @@
{
"VendorInfo": {
"_id": {
"$oid": "59dfe591314805ffe1d47c0a"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Ostron/ProspectorVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Eidolon/RareGemACutAItem",
"PremiumPrice": [19, 19],
"Bin": "BIN_1",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e98f0"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Eidolon/CommonGemBCutAItem",
"PremiumPrice": [8, 8],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e98f1"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Eidolon/CommonGemACutAItem",
"PremiumPrice": [5, 5],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e98f2"
}
}
],
coderabbitai[bot] commented 2024-10-18 06:38:25 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider optimizing the PremiumPrice structure

In the ItemManifest, each item's PremiumPrice is represented as an array with two identical values (e.g., [19, 19], [8, 8], [5, 5]). This structure seems redundant. Consider simplifying it to a single value if there's no specific reason for the duplication. For example:

"PremiumPrice": 19

This change would make the data more concise and easier to maintain. If there's a particular reason for the current structure, please add a comment explaining its purpose.

_:hammer_and_wrench: Refactor suggestion_ **Consider optimizing the `PremiumPrice` structure** In the `ItemManifest`, each item's `PremiumPrice` is represented as an array with two identical values (e.g., `[19, 19]`, `[8, 8]`, `[5, 5]`). This structure seems redundant. Consider simplifying it to a single value if there's no specific reason for the duplication. For example: ```json "PremiumPrice": 19 ``` This change would make the data more concise and easier to maintain. If there's a particular reason for the current structure, please add a comment explaining its purpose. <!-- This is an auto-generated comment by CodeRabbit -->
"MaxDailyPurchases": 0,
"PropertyTextHash": "773C6968D9A65506CD28DF28C768F0DA",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,248 @@
{
"VendorInfo": {
"_id": {
"$oid": "5be4a159b144f3cdf1c22efa"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Solaris/DebtTokenVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleUncommonD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Venus/Resources/VenusCoconutItem",
"ItemCount": 5,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/MiscItems/Circuits",
"ItemCount": 3664,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [87300, 87300],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 1881404827,
"Id": {
"$oid": "670daf92d21f34757a5e73b4"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleRareC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/MiscItems/NeuralSensor",
"ItemCount": 1,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [53300, 53300],
"Bin": "BIN_2",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 1943984533,
"Id": {
"$oid": "6710b5029e1a3080a65e73a7"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleCommonG",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/MiscItems/Salvage",
"ItemCount": 11540,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [27300, 27300],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 744199559,
"Id": {
"$oid": "67112582cc115756985e73a4"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleUncommonB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Solaris/FishParts/CorpusFishThermalLaserItem",
"ItemCount": 9,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [75800, 75800],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 3744711432,
"Id": {
"$oid": "670de7d28a6ec82cd25e73a2"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleUncommonB",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/MiscItems/Rubedo",
"ItemCount": 3343,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [52200, 52200],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 1579000687,
"Id": {
"$oid": "670e58526171148e125e73ad"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleCommonA",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Gameplay/Venus/Resources/CoolantItem",
"ItemCount": 9,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Fish/Solaris/FishParts/CorpusFishAnoscopicSensorItem",
"ItemCount": 5,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [12400, 12400],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 3589081466,
"Id": {
"$oid": "67112582cc115756985e73a5"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleUncommonC",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Gems/Solaris/SolarisCommonOreBAlloyItem",
"ItemCount": 13,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [77500, 77500],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 1510234814,
"Id": {
"$oid": "670f0f21250ad046c35e73ee"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleUncommonD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Fish/Solaris/FishParts/CorpusFishParralelBiodeItem",
"ItemCount": 7,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Gems/Solaris/SolarisCommonGemBCutItem",
"ItemCount": 12,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [94600, 94600],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 4222095721,
"Id": {
"$oid": "670f63827be40254f95e739d"
}
},
{
"StoreItem": "/Lotus/Types/StoreItems/Packages/DebtTokenBundles/DebtTokenBundleCommonJ",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/MiscItems/Nanospores",
"ItemCount": 14830,
"ProductCategory": "MiscItems"
}
],
"RegularPrice": [25600, 25600],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"PurchaseQuantityLimit": 1,
"AllowMultipurchase": true,
"LocTagRandSeed": 2694388669,
"Id": {
"$oid": "67112582cc115756985e73a6"
}
}
],
"PropertyTextHash": "A39621049CA3CA13761028CD21C239EF",
"RandomSeedType": "VRST_FLAVOUR_TEXT",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,126 @@
{
"VendorInfo": {
"_id": {
"$oid": "5be4a159b144f3cdf1c22edf"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Solaris/DebtTokenVendorRepossessionsManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Venus/SUToolBox",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Solaris/DebtTokenB",
"ItemCount": 6,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "6711a412ba1ba01e405e739d"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Venus/SUBookAOpen",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Solaris/DebtTokenC",
"ItemCount": 6,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "6711a412ba1ba01e405e739e"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Venus/SUFoodCans",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Solaris/DebtTokenC",
"ItemCount": 7,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "6711a412ba1ba01e405e739f"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Venus/SUTechToolD",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Solaris/DebtTokenD",
"ItemCount": 5,
"ProductCategory": "MiscItems"
},
{
"ItemType": "/Lotus/Types/Items/Solaris/DebtTokenA",
"ItemCount": 15,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_1",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "6711a412ba1ba01e405e73a0"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/ShipDecos/Venus/SUContainerCrate",
"ItemPrices": [
{
"ItemType": "/Lotus/Types/Items/Solaris/DebtTokenA",
"ItemCount": 9,
"ProductCategory": "MiscItems"
}
],
"Bin": "BIN_0",
"QuantityMultiplier": 1,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "6711a412ba1ba01e405e73a1"
}
}
],
"PropertyTextHash": "E0E83157D73468DC578403CB9EBA9DA6",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}
coderabbitai[bot] commented 2024-10-18 06:38:26 -07:00 (Migrated from github.com)
Review

🛠️ Refactor suggestion

Consider reviewing uniform values across items.

The file structure is consistently maintained, which is excellent for readability and maintainability. However, there are some uniform values across all items that might benefit from review:

  1. Expiry dates are set to a very high value for all items.
  2. QuantityMultiplier is always set to 1.
  3. AllowMultipurchase is always set to true.

While these uniform values might be intentional, consider if any of these properties should vary between items:

  1. Different items might have different expiration policies.
  2. Some items might benefit from quantity discounts (QuantityMultiplier > 1).
  3. Certain rare or limited items might not allow multiple purchases.

To verify the usage of these properties across all vendor manifests, you can run:

#!/bin/bash
# Search for QuantityMultiplier and AllowMultipurchase usage
echo "QuantityMultiplier usage:"
rg -g '*.json' -i '"QuantityMultiplier":\s*(\d+)' static/fixed_responses/getVendorInfo/

echo "\nAllowMultipurchase usage:"
rg -g '*.json' -i '"AllowMultipurchase":\s*(true|false)' static/fixed_responses/getVendorInfo/

This will help you understand if these properties are used consistently across all vendors or if there's already some variation in place.

_:hammer_and_wrench: Refactor suggestion_ **Consider reviewing uniform values across items.** The file structure is consistently maintained, which is excellent for readability and maintainability. However, there are some uniform values across all items that might benefit from review: 1. Expiry dates are set to a very high value for all items. 2. QuantityMultiplier is always set to 1. 3. AllowMultipurchase is always set to true. While these uniform values might be intentional, consider if any of these properties should vary between items: 1. Different items might have different expiration policies. 2. Some items might benefit from quantity discounts (QuantityMultiplier > 1). 3. Certain rare or limited items might not allow multiple purchases. To verify the usage of these properties across all vendor manifests, you can run: ```shell #!/bin/bash # Search for QuantityMultiplier and AllowMultipurchase usage echo "QuantityMultiplier usage:" rg -g '*.json' -i '"QuantityMultiplier":\s*(\d+)' static/fixed_responses/getVendorInfo/ echo "\nAllowMultipurchase usage:" rg -g '*.json' -i '"AllowMultipurchase":\s*(true|false)' static/fixed_responses/getVendorInfo/ ``` This will help you understand if these properties are used consistently across all vendors or if there's already some variation in place. <!-- This is an auto-generated comment by CodeRabbit -->

View File

@ -0,0 +1,106 @@
{
"VendorInfo": {
"_id": {
"$oid": "5b0de8556df82a56ea9bae82"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Solaris/FishmongerVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Solaris/FishParts/CorpusFishThermalLaserItem",
"PremiumPrice": [15, 15],
"Bin": "BIN_1",
"QuantityMultiplier": 10,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9515"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Solaris/FishParts/CorpusFishVenedoCaseItem",
"PremiumPrice": [8, 8],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9516"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Solaris/FishParts/SolarisFishDissipatorCoilItem",
"PremiumPrice": [18, 18],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9517"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Solaris/FishParts/CorpusFishExaBrainItem",
"PremiumPrice": [5, 5],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9518"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Solaris/FishParts/CorpusFishAnoscopicSensorItem",
"PremiumPrice": [5, 5],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9519"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Fish/Solaris/FishParts/GenericFishScrapItem",
"PremiumPrice": [5, 5],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e951a"
}
}
coderabbitai[bot] commented 2024-10-18 06:38:25 -07:00 (Migrated from github.com)
Review

💡 Codebase verification

Inconsistent Bin values detected in ItemManifest.

Several items have Bin values outside the expected "BIN_0" and "BIN_1":

  • "BIN_2"
  • "BIN_3"
  • "BIN_5"

Please verify if these Bin assignments are intentional and ensure they align with the categorization logic for store items.

🔗 Analysis chain

Good structure, but clarify PremiumPrice and Bin usage.

The ItemManifest array is well-structured with consistent properties across all items. However, there are a few points to consider:

  1. All items have the same far-future Expiry date. Is this intentional, or should some items have different expiration dates?

  2. The PremiumPrice is always an array with two identical values (e.g., [15, 15], [8, 8]). Is this intentional, or should it be a single value?

  3. The Bin values are either "BIN_0" or "BIN_1". Could you clarify the purpose of these bins and if there's a specific logic behind their assignment?

To ensure consistency across other vendor manifests, please run the following script:

This script will help identify any inconsistencies or unusual patterns across all vendor manifests.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent structure and unusual patterns in vendor manifests

# Test: Check for consistent ItemManifest structure and unusual PremiumPrice patterns
jq '.VendorInfo.ItemManifest[] | select(.PremiumPrice[0] != .PremiumPrice[1] or (.PremiumPrice | length) != 2)' static/fixed_responses/getVendorInfo/*.json

# Test: Check for varied Expiry dates
jq '.VendorInfo.ItemManifest[] | select(.Expiry."$date"."$numberLong" != "9999999000000")' static/fixed_responses/getVendorInfo/*.json

# Test: Check for Bin values other than "BIN_0" or "BIN_1"
jq '.VendorInfo.ItemManifest[] | select(.Bin != "BIN_0" and .Bin != "BIN_1")' static/fixed_responses/getVendorInfo/*.json

Length of output: 109202

_:bulb: Codebase verification_ **Inconsistent Bin values detected in ItemManifest.** Several items have Bin values outside the expected "BIN_0" and "BIN_1": - "BIN_2" - "BIN_3" - "BIN_5" Please verify if these Bin assignments are intentional and ensure they align with the categorization logic for store items. <details> <summary>🔗 Analysis chain</summary> **Good structure, but clarify PremiumPrice and Bin usage.** The ItemManifest array is well-structured with consistent properties across all items. However, there are a few points to consider: 1. All items have the same far-future Expiry date. Is this intentional, or should some items have different expiration dates? 2. The PremiumPrice is always an array with two identical values (e.g., [15, 15], [8, 8]). Is this intentional, or should it be a single value? 3. The Bin values are either "BIN_0" or "BIN_1". Could you clarify the purpose of these bins and if there's a specific logic behind their assignment? To ensure consistency across other vendor manifests, please run the following script: This script will help identify any inconsistencies or unusual patterns across all vendor manifests. </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Check for consistent structure and unusual patterns in vendor manifests # Test: Check for consistent ItemManifest structure and unusual PremiumPrice patterns jq '.VendorInfo.ItemManifest[] | select(.PremiumPrice[0] != .PremiumPrice[1] or (.PremiumPrice | length) != 2)' static/fixed_responses/getVendorInfo/*.json # Test: Check for varied Expiry dates jq '.VendorInfo.ItemManifest[] | select(.Expiry."$date"."$numberLong" != "9999999000000")' static/fixed_responses/getVendorInfo/*.json # Test: Check for Bin values other than "BIN_0" or "BIN_1" jq '.VendorInfo.ItemManifest[] | select(.Bin != "BIN_0" and .Bin != "BIN_1")' static/fixed_responses/getVendorInfo/*.json ``` Length of output: 109202 </details> <!-- This is an auto-generated comment by CodeRabbit -->
],
"PropertyTextHash": "946131D0CF5CDF7C2C03BB967DE0DF49",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}

View File

@ -0,0 +1,61 @@
{
"VendorInfo": {
"_id": {
"$oid": "5be4a159b144f3cdf1c22ebb"
},
"TypeName": "/Lotus/Types/Game/VendorManifests/Solaris/ProspectorVendorManifest",
"ItemManifest": [
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Solaris/SolarisRareGemACutItem",
"PremiumPrice": [20, 20],
"Bin": "BIN_1",
"QuantityMultiplier": 5,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9777"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Solaris/SolarisCommonGemBCutItem",
"PremiumPrice": [10, 10],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9778"
}
},
{
"StoreItem": "/Lotus/StoreItems/Types/Items/Gems/Solaris/SolarisCommonGemACutItem",
"PremiumPrice": [8, 8],
"Bin": "BIN_0",
"QuantityMultiplier": 20,
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
},
"AllowMultipurchase": true,
"Id": {
"$oid": "66fd60b20ba592c4c95e9779"
}
}
],
"PropertyTextHash": "A5756A21991FF49CFA7D096B4026515B",
"Expiry": {
"$date": {
"$numberLong": "9999999000000"
}
}
}
}