vona-module-a-captcha 5.0.11 → 5.0.13

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 (2) hide show
  1. package/dist/index.js +5 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BeanInfo, BeanBase, uuidv4, beanFullNameFromOnionName, deepExtend, BeanScopeBase, createBeanDecorator } from 'vona';
2
+ import { zodCustomError, getRandomInt } from '@cabloy/utils';
2
3
  import { Interceptor, Aspect } from 'vona-module-a-aspect';
3
- import { getRandomInt } from '@cabloy/utils';
4
4
  import { Bean, Scope } from 'vona-module-a-bean';
5
5
  import { CacheRedis, BeanCacheRedisBase } from 'vona-module-a-cache';
6
6
  import { Api, v } from 'vona-module-a-openapi';
@@ -25,7 +25,7 @@ let InterceptorCaptchaVerify = (_dec$6 = Interceptor({
25
25
  if (typeof captcha !== 'object') throw new Error('not found valid captcha data');
26
26
  // verify
27
27
  const verified = await this.bean.captcha.verify(captcha.id, captcha.token, sceneName);
28
- if (!verified) throw this.bean.zod.customError([bodyField], this.scope.locale.CaptchaInvalid());
28
+ if (!verified) throw zodCustomError([bodyField], this.scope.locale.CaptchaInvalid());
29
29
  // next
30
30
  return next();
31
31
  }
@@ -241,7 +241,9 @@ async function resolverDefault(_ctx, providers) {
241
241
  }
242
242
 
243
243
  var _dec$4, _dec2$4, _class$4;
244
- let CacheRedisCaptcha = (_dec$4 = CacheRedis(), _dec2$4 = BeanInfo({
244
+ let CacheRedisCaptcha = (_dec$4 = CacheRedis({
245
+ disableTransactionCompensate: true
246
+ }), _dec2$4 = BeanInfo({
245
247
  module: "a-captcha"
246
248
  }), _dec$4(_class$4 = _dec2$4(_class$4 = class CacheRedisCaptcha extends BeanCacheRedisBase {}) || _class$4) || _class$4);
247
249
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-a-captcha",
3
3
  "type": "module",
4
- "version": "5.0.11",
4
+ "version": "5.0.13",
5
5
  "title": "a-captcha",
6
6
  "vonaModule": {
7
7
  "dependencies": {},