@adminforth/bulk-ai-flow 1.18.3 → 1.18.5

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/build.log CHANGED
@@ -13,5 +13,5 @@ custom/package-lock.json
13
13
  custom/package.json
14
14
  custom/tsconfig.json
15
15
 
16
- sent 92,979 bytes received 172 bytes 186,302.00 bytes/sec
16
+ sent 92,988 bytes received 172 bytes 186,320.00 bytes/sec
17
17
  total size is 92,343 speedup is 0.99
package/dist/index.js CHANGED
@@ -155,8 +155,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
155
155
  resData = JSON.parse(textOutput);
156
156
  }
157
157
  catch (e) {
158
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL' });
159
- return { ok: false, error: 'AI response is not valid JSON. Probably attached invalid image URL' };
158
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL', aiResponse: textOutput });
159
+ return { ok: false, error: 'AI response is not valid JSON. Probably attached invalid image URL', aiResponse: textOutput };
160
160
  }
161
161
  const result = resData;
162
162
  jobs.set(jobId, { status: 'completed', result });
@@ -207,8 +207,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
207
207
  resData = JSON.parse(resp);
208
208
  }
209
209
  catch (e) {
210
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON' });
211
- return { ok: false, error: 'AI response is not valid JSON' };
210
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON', aiResponse: resp });
211
+ return { ok: false, error: 'AI response is not valid JSON', aiResponse: resp };
212
212
  }
213
213
  const result = resData;
214
214
  jobs.set(jobId, { status: 'completed', result });
@@ -432,8 +432,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
432
432
  resData = JSON.parse(textOutput);
433
433
  }
434
434
  catch (e) {
435
- // return { ok: false, error: 'AI response is not valid JSON. Probably attached invalid image URL' };
436
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL' });
435
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL', aiResponse: textOutput });
437
436
  }
438
437
  // return { ok: true, result: resData };
439
438
  jobs.set(jobId, { status: 'completed', result: resData });
@@ -460,8 +459,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
460
459
  resData = JSON.parse(resp);
461
460
  }
462
461
  catch (e) {
463
- // return { ok: false, error: 'AI response is not valid JSON' };
464
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON' });
462
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON', aiResponse: resp });
465
463
  }
466
464
  // return { ok: true, result: resData };
467
465
  jobs.set(jobId, { status: 'completed', result: resData });
package/index.ts CHANGED
@@ -152,8 +152,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
152
152
  try {
153
153
  resData = JSON.parse(textOutput);
154
154
  } catch (e) {
155
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL' });
156
- return { ok: false, error: 'AI response is not valid JSON. Probably attached invalid image URL' };
155
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL', aiResponse: textOutput });
156
+ return { ok: false, error: 'AI response is not valid JSON. Probably attached invalid image URL', aiResponse: textOutput };
157
157
  }
158
158
  const result = resData;
159
159
  jobs.set(jobId, { status: 'completed', result });
@@ -201,8 +201,8 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
201
201
  try {
202
202
  resData = JSON.parse(resp);
203
203
  } catch (e) {
204
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON' });
205
- return { ok: false, error: 'AI response is not valid JSON' };
204
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON', aiResponse: resp });
205
+ return { ok: false, error: 'AI response is not valid JSON', aiResponse: resp };
206
206
  }
207
207
  const result = resData;
208
208
  jobs.set(jobId, { status: 'completed', result });
@@ -419,8 +419,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
419
419
  try {
420
420
  resData = JSON.parse(textOutput);
421
421
  } catch (e) {
422
- // return { ok: false, error: 'AI response is not valid JSON. Probably attached invalid image URL' };
423
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL' });
422
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON. Probably attached invalid image URL', aiResponse: textOutput });
424
423
  }
425
424
  // return { ok: true, result: resData };
426
425
  jobs.set(jobId, { status: 'completed', result: resData });
@@ -445,8 +444,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
445
444
  try {
446
445
  resData = JSON.parse(resp);
447
446
  } catch (e) {
448
- // return { ok: false, error: 'AI response is not valid JSON' };
449
- jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON' });
447
+ jobs.set(jobId, { status: 'failed', error: 'AI response is not valid JSON', aiResponse: resp });
450
448
  }
451
449
  // return { ok: true, result: resData };
452
450
  jobs.set(jobId, { status: 'completed', result: resData });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.18.3",
3
+ "version": "1.18.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,7 +30,7 @@
30
30
  "handlebars": "^4.7.8"
31
31
  },
32
32
  "peerDependencies": {
33
- "adminforth": "^2.13.0-next.60"
33
+ "adminforth": "^2.13.0-0"
34
34
  },
35
35
  "release": {
36
36
  "plugins": [