Compare View

switch
from
...
to
 
Commits (5)

Changes

Showing 6 changed files Side-by-side Diff

1 1 module.exports = {
2   - env: {
3   - commonjs: true,
4   - es2021: true,
5   - node: true,
6   - },
7   - extends: [
8   - 'airbnb-base',
9   - ],
10   - parserOptions: {
11   - ecmaVersion: 12,
12   - },
13   - rules: {
14   - },
  2 + env: {
  3 + commonjs: true,
  4 + es2021: true,
  5 + node: true,
  6 + },
  7 + extends: [
  8 + 'airbnb-base',
  9 + ],
  10 + parserOptions: {
  11 + ecmaVersion: 12,
  12 + },
  13 + rules: {
  14 + indent: ['error', 4],
  15 + },
15 16 };
... ... @@ -0,0 +1,331 @@
  1 +### Changelog
  2 +
  3 +All notable changes to this project will be documented in this file. Dates are displayed in UTC.
  4 +
  5 +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
  6 +
  7 +#### [v0.14.8](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.7...v0.14.8)
  8 +
  9 +- Fix eslint on http-listener [`f8fc782`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/f8fc782a2e1ac06bac97cdcb86d0cb912678f9d9)
  10 +- Add xid on some logs at http-listener [`6a6998f`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/6a6998f9c593e155e99121479d2f4da5610e99e2)
  11 +- Fix eslint on index.js [`f383485`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/f383485f1173ced1c70847c3e446e65a372c777a)
  12 +
  13 +#### [v0.14.7](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.6...v0.14.7)
  14 +
  15 +> 30 September 2021
  16 +
  17 +- Add removeAccents dep [`a50c67c`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/a50c67c4b9defdaac30704831e4e1a3d69c9f739)
  18 +- Add removeAccents before unicode cleansing [`57ed4f4`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/57ed4f480c38782807839ff38d18058cf6e59190)
  19 +
  20 +#### [v0.14.6](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.5...v0.14.6)
  21 +
  22 +> 30 September 2021
  23 +
  24 +- Add clean msg from weird chars [`7545057`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/75450570b05e2ea8a548715fbd361de92c9e5b23)
  25 +- Add README.md [`1dcd57d`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/1dcd57d9f8eb6c36c8452100322aaef27e57ee6c)
  26 +- Remove plain text README [`96d3661`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/96d3661d08bbe3e841df9c72ef03e96ec6a43971)
  27 +
  28 +#### [v0.14.5](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.4...v0.14.5)
  29 +
  30 +> 12 September 2021
  31 +
  32 +- Bump all outdated deps [`fc39a66`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/fc39a66c6b919ed3971a4f0be861661778a068a8)
  33 +
  34 +#### [v0.14.4](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.3...v0.14.4)
  35 +
  36 +> 12 September 2021
  37 +
  38 +- Bump to komodo-sdk@1.43.3 [`8665541`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/86655415304b183f024c20fabd3d9219144ff50e)
  39 +
  40 +#### [v0.14.3](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.2...v0.14.3)
  41 +
  42 +> 10 February 2021
  43 +
  44 +- Batal config.do_not_forward_rc68_to_centers [`a5f8107`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/a5f8107819f2122fb1b69b121679c06ddf90613f)
  45 +
  46 +#### [v0.14.2](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.1...v0.14.2)
  47 +
  48 +> 10 February 2021
  49 +
  50 +- config.do_not_forward_rc68_to_centers [`f32ab00`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/f32ab0025ad2f41e873fab411484d862e0d9b507)
  51 +
  52 +#### [v0.14.1](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.14.0...v0.14.1)
  53 +
  54 +> 4 January 2021
  55 +
  56 +- Write pid.txt as a string (node14 comply) [`2209419`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/2209419d0ef40c191660c9dfef5d7e9ee7ce7062)
  57 +
  58 +#### [v0.14.0](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.13.3...v0.14.0)
  59 +
  60 +> 17 July 2020
  61 +
  62 +- AUTOPAY [`75e4b02`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/75e4b02cc5e8d8d0274da97c1bfbaa78eeda4437)
  63 +
  64 +#### [v0.13.3](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.13.2...v0.13.3)
  65 +
  66 +> 13 July 2020
  67 +
  68 +- Add random uniqid on inquiry request id [`73d8f3b`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/73d8f3b50ca1b33da6db4fce88c470b3f5ca2dcf)
  69 +
  70 +#### [v0.13.2](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.13.1...v0.13.2)
  71 +
  72 +> 7 July 2020
  73 +
  74 +- AUTO request id on buy use CORE [`d3598b4`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/d3598b456af9a42e876370eae669a500ac6eefe1)
  75 +
  76 +#### [v0.13.1](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.13.0...v0.13.1)
  77 +
  78 +> 4 May 2020
  79 +
  80 +- Config to disable claim bonus/rebate [`ac02046`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/ac020462ae9f45995e0764de81a4ddb61752ca3c)
  81 +
  82 +#### [v0.13.0](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.12.2...v0.13.0)
  83 +
  84 +> 9 March 2020
  85 +
  86 +- adddownline append ts suffix [`0a8f1a2`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/0a8f1a2f13419c4465733d68503b30cdaaea7d28)
  87 +
  88 +#### [v0.12.2](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.12.1...v0.12.2)
  89 +
  90 +> 24 February 2020
  91 +
  92 +- LISTCOMPLAIN [`bed712d`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/bed712de5932c1976dddf627a1b7d46cd82cc874)
  93 +
  94 +#### [v0.12.1](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.12.0...v0.12.1)
  95 +
  96 +> 24 February 2020
  97 +
  98 +- Remove some 'use strict' [`d61442c`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/d61442cc0da47c31ec644bacdf115a974d43a5b6)
  99 +- Sample of ascending_mutation and ascending_deposit [`21de4d6`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/21de4d66f10f672075570bd8edfbaba0fb25a7e1)
  100 +- LISTDEPOSIT honour config.ascending_mutation or config.ascending_deposit [`41496a8`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/41496a8163e609b5cb88ed1ef005a7252ccdea74)
  101 +
  102 +#### [v0.12.0](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.11.0...v0.12.0)
  103 +
  104 +> 14 February 2020
  105 +
  106 +- Complain handler [`40dfc57`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/40dfc57ccfc2d514a46df6c1cabb4316644f0788)
  107 +- destinationCorrector [`7a59681`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/7a59681851b24861116e647f53503bdb49db9439)
  108 +
  109 +#### [v0.11.0](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.10.6...v0.11.0)
  110 +
  111 +> 20 December 2019
  112 +
  113 +- INQUIRY and PAY [`2429c04`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/2429c04c16a0de083ea86e247cc4be41888013ca)
  114 +- claimbonus [`a6fbe08`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/a6fbe088d9cd9ae1a5fee54e44d84b6b6487f849)
  115 +- temporary bonus [`81df4ef`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/81df4efb46c1b388e0d6894c10fd8e6372c17cee)
  116 +
  117 +#### [v0.10.6](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.10.5...v0.10.6)
  118 +
  119 +> 6 December 2019
  120 +
  121 +- LISTDEPOSIT [`ff9c0a4`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/ff9c0a476dd9c865e31aa237fb576cf40fccfeb7)
  122 +- blacklist help [`4b2ec8e`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/4b2ec8eed6856f253cf2b46cf76c8840056e5666)
  123 +- daysummaryall [`d338889`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/d33888983e7d1f3f711b6b0174f0c30384846a72)
  124 +
  125 +#### [v0.10.5](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.10.4...v0.10.5)
  126 +
  127 +> 3 December 2019
  128 +
  129 +- Buy: replace +62 to 0 [`01c2902`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/01c2902ced57a13abcf3ba4e182b2be6c97386de)
  130 +
  131 +#### [v0.10.4](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.10.3...v0.10.4)
  132 +
  133 +> 1 December 2019
  134 +
  135 +- Auto 0 dan 62 pada addbalance dan transferbalance [`8f2c83f`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/8f2c83f8c1f07c0a0eb18f92713e0de92617d819)
  136 +
  137 +#### [v0.10.3](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.10.2...v0.10.3)
  138 +
  139 +> 1 December 2019
  140 +
  141 +- Ubah 0 di depan menjadi pada nama terminal baru saat pembuatan downline baru jika phone number [`c7ef5ea`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/c7ef5eaccc40a7fb5d3bc73c57137c7dda91e7ad)
  142 +- Ubah 0 di depan pada terminal baru di addterminal jika phone number [`4a6f9dc`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/4a6f9dce6ace8cb6396635c183a8e9fd73423da2)
  143 +- Fix missing calling core [`4923ddc`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/4923ddcd3095f13d2e1b2bc1cfdbd34ec2b0bdf4)
  144 +
  145 +#### [v0.10.2](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.10.1...v0.10.2)
  146 +
  147 +> 18 November 2019
  148 +
  149 +- CONST on price [`42ed229`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/42ed229a6a9f4c186a36b92d2ca613d5a0b48a92)
  150 +- LISTTERMINAL multiple formats [`1aee6da`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/1aee6daf6a555574e51ac5ee6d0abee10dcc44d5)
  151 +- downlineinfo can be select by store_name or terminal_name [`8fb3694`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/8fb3694e9e29156f590ad9e493654219e71f5844)
  152 +
  153 +#### [v0.10.1](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.10.0...v0.10.1)
  154 +
  155 +> 14 November 2019
  156 +
  157 +- Split help to multiline [`7fae5b0`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/7fae5b0da994302bc0c5807542c7d9fef5593764)
  158 +
  159 +#### [v0.10.0](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.25...v0.10.0)
  160 +
  161 +> 29 October 2019
  162 +
  163 +- Command listtrx dan listtrxall [`e19d4c4`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/e19d4c4983461465f8e90800392e6ddae85aa1b1)
  164 +
  165 +#### [v0.9.25](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.24...v0.9.25)
  166 +
  167 +> 16 October 2019
  168 +
  169 +- resync db-mysql dari komodo [`402ba9d`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/402ba9dec54f2259e1d1d0121c67e9d13615723b)
  170 +
  171 +#### [v0.9.24](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.23...v0.9.24)
  172 +
  173 +> 28 August 2019
  174 +
  175 +- adddownline support markup and create terminal [`af29d21`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/af29d2157bd2b1392fbf923cd24ebf56b290d4fb)
  176 +
  177 +#### [v0.9.23](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.22...v0.9.23)
  178 +
  179 +> 12 August 2019
  180 +
  181 +- RedisClient fixed [`55e015e`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/55e015ed4dc7770ede5dcf0e00353215a54023fd)
  182 +- Log label and process title [`c1c899e`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/c1c899e05cb5a574bfff536953cc351f68a87905)
  183 +- Perbaikan redis client di messages-archive [`449ed02`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/449ed021da11bd00683aa69303376b196e8a43e5)
  184 +
  185 +#### [v0.9.22](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.21...v0.9.22)
  186 +
  187 +> 9 August 2019
  188 +
  189 +- More log [`b245199`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/b245199e2be66fd8f758951ea2f108d9f3ddcd86)
  190 +
  191 +#### [v0.9.21](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.20...v0.9.21)
  192 +
  193 +> 9 August 2019
  194 +
  195 +- Warn on no redis [`2e3adb5`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/2e3adb5d4fa6bde5022e39ba34d085b909fef3ea)
  196 +
  197 +#### [v0.9.20](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.19...v0.9.20)
  198 +
  199 +> 9 August 2019
  200 +
  201 +- More verbose on log [`32e4b96`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/32e4b967f39962a31730890c37c1326c5311e5ad)
  202 +
  203 +#### [v0.9.19](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.18...v0.9.19)
  204 +
  205 +> 9 August 2019
  206 +
  207 +- Multilne [`c7425b7`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/c7425b7ec662cb8573d89653f43f6a7a94aa77cf)
  208 +- Obey req.query.is_outgoing [`1fc809c`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/1fc809c905b210f4cead06c52bfe5c27a22c479d)
  209 +
  210 +#### [v0.9.18](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.17...v0.9.18)
  211 +
  212 +> 9 August 2019
  213 +
  214 +- *CRITICAL* bug release sebelumnya [`c9814ab`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/c9814ab1151f099da8c88decd4182ef2c4a4a894)
  215 +
  216 +#### [v0.9.17](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.16...v0.9.17)
  217 +
  218 +> 9 August 2019
  219 +
  220 +- Update to komodo-sdk@1.37.6 [`91d62b4`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/91d62b493488c28f6918505f10201fbf52fccac4)
  221 +- Messages counter [`6224382`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/6224382333828cb479e6ad8fb463c0c877045806)
  222 +
  223 +#### [v0.9.16](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.15...v0.9.16)
  224 +
  225 +> 7 August 2019
  226 +
  227 +- MESSAGES-ARCHIVES field created now [`23f87a6`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/23f87a60fa241465fec806d1f51d5670cda419ff)
  228 +
  229 +#### [v0.9.15](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.14...v0.9.15)
  230 +
  231 +> 7 August 2019
  232 +
  233 +- Fix saving outgoing message [`94fa9a1`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/94fa9a1420dc79406141426734ef1b2bc806a710)
  234 +
  235 +#### [v0.9.14](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.13...v0.9.14)
  236 +
  237 +> 7 August 2019
  238 +
  239 +- DEBUG [`d0d4d5a`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/d0d4d5a98785dd69ffbd7e220e91c19c463fa8ab)
  240 +
  241 +#### [v0.9.13](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.12...v0.9.13)
  242 +
  243 +> 7 August 2019
  244 +
  245 +- Logging on message history [`c8c4f3b`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/c8c4f3ba98b42b5f98b1e06fce39b4277566f8e0)
  246 +
  247 +#### [v0.9.12](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.11...v0.9.12)
  248 +
  249 +> 7 August 2019
  250 +
  251 +- Penggunaan parameter partner menggantikan from dan to [`e448936`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/e448936d34b140aa2658c77d2daa27566edd2ce2)
  252 +
  253 +#### [v0.9.11](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.10...v0.9.11)
  254 +
  255 +> 6 August 2019
  256 +
  257 +- Coba tangani bug mysql [`99e55f1`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/99e55f15e9782ba3a19d5c4b21da0f70db8d6c76)
  258 +
  259 +#### [v0.9.10](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.9...v0.9.10)
  260 +
  261 +> 6 August 2019
  262 +
  263 +- Message archive [`336ebef`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/336ebef2f95f81b6aaae5c578f278e3e19840786)
  264 +- Update komodo-sdk [`7a0c6ec`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/7a0c6ec85770dcca7e796eecdcfadf02db251a2b)
  265 +- Tambahan keyword [`56c506e`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/56c506ebfbb9a6cea9ea1671106ae458a3f38dec)
  266 +
  267 +#### [v0.9.9](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.8...v0.9.9)
  268 +
  269 +> 18 July 2019
  270 +
  271 +- Smart delimiter [`d1dad71`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/d1dad71515c29ffd2c552b68947b27bbb22c1563)
  272 +
  273 +#### [v0.9.8](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.7...v0.9.8)
  274 +
  275 +> 18 July 2019
  276 +
  277 +- Supplier balances [`c7ca62f`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/c7ca62ff7b062850d11cc7468b45fe2b9be4903f)
  278 +- downlineInfo menggunakan parameter standar [`816884a`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/816884a3be0afd9402cadffbb12ccc38503240e3)
  279 +- listdownline menggunkanan parameter konvensi [`4f291e9`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/4f291e9b4f083c4abc7f3afd73ea679b003e0253)
  280 +
  281 +#### [v0.9.7](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.6...v0.9.7)
  282 +
  283 +> 15 July 2019
  284 +
  285 +- default-command sorted [`36be5d3`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/36be5d315815f265938f02cbc5bef387ba73be00)
  286 +- Enable/disable downline [`f77a856`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/f77a8568e30a18e3b94eadac525a8244bb955f47)
  287 +- Pembuatan tiket deposit [`3691166`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/369116684bc6ad11c218989a039305427ed67b3b)
  288 +
  289 +#### [v0.9.6](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.5...v0.9.6)
  290 +
  291 +> 3 July 2019
  292 +
  293 +- transferBalance handler [`099ce6f`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/099ce6f7f6c9fe82be75f56daead1be96c654bc2)
  294 +- Handler addbalance [`273862f`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/273862fe5841a51d2f5a24237203c9c449023c27)
  295 +- Tambah beberapa keyword untuk addterminal [`b4c2385`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/b4c2385a5e1d71951e3c90a74003040bc0636f1e)
  296 +
  297 +#### [v0.9.5](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.4...v0.9.5)
  298 +
  299 +> 2 July 2019
  300 +
  301 +- Command adddownline [`b39444c`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/b39444c35e25a85a04fadf73046a03d6a32e4c51)
  302 +- Info downline [`8e3a1cb`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/8e3a1cb0d93b5851475ccdeced9d3271e08d5bb2)
  303 +- Tidak tampilkan perintah yg belum diimplementasi [`ed78c0a`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/ed78c0ab31c321d1cf8aa8ad2fb879b5ecb1eb3f)
  304 +
  305 +#### [v0.9.4](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.3...v0.9.4)
  306 +
  307 +> 21 June 2019
  308 +
  309 +- Checking core version [`5fae2dc`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/5fae2dc7762d851505cee66c96a3d796fbfc382f)
  310 +- Pengkinian list command [`e8bf179`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/e8bf179ec4b0df5dc09ad7ea842f3dbdee4c85f2)
  311 +- Handler list downline [`90fbdbf`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/90fbdbf1de0776b8f2535e37ef4cc410b68c306d)
  312 +
  313 +#### [v0.9.3](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.2...v0.9.3)
  314 +
  315 +> 19 June 2019
  316 +
  317 +- Change working dir and create pid file [`3d97094`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/3d97094c84f8530d3effb1535da5f3e8a56f75a2)
  318 +
  319 +#### [v0.9.2](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/compare/v0.9.1...v0.9.2)
  320 +
  321 +> 19 June 2019
  322 +
  323 +- Sample config [`30bf7f5`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/30bf7f5244f8210e5926a4acaaa1952935768577)
  324 +- conditional ipfilter [`8910bfe`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/8910bfe4370010dd3c02beb7f4096a05bbf61856)
  325 +
  326 +#### v0.9.1
  327 +
  328 +> 19 June 2019
  329 +
  330 +- Ready to rock [`d3d4606`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/d3d460667dd77d5a0a77b1eecf931c9aa9b288a8)
  331 +- first commit [`966909d`](https://gitlab.kodesumber.com/komodo/komodo-center-messaging/commit/966909d93f80d48c05c187d4eb7782bfebe531d1)
... ... @@ -8,11 +8,12 @@ global.KOMODO_LOG_LABEL = 'KOMODO-MESSAGING';
8 8 process.title = global.KOMODO_LOG_LABEL;
9 9  
10 10 const matrix = require('komodo-sdk/matrix');
  11 +
11 12 matrix.NODE_ENV = process.env.NODE_ENV;
12 13  
13 14 const logger = require('tektrans-logger');
14 15 const coreUrl = require('komodo-sdk/core-url');
15   -logger.verbose('CORE URL: ' + coreUrl);
16 16  
17   -require('./lib/http-listener');
  17 +logger.verbose(`CORE URL: ${coreUrl}`);
18 18  
  19 +require('./lib/http-listener');
lib/http-listener.js
  1 +const MODULE_NAME = 'HTTP-LISTENER';
  2 +
1 3 const express = require('express');
2   -const bodyParser = require('body-parser');
3 4 const ipfilter = require('express-ipfilter').IpFilter;
4 5 const removeAccents = require('remove-accents');
  6 +const uniqid = require('uniqid');
5 7  
6 8 const config = require('komodo-sdk/config');
7 9 const logger = require('tektrans-logger');
... ... @@ -10,7 +12,9 @@ const commandHandler = require('./command-handler');
10 12 const messagesArchive = require('./messages-archive');
11 13  
12 14 const app = express();
13   -const port = config && config.listener && config.listener.http && config.listener.http.port ? config.listener.http.port : 32979;
  15 +const port = (config && config.listener && config.listener.http
  16 + && config.listener.http.port && config.listener.http.port
  17 +) || 32979;
14 18  
15 19 /**
16 20 * Handler utama.
... ... @@ -19,7 +23,7 @@ const port = config && config.listener && config.listener.http && config.listene
19 23 * @param {object} req.query - Express query string object
20 24 * @param {string} [req.query.partner] - Partner (pengirim atau penerima)
21 25 * @param {string} [req.query.from] - Pengirim, OBSOLETED: gunakan parameter partner
22   - * @param {string} [req.query.from_raw] - Pengirim tanpa suffix (raw), OBSOLETED: gunakan parameter partner_raw
  26 + * @param {string} [req.query.from_raw] - Pengirim tanpa suffix (raw), OBSOLETED by partner_raw
23 27 * @param {string} [req.query.to] - Tujuan, jika is_outgoing, OBSOLETED: gunakan parameter partner
24 28 * @param {string} req.query.msg - Isi pesan
25 29 * @param {string} req.query.origin - Nama origin
... ... @@ -31,16 +35,23 @@ const port = config && config.listener && config.listener.http && config.listene
31 35 function mainHandler(req, res) {
32 36 if (!req.body) req.body = {};
33 37  
  38 + const xid = uniqid();
  39 +
  40 + logger.verbose(`${MODULE_NAME} 72AFD326: Got a request`, {
  41 + xid,
  42 + query: req.query,
  43 + body: req.body,
  44 + });
  45 +
34 46 if (
35   - ( !req.body.partner && !req.query.partner )
36   - &&
37   - (
38   - ( (!req.query.is_outgoing && !req.body.is_outgoing) && (!req.query.from && !req.body.from) )
39   - ||
40   - ( (req.query.is_outgoing || req.body.is_outgoing) && (!req.query.to && !req.body.to) )
  47 + (!req.body.partner && !req.query.partner)
  48 + && (
  49 + (!req.query.is_outgoing && !req.body.is_outgoing && !req.query.from && !req.body.from)
  50 + || ((req.query.is_outgoing || req.body.is_outgoing) && !req.query.to && !req.body.to)
41 51 )
42 52 ) {
43   - logger.warn('Undefined parameter partner or from or to. #D254B7B454DB', {
  53 + logger.warn(`${MODULE_NAME} D254B7B454DB: Undefined parameter partner or from or to`, {
  54 + xid,
44 55 partner: req.body.partner || req.query.partner,
45 56 is_outgoing: req.body.is_outgoing || req.query.is_outgoing,
46 57 from: req.body.from || req.query.from,
... ... @@ -52,41 +63,53 @@ function mainHandler(req, res) {
52 63  
53 64 // message cleansing
54 65 const msg = removeAccents(req.query.msg || req.body.msg || '')
55   - .replace(/[\u{0080}-\u{FFFF}]/gu, '').trim();
  66 + .replace(/[\u{0080}-\u{FFFF}]/gu, '')
  67 + .trim();
56 68  
57 69 if (!msg) {
58   - logger.warn('Undefined parameter msg. #92996A497D12')
59   - res.end('ERROR. Undefined parameter: msg');
  70 + logger.warn(`${MODULE_NAME} #92996A497D12: Undefined parameter msg`, {
  71 + xid,
  72 + });
  73 + res.end(`ERROR. Undefined parameter: msg. XID: ${xid}`);
60 74 return;
61 75 }
62 76  
63 77 logger.verbose(
64   - `Saving ${req.body.is_outgoing || req.query.is_outgoing ? 'outgoing' : 'incoming' } message history`,
  78 + `Saving ${req.body.is_outgoing || req.query.is_outgoing ? 'outgoing' : 'incoming'} message history`,
65 79 {
  80 + xid,
66 81 transport: req.body.origin_transport || req.query.origin_transport,
67   - partner: req.body.partner || req.query.partner || req.body.from || req.query.from || req.body.to || req.query.to,
  82 + partner: req.body.partner || req.query.partner || req.body.from || req.query.from
  83 + || req.body.to || req.query.to,
68 84 msg,
69   - }
  85 + },
70 86 );
71 87  
72 88 messagesArchive.insert(
73 89 {
74   - origin_label: req.body.origin_label || req.query.origin_label || req.body.origin || req.query.origin,
  90 + origin_label: req.body.origin_label || req.query.origin_label
  91 + || req.body.origin || req.query.origin,
75 92 origin_transport: req.body.origin_transport || req.query.origin_transport,
76   - partner: req.body.partner_raw || req.query.partner_raw || req.body.from_raw || req.query.from_raw || req.body.from || req.query.from || req.body.to || req.query.to || req.body.partner || req.query.partner,
  93 + partner: req.body.partner_raw || req.query.partner_raw
  94 + || req.body.from_raw || req.query.from_raw
  95 + || req.body.from || req.query.from
  96 + || req.body.to || req.query.to || req.body.partner || req.query.partner,
77 97 msg,
78   - },
79   - ( req.body.is_outgoing || req.query.is_outgoing ) ? messagesArchive.DIRECTION_OUTGOING : messagesArchive.DIRECTION_INCOMING
  98 + },
  99 + (req.body.is_outgoing || req.query.is_outgoing) ? messagesArchive.DIRECTION_OUTGOING
  100 + : messagesArchive.DIRECTION_INCOMING,
80 101 );
81 102  
82 103 if (
83   - req.body.do_not_forward_to_core || req.query.do_not_forward_to_core
  104 + req.body.do_not_forward_to_core || req.query.do_not_forward_to_core
84 105 || req.body.is_outgoing || req.query.is_outgoing
85 106 ) {
86   - logger.verbose( 'Ignoring message', {
87   - from: req.body.from || req.query.from,
88   - msg,
89   - do_not_forward_to_core: req.body.do_not_forward_to_core || req.query.do_not_forward_to_core
  107 + logger.verbose('Ignoring message', {
  108 + xid,
  109 + from: req.body.from || req.query.from,
  110 + msg,
  111 + do_not_forward_to_core: req.body.do_not_forward_to_core
  112 + || req.query.do_not_forward_to_core,
90 113 });
91 114  
92 115 res.end('OK');
... ... @@ -105,24 +128,28 @@ function mainHandler(req, res) {
105 128 report_port: req.body.report_port || req.query.report_port,
106 129 from: req.body.partner || req.query.partner || req.body.from || req.query.from,
107 130 msg,
108   - }
  131 + };
109 132  
110   - commandHandler(msg, params, function(err, coreResponseObject, responseParams) {
  133 + commandHandler(msg, params, (err, coreResponseObject, responseParams) => {
111 134 if (err) {
112   - res.end('ERROR. ' + err);
  135 + res.end(`ERROR. ${err.message || err}`);
113 136 } else if (coreResponseObject) {
114 137 res.json(coreResponseObject);
115 138 } else {
116 139 res.end(responseParams.body);
117 140 }
118   - })
  141 + });
119 142 }
120 143  
121   -config.ip_whitelist && config.ip_whitelist.length && app.use(ipfilter(config.ip_whitelist, {mode: 'allow', log: false}));
  144 +if (config.ip_whitelist && config.ip_whitelist.length) {
  145 + app.use(ipfilter(config.ip_whitelist, { mode: 'allow', log: false }));
  146 +}
122 147  
123 148 app.get('/', mainHandler);
124   -app.post('/', bodyParser.urlencoded({extended: true}), mainHandler);
  149 +app.post('/', express.urlencoded({ extended: true }), mainHandler);
125 150  
126   -app.listen(port, function() {
127   - logger.info('HTTP-LISTENER: started', {port: port, app_env: app.get('env')});
128   -});
129 151 \ No newline at end of file
  152 +app.listen(port, () => {
  153 + logger.info('HTTP-LISTENER: started', {
  154 + port, app_env: app.get('env'),
  155 + });
  156 +});
1 1 {
2 2 "name": "komodo-center-messaging",
3   - "version": "0.14.7",
  3 + "version": "0.14.8",
4 4 "lockfileVersion": 2,
5 5 "requires": true,
6 6 "packages": {
7 7 "": {
8 8 "name": "komodo-center-messaging",
9   - "version": "0.14.7",
  9 + "version": "0.14.8",
10 10 "license": "ISC",
11 11 "dependencies": {
  12 + "auto-changelog": "^2.3.0",
12 13 "body-parser": "^1.19.0",
13 14 "express": "^4.17.1",
14 15 "express-ipfilter": "^1.2.0",
1 1 {
2 2 "name": "komodo-center-messaging",
3   - "version": "0.14.7",
  3 + "version": "0.14.8",
4 4 "description": "Komodo Common Messaging Center",
5 5 "main": "index.js",
6 6 "scripts": {
7 7 "test": "mocha",
  8 + "version": "auto-changelog -p && git add CHANGELOG.md",
8 9 "postversion": "git push && git push --tags"
9 10 },
10 11 "repository": {
... ... @@ -19,6 +20,7 @@
19 20 "author": "Adhidarma Hadiwinoto <me@adhisimon.org>",
20 21 "license": "ISC",
21 22 "dependencies": {
  23 + "auto-changelog": "^2.3.0",
22 24 "body-parser": "^1.19.0",
23 25 "express": "^4.17.1",
24 26 "express-ipfilter": "^1.2.0",