hydrooj-addons-manager 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +10 -5
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -92,11 +92,16 @@ class AddonsManagerHandler extends Handler {
92
92
 
93
93
  // optional: better log formatting
94
94
  console.log(`[Addons Manager] Action=${pkg.action} Package=${pkg.name} Version=${pkg.version} Result=${JSON.stringify(result)}`);
95
- this.back({
96
- result: result,
97
- packages: packages,
98
- lockedPackages: lockedPackages
99
- });
95
+ if(result.success){
96
+ this.back({
97
+ result: result,
98
+ packages: packages,
99
+ lockedPackages: lockedPackages
100
+ });
101
+ }else {
102
+ throw new UserFacingError(result.message || 'Operation failed');
103
+ }
104
+
100
105
  }
101
106
  }
102
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hydrooj-addons-manager",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "addons manager for hydrooj",
5
5
  "main": "index.ts",
6
6
  "author": "https://github.com/Bryan0324",