hydrooj-addons-manager 0.1.1 → 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.
- package/index.ts +11 -6
- 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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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
|
|
|
@@ -140,7 +145,7 @@ export default class AddonsManagerService extends Service {
|
|
|
140
145
|
result = rmRes;
|
|
141
146
|
break;
|
|
142
147
|
case 'update':
|
|
143
|
-
result = await sendCommand('yarn', ['global', 'upgrade', name + (version ? '@' + version : '')], config.pathToHydro);
|
|
148
|
+
result = await sendCommand('yarn', ['global', 'upgrade', name + (version ? '@' + version : ''), '--latest'], config.pathToHydro);
|
|
144
149
|
break;
|
|
145
150
|
case 'add':
|
|
146
151
|
await sendCommand('yarn', ['global', 'add', name + (version ? '@' + version : '')], config.pathToHydro);
|