cloudron 8.2.0 → 8.2.2

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/CHANGELOG.md CHANGED
@@ -125,3 +125,10 @@
125
125
  [8.1.2]
126
126
  * add appstore login/logout and also forum post logs
127
127
 
128
+ [8.2.0]
129
+ * versions: add `verify` subcommand
130
+ * Make `resolveManifest` return a modified copy
131
+
132
+ [8.2.1]
133
+ * cancel task: wait for cancellation
134
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudron",
3
- "version": "8.2.0",
3
+ "version": "8.2.2",
4
4
  "license": "MIT",
5
5
  "description": "Cloudron Commandline Tool",
6
6
  "type": "module",
package/src/actions.js CHANGED
@@ -101,7 +101,14 @@ async function stopActiveTask(app, options) {
101
101
 
102
102
  const request = createRequest('POST', `/api/v1/tasks/${app.taskId}/stop`, options);
103
103
  const response = await request.send({});
104
+ if (response.status === 409) return; // task already finished between getApp and now
104
105
  if (response.status !== 204) throw `Failed to stop active task: ${requestError(response)}`;
106
+
107
+ if (!options.wait) return;
108
+
109
+ const result = await waitForTask(app.taskId, options);
110
+ // 'stopped' is the expected terminal state when we just asked the task to stop
111
+ if (result.error && result.error.code !== 'stopped') throw new Error(`Stop active task failed: ${result.error.message}`);
105
112
  }
106
113
 
107
114
  function saveCwdAppId(appId, manifestFilePath) {