@adminforth/bulk-ai-flow 2.0.1 → 2.0.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/build.log +2 -2
- package/custom/ImageGenerationCarousel.vue +2 -3
- package/custom/VisionAction.vue +4 -5
- package/dist/custom/ImageGenerationCarousel.vue +2 -3
- package/dist/custom/VisionAction.vue +4 -5
- package/dist/index.js +11 -12
- package/index.ts +11 -10
- package/package.json +2 -2
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 130,
|
|
18
|
-
total size is 129,
|
|
17
|
+
sent 130,394 bytes received 191 bytes 261,170.00 bytes/sec
|
|
18
|
+
total size is 129,681 speedup is 0.99
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
<Dialog
|
|
4
4
|
ref="dialogRef"
|
|
5
5
|
:header="$t('Generate image with AI')"
|
|
6
|
-
:closable="true"
|
|
7
6
|
class="w-full lg:w-[1100px]"
|
|
8
7
|
:beforeCancelFunction="async () => { emit('close'); return true; }"
|
|
9
8
|
:buttons="dialogButtons"
|
|
10
|
-
:
|
|
9
|
+
:close-by-click-outside="false"
|
|
11
10
|
>
|
|
12
11
|
<div class="flex flex-col gap-4">
|
|
13
12
|
<Textarea
|
|
@@ -131,7 +130,7 @@ const dialogButtons = computed(() => [
|
|
|
131
130
|
label: t('Cancel'),
|
|
132
131
|
options: {
|
|
133
132
|
class: 'afcl-button',
|
|
134
|
-
|
|
133
|
+
variant: 'secondary',
|
|
135
134
|
},
|
|
136
135
|
onclick: () => emit('close'),
|
|
137
136
|
},
|
package/custom/VisionAction.vue
CHANGED
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
:class="popupMode === 'generation' ? 'lg:w-auto !lg:max-w-[1600px]'
|
|
14
14
|
: popupMode === 'settings' ? 'lg:w-[1000px] !lg:max-w-[1000px]'
|
|
15
15
|
: 'lg:w-[500px] !lg:max-w-[500px]'"
|
|
16
|
-
:closable="true"
|
|
17
16
|
:buttons="popupMode === 'generation' ? generationModeButtons : popupMode === 'settings' ? [
|
|
18
17
|
{
|
|
19
18
|
label: t('Cancel'),
|
|
20
19
|
options: {
|
|
21
20
|
class: 'afcl-button w-1/6',
|
|
22
|
-
|
|
21
|
+
variant: 'secondary'
|
|
23
22
|
},
|
|
24
23
|
onclick: () => { popupMode = 'confirmation'; }
|
|
25
24
|
},
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
label: t('Cancel'),
|
|
37
36
|
options: {
|
|
38
37
|
class: 'afcl-button w-1/2',
|
|
39
|
-
|
|
38
|
+
variant: 'secondary'
|
|
40
39
|
},
|
|
41
40
|
onclick: (dialog) => confirmDialog.tryToHideModal()
|
|
42
41
|
},
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
onclick: async () => { await runAiActions(); }
|
|
50
49
|
}
|
|
51
50
|
]"
|
|
52
|
-
:
|
|
51
|
+
:close-by-click-outside="false"
|
|
53
52
|
>
|
|
54
53
|
<div
|
|
55
54
|
class="bulk-vision-table flex flex-col gap-3 w-full"
|
|
@@ -463,7 +462,7 @@ const generationModeButtons = computed(() => {
|
|
|
463
462
|
label: t('Cancel'),
|
|
464
463
|
options: {
|
|
465
464
|
class: 'afcl-button w-1/6',
|
|
466
|
-
|
|
465
|
+
variant: 'secondary'
|
|
467
466
|
},
|
|
468
467
|
onclick: async (dialog) => { await dialog.hide(true); }
|
|
469
468
|
},
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
<Dialog
|
|
4
4
|
ref="dialogRef"
|
|
5
5
|
:header="$t('Generate image with AI')"
|
|
6
|
-
:closable="true"
|
|
7
6
|
class="w-full lg:w-[1100px]"
|
|
8
7
|
:beforeCancelFunction="async () => { emit('close'); return true; }"
|
|
9
8
|
:buttons="dialogButtons"
|
|
10
|
-
:
|
|
9
|
+
:close-by-click-outside="false"
|
|
11
10
|
>
|
|
12
11
|
<div class="flex flex-col gap-4">
|
|
13
12
|
<Textarea
|
|
@@ -131,7 +130,7 @@ const dialogButtons = computed(() => [
|
|
|
131
130
|
label: t('Cancel'),
|
|
132
131
|
options: {
|
|
133
132
|
class: 'afcl-button',
|
|
134
|
-
|
|
133
|
+
variant: 'secondary',
|
|
135
134
|
},
|
|
136
135
|
onclick: () => emit('close'),
|
|
137
136
|
},
|
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
:class="popupMode === 'generation' ? 'lg:w-auto !lg:max-w-[1600px]'
|
|
14
14
|
: popupMode === 'settings' ? 'lg:w-[1000px] !lg:max-w-[1000px]'
|
|
15
15
|
: 'lg:w-[500px] !lg:max-w-[500px]'"
|
|
16
|
-
:closable="true"
|
|
17
16
|
:buttons="popupMode === 'generation' ? generationModeButtons : popupMode === 'settings' ? [
|
|
18
17
|
{
|
|
19
18
|
label: t('Cancel'),
|
|
20
19
|
options: {
|
|
21
20
|
class: 'afcl-button w-1/6',
|
|
22
|
-
|
|
21
|
+
variant: 'secondary'
|
|
23
22
|
},
|
|
24
23
|
onclick: () => { popupMode = 'confirmation'; }
|
|
25
24
|
},
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
label: t('Cancel'),
|
|
37
36
|
options: {
|
|
38
37
|
class: 'afcl-button w-1/2',
|
|
39
|
-
|
|
38
|
+
variant: 'secondary'
|
|
40
39
|
},
|
|
41
40
|
onclick: (dialog) => confirmDialog.tryToHideModal()
|
|
42
41
|
},
|
|
@@ -49,7 +48,7 @@
|
|
|
49
48
|
onclick: async () => { await runAiActions(); }
|
|
50
49
|
}
|
|
51
50
|
]"
|
|
52
|
-
:
|
|
51
|
+
:close-by-click-outside="false"
|
|
53
52
|
>
|
|
54
53
|
<div
|
|
55
54
|
class="bulk-vision-table flex flex-col gap-3 w-full"
|
|
@@ -463,7 +462,7 @@ const generationModeButtons = computed(() => {
|
|
|
463
462
|
label: t('Cancel'),
|
|
464
463
|
options: {
|
|
465
464
|
class: 'afcl-button w-1/6',
|
|
466
|
-
|
|
465
|
+
variant: 'secondary'
|
|
467
466
|
},
|
|
468
467
|
onclick: async (dialog) => { await dialog.hide(true); }
|
|
469
468
|
},
|
package/dist/index.js
CHANGED
|
@@ -1006,6 +1006,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1006
1006
|
server.endpoint({
|
|
1007
1007
|
method: 'POST',
|
|
1008
1008
|
path: `/plugin/${this.pluginInstanceId}/get_old_data`,
|
|
1009
|
+
agent: { hiddenFromAgents: true },
|
|
1009
1010
|
request_schema: getOldDataBodySchema,
|
|
1010
1011
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, query, cookies, requestUrl }) {
|
|
1011
1012
|
const data = body;
|
|
@@ -1027,6 +1028,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1027
1028
|
server.endpoint({
|
|
1028
1029
|
method: 'POST',
|
|
1029
1030
|
path: `/plugin/${this.pluginInstanceId}/get_images`,
|
|
1031
|
+
agent: { hiddenFromAgents: true },
|
|
1030
1032
|
request_schema: getImagesBodySchema,
|
|
1031
1033
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, query, cookies, requestUrl }) {
|
|
1032
1034
|
const data = body;
|
|
@@ -1047,6 +1049,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1047
1049
|
server.endpoint({
|
|
1048
1050
|
method: 'POST',
|
|
1049
1051
|
path: `/plugin/${this.pluginInstanceId}/update_fields`,
|
|
1052
|
+
agent: { hiddenFromAgents: true },
|
|
1050
1053
|
request_schema: updateFieldsBodySchema,
|
|
1051
1054
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, response }) {
|
|
1052
1055
|
const data = body;
|
|
@@ -1102,12 +1105,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1102
1105
|
if (oldRecord[value]) {
|
|
1103
1106
|
// put tag to delete old file
|
|
1104
1107
|
try {
|
|
1105
|
-
|
|
1106
|
-
yield columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion(oldRecord[value]);
|
|
1107
|
-
}
|
|
1108
|
-
else {
|
|
1109
|
-
yield columnPlugin.pluginOptions.storageAdapter.markKeyForDeletation(oldRecord[value]);
|
|
1110
|
-
}
|
|
1108
|
+
yield columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion(oldRecord[value]);
|
|
1111
1109
|
}
|
|
1112
1110
|
catch (e) {
|
|
1113
1111
|
// file might be e.g. already deleted, so we catch error
|
|
@@ -1117,12 +1115,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1117
1115
|
if (recordFields[value] && recordFields[value] !== null) {
|
|
1118
1116
|
// remove tag from new file
|
|
1119
1117
|
// in this case we let it crash if it fails: this is a new file which just was uploaded.
|
|
1120
|
-
|
|
1121
|
-
yield columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion(recordFields[value]);
|
|
1122
|
-
}
|
|
1123
|
-
else {
|
|
1124
|
-
yield columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletation(recordFields[value]);
|
|
1125
|
-
}
|
|
1118
|
+
yield columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion(recordFields[value]);
|
|
1126
1119
|
}
|
|
1127
1120
|
}
|
|
1128
1121
|
}
|
|
@@ -1170,6 +1163,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1170
1163
|
server.endpoint({
|
|
1171
1164
|
method: 'POST',
|
|
1172
1165
|
path: `/plugin/${this.pluginInstanceId}/get_image_generation_prompts`,
|
|
1166
|
+
agent: { hiddenFromAgents: true },
|
|
1173
1167
|
request_schema: getImageGenerationPromptsBodySchema,
|
|
1174
1168
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, query, cookies, requestUrl }) {
|
|
1175
1169
|
const data = body;
|
|
@@ -1200,6 +1194,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1200
1194
|
server.endpoint({
|
|
1201
1195
|
method: 'POST',
|
|
1202
1196
|
path: `/plugin/${this.pluginInstanceId}/create-job`,
|
|
1197
|
+
agent: { hiddenFromAgents: true },
|
|
1203
1198
|
request_schema: createJobBodySchema,
|
|
1204
1199
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, query, cookies, requestUrl, response }) {
|
|
1205
1200
|
const data = body;
|
|
@@ -1267,6 +1262,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1267
1262
|
server.endpoint({
|
|
1268
1263
|
method: 'POST',
|
|
1269
1264
|
path: `/plugin/${this.pluginInstanceId}/get-job-status`,
|
|
1265
|
+
agent: { hiddenFromAgents: true },
|
|
1270
1266
|
request_schema: jobStatusBodySchema,
|
|
1271
1267
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, response }) {
|
|
1272
1268
|
const data = body;
|
|
@@ -1302,6 +1298,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1302
1298
|
server.endpoint({
|
|
1303
1299
|
method: 'POST',
|
|
1304
1300
|
path: `/plugin/${this.pluginInstanceId}/update-rate-limits`,
|
|
1301
|
+
agent: { hiddenFromAgents: true },
|
|
1305
1302
|
request_schema: updateRateLimitsBodySchema,
|
|
1306
1303
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, response }) {
|
|
1307
1304
|
var _b, _c, _d;
|
|
@@ -1331,6 +1328,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1331
1328
|
server.endpoint({
|
|
1332
1329
|
method: 'POST',
|
|
1333
1330
|
path: `/plugin/${this.pluginInstanceId}/compile_old_image_link`,
|
|
1331
|
+
agent: { hiddenFromAgents: true },
|
|
1334
1332
|
request_schema: compileOldImageLinkBodySchema,
|
|
1335
1333
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, response }) {
|
|
1336
1334
|
var _b, _c;
|
|
@@ -1362,6 +1360,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1362
1360
|
server.endpoint({
|
|
1363
1361
|
method: 'POST',
|
|
1364
1362
|
path: `/plugin/${this.pluginInstanceId}/get_filtered_ids`,
|
|
1363
|
+
agent: { hiddenFromAgents: true },
|
|
1365
1364
|
request_schema: getFilteredIdsBodySchema,
|
|
1366
1365
|
handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, adminUser, headers, query, cookies, requestUrl, response }) {
|
|
1367
1366
|
var _b, _c;
|
package/index.ts
CHANGED
|
@@ -1056,6 +1056,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1056
1056
|
server.endpoint({
|
|
1057
1057
|
method: 'POST',
|
|
1058
1058
|
path: `/plugin/${this.pluginInstanceId}/get_old_data`,
|
|
1059
|
+
agent: { hiddenFromAgents: true },
|
|
1059
1060
|
request_schema: getOldDataBodySchema,
|
|
1060
1061
|
handler: async ({ body, adminUser, headers, query, cookies, requestUrl }) => {
|
|
1061
1062
|
const data = body as z.infer<typeof getOldDataBodySchema>;
|
|
@@ -1079,6 +1080,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1079
1080
|
server.endpoint({
|
|
1080
1081
|
method: 'POST',
|
|
1081
1082
|
path: `/plugin/${this.pluginInstanceId}/get_images`,
|
|
1083
|
+
agent: { hiddenFromAgents: true },
|
|
1082
1084
|
request_schema: getImagesBodySchema,
|
|
1083
1085
|
handler: async ({ body, adminUser, headers, query, cookies, requestUrl }) => {
|
|
1084
1086
|
const data = body as z.infer<typeof getImagesBodySchema>;
|
|
@@ -1101,6 +1103,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1101
1103
|
server.endpoint({
|
|
1102
1104
|
method: 'POST',
|
|
1103
1105
|
path: `/plugin/${this.pluginInstanceId}/update_fields`,
|
|
1106
|
+
agent: { hiddenFromAgents: true },
|
|
1104
1107
|
request_schema: updateFieldsBodySchema,
|
|
1105
1108
|
handler: async ({ body, adminUser, headers, response }) => {
|
|
1106
1109
|
const data = body as z.infer<typeof updateFieldsBodySchema>;
|
|
@@ -1163,11 +1166,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1163
1166
|
if (oldRecord[value]) {
|
|
1164
1167
|
// put tag to delete old file
|
|
1165
1168
|
try {
|
|
1166
|
-
|
|
1167
|
-
await columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion(oldRecord[value]);
|
|
1168
|
-
} else {
|
|
1169
|
-
await columnPlugin.pluginOptions.storageAdapter.markKeyForDeletation(oldRecord[value]);
|
|
1170
|
-
}
|
|
1169
|
+
await columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion(oldRecord[value]);
|
|
1171
1170
|
} catch (e) {
|
|
1172
1171
|
// file might be e.g. already deleted, so we catch error
|
|
1173
1172
|
console.error(`Error setting tag to true for object ${oldRecord[value]}. File will not be auto-cleaned up`);
|
|
@@ -1176,11 +1175,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1176
1175
|
if (recordFields[value] && recordFields[value] !== null) {
|
|
1177
1176
|
// remove tag from new file
|
|
1178
1177
|
// in this case we let it crash if it fails: this is a new file which just was uploaded.
|
|
1179
|
-
|
|
1180
|
-
await columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion(recordFields[value]);
|
|
1181
|
-
} else {
|
|
1182
|
-
await columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletation(recordFields[value]);
|
|
1183
|
-
}
|
|
1178
|
+
await columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion(recordFields[value]);
|
|
1184
1179
|
}
|
|
1185
1180
|
}
|
|
1186
1181
|
}
|
|
@@ -1234,6 +1229,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1234
1229
|
server.endpoint({
|
|
1235
1230
|
method: 'POST',
|
|
1236
1231
|
path: `/plugin/${this.pluginInstanceId}/get_image_generation_prompts`,
|
|
1232
|
+
agent: { hiddenFromAgents: true },
|
|
1237
1233
|
request_schema: getImageGenerationPromptsBodySchema,
|
|
1238
1234
|
handler: async ({ body, adminUser, headers, query, cookies, requestUrl }) => {
|
|
1239
1235
|
const data = body as z.infer<typeof getImageGenerationPromptsBodySchema>;
|
|
@@ -1268,6 +1264,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1268
1264
|
server.endpoint({
|
|
1269
1265
|
method: 'POST',
|
|
1270
1266
|
path: `/plugin/${this.pluginInstanceId}/create-job`,
|
|
1267
|
+
agent: { hiddenFromAgents: true },
|
|
1271
1268
|
request_schema: createJobBodySchema,
|
|
1272
1269
|
handler: async ({ body, adminUser, headers, query, cookies, requestUrl, response }) => {
|
|
1273
1270
|
const data = body as z.infer<typeof createJobBodySchema>;
|
|
@@ -1336,6 +1333,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1336
1333
|
server.endpoint({
|
|
1337
1334
|
method: 'POST',
|
|
1338
1335
|
path: `/plugin/${this.pluginInstanceId}/get-job-status`,
|
|
1336
|
+
agent: { hiddenFromAgents: true },
|
|
1339
1337
|
request_schema: jobStatusBodySchema,
|
|
1340
1338
|
handler: async ({ body, adminUser, headers, response }) => {
|
|
1341
1339
|
const data = body as z.infer<typeof jobStatusBodySchema>;
|
|
@@ -1376,6 +1374,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1376
1374
|
server.endpoint({
|
|
1377
1375
|
method: 'POST',
|
|
1378
1376
|
path: `/plugin/${this.pluginInstanceId}/update-rate-limits`,
|
|
1377
|
+
agent: { hiddenFromAgents: true },
|
|
1379
1378
|
request_schema: updateRateLimitsBodySchema,
|
|
1380
1379
|
handler: async ({ body, adminUser, headers, response }) => {
|
|
1381
1380
|
const data = body as z.infer<typeof updateRateLimitsBodySchema>;
|
|
@@ -1406,6 +1405,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1406
1405
|
server.endpoint({
|
|
1407
1406
|
method: 'POST',
|
|
1408
1407
|
path: `/plugin/${this.pluginInstanceId}/compile_old_image_link`,
|
|
1408
|
+
agent: { hiddenFromAgents: true },
|
|
1409
1409
|
request_schema: compileOldImageLinkBodySchema,
|
|
1410
1410
|
handler: async ({ body, adminUser, headers, response }) => {
|
|
1411
1411
|
const data = body as z.infer<typeof compileOldImageLinkBodySchema>;
|
|
@@ -1438,6 +1438,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
|
1438
1438
|
server.endpoint({
|
|
1439
1439
|
method: 'POST',
|
|
1440
1440
|
path: `/plugin/${this.pluginInstanceId}/get_filtered_ids`,
|
|
1441
|
+
agent: { hiddenFromAgents: true },
|
|
1441
1442
|
request_schema: getFilteredIdsBodySchema,
|
|
1442
1443
|
handler: async ({ body, adminUser, headers, query, cookies, requestUrl, response }) => {
|
|
1443
1444
|
const resource = this.resourceConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/bulk-ai-flow",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"description": "Bulk AI workflow plugin for AdminForth for batch field generation and image processing",
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "latest",
|
|
32
|
-
"adminforth": "^
|
|
32
|
+
"adminforth": "^4.7.3",
|
|
33
33
|
"semantic-release": "^24.2.1",
|
|
34
34
|
"semantic-release-slack-bot": "^4.0.2",
|
|
35
35
|
"typescript": "^5.7.3"
|