@unchainedshop/plugins 2.3.2 → 2.3.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/lib/events/redis.js +3 -3
- package/lib/events/redis.js.map +1 -1
- package/package.json +20 -19
- package/src/events/redis.ts +3 -3
package/lib/events/redis.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createClient } from '@redis/client';
|
|
2
2
|
import { setEmitAdapter } from '@unchainedshop/events';
|
|
3
3
|
const { REDIS_PORT = 6379, REDIS_HOST = '127.0.0.1' } = process.env;
|
|
4
4
|
const subscribedEvents = new Set();
|
|
5
5
|
const RedisEventEmitter = () => {
|
|
6
|
-
const redisPublisher =
|
|
6
|
+
const redisPublisher = createClient({
|
|
7
7
|
url: `redis://${REDIS_HOST}:${REDIS_PORT}`,
|
|
8
8
|
});
|
|
9
|
-
const redisSubscriber =
|
|
9
|
+
const redisSubscriber = createClient({
|
|
10
10
|
url: `redis://${REDIS_HOST}:${REDIS_PORT}`,
|
|
11
11
|
});
|
|
12
12
|
return {
|
package/lib/events/redis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../../src/events/redis.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../../src/events/redis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,EAAE,UAAU,GAAG,IAAI,EAAE,UAAU,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAEpE,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;AAEnC,MAAM,iBAAiB,GAAG,GAAgB,EAAE;IAC1C,MAAM,cAAc,GAAG,YAAY,CAAC;QAClC,GAAG,EAAE,WAAW,UAAU,IAAI,UAAU,EAAE;KAC3C,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,YAAY,CAAC;QACnC,GAAG,EAAE,WAAW,UAAU,IAAI,UAAU,EAAE;KAC3C,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC3F,SAAS,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE;YACjC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;gBACpC,eAAe,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;oBAC/C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;gBAChC,CAAC,CAAC,CAAC;gBACH,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aACjC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,iBAAiB,EAAE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/plugins",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"main": "lib/plugins-index.js",
|
|
5
5
|
"types": "lib/plugins-index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
74
74
|
"optionalDependencies": {
|
|
75
|
+
"@redis/client": "^1.5.8",
|
|
75
76
|
"bip32": "^4.0.0",
|
|
76
77
|
"escape-string-regexp": "^5.0.0",
|
|
77
78
|
"ethers": "^6.6.4",
|
|
@@ -82,23 +83,24 @@
|
|
|
82
83
|
"web-push": "^3.6.3"
|
|
83
84
|
},
|
|
84
85
|
"devDependencies": {
|
|
86
|
+
"@redis/client": "^1.5.8",
|
|
85
87
|
"@types/node": "^18.16.19",
|
|
86
|
-
"@unchainedshop/api": "^2.3.
|
|
87
|
-
"@unchainedshop/core-delivery": "^2.3.
|
|
88
|
-
"@unchainedshop/core-enrollments": "^2.3.
|
|
89
|
-
"@unchainedshop/core-filters": "^2.3.
|
|
90
|
-
"@unchainedshop/core-messaging": "^2.3.
|
|
91
|
-
"@unchainedshop/core-orders": "^2.3.
|
|
92
|
-
"@unchainedshop/core-payment": "^2.3.
|
|
93
|
-
"@unchainedshop/core-products": "^2.3.
|
|
94
|
-
"@unchainedshop/core-quotations": "^2.3.
|
|
95
|
-
"@unchainedshop/core-warehousing": "^2.3.
|
|
96
|
-
"@unchainedshop/core-worker": "^2.3.
|
|
97
|
-
"@unchainedshop/events": "^2.3.
|
|
98
|
-
"@unchainedshop/file-upload": "^2.3.
|
|
99
|
-
"@unchainedshop/logger": "^2.3.
|
|
100
|
-
"@unchainedshop/types": "^2.3.
|
|
101
|
-
"@unchainedshop/utils": "^2.3.
|
|
88
|
+
"@unchainedshop/api": "^2.3.3",
|
|
89
|
+
"@unchainedshop/core-delivery": "^2.3.3",
|
|
90
|
+
"@unchainedshop/core-enrollments": "^2.3.3",
|
|
91
|
+
"@unchainedshop/core-filters": "^2.3.3",
|
|
92
|
+
"@unchainedshop/core-messaging": "^2.3.3",
|
|
93
|
+
"@unchainedshop/core-orders": "^2.3.3",
|
|
94
|
+
"@unchainedshop/core-payment": "^2.3.3",
|
|
95
|
+
"@unchainedshop/core-products": "^2.3.3",
|
|
96
|
+
"@unchainedshop/core-quotations": "^2.3.3",
|
|
97
|
+
"@unchainedshop/core-warehousing": "^2.3.3",
|
|
98
|
+
"@unchainedshop/core-worker": "^2.3.3",
|
|
99
|
+
"@unchainedshop/events": "^2.3.3",
|
|
100
|
+
"@unchainedshop/file-upload": "^2.3.3",
|
|
101
|
+
"@unchainedshop/logger": "^2.3.3",
|
|
102
|
+
"@unchainedshop/types": "^2.3.3",
|
|
103
|
+
"@unchainedshop/utils": "^2.3.3",
|
|
102
104
|
"bluebird": "^3.7.2",
|
|
103
105
|
"event-iterator": "^2.0.0",
|
|
104
106
|
"express": "^4.18.2",
|
|
@@ -107,9 +109,8 @@
|
|
|
107
109
|
"minio": "^7.1.1",
|
|
108
110
|
"mongodb": "^4.16.0",
|
|
109
111
|
"node-sheets": "^1.2.0",
|
|
110
|
-
"nodemailer": "^6.9.
|
|
112
|
+
"nodemailer": "^6.9.4",
|
|
111
113
|
"open": "^9.1.0",
|
|
112
|
-
"redis": "^4.6.7",
|
|
113
114
|
"request": "^2.88.2",
|
|
114
115
|
"ts-jest": "^29.1.1",
|
|
115
116
|
"typescript": "^5.1.6",
|
package/src/events/redis.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createClient } from '@redis/client';
|
|
2
2
|
import { EmitAdapter } from '@unchainedshop/types/events.js';
|
|
3
3
|
import { setEmitAdapter } from '@unchainedshop/events';
|
|
4
4
|
|
|
@@ -7,11 +7,11 @@ const { REDIS_PORT = 6379, REDIS_HOST = '127.0.0.1' } = process.env;
|
|
|
7
7
|
const subscribedEvents = new Set();
|
|
8
8
|
|
|
9
9
|
const RedisEventEmitter = (): EmitAdapter => {
|
|
10
|
-
const redisPublisher =
|
|
10
|
+
const redisPublisher = createClient({
|
|
11
11
|
url: `redis://${REDIS_HOST}:${REDIS_PORT}`,
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
const redisSubscriber =
|
|
14
|
+
const redisSubscriber = createClient({
|
|
15
15
|
url: `redis://${REDIS_HOST}:${REDIS_PORT}`,
|
|
16
16
|
});
|
|
17
17
|
|