npm package diff
Package: @forge/storage
Versions: 1.5.15-experimental-204139e - 1.5.15-experimental-10722bc
File: package/out/transaction-api.js
Index: package/out/transaction-api.js
===================================================================
--- package/out/transaction-api.js
+++ package/out/transaction-api.js
@@ -27,6 +27,12 @@
set: [...(this.transactionOptions.set || [])],
delete: [...(this.transactionOptions.delete || []), { key }]
});
}
+ async execute() {
+ if (!this.transactionOptions.delete?.length && !this.transactionOptions.set?.length) {
+ throw new Error('Nothing to execute');
+ }
+ await this.globalStorage.transaction(this.transactionOptions);
+ }
}
exports.DefaultTransactionBuilder = DefaultTransactionBuilder;