@reachu/database 1.0.184 → 1.0.185

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.
@@ -24,11 +24,17 @@ let ProductSubscriber = ProductSubscriber_1 = class ProductSubscriber {
24
24
  constructor() {
25
25
  this.listenTo = () => Product_entity_1.Product;
26
26
  this.afterUpdate = (event) => __awaiter(this, void 0, void 0, function* () {
27
+ console.log('event afterUpdate1', event);
27
28
  if (event === null || event === void 0 ? void 0 : event.entity) {
29
+ console.log('event afterUpdate2', event);
28
30
  logger_1.logger.debug(`[ProductSubscriber.afterUpdate] after update entity (${event.entity.id})`);
31
+ console.log('event afterUpdate3', event);
29
32
  const { id } = event.entity;
33
+ console.log('event afterUpdate4', event);
30
34
  yield Product_entity_1.Product.invalidateCache(id, ProductSubscriber_1.invalidateCache);
35
+ console.log('event afterUpdate5', event);
31
36
  }
37
+ console.log('event afterUpdate6', event);
32
38
  });
33
39
  this.afterRemove = (event) => __awaiter(this, void 0, void 0, function* () {
34
40
  if (event === null || event === void 0 ? void 0 : event.entity) {
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSubscriber.js","sourceRoot":"","sources":["../../src/subscribers/ProductSubscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,qCAA+F;AAC/F,6DAAmD;AACnD,2CAAwC;AAGxC,IAAa,iBAAiB,yBAA9B,MAAa,iBAAiB;IAA9B;QAEE,aAAQ,GAAG,GAAG,EAAE,CAAC,wBAAO,CAAC;QAEzB,gBAAW,GAAG,CAAO,KAA2B,EAAE,EAAE;YAClD,IAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EAAE;gBACjB,eAAM,CAAC,KAAK,CAAC,wDAAwD,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;gBACzF,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC5B,MAAM,wBAAO,CAAC,eAAe,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CAAC,MAAM,CAAC;gBAC5B,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;gBAEzC,MAAM,wBAAO,CAAC,eAAe,CAAC,EAAE,EAAE,mBAAiB,CAAC,eAAe,CAAC,CAAC;gBACrE,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;aAC1C;YACD,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAC3C,CAAC,CAAA,CAAC;QAEF,gBAAW,GAAG,CAAO,KAA2B,EAAE,EAAE;YAClD,IAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EAAE;gBACjB,eAAM,CAAC,KAAK,CAAC,wDAAwD,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;gBACzF,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC5B,MAAM,wBAAO,CAAC,eAAe,CAAC,EAAE,EAAE,mBAAiB,CAAC,eAAe,CAAC,CAAC;aACtE;QACH,CAAC,CAAA,CAAC;IACJ,CAAC;CAAA,CAAA;AA5BY,iBAAiB;IAD7B,yBAAe,EAAE;GACL,iBAAiB,CA4B7B;AA5BY,8CAAiB"}
@@ -2236,7 +2236,7 @@
2236
2236
  "signature": "744e6430bafc6f39f66c4fc1e6a0d8c9551260ffd1782aa7e3f5166ac6aa1f86",
2237
2237
  "affectsGlobalScope": false
2238
2238
  },
2239
- "../node_modules/@types/send/node_modules/@types/mime/index.d.ts": {
2239
+ "../node_modules/@types/mime/index.d.ts": {
2240
2240
  "version": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
2241
2241
  "signature": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
2242
2242
  "affectsGlobalScope": false
@@ -2882,7 +2882,7 @@
2882
2882
  "affectsGlobalScope": false
2883
2883
  },
2884
2884
  "../src/subscribers/productsubscriber.ts": {
2885
- "version": "db7aa2a91dd0925224e321e3308aabe801c061037a81f45e969fea5a39be507f",
2885
+ "version": "8ae172fa9c91981c414ac77cb066f82d55d757673e9a30105c134a7193f1f0ba",
2886
2886
  "signature": "38d7cc7c4cc4f6bfc7a3962cf7d92612f5f8599e213c34c8c78f9a804e25293a",
2887
2887
  "affectsGlobalScope": false
2888
2888
  },
@@ -3812,8 +3812,8 @@
3812
3812
  "affectsGlobalScope": false
3813
3813
  },
3814
3814
  "../node_modules/@babel/types/lib/index.d.ts": {
3815
- "version": "55584873eae27c5607725f0a9b2123cdea9100fd47cd4bfd582b567a7c363877",
3816
- "signature": "55584873eae27c5607725f0a9b2123cdea9100fd47cd4bfd582b567a7c363877",
3815
+ "version": "9bc7900e5ecd93822053b8b42ac890c871eee76c7b6cbd2c2561dc1db95f7d0a",
3816
+ "signature": "9bc7900e5ecd93822053b8b42ac890c871eee76c7b6cbd2c2561dc1db95f7d0a",
3817
3817
  "affectsGlobalScope": false
3818
3818
  },
3819
3819
  "../node_modules/@types/babel__generator/index.d.ts": {
@@ -3906,11 +3906,6 @@
3906
3906
  "signature": "f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1",
3907
3907
  "affectsGlobalScope": false
3908
3908
  },
3909
- "../node_modules/@types/mime/index.d.ts": {
3910
- "version": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
3911
- "signature": "d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769",
3912
- "affectsGlobalScope": false
3913
- },
3914
3909
  "../node_modules/@types/prettier/index.d.ts": {
3915
3910
  "version": "d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e",
3916
3911
  "signature": "d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e",
@@ -4233,10 +4228,10 @@
4233
4228
  "../node_modules/@types/node/stream.d.ts"
4234
4229
  ],
4235
4230
  "../node_modules/@types/send/index.d.ts": [
4231
+ "../node_modules/@types/mime/index.d.ts",
4236
4232
  "../node_modules/@types/node/fs.d.ts",
4237
4233
  "../node_modules/@types/node/index.d.ts",
4238
- "../node_modules/@types/node/stream.d.ts",
4239
- "../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
4234
+ "../node_modules/@types/node/stream.d.ts"
4240
4235
  ],
4241
4236
  "../node_modules/@types/serve-static/index.d.ts": [
4242
4237
  "../node_modules/@types/http-errors/index.d.ts",
@@ -7465,10 +7460,10 @@
7465
7460
  "../node_modules/@types/node/stream.d.ts"
7466
7461
  ],
7467
7462
  "../node_modules/@types/send/index.d.ts": [
7463
+ "../node_modules/@types/mime/index.d.ts",
7468
7464
  "../node_modules/@types/node/fs.d.ts",
7469
7465
  "../node_modules/@types/node/index.d.ts",
7470
- "../node_modules/@types/node/stream.d.ts",
7471
- "../node_modules/@types/send/node_modules/@types/mime/index.d.ts"
7466
+ "../node_modules/@types/node/stream.d.ts"
7472
7467
  ],
7473
7468
  "../node_modules/@types/serve-static/index.d.ts": [
7474
7469
  "../node_modules/@types/http-errors/index.d.ts",
@@ -10327,7 +10322,6 @@
10327
10322
  "../node_modules/@types/qs/index.d.ts",
10328
10323
  "../node_modules/@types/range-parser/index.d.ts",
10329
10324
  "../node_modules/@types/send/index.d.ts",
10330
- "../node_modules/@types/send/node_modules/@types/mime/index.d.ts",
10331
10325
  "../node_modules/@types/serve-static/index.d.ts",
10332
10326
  "../node_modules/@types/stack-utils/index.d.ts",
10333
10327
  "../node_modules/@types/yargs-parser/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.184",
3
+ "version": "1.0.185",
4
4
  "description": "reachu-database",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "author": "reachu",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "@reachu/logger": "1.0.184",
25
- "@reachu/utils": "1.0.184",
24
+ "@reachu/logger": "1.0.185",
25
+ "@reachu/utils": "1.0.185",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -8,11 +8,20 @@ export class ProductSubscriber implements EntitySubscriberInterface<Product> {
8
8
  listenTo = () => Product;
9
9
 
10
10
  afterUpdate = async (event: UpdateEvent<Product>) => {
11
+ console.log('event afterUpdate1', event);
11
12
  if (event?.entity) {
13
+ console.log('event afterUpdate2', event);
14
+
12
15
  logger.debug(`[ProductSubscriber.afterUpdate] after update entity (${event.entity.id})`);
16
+ console.log('event afterUpdate3', event);
17
+
13
18
  const { id } = event.entity;
19
+ console.log('event afterUpdate4', event);
20
+
14
21
  await Product.invalidateCache(id, ProductSubscriber.invalidateCache);
22
+ console.log('event afterUpdate5', event);
15
23
  }
24
+ console.log('event afterUpdate6', event);
16
25
  };
17
26
 
18
27
  afterRemove = async (event: RemoveEvent<Product>) => {