@adminforth/bulk-ai-flow 1.24.0 → 1.24.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/build.log CHANGED
@@ -14,5 +14,5 @@ custom/package.json
14
14
  custom/pnpm-lock.yaml
15
15
  custom/tsconfig.json
16
16
 
17
- sent 111,916 bytes received 191 bytes 224,214.00 bytes/sec
18
- total size is 111,202 speedup is 0.99
17
+ sent 111,946 bytes received 191 bytes 224,274.00 bytes/sec
18
+ total size is 111,232 speedup is 0.99
@@ -7,7 +7,7 @@
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "keywords": [],
10
- "author": "",
10
+ "author": "DevForth (https://devforth.io)",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
13
  "@iconify-prerendered/vue-mdi": "^0.25.1718880438",
@@ -7,7 +7,7 @@
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "keywords": [],
10
- "author": "",
10
+ "author": "DevForth (https://devforth.io)",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
13
  "@iconify-prerendered/vue-mdi": "^0.25.1718880438",
package/dist/index.js CHANGED
@@ -108,10 +108,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
108
108
  analyze_image(jobId_1, recordId_1, adminUser_1, headers_1, customPrompt_1) {
109
109
  return __awaiter(this, arguments, void 0, function* (jobId, recordId, adminUser, headers, customPrompt, filterFilledFields = true) {
110
110
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
111
- if (this.options.rateLimits && this.options.rateLimits.fillFieldsFromImages && (yield this.checkRateLimit("fillFieldsFromImages", this.options.rateLimits.fillFieldsFromImages, headers))) {
112
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
113
- return { error: "Rate limit exceeded" };
114
- }
111
+ // TODO: need to do correct check of rate limit
112
+ // if (this.options.rateLimits && this.options.rateLimits.fillFieldsFromImages && await this.checkRateLimit("fillFieldsFromImages" ,this.options.rateLimits.fillFieldsFromImages, headers)) {
113
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
114
+ // return { error: "Rate limit exceeded" };
115
+ // }
115
116
  const selectedId = recordId;
116
117
  let isError = false;
117
118
  // Fetch the record using the provided ID
@@ -194,10 +195,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
194
195
  }
195
196
  analyzeNoImages(jobId_1, recordId_1, adminUser_1, headers_1, customPrompt_1) {
196
197
  return __awaiter(this, arguments, void 0, function* (jobId, recordId, adminUser, headers, customPrompt, filterFilledFields = true) {
197
- if (this.options.rateLimits && this.options.rateLimits.fillPlainFields && (yield this.checkRateLimit("fillPlainFields", this.options.rateLimits.fillPlainFields, headers))) {
198
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
199
- return { error: "Rate limit exceeded" };
200
- }
198
+ // TODO: need to do correct check of rate limit
199
+ // if (this.options.rateLimits && this.options.rateLimits.fillPlainFields && await this.checkRateLimit("fillPlainFields" ,this.options.rateLimits.fillPlainFields, headers)) {
200
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
201
+ // return { error: "Rate limit exceeded" };
202
+ // }
201
203
  const selectedId = recordId;
202
204
  let isError = false;
203
205
  if (STUB_MODE) {
@@ -260,10 +262,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
260
262
  initialImageGenerate(jobId_1, recordId_1, adminUser_1, headers_1, customPrompt_1) {
261
263
  return __awaiter(this, arguments, void 0, function* (jobId, recordId, adminUser, headers, customPrompt, filterFilledFields = true) {
262
264
  var _a, _b;
263
- if (this.options.rateLimits && this.options.rateLimits.generateImages && (yield this.checkRateLimit("generateImages", this.options.rateLimits.generateImages, headers))) {
264
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
265
- return { error: "Rate limit exceeded" };
266
- }
265
+ // TODO: need to do correct check of rate limit
266
+ // if (this.options.rateLimits && this.options.rateLimits.generateImages && await this.checkRateLimit("generateImages" ,this.options.rateLimits.generateImages, headers)) {
267
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
268
+ // return { error: "Rate limit exceeded" };
269
+ // }
267
270
  const selectedId = recordId;
268
271
  let isError = false;
269
272
  const start = +new Date();
@@ -375,10 +378,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
375
378
  var _a;
376
379
  const Id = recordId;
377
380
  let isError = false;
378
- if (yield this.checkRateLimit(fieldName, this.options.generateImages[fieldName].rateLimit, headers)) {
379
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
380
- return { error: "Rate limit exceeded" };
381
- }
381
+ // TODO: need to do correct check of rate limit
382
+ // if (await this.checkRateLimit(fieldName, this.options.generateImages[fieldName].rateLimit, headers)) {
383
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
384
+ // return { error: "Rate limit exceeded" };
385
+ // }
382
386
  const start = +new Date();
383
387
  const record = yield this.adminforth.resource(this.resourceConfig.resourceId).get([Filters.EQ((_a = this.resourceConfig.columns.find(c => c.primaryKey)) === null || _a === void 0 ? void 0 : _a.name, Id)]);
384
388
  let attachmentFiles;
package/index.ts CHANGED
@@ -109,10 +109,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
109
109
  }
110
110
 
111
111
  private async analyze_image(jobId: string, recordId: string, adminUser: any, headers: Record<string, string | string[] | undefined>, customPrompt? : string, filterFilledFields: boolean = true) {
112
- if (this.options.rateLimits && this.options.rateLimits.fillFieldsFromImages && await this.checkRateLimit("fillFieldsFromImages" ,this.options.rateLimits.fillFieldsFromImages, headers)) {
113
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
114
- return { error: "Rate limit exceeded" };
115
- }
112
+ // TODO: need to do correct check of rate limit
113
+ // if (this.options.rateLimits && this.options.rateLimits.fillFieldsFromImages && await this.checkRateLimit("fillFieldsFromImages" ,this.options.rateLimits.fillFieldsFromImages, headers)) {
114
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
115
+ // return { error: "Rate limit exceeded" };
116
+ // }
116
117
  const selectedId = recordId;
117
118
  let isError = false;
118
119
  // Fetch the record using the provided ID
@@ -193,10 +194,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
193
194
  }
194
195
 
195
196
  private async analyzeNoImages(jobId: string, recordId: string, adminUser: any, headers: Record<string, string | string[] | undefined>, customPrompt? : string, filterFilledFields: boolean = true) {
196
- if (this.options.rateLimits && this.options.rateLimits.fillPlainFields && await this.checkRateLimit("fillPlainFields" ,this.options.rateLimits.fillPlainFields, headers)) {
197
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
198
- return { error: "Rate limit exceeded" };
199
- }
197
+ // TODO: need to do correct check of rate limit
198
+ // if (this.options.rateLimits && this.options.rateLimits.fillPlainFields && await this.checkRateLimit("fillPlainFields" ,this.options.rateLimits.fillPlainFields, headers)) {
199
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
200
+ // return { error: "Rate limit exceeded" };
201
+ // }
200
202
  const selectedId = recordId;
201
203
  let isError = false;
202
204
  if (STUB_MODE) {
@@ -256,10 +258,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
256
258
  }
257
259
 
258
260
  private async initialImageGenerate(jobId: string, recordId: string, adminUser: any, headers: Record<string, string | string[] | undefined>, customPrompt? : string, filterFilledFields: boolean = true) {
259
- if (this.options.rateLimits && this.options.rateLimits.generateImages && await this.checkRateLimit("generateImages" ,this.options.rateLimits.generateImages, headers)) {
260
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
261
- return { error: "Rate limit exceeded" };
262
- }
261
+ // TODO: need to do correct check of rate limit
262
+ // if (this.options.rateLimits && this.options.rateLimits.generateImages && await this.checkRateLimit("generateImages" ,this.options.rateLimits.generateImages, headers)) {
263
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
264
+ // return { error: "Rate limit exceeded" };
265
+ // }
263
266
  const selectedId = recordId;
264
267
  let isError = false;
265
268
  const start = +new Date();
@@ -369,10 +372,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
369
372
  private async regenerateImage(jobId: string, recordId: string, fieldName: string, prompt: string, adminUser: any, headers: Record<string, string | string[] | undefined>) {
370
373
  const Id = recordId;
371
374
  let isError = false;
372
- if (await this.checkRateLimit(fieldName, this.options.generateImages[fieldName].rateLimit, headers)) {
373
- jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
374
- return { error: "Rate limit exceeded" };
375
- }
375
+ // TODO: need to do correct check of rate limit
376
+ // if (await this.checkRateLimit(fieldName, this.options.generateImages[fieldName].rateLimit, headers)) {
377
+ // jobs.set(jobId, { status: 'failed', error: "Rate limit exceeded" });
378
+ // return { error: "Rate limit exceeded" };
379
+ // }
376
380
  const start = +new Date();
377
381
  const record = await this.adminforth.resource(this.resourceConfig.resourceId).get([Filters.EQ(this.resourceConfig.columns.find(c => c.primaryKey)?.name, Id)]);
378
382
  let attachmentFiles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.24.0",
3
+ "version": "1.24.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,7 +20,7 @@
20
20
  "image-processing",
21
21
  "field-generation"
22
22
  ],
23
- "author": "",
23
+ "author": "DevForth (https://devforth.io)",
24
24
  "license": "MIT",
25
25
  "description": "Bulk AI workflow plugin for AdminForth for batch field generation and image processing",
26
26
  "devDependencies": {