exodus-framework 2.0.871 → 2.0.872

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.
@@ -6,6 +6,7 @@ export declare class Cache<T> extends System {
6
6
  delete(_key: string): Promise<void>;
7
7
  all(): Promise<T[]>;
8
8
  clear(): Promise<void>;
9
+ has(_key: string): Promise<boolean>;
9
10
  }
10
11
  export declare class RedisCache<T> extends Cache<T> {
11
12
  protected client: RedisClientType;
@@ -16,5 +17,6 @@ export declare class RedisCache<T> extends Cache<T> {
16
17
  delete(key: string): Promise<void>;
17
18
  all(): Promise<T[]>;
18
19
  clear(): Promise<void>;
20
+ has(key: string): Promise<boolean>;
19
21
  }
20
22
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/app/classes/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,qBAAa,KAAK,CAAC,CAAC,CAAE,SAAQ,MAAM;IAC5B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAG7B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAG1B,MAAM,CAAC,IAAI,EAAE,MAAM;IAGnB,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC;IAGnB,KAAK;CAGZ;AAED,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IAEvC,SAAS,CAAC,MAAM,EAAE,eAAe;IACjC,SAAS,CAAC,GAAG,EAAE,MAAM;gBADX,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,MAAM;IAKjB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAS5B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IASxB,MAAM,CAAC,GAAG,EAAE,MAAM;IAQlB,GAAG;IAcH,KAAK;CAUZ"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/app/classes/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,qBAAa,KAAK,CAAC,CAAC,CAAE,SAAQ,MAAM;IAC5B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAG7B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAG1B,MAAM,CAAC,IAAI,EAAE,MAAM;IAGnB,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC;IAGnB,KAAK;IAGL,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG1C;AAED,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IAEvC,SAAS,CAAC,MAAM,EAAE,eAAe;IACjC,SAAS,CAAC,GAAG,EAAE,MAAM;gBADX,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,MAAM;IAKjB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAS5B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IASxB,MAAM,CAAC,GAAG,EAAE,MAAM;IAQlB,GAAG;IAcH,KAAK;IAWL,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAOzC"}
@@ -23,6 +23,9 @@ class Cache extends _system.default {
23
23
  async clear() {
24
24
  throw new Error('Not implemented');
25
25
  }
26
+ async has(_key) {
27
+ throw new Error('Not implemented');
28
+ }
26
29
  }
27
30
  exports.Cache = Cache;
28
31
  class RedisCache extends Cache {
@@ -65,7 +68,7 @@ class RedisCache extends Cache {
65
68
  }
66
69
  return data;
67
70
  } catch (error) {
68
- new _error.ErrorHandler('Falha no delete do redis cache', error);
71
+ new _error.ErrorHandler('Falha no all do redis cache', error);
69
72
  }
70
73
  }
71
74
  async clear() {
@@ -77,7 +80,14 @@ class RedisCache extends Cache {
77
80
  await this.delete(k);
78
81
  }
79
82
  } catch (error) {
80
- new _error.ErrorHandler('Falha no delete do redis cache', error);
83
+ new _error.ErrorHandler('Falha no clear do redis cache', error);
84
+ }
85
+ }
86
+ async has(key) {
87
+ try {
88
+ return !this.get(key);
89
+ } catch (error) {
90
+ new _error.ErrorHandler('Falha no has do redis cache', error);
81
91
  }
82
92
  }
83
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exodus-framework",
3
- "version": "2.0.871",
3
+ "version": "2.0.872",
4
4
  "description": "Exodus Framework",
5
5
  "author": "jhownpaixao",
6
6
  "license": "ISC",