@adminforth/bulk-ai-flow 1.15.0 → 1.15.1

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.
Files changed (3) hide show
  1. package/dist/index.js +12 -2
  2. package/index.ts +10 -2
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -612,7 +612,12 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
612
612
  if (oldRecord[value]) {
613
613
  // put tag to delete old file
614
614
  try {
615
- yield columnPlugin.pluginOptions.storageAdapter.markKeyForDeletation(oldRecord[value]);
615
+ if (columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion !== undefined) {
616
+ yield columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion(oldRecord[value]);
617
+ }
618
+ else {
619
+ yield columnPlugin.pluginOptions.storageAdapter.markKeyForDeletation(oldRecord[value]);
620
+ }
616
621
  }
617
622
  catch (e) {
618
623
  // file might be e.g. already deleted, so we catch error
@@ -622,7 +627,12 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
622
627
  if (fieldsToUpdate[idx][value] && fieldsToUpdate[idx][value] !== null) {
623
628
  // remove tag from new file
624
629
  // in this case we let it crash if it fails: this is a new file which just was uploaded.
625
- yield columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletation(fieldsToUpdate[idx][value]);
630
+ if (columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion !== undefined) {
631
+ yield columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion(fieldsToUpdate[idx][value]);
632
+ }
633
+ else {
634
+ yield columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletation(fieldsToUpdate[idx][value]);
635
+ }
626
636
  }
627
637
  }
628
638
  }
package/index.ts CHANGED
@@ -625,7 +625,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
625
625
  if (oldRecord[value]) {
626
626
  // put tag to delete old file
627
627
  try {
628
- await columnPlugin.pluginOptions.storageAdapter.markKeyForDeletation(oldRecord[value]);
628
+ if (columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion !== undefined) {
629
+ await columnPlugin.pluginOptions.storageAdapter.markKeyForDeletion(oldRecord[value]);
630
+ } else {
631
+ await columnPlugin.pluginOptions.storageAdapter.markKeyForDeletation(oldRecord[value]);
632
+ }
629
633
  } catch (e) {
630
634
  // file might be e.g. already deleted, so we catch error
631
635
  console.error(`Error setting tag to true for object ${oldRecord[value]}. File will not be auto-cleaned up`);
@@ -634,7 +638,11 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
634
638
  if (fieldsToUpdate[idx][value] && fieldsToUpdate[idx][value] !== null) {
635
639
  // remove tag from new file
636
640
  // in this case we let it crash if it fails: this is a new file which just was uploaded.
637
- await columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletation(fieldsToUpdate[idx][value]);
641
+ if (columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion !== undefined) {
642
+ await columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletion(fieldsToUpdate[idx][value]);
643
+ } else {
644
+ await columnPlugin.pluginOptions.storageAdapter.markKeyForNotDeletation(fieldsToUpdate[idx][value]);
645
+ }
638
646
  }
639
647
  }
640
648
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@types/handlebars": "^4.0.40",
30
- "adminforth": "^2.4.0-next.222",
30
+ "adminforth": "^2.4.0-next.315",
31
31
  "handlebars": "^4.7.8"
32
32
  },
33
33
  "release": {