@adminforth/background-jobs 1.8.0 → 1.8.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.
package/dist/index.js CHANGED
@@ -373,13 +373,13 @@ export default class BackgroundJobsPlugin extends AdminForthPlugin {
373
373
  return JSON.parse(state);
374
374
  });
375
375
  }
376
- updateJobFieldsAtomicly(jobId, updateFunction) {
376
+ updateJobFieldsAtomically(jobId, updateFunction) {
377
377
  return __awaiter(this, void 0, void 0, function* () {
378
378
  if (!jobId) {
379
- throw new Error('updateJobFieldsAtomicly: jobId is required');
379
+ throw new Error('updateJobFieldsAtomically: jobId is required');
380
380
  }
381
381
  if (typeof updateFunction !== 'function') {
382
- throw new Error('updateJobFieldsAtomicly: updateFunction must be a function');
382
+ throw new Error('updateJobFieldsAtomically: updateFunction must be a function');
383
383
  }
384
384
  // Ensure updates are atomic per jobId.
385
385
  // Different jobs are not blocked by each other.
package/index.ts CHANGED
@@ -404,12 +404,12 @@ export default class BackgroundJobsPlugin extends AdminForthPlugin {
404
404
  return JSON.parse(state);
405
405
  }
406
406
 
407
- public async updateJobFieldsAtomicly(jobId: string, updateFunction: () => Promise<void>) {
407
+ public async updateJobFieldsAtomically(jobId: string, updateFunction: () => Promise<void>) {
408
408
  if (!jobId) {
409
- throw new Error('updateJobFieldsAtomicly: jobId is required');
409
+ throw new Error('updateJobFieldsAtomically: jobId is required');
410
410
  }
411
411
  if (typeof updateFunction !== 'function') {
412
- throw new Error('updateJobFieldsAtomicly: updateFunction must be a function');
412
+ throw new Error('updateJobFieldsAtomically: updateFunction must be a function');
413
413
  }
414
414
 
415
415
  // Ensure updates are atomic per jobId.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/background-jobs",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",