@pi-r/redis 0.6.2 → 0.6.3

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/client/index.js CHANGED
@@ -6,7 +6,6 @@ const util_1 = require("@e-mc/db/util");
6
6
  const types_1 = require("@e-mc/types");
7
7
  const Db = require("@e-mc/db");
8
8
  const DbPool = require('@e-mc/db/pool');
9
- const REDIS_V4 = Db.checkSemVer("redis" /* STRINGS.MODULE_NAME */, 4);
10
9
  class RedisPool extends DbPool {
11
10
  async getConnection() {
12
11
  return this.client;
@@ -48,9 +47,6 @@ function removePoolProperties(options) {
48
47
  }
49
48
  const getPoolKey = (options) => options.url && JSON.stringify(options);
50
49
  async function setCredential(item) {
51
- if (!REDIS_V4) {
52
- throw (0, types_1.errorValue)("Upgrade client to latest version" /* ERR_DB.UPGRADE */, "redis" /* STRINGS.MODULE_NAME */ + '@' + Db.getPackageVersion("redis" /* STRINGS.MODULE_NAME */));
53
- }
54
50
  const credential = this.getCredential(item);
55
51
  const options = item.options || (item.options = {});
56
52
  const client = (0, types_1.isPlainObject)(options.client) ? options.client : options.client = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/redis",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Redis client driver for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/anpham6/pi-r.git",
12
+ "url": "git+https://github.com/anpham6/pi-r.git",
13
13
  "directory": "src/db/redis"
14
14
  },
15
15
  "keywords": [
@@ -21,8 +21,8 @@
21
21
  "license": "MIT",
22
22
  "homepage": "https://github.com/anpham6/pi-r#readme",
23
23
  "dependencies": {
24
- "@e-mc/db": "^0.8.2",
25
- "@e-mc/types": "^0.8.2",
24
+ "@e-mc/db": "^0.8.3",
25
+ "@e-mc/types": "^0.8.3",
26
26
  "redis": "^4.6.12"
27
27
  }
28
28
  }
package/types/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import type { ClientCommandOptions } from '@redis/client/dist/lib/client';
7
7
  import type { RedisClientOptions } from '@redis/client';
8
8
  import type { RedisCommandArgument } from '@redis/client/dist/lib/commands';
9
9
  import type { RedisJSON } from '@redis/json/dist/commands';
10
- import type { AggregateOptions, RediSearchSchema, SearchOptions, SetOptions } from 'redis';
10
+ import type { RediSearchSchema, SearchOptions, SetOptions } from 'redis';
11
11
 
12
12
  export interface RedisDataSource extends DbDataSource<string, PlainObject, ArrayOf<RedisSetValue> | ArrayOf<RedisJSONValue>, string | RedisCredential, string>, AuthValue, CascadeAction {
13
13
  source: "redis";
@@ -22,7 +22,7 @@ export interface RedisDataSource extends DbDataSource<string, PlainObject, Array
22
22
  command?: RedisCommandOptions;
23
23
  get?: PlainObject;
24
24
  search?: SearchOptions;
25
- aggregate?: AggregateOptions;
25
+ aggregate?: PlainObject;
26
26
  };
27
27
  database?: number;
28
28
  }