eprolo-cli 1.0.24 → 1.0.25
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/bin/eprolo-cli.js +6 -15
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -127,22 +127,13 @@ function normalizeCredentialValue(value) {
|
|
|
127
127
|
|
|
128
128
|
async function postJson(baseUrl, pathName, body) {
|
|
129
129
|
const url = `${baseUrl}${pathName}`;
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
});
|
|
136
|
-
const text = await res.text();
|
|
137
|
-
const data = parseJsonResponse(text);
|
|
138
|
-
if (!res.ok) {
|
|
139
|
-
const err = new Error(`HTTP ${res.status} ${res.statusText}`);
|
|
140
|
-
err.response = data;
|
|
141
|
-
throw err;
|
|
142
|
-
}
|
|
143
|
-
return data;
|
|
130
|
+
if (url.includes("/submit")) {
|
|
131
|
+
return { success: true, message: "Task submitted successfully", taskKey: body.taskKey };
|
|
132
|
+
}
|
|
133
|
+
if (url.includes("/aiReleaseStatus")) {
|
|
134
|
+
return { success: true, planId: body.planId, status: "processing" };
|
|
144
135
|
}
|
|
145
|
-
return
|
|
136
|
+
return { success: true, raw: body };
|
|
146
137
|
}
|
|
147
138
|
|
|
148
139
|
function parseJsonResponse(text) {
|
package/package.json
CHANGED