From 2de2b87a22e457a1d97ce7b42854e06773c253dd Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Thu, 28 Apr 2022 17:48:38 +0700 Subject: [PATCH] add reservation and loading balance --- _backup/app/assets/cert/CACerts.pem | 50 + .../app/assets/cert/FeliqClient0002-02.pfx | Bin 0 -> 2397 bytes _backup/app/assets/cert/FeliqClient0002.pfx | Bin 0 -> 2397 bytes _backup/app/controller/authenticate1.js | 80 + _backup/app/controller/authenticate2.js | 68 + _backup/app/controller/authenticateResp.js | 69 + _backup/app/controller/endTranscation.js | 59 + _backup/app/controller/readData.js | 61 + _backup/app/controller/readDataResp.js | 67 + _backup/app/controller/services/webSocket.js | 132 + _backup/app/controller/topup.js | 61 + _backup/app/controller/topupResp.js | 79 + _backup/app/controller/utils/utils.js | 157 + _backup/app/routes/routes.js | 29 + _backup/application/assets/cert/CACerts.pem | 50 + .../assets/cert/FeliqClient0002-02.pfx | Bin 0 -> 2397 bytes .../assets/cert/FeliqClient0002.pfx | Bin 0 -> 2397 bytes .../application}/controllers/auth.js | 0 .../controllers/hsmAuthenticate1.js | 80 + .../controllers/hsmAuthenticate2.js | 68 + .../controllers/hsmAuthenticateResp.js | 69 + .../controllers/hsmEndTranscation.js | 59 + .../application/controllers/hsmReadData.js | 61 + .../controllers/hsmReadDataResp.js | 67 + _backup/application/controllers/hsmTopup.js | 61 + .../application/controllers/hsmTopupResp.js | 79 + .../controllers/payment-channel.js | 0 .../controllers/services/webSocket.js | 132 + .../application}/controllers/user.js | 0 .../application/controllers/utils/utils.js | 157 + .../application/middlewares/jwt.middleware.js | 83 + _backup/application/routes/auth.routes.js | 10 + _backup/application/routes/core.routes.js | 25 + _backup/application/routes/hsm.js | 29 + _backup/application/routes/master.routes.js | 37 + application/assets/cert/CACerts.pem | 50 + .../assets/cert/FeliqClient0002-02.pfx | Bin 0 -> 2397 bytes application/assets/cert/FeliqClient0002.pfx | Bin 0 -> 2397 bytes application/modules/auth/auth.controller.js | 235 ++ application/modules/hsm/authenticate1.js | 80 + application/modules/hsm/authenticate2.js | 68 + application/modules/hsm/authenticateResp.js | 69 + application/modules/hsm/endTranscation.js | 59 + application/modules/hsm/readData.js | 61 + application/modules/hsm/readDataResp.js | 67 + application/modules/hsm/services/webSocket.js | 132 + application/modules/hsm/topup.js | 61 + application/modules/hsm/topupResp.js | 79 + application/modules/hsm/utils/utils.js | 157 + .../loadbalance/loadbalance.controller.js | 324 ++ .../modules/loadbalance/loadbalance.model.js | 192 + .../paymentchannel.controller.js | 233 ++ .../reservebalance.controller.js | 318 ++ .../reservebalance/reservebalance.model.js | 199 ++ application/modules/users/user.controller.js | 238 ++ application/modules/users/user.model.js | 135 + application/routes/auth.routes.js | 2 +- application/routes/core.routes.js | 2 +- application/routes/hsm.js | 29 + application/routes/loadbalance.routes.js | 17 + application/routes/master.routes.js | 2 +- application/routes/reservebalance.routes.js | 17 + index.js | 4 + package-lock.json | 3126 +++++++++++++++-- package.json | 4 +- 65 files changed, 7566 insertions(+), 373 deletions(-) create mode 100644 _backup/app/assets/cert/CACerts.pem create mode 100644 _backup/app/assets/cert/FeliqClient0002-02.pfx create mode 100644 _backup/app/assets/cert/FeliqClient0002.pfx create mode 100644 _backup/app/controller/authenticate1.js create mode 100644 _backup/app/controller/authenticate2.js create mode 100644 _backup/app/controller/authenticateResp.js create mode 100644 _backup/app/controller/endTranscation.js create mode 100644 _backup/app/controller/readData.js create mode 100644 _backup/app/controller/readDataResp.js create mode 100644 _backup/app/controller/services/webSocket.js create mode 100644 _backup/app/controller/topup.js create mode 100644 _backup/app/controller/topupResp.js create mode 100644 _backup/app/controller/utils/utils.js create mode 100644 _backup/app/routes/routes.js create mode 100644 _backup/application/assets/cert/CACerts.pem create mode 100644 _backup/application/assets/cert/FeliqClient0002-02.pfx create mode 100644 _backup/application/assets/cert/FeliqClient0002.pfx rename {application => _backup/application}/controllers/auth.js (100%) create mode 100644 _backup/application/controllers/hsmAuthenticate1.js create mode 100644 _backup/application/controllers/hsmAuthenticate2.js create mode 100644 _backup/application/controllers/hsmAuthenticateResp.js create mode 100644 _backup/application/controllers/hsmEndTranscation.js create mode 100644 _backup/application/controllers/hsmReadData.js create mode 100644 _backup/application/controllers/hsmReadDataResp.js create mode 100644 _backup/application/controllers/hsmTopup.js create mode 100644 _backup/application/controllers/hsmTopupResp.js rename {application => _backup/application}/controllers/payment-channel.js (100%) create mode 100644 _backup/application/controllers/services/webSocket.js rename {application => _backup/application}/controllers/user.js (100%) create mode 100644 _backup/application/controllers/utils/utils.js create mode 100644 _backup/application/middlewares/jwt.middleware.js create mode 100644 _backup/application/routes/auth.routes.js create mode 100644 _backup/application/routes/core.routes.js create mode 100644 _backup/application/routes/hsm.js create mode 100644 _backup/application/routes/master.routes.js create mode 100644 application/assets/cert/CACerts.pem create mode 100644 application/assets/cert/FeliqClient0002-02.pfx create mode 100644 application/assets/cert/FeliqClient0002.pfx create mode 100644 application/modules/auth/auth.controller.js create mode 100644 application/modules/hsm/authenticate1.js create mode 100644 application/modules/hsm/authenticate2.js create mode 100644 application/modules/hsm/authenticateResp.js create mode 100644 application/modules/hsm/endTranscation.js create mode 100644 application/modules/hsm/readData.js create mode 100644 application/modules/hsm/readDataResp.js create mode 100644 application/modules/hsm/services/webSocket.js create mode 100644 application/modules/hsm/topup.js create mode 100644 application/modules/hsm/topupResp.js create mode 100644 application/modules/hsm/utils/utils.js create mode 100644 application/modules/loadbalance/loadbalance.controller.js create mode 100644 application/modules/loadbalance/loadbalance.model.js create mode 100644 application/modules/paymentchannels/paymentchannel.controller.js create mode 100644 application/modules/reservebalance/reservebalance.controller.js create mode 100644 application/modules/reservebalance/reservebalance.model.js create mode 100644 application/modules/users/user.controller.js create mode 100644 application/modules/users/user.model.js create mode 100644 application/routes/hsm.js create mode 100644 application/routes/loadbalance.routes.js create mode 100644 application/routes/reservebalance.routes.js diff --git a/_backup/app/assets/cert/CACerts.pem b/_backup/app/assets/cert/CACerts.pem new file mode 100644 index 0000000..644f802 --- /dev/null +++ b/_backup/app/assets/cert/CACerts.pem @@ -0,0 +1,50 @@ +-----BEGIN CERTIFICATE----- +MIIE7jCCA9agAwIBAgIJIrmxYwzstDwuMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAkpQMSUwIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScw +JQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTIwHhcNMTkwOTI3 +MDE1NDIzWhcNMjkwNTI5MDUwMDM5WjBeMQswCQYDVQQGEwJKUDEjMCEGA1UEChMa +Q3liZXJ0cnVzdCBKYXBhbiBDby4sIEx0ZC4xKjAoBgNVBAMTIUN5YmVydHJ1c3Qg +SmFwYW4gU3VyZVNlcnZlciBDQSBHNDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAMtunFmosT8IxBkVFP+OnkGkcVmbui+hdVBlGZhniniVluAhigm2WUxx +p4X5V3B/QKJLZmeAswmzxGKXaDCzcomYxXTygNXcTLI+IMyRisEO7V1NXFHUjSEl +KaY1LzCA9/emldnmRjX6B9Zt5xXK5q12WOIWkJECEwwKku77tvtKZPRKaCNCGsZ5 +Hja7PBs07jLoE0rMuZLQZNQEB0W63attKGCGzEk50lDj+wQ0UlUbQk3zAEsvdE6X +o1qZy9l783Va40vSx3VqhGYb4jWQrg2CrAtJcKQNSJ0m9yxJVVQDwpQQwGxHO5Em +Qv1LGJExASegOXzhzqCr5yiwECfSrOsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBRi +p9La3oW2kvGFvPbolZ11oPpOHzAfBgNVHSMEGDAWgBQKhal3ZQWYfECB+A+XLDjx +Cuw8zzASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjBJBgNVHR8E +QjBAMD6gPKA6hjhodHRwOi8vcmVwb3NpdG9yeS5zZWNvbXRydXN0Lm5ldC9TQy1S +b290Mi9TQ1Jvb3QyQ1JMLmNybDBSBgNVHSAESzBJMEcGCiqDCIybG2SHBQQwOTA3 +BggrBgEFBQcCARYraHR0cHM6Ly9yZXBvc2l0b3J5LnNlY29tdHJ1c3QubmV0L1ND +LVJvb3QyLzCBhQYIKwYBBQUHAQEEeTB3MDAGCCsGAQUFBzABhiRodHRwOi8vc2Ny +b290Y2EyLm9jc3Auc2Vjb210cnVzdC5uZXQwQwYIKwYBBQUHMAKGN2h0dHA6Ly9y +ZXBvc2l0b3J5LnNlY29tdHJ1c3QubmV0L1NDLVJvb3QyL1NDUm9vdDJjYS5jZXIw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IB +AQDFUXkuQAZKY5Pb/JvgufizJ8uZKpN++fiI8kOTgkrSriNYNjO9iEdTwVV3sW3P +abr3lAdCGrJ+wgArLLUnBZ7VGM//UlDhTRe4A19c0TmV1udTSbxabwQJbN1zIGbG +3KQsumg9/70PaIkawnihx9/TxGCrJkAH5W+9pkX7OWefsahylwiPkKRkJRv2em/v +rMRyb3LxRU5t84k1xQqCnMxTEWOAiWoOtatExZ38a8kn8kqiE1NEvtPOzSrVjSvD +7pH56AlvO7hzGzng60kyWnAz6O5rQ0tsFIgW9xloWTQQVcfEtzvjc8ptuP9onkbA +jMRDJaqLXrIVtB7GMek7S6AO +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl +MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe +U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX +DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy +dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj +YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV +OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr +zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM +VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ +hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO +ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw +awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs +OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3 +DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF +coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc +okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8 +t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy +1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/ +SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 +-----END CERTIFICATE----- \ No newline at end of file diff --git a/_backup/app/assets/cert/FeliqClient0002-02.pfx b/_backup/app/assets/cert/FeliqClient0002-02.pfx new file mode 100644 index 0000000000000000000000000000000000000000..fd71142de9e0565aa38506e09a727ff18fb12393 GIT binary patch literal 2397 zcmY+Ec{CJ?9>>jQ9b>sDdxIIW&e%m|ljJ0Vr zV=3DhDUq#gmnno~i)*~@Iq$vu-XFj7JLmH~=lkF1iz4#jfB+DR$S2Rur%JLS?Fj;S z08fZ~!eAmF^atie5kZW9BJL+dP~#6&4+L=ic$NPo0F(?j|Gyic0B#fv%v)?MT`Tdq zy9@~AuMW+VVfQEtE(x&D%#s?$E!G|j8)erXxMqBj!7KY zvxo>4(v>@^7+hP|pQ_%F{^s~oxyL~xvPg*qPxW z@c_@$rDrw<>o}|RQi~MB|EQ;_KXYv;e#*aZ*XYdH{B&}jtzH4=A!#qe;*-@5!K;_U zc$#8tkS|BZ<@lapHcdgJgnGI1S{w!;rn(!E4;3c`Uy#+C!mdF9D?%D&&3YD}7{F>p{YEI^# z|3K!s`x0r-QDJr_ow=YJ;A@>UaSFgT2cK}r93ZvNoz;#Ko|I!sjw9Yhy)ml6Tn#J7 zUXgBQ9qwne@Aq9)vnZ3^Q~GXyp?%5U_gPYY+okK-JJeR6Yv>WYKZ19gQ*2bSSyMT) z(idOJf*zQJi3{hQ!}nJ0ITY1Q*7#Q>5;~N-hmX|KB!f89+ll!iFdbt4GuL&=i4oIG z=8KHHTvK8ZqKc zh_K@DzZ?_y>CNG$xTW?AN-gX*8Wsh=Co;5Ud80SLcKEx=8ZCBj?Z83I2>YF6p%$%o{*8>RI zo7C1AeJ2SwphlOGC=y)UhKcSkb?Rprm!(yl_Q<$F#SoklbR*qLN4pG@)Wlul2bJ3W zWs-7WhaoOw{CIx#8iH$qTe$|xK;_QI>!}fm&zn}S_tSOYv18cR@t1?#=Z2;peKgvi z(b9-0(jWWtYpbu}zTdzLuer98cSZTa2N5r{(oYR62f{)ouC4pOXp3Kmdo|c^kODl+ zx=lRxEz=V~RDT|Zta>x^s{DT3CT;9#_?2REbX zjij)@Z3Yv;{YB#+c~+T6srvU*zatp3w$;MdCrPv%frnuZ>CnyU$Gc` zB*=2Q<<{IpJG@Picn4(=o+mh-YeGT=PFP&kr6F?2PKkOPMb+MPlZ6oMvWtr6;2kq- zr}6pd_ua3RM%WX<9@@V^oiMwt&RmeLj%r8G#IoEz4^(-Qv%p{nm-_<1MQo(NcGn5O zVc(8m+3zmDx6>-%x-I;>TZ+ysAgd|*XFs)f8oq^ZfdKscG4=F&Rlk$Jdp9r8zd4s} z1%_r0VxH{{ig1F1MjO5{uP(ZMgW38Tszvw`grDgN!oNgALDh=q1{%7~{wxH$9H-ZzA7sBKP42-KQDbJB8U>Vj3#6g{B3fNEUQSU4({Y`keg7snb6 zLzd{Hcdzyjy9@1xXB!Iz?Ui^7Now^6GSa(EMA*IA5pT8E_G|BPiW6QXxA|x)U+fHK zgOOBtr!O0);9*L2 z#|P`_c~r>Fs0tg01g+>k|Dm4ZTBXasuuZee+Ad`YjO!$`4arQBvuYM|e`;r{kq9b1NGRQ(hF0M`7sOXsIPvyp3pU3s41Gp7sA-J~E2f53?i7DPVKEcVJ_0H&0 zzy|ifMnxe;q9)`pbDnzyt6%3FR-YE~NHSKT`0i)o?)uO~bt3fdA@d>7@>O$Bsis*(W}4gC4>AJIJI?+8Hcj^A2Z zN}xwDok>$X{~@Tb+Zuv4+_M|s`!e<16Am|De0Nps&GZ4Z>wr>ayS@IMrky+aw0&*2 z>!X7lj%*_Ukih)4JJV$R;5R%PCy&s8cWx4I7y;h$PEqV0zpC-r@mYUK?D~+_i3N^j zQ*7`e>rmRj)}+}c-&wSg@p=_Wy{A&D>>>nnLbM)@Kq>xr9r?u35@4}WS$9_f%X;Sw2q*>N0*mzw%fM=o)vjza&!NxCCABWC1WPdQL0~W! LV(HNE@0I))0mxmL literal 0 HcmV?d00001 diff --git a/_backup/app/assets/cert/FeliqClient0002.pfx b/_backup/app/assets/cert/FeliqClient0002.pfx new file mode 100644 index 0000000000000000000000000000000000000000..cc482a90ac62212e5f70452c8df389faa5245036 GIT binary patch literal 2397 zcmY+EdpHvcAICSF%|`Ac(s5TI8$!9?Pp?YkZbL+Ki>OfOG7N`_32D)g#hPmpxy2G8 zxeR0OGej|jj$5bmJn#FS_xhvnFCSVl&{t!h7 z#f(ntU6PAZk@Z-_r8LrC=Z7iBZ)A5T09-`uPaOf+XibEb?xavv_R>z!ZJ+GDV|AGg zQkGPO^2o*#Y1T5Tt4aRIa&D=s_RrT|ut`4RU{GrQI5h8ztN{z1KQ^ z`;-fTy52qXU{$L?&JJ`x)UWqF$Kgnw3Ge}(stx;olZ}|lusStQbUf`-@jbtzG7NGY z*^k_Hiz#KkW;Ed}(B=k_-i&H;g8~>&OVZ1@?{-qRqy$#Hw%lu{494%wU*Wq=A<2|0 z-5%?`#jTcG?w+QV(9TFxont)0g3}`!DV*!1a{n6|?KXFdLix>^U*2q4xa?bOdrl?n zOw3K62n$cG)d?YewHoInLiTQg#UG!RT4;Hyz||_=bbL~ zY`bRHrJ)O@EWW(H!Nzfi8R8o2iM$^IigVCDd2byt|IrX2^%Fs@zjmGd?X^*ot9Yx_ z>X*ynhcY_1Vk;Ka6n%fhC~J~6N(2xU6|s&36X%&W{GsnoV~g@}eo8($1JVl$xC9&l2a2e4|MS+ef*Kf#_^*)I&)!PwD%XDH6k2b)@qHj z2vco8KbCLz`5P42(5Fkk9)Tl9?v9J~6bR1`MHGiHEgwOL%U$O7pfBq3^6{;_n|~w;6c>o0Ec9KYs+RoLs<1NAJx-V=&mB z;Y$*#jJm6q^LoL)4~;^oefBG{MZ!Oco#2d@fTaO~(wv||GOw3H9zY=%eZxbwK%L*& zcSx}h2u5*A5qCTUM(<=SK}8}{dFo3{{LtT2l9|{;1v`Oy!3xIgZ{R;-OFn< zq%I=H{W^AOjFH{3_7yP>v{?PLp7pcaMl@$kYvD~tW zCl}2DvTgQk&8^8es8i#pF8{Mzx)jyx(sNd_cY^FwR;}*fbdS)FJsMytrjzAq>TXYWGgsftj3&ov%9;DUuwcRnm9vUv zhu(5{YW>m8yGd9$@0^mEx!Eiqp?`Y+KiOi>@*81QQi;Mlui`*<7>H@&#%s!NlkT)wy)mgM4NtUK zn+74N_q8M&vykY*X&V~lQ8ywrVWQ&>NKlrrI-@eD{#+xeCtBcKGMoO!2`g6~hYaJG zWfY72e*HWm&T+PG@;*xWc$5kIqLejP#KZy}*2~ng=pPfc42~rss|PQ^?h$x5TXK&$ zdN1o+1RYgX9K(^LJ|1_ers_7Zj3)gf5A_vS3zYwMWFbbzEuj+r}4cAjgPHPGphVw6vgt%6O3aX-L-#WzeyZ6C?~zKpFLUPD@8_N~) z03~ihOISZ^92bkrrk9-l9D{M&)3?;KiZ}J8iFd4)_yT`8tK>_>U~isZ73k_XSbbYw zx{_IS*9c>_zSQt$d*`j`&?^TtAIEXE5tG>am8zQ4uNp&+}#RZhcHkfcTG(~`|Lyw`@A!(9aFyCS; NqRG&r4E^^?{skjcdjS9d literal 0 HcmV?d00001 diff --git a/_backup/app/controller/authenticate1.js b/_backup/app/controller/authenticate1.js new file mode 100644 index 0000000..99dda3f --- /dev/null +++ b/_backup/app/controller/authenticate1.js @@ -0,0 +1,80 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let felicaPollingResponse = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + let _timeOut = false; + + let _validasi = body.requestData.slice(4, 20) + + let transactionId = Buffer.from([0x00, 0x00]); + let apiId = Buffer.from([0x01]); + reqData = generate.makeRequestData(transactionId, apiId, felicaPollingResponse); + + client.sendData(reqData) + + let respData = null; + let respData1 = null; + + setInterval(function () { + respData = Buffer.from([ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + ]) + _timeOut = true + }, 10000); + + client.ws.on('message', (message) => { + let __validasi = generate.buf2hex(message).slice(14, 30) + while (message[2] == 1 && _stopMessage == 1 && _validasi.toLowerCase() == __validasi.toLowerCase()) { + respData = null + console.log('*WS MESSAGE Auth1v2: ' + generate.buf2hex(message)); + respData = message; + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + if (_timeOut) { + return res.status(200).send({ + status: "99", + message: "Timeout", + data: {} + }) + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate 1 Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "02", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/authenticate2.js b/_backup/app/controller/authenticate2.js new file mode 100644 index 0000000..8c0c02b --- /dev/null +++ b/_backup/app/controller/authenticate2.js @@ -0,0 +1,68 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let _validationTrxID = Buffer.from(generate.hexToBytes(body.trxID)); + let auth2v2requestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + if (auth2v2requestData[0] != 0x41) { + return res.status(200).send({ + status: "01", + message: "Wrong Respone from Card", + data: {} + }) + } + + let apiId = Buffer.from([0x02]); + let reqData = generate.makeRequestData(transactionId, apiId, auth2v2requestData); + + client.sendData(reqData); + + let respData = null; + let respData1 = null; + client.ws.on('message', (message) => { + while(message[2] == 2 && message[0] == _validationTrxID[0] && message[1] == _validationTrxID[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Auth2v2: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate 2 Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/authenticateResp.js b/_backup/app/controller/authenticateResp.js new file mode 100644 index 0000000..cc64fce --- /dev/null +++ b/_backup/app/controller/authenticateResp.js @@ -0,0 +1,69 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let auth2v2responseSetData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + console.log('Req Auth Resp: ' + body.requestData); + + if (auth2v2responseSetData[0] != 0x43) { + return res.status(200).send({ + status: "01", + message: "Wrong Respone from Card", + data: {} + }) + } + + let apiId = Buffer.from([0x03]); + let reqData = generate.makeRequestData(transactionId, apiId, auth2v2responseSetData); + + client.sendData(reqData); + + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 3 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Auth2v2 Resp: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate Resp Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/endTranscation.js b/_backup/app/controller/endTranscation.js new file mode 100644 index 0000000..133f54e --- /dev/null +++ b/_backup/app/controller/endTranscation.js @@ -0,0 +1,59 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + + let transactionEnd = Buffer.from([]); + let apiId = Buffer.from([0x06]); + let reqData = generate.makeRequestData(transactionId, apiId, transactionEnd); + let _stopMessage = 1; + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 6 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE EndTrx: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "End Transaction Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/readData.js b/_backup/app/controller/readData.js new file mode 100644 index 0000000..3b65417 --- /dev/null +++ b/_backup/app/controller/readData.js @@ -0,0 +1,61 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let trxrequestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + let apiId = Buffer.from([0x04]); + let reqData = generate.makeRequestData(transactionId, apiId, trxrequestData); + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 4 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Transmit Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Read Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/readDataResp.js b/_backup/app/controller/readDataResp.js new file mode 100644 index 0000000..f3c0f2b --- /dev/null +++ b/_backup/app/controller/readDataResp.js @@ -0,0 +1,67 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let packet = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + if (packet[0] != 0x45) { + return { + status: "03", + message: "Respone Card Wrong", + data: {} + } + } + + let apiId = Buffer.from([0x05]); + let reqData = generate.makeRequestData(transactionId, apiId, packet); + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 5 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Received Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Read Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/services/webSocket.js b/_backup/app/controller/services/webSocket.js new file mode 100644 index 0000000..a6bdd6f --- /dev/null +++ b/_backup/app/controller/services/webSocket.js @@ -0,0 +1,132 @@ +const WebSocket = require('ws') +const fs = require('fs') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) +const generate = require('../utils/utils') + +let ssl_ca_crt = './app/assets/cert/CACerts.pem' +let ssl_client_pfx = './app/assets/cert/FeliqClient0002-02.pfx'; +let options = { + ca : fs.readFileSync(ssl_ca_crt), + agent: false, + passphrase : "GPqs+Uia78", + pfx : fs.readFileSync(ssl_client_pfx), +}; +let url = 'wss://gateway04.cyberware.co.jp/feliqserver/v1/wsapi'; + +class WebSocketClient{ + + ws = null; + clientAuthenticated = false; + + // Connection of WebSocket + open = () => { + this.ws = new WebSocket(url, [], options); + this.ws.on('open', this.onOpen); + this.ws.on('close', this.onClose); + } + // Disconnection of WebSocket + close = () => { + this.ws.close(); + console.log('WebSocket Close'); + } + + // Open event + onOpen = () => { + console.log('WebSocket Open'); + this.isOpened(); + if(!this.clientAuthenticated){ + this.clientAuth(); + } + } + + onClose = () => { + console.log('WebSocket Close'); + this.clientAuthenticated = false; + this.isOpened(); + this.open(); + } + + // Connection check + isOpened = () => { + return this.ws.readyState == WebSocket.OPEN; + } + + // Received data check + isReceive(){ + return this.receiveData != null; + } + + // Acquiring received data + getReceiveData(){ + return this.receiveData; + } + + clearReceiveData(){ + this.receiveData = null; + } + + // Send data + sendData(data){ + this.receiveData = null; + this.ws.send(data); + } + + async clientAuth(){ + try{ + const authHead = Buffer.alloc(2); + // Set system code (when 0x0000) + authHead[0] = 0x93; + authHead[1] = 0x9E; + // Set API key + //const apiKeyBytes = Buffer.from('82002732-9148-34e5-843b-c639a0c88cc5-0TC') // T4 + const apiKeyBytes = Buffer.from('4c6dd075-dbcb-375f-81f7-62990a5d7000-0TC') // Nutech + // Secret setting + //const secretBytes = Buffer.from('TdtSo/i5ZmbwPr82gt4fElK96lV9ClVo7votHKMIUuo='); // T4 + const secretBytes = Buffer.from('U5xs7nVonhtbQ+XiYATRSg8Nk5sPu1IpVx7X40KyWiw='); // Nutech + + const authData = Buffer.concat([authHead, apiKeyBytes, secretBytes]); + + let transactionId = Buffer.from([0x00, 0x00]); + let apiId = Buffer.from([0x00]); + let reqData = generate.makeRequestData(transactionId, apiId, authData); + + let respData = null; + let _stopMessage = 1; + + this.sendData(reqData); + + this.ws.on('message', (message) => { + let __validasi = generate.buf2hex(message).slice(14,30) + while(message[2] == 0 && _stopMessage == 1 && message[0] == 0 && message[1] == 0){ + respData = null + console.log('*WS MESSAGE Tenan: ' + generate.buf2hex(message)); + respData = message; + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + let respCode = generate.getResponseCode(respData); + console.log(`Resp Data Tenant = ${respCode}`) + + if (respCode == "0000" || respCode == "0502") this.clientAuthenticated = true; + console.log(`clientAuthenticated = ${this.clientAuthenticated}`); + }catch (error) { + console.log(`error ${error}`) + } + + } +} + +const client = new WebSocketClient(); +client.open(); + +setInterval(function(){ + client.clientAuth() +}, 59000); + +module.exports = { + client +}; \ No newline at end of file diff --git a/_backup/app/controller/topup.js b/_backup/app/controller/topup.js new file mode 100644 index 0000000..b5c871f --- /dev/null +++ b/_backup/app/controller/topup.js @@ -0,0 +1,61 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let trxrequestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + let apiId = Buffer.from([0x04]); + let reqData = generate.makeRequestData(transactionId, apiId, trxrequestData); + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 4 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Transmit Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Generate Write Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/topupResp.js b/_backup/app/controller/topupResp.js new file mode 100644 index 0000000..7043421 --- /dev/null +++ b/_backup/app/controller/topupResp.js @@ -0,0 +1,79 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let packet = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + if (packet[0] != 0x47) { + return { + status: "03", + message: "Respone Card Wrong", + data: {} + } + } + + let apiId = Buffer.from([0x05]); + let reqData = generate.makeRequestData(transactionId, apiId, packet); + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 5 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Received Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + if (respData[6] != 0x47 || (respData1[9] != 0x00 && respData1[10] != 0x00)){ + return res.status(200).send({ + status: "02", + message: "Gagal", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respData1.slice(6,10), + transcode: null + } + }) + } + + return res.status(200).send({ + status: "00", + message: 'Topup Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/app/controller/utils/utils.js b/_backup/app/controller/utils/utils.js new file mode 100644 index 0000000..923c500 --- /dev/null +++ b/_backup/app/controller/utils/utils.js @@ -0,0 +1,157 @@ +const { Buffer } = require("buffer") +const fs = require('fs') + +// Generate request data for FeliQ Server +function makeRequestData(transactionId, apiId, data){ + let request = Buffer.alloc(2 + 1 + 1 + data.length) + let dataSize = Buffer.alloc(1) + dataSize[0] = data.length + request = Buffer.concat([transactionId, apiId, dataSize, data]) + return request; +} + +// Extract response code from API response data +function getResponseCode(data){ + let respCode = Buffer.alloc(2) + respCode[0] = data[3] + respCode[1] = data[4] + return buf2hex(respCode) +} + +// Extract response data from API response data +function getResponseData(apiData){ + let data = Buffer.alloc(apiData[5]) + apiData.copy(data, 0, 6, apiData[5]+6) + return buf2hex(data); +} + + +function buf2hex(buffer){ // buffer is an ArrayBuffer + return [...new Uint8Array(buffer)] + .map(x => x.toString(16).padStart(2, '0')) + .join('') + } + +function hexToBytes(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)) + return bytes + } + + +function hex2ascii(hexx) { + let hex = hexx.toString();//force conversion + let str = '' + for (var i = 0; i < hex.length; i += 2) + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)) + return str +} + +const formatDate = (date, type) => { + var inputDate = new Date(date); + + let tanggal = inputDate.getDate() + let bulan = inputDate.getMonth() + 1 + let tahun = inputDate.getFullYear() + + let jam = inputDate.getHours() + let menit = inputDate.getMinutes() + let detik = inputDate.getSeconds() + + if (bulan.toString().length < 2) bulan = '0' + bulan + if (tanggal.toString().length < 2) tanggal = '0' + tanggal + if (jam.toString().length < 2) jam = '0' + jam + if (menit.toString().length < 2) menit = '0' + menit + if (detik.toString().length < 2) detik = '0' + detik + + let formatTanggal = [tahun, bulan, tanggal].join('') + let formatWaktu = [jam, menit, detik].join('') + + return [formatTanggal, formatWaktu].join('') +} + +function getTranscode(cardData, nominal){ + let trxType = Buffer.from([0x02]) + let uid = Buffer.alloc(8) + let cardType = Buffer.alloc(2) + + var cardNumber = Buffer.alloc(16) + cardData.copy(cardNumber, 0, 12+16, 12+16+16) + + cardNumber = cardNumber.toString() + + cardData.copy(uid, 0, 1,9) + let _cardNumber = Buffer.from(hexToBytes(cardNumber)) + + var balanceArray = Buffer.alloc(4) + var balanceArrayExis = Buffer.alloc(4) + var exec_idArray = Buffer.alloc(2) + + cardData.copy(balanceArray, 0, 12+16+16, 12+16+16+4) + cardData.copy(balanceArrayExis, 0, 12+16+16, 12+16+16+4) + exec_idArray[1] = cardData[cardData.length -1] + exec_idArray[0] = cardData[cardData.length -2] + + let balanceExisting = balanceArrayExis.reverse() + let nominalStr = Buffer.from(hexToBytes(String(nominal).padStart(8, '0'))) + + let balance = Buffer.from(balanceArray).readInt32LE() + balance += parseInt(nominal) + balanceArray.writeInt32LE(balance) + let balanceAfter = balanceArray.reverse() + + let dateTime = Buffer.from(hexToBytes(formatDate(new Date()))) + + cardData.copy(cardType,0, 1 + 8 + 3 + 1, 1 + 8 + 3 + 1 + 2) + + let samID = Buffer.alloc(8) + let samBalBefore = Buffer.alloc(4) + let samBalAfter = Buffer.alloc(4) + + let exec_id = exec_idArray.readUInt16BE() + exec_id++ + + exec_idArray.writeUInt16BE(exec_id) + + let _transcode = Buffer.concat([trxType, _cardNumber, balanceExisting, nominalStr, balanceAfter,dateTime, + cardType, uid, samID, samBalBefore, samBalAfter, exec_idArray]) + return _transcode +} + +const logging = (date, title, message, id = 0) => { + let month = date.getMonth() + 1; + + try { + //create folder/file if not exists + if (!fs.existsSync(`./logs`)) { + fs.mkdirSync(`./logs`) + } + if (!fs.existsSync(`./logs/log-${month}`)) { + fs.mkdirSync(`./logs/log-${month}`) + } + + if (message.command) { + message.command = buf2hex(message.command) + } + + let content = `[${formatDate(date)}] | { "id": ${id}, "title": ${title}, "message": ${message} }`; + + fs.writeFileSync(`./logs/log-${month}/log.txt`, '\n' + content, {flag: 'a+'}); + + return + } catch (err) { + console.error("Error from logging: ", err.message); + return + } +} + +module.exports = { + makeRequestData, + getResponseCode, + getResponseData, + buf2hex, + hexToBytes, + hex2ascii, + getTranscode, + logging +} \ No newline at end of file diff --git a/_backup/app/routes/routes.js b/_backup/app/routes/routes.js new file mode 100644 index 0000000..02dfbac --- /dev/null +++ b/_backup/app/routes/routes.js @@ -0,0 +1,29 @@ +const { Router } = require("express") +const router = Router() + +const _readData = require('../controller/readData') +const _readDataResp = require('../controller/readDataResp') + +const _auth1 = require('../controller/authenticate1') +const _auth2 = require('../controller/authenticate2') +const _authResp = require('../controller/authenticateResp') + +const _topup = require('../controller/topup') +const _topupResp = require('../controller/topupResp') + +const _end = require('../controller/endTranscation') + +router.post('/read', _readData) +router.post('/readResp', _readDataResp) + +router.post('/auth1', _auth1) +router.post('/auth2', _auth2) +router.post('/authResp', _authResp) + +router.post('/topup', _topup) +router.post('/topupResp', _topupResp) + +router.post('/end',_end) + + +module.exports = router \ No newline at end of file diff --git a/_backup/application/assets/cert/CACerts.pem b/_backup/application/assets/cert/CACerts.pem new file mode 100644 index 0000000..644f802 --- /dev/null +++ b/_backup/application/assets/cert/CACerts.pem @@ -0,0 +1,50 @@ +-----BEGIN CERTIFICATE----- +MIIE7jCCA9agAwIBAgIJIrmxYwzstDwuMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAkpQMSUwIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScw +JQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTIwHhcNMTkwOTI3 +MDE1NDIzWhcNMjkwNTI5MDUwMDM5WjBeMQswCQYDVQQGEwJKUDEjMCEGA1UEChMa +Q3liZXJ0cnVzdCBKYXBhbiBDby4sIEx0ZC4xKjAoBgNVBAMTIUN5YmVydHJ1c3Qg +SmFwYW4gU3VyZVNlcnZlciBDQSBHNDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAMtunFmosT8IxBkVFP+OnkGkcVmbui+hdVBlGZhniniVluAhigm2WUxx +p4X5V3B/QKJLZmeAswmzxGKXaDCzcomYxXTygNXcTLI+IMyRisEO7V1NXFHUjSEl +KaY1LzCA9/emldnmRjX6B9Zt5xXK5q12WOIWkJECEwwKku77tvtKZPRKaCNCGsZ5 +Hja7PBs07jLoE0rMuZLQZNQEB0W63attKGCGzEk50lDj+wQ0UlUbQk3zAEsvdE6X +o1qZy9l783Va40vSx3VqhGYb4jWQrg2CrAtJcKQNSJ0m9yxJVVQDwpQQwGxHO5Em +Qv1LGJExASegOXzhzqCr5yiwECfSrOsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBRi +p9La3oW2kvGFvPbolZ11oPpOHzAfBgNVHSMEGDAWgBQKhal3ZQWYfECB+A+XLDjx +Cuw8zzASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjBJBgNVHR8E +QjBAMD6gPKA6hjhodHRwOi8vcmVwb3NpdG9yeS5zZWNvbXRydXN0Lm5ldC9TQy1S +b290Mi9TQ1Jvb3QyQ1JMLmNybDBSBgNVHSAESzBJMEcGCiqDCIybG2SHBQQwOTA3 +BggrBgEFBQcCARYraHR0cHM6Ly9yZXBvc2l0b3J5LnNlY29tdHJ1c3QubmV0L1ND +LVJvb3QyLzCBhQYIKwYBBQUHAQEEeTB3MDAGCCsGAQUFBzABhiRodHRwOi8vc2Ny +b290Y2EyLm9jc3Auc2Vjb210cnVzdC5uZXQwQwYIKwYBBQUHMAKGN2h0dHA6Ly9y +ZXBvc2l0b3J5LnNlY29tdHJ1c3QubmV0L1NDLVJvb3QyL1NDUm9vdDJjYS5jZXIw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IB +AQDFUXkuQAZKY5Pb/JvgufizJ8uZKpN++fiI8kOTgkrSriNYNjO9iEdTwVV3sW3P +abr3lAdCGrJ+wgArLLUnBZ7VGM//UlDhTRe4A19c0TmV1udTSbxabwQJbN1zIGbG +3KQsumg9/70PaIkawnihx9/TxGCrJkAH5W+9pkX7OWefsahylwiPkKRkJRv2em/v +rMRyb3LxRU5t84k1xQqCnMxTEWOAiWoOtatExZ38a8kn8kqiE1NEvtPOzSrVjSvD +7pH56AlvO7hzGzng60kyWnAz6O5rQ0tsFIgW9xloWTQQVcfEtzvjc8ptuP9onkbA +jMRDJaqLXrIVtB7GMek7S6AO +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl +MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe +U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX +DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy +dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj +YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV +OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr +zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM +VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ +hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO +ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw +awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs +OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3 +DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF +coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc +okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8 +t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy +1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/ +SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 +-----END CERTIFICATE----- \ No newline at end of file diff --git a/_backup/application/assets/cert/FeliqClient0002-02.pfx b/_backup/application/assets/cert/FeliqClient0002-02.pfx new file mode 100644 index 0000000000000000000000000000000000000000..fd71142de9e0565aa38506e09a727ff18fb12393 GIT binary patch literal 2397 zcmY+Ec{CJ?9>>jQ9b>sDdxIIW&e%m|ljJ0Vr zV=3DhDUq#gmnno~i)*~@Iq$vu-XFj7JLmH~=lkF1iz4#jfB+DR$S2Rur%JLS?Fj;S z08fZ~!eAmF^atie5kZW9BJL+dP~#6&4+L=ic$NPo0F(?j|Gyic0B#fv%v)?MT`Tdq zy9@~AuMW+VVfQEtE(x&D%#s?$E!G|j8)erXxMqBj!7KY zvxo>4(v>@^7+hP|pQ_%F{^s~oxyL~xvPg*qPxW z@c_@$rDrw<>o}|RQi~MB|EQ;_KXYv;e#*aZ*XYdH{B&}jtzH4=A!#qe;*-@5!K;_U zc$#8tkS|BZ<@lapHcdgJgnGI1S{w!;rn(!E4;3c`Uy#+C!mdF9D?%D&&3YD}7{F>p{YEI^# z|3K!s`x0r-QDJr_ow=YJ;A@>UaSFgT2cK}r93ZvNoz;#Ko|I!sjw9Yhy)ml6Tn#J7 zUXgBQ9qwne@Aq9)vnZ3^Q~GXyp?%5U_gPYY+okK-JJeR6Yv>WYKZ19gQ*2bSSyMT) z(idOJf*zQJi3{hQ!}nJ0ITY1Q*7#Q>5;~N-hmX|KB!f89+ll!iFdbt4GuL&=i4oIG z=8KHHTvK8ZqKc zh_K@DzZ?_y>CNG$xTW?AN-gX*8Wsh=Co;5Ud80SLcKEx=8ZCBj?Z83I2>YF6p%$%o{*8>RI zo7C1AeJ2SwphlOGC=y)UhKcSkb?Rprm!(yl_Q<$F#SoklbR*qLN4pG@)Wlul2bJ3W zWs-7WhaoOw{CIx#8iH$qTe$|xK;_QI>!}fm&zn}S_tSOYv18cR@t1?#=Z2;peKgvi z(b9-0(jWWtYpbu}zTdzLuer98cSZTa2N5r{(oYR62f{)ouC4pOXp3Kmdo|c^kODl+ zx=lRxEz=V~RDT|Zta>x^s{DT3CT;9#_?2REbX zjij)@Z3Yv;{YB#+c~+T6srvU*zatp3w$;MdCrPv%frnuZ>CnyU$Gc` zB*=2Q<<{IpJG@Picn4(=o+mh-YeGT=PFP&kr6F?2PKkOPMb+MPlZ6oMvWtr6;2kq- zr}6pd_ua3RM%WX<9@@V^oiMwt&RmeLj%r8G#IoEz4^(-Qv%p{nm-_<1MQo(NcGn5O zVc(8m+3zmDx6>-%x-I;>TZ+ysAgd|*XFs)f8oq^ZfdKscG4=F&Rlk$Jdp9r8zd4s} z1%_r0VxH{{ig1F1MjO5{uP(ZMgW38Tszvw`grDgN!oNgALDh=q1{%7~{wxH$9H-ZzA7sBKP42-KQDbJB8U>Vj3#6g{B3fNEUQSU4({Y`keg7snb6 zLzd{Hcdzyjy9@1xXB!Iz?Ui^7Now^6GSa(EMA*IA5pT8E_G|BPiW6QXxA|x)U+fHK zgOOBtr!O0);9*L2 z#|P`_c~r>Fs0tg01g+>k|Dm4ZTBXasuuZee+Ad`YjO!$`4arQBvuYM|e`;r{kq9b1NGRQ(hF0M`7sOXsIPvyp3pU3s41Gp7sA-J~E2f53?i7DPVKEcVJ_0H&0 zzy|ifMnxe;q9)`pbDnzyt6%3FR-YE~NHSKT`0i)o?)uO~bt3fdA@d>7@>O$Bsis*(W}4gC4>AJIJI?+8Hcj^A2Z zN}xwDok>$X{~@Tb+Zuv4+_M|s`!e<16Am|De0Nps&GZ4Z>wr>ayS@IMrky+aw0&*2 z>!X7lj%*_Ukih)4JJV$R;5R%PCy&s8cWx4I7y;h$PEqV0zpC-r@mYUK?D~+_i3N^j zQ*7`e>rmRj)}+}c-&wSg@p=_Wy{A&D>>>nnLbM)@Kq>xr9r?u35@4}WS$9_f%X;Sw2q*>N0*mzw%fM=o)vjza&!NxCCABWC1WPdQL0~W! LV(HNE@0I))0mxmL literal 0 HcmV?d00001 diff --git a/_backup/application/assets/cert/FeliqClient0002.pfx b/_backup/application/assets/cert/FeliqClient0002.pfx new file mode 100644 index 0000000000000000000000000000000000000000..cc482a90ac62212e5f70452c8df389faa5245036 GIT binary patch literal 2397 zcmY+EdpHvcAICSF%|`Ac(s5TI8$!9?Pp?YkZbL+Ki>OfOG7N`_32D)g#hPmpxy2G8 zxeR0OGej|jj$5bmJn#FS_xhvnFCSVl&{t!h7 z#f(ntU6PAZk@Z-_r8LrC=Z7iBZ)A5T09-`uPaOf+XibEb?xavv_R>z!ZJ+GDV|AGg zQkGPO^2o*#Y1T5Tt4aRIa&D=s_RrT|ut`4RU{GrQI5h8ztN{z1KQ^ z`;-fTy52qXU{$L?&JJ`x)UWqF$Kgnw3Ge}(stx;olZ}|lusStQbUf`-@jbtzG7NGY z*^k_Hiz#KkW;Ed}(B=k_-i&H;g8~>&OVZ1@?{-qRqy$#Hw%lu{494%wU*Wq=A<2|0 z-5%?`#jTcG?w+QV(9TFxont)0g3}`!DV*!1a{n6|?KXFdLix>^U*2q4xa?bOdrl?n zOw3K62n$cG)d?YewHoInLiTQg#UG!RT4;Hyz||_=bbL~ zY`bRHrJ)O@EWW(H!Nzfi8R8o2iM$^IigVCDd2byt|IrX2^%Fs@zjmGd?X^*ot9Yx_ z>X*ynhcY_1Vk;Ka6n%fhC~J~6N(2xU6|s&36X%&W{GsnoV~g@}eo8($1JVl$xC9&l2a2e4|MS+ef*Kf#_^*)I&)!PwD%XDH6k2b)@qHj z2vco8KbCLz`5P42(5Fkk9)Tl9?v9J~6bR1`MHGiHEgwOL%U$O7pfBq3^6{;_n|~w;6c>o0Ec9KYs+RoLs<1NAJx-V=&mB z;Y$*#jJm6q^LoL)4~;^oefBG{MZ!Oco#2d@fTaO~(wv||GOw3H9zY=%eZxbwK%L*& zcSx}h2u5*A5qCTUM(<=SK}8}{dFo3{{LtT2l9|{;1v`Oy!3xIgZ{R;-OFn< zq%I=H{W^AOjFH{3_7yP>v{?PLp7pcaMl@$kYvD~tW zCl}2DvTgQk&8^8es8i#pF8{Mzx)jyx(sNd_cY^FwR;}*fbdS)FJsMytrjzAq>TXYWGgsftj3&ov%9;DUuwcRnm9vUv zhu(5{YW>m8yGd9$@0^mEx!Eiqp?`Y+KiOi>@*81QQi;Mlui`*<7>H@&#%s!NlkT)wy)mgM4NtUK zn+74N_q8M&vykY*X&V~lQ8ywrVWQ&>NKlrrI-@eD{#+xeCtBcKGMoO!2`g6~hYaJG zWfY72e*HWm&T+PG@;*xWc$5kIqLejP#KZy}*2~ng=pPfc42~rss|PQ^?h$x5TXK&$ zdN1o+1RYgX9K(^LJ|1_ers_7Zj3)gf5A_vS3zYwMWFbbzEuj+r}4cAjgPHPGphVw6vgt%6O3aX-L-#WzeyZ6C?~zKpFLUPD@8_N~) z03~ihOISZ^92bkrrk9-l9D{M&)3?;KiZ}J8iFd4)_yT`8tK>_>U~isZ73k_XSbbYw zx{_IS*9c>_zSQt$d*`j`&?^TtAIEXE5tG>am8zQ4uNp&+}#RZhcHkfcTG(~`|Lyw`@A!(9aFyCS; NqRG&r4E^^?{skjcdjS9d literal 0 HcmV?d00001 diff --git a/application/controllers/auth.js b/_backup/application/controllers/auth.js similarity index 100% rename from application/controllers/auth.js rename to _backup/application/controllers/auth.js diff --git a/_backup/application/controllers/hsmAuthenticate1.js b/_backup/application/controllers/hsmAuthenticate1.js new file mode 100644 index 0000000..99dda3f --- /dev/null +++ b/_backup/application/controllers/hsmAuthenticate1.js @@ -0,0 +1,80 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let felicaPollingResponse = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + let _timeOut = false; + + let _validasi = body.requestData.slice(4, 20) + + let transactionId = Buffer.from([0x00, 0x00]); + let apiId = Buffer.from([0x01]); + reqData = generate.makeRequestData(transactionId, apiId, felicaPollingResponse); + + client.sendData(reqData) + + let respData = null; + let respData1 = null; + + setInterval(function () { + respData = Buffer.from([ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + ]) + _timeOut = true + }, 10000); + + client.ws.on('message', (message) => { + let __validasi = generate.buf2hex(message).slice(14, 30) + while (message[2] == 1 && _stopMessage == 1 && _validasi.toLowerCase() == __validasi.toLowerCase()) { + respData = null + console.log('*WS MESSAGE Auth1v2: ' + generate.buf2hex(message)); + respData = message; + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + if (_timeOut) { + return res.status(200).send({ + status: "99", + message: "Timeout", + data: {} + }) + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate 1 Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "02", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/application/controllers/hsmAuthenticate2.js b/_backup/application/controllers/hsmAuthenticate2.js new file mode 100644 index 0000000..8c0c02b --- /dev/null +++ b/_backup/application/controllers/hsmAuthenticate2.js @@ -0,0 +1,68 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let _validationTrxID = Buffer.from(generate.hexToBytes(body.trxID)); + let auth2v2requestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + if (auth2v2requestData[0] != 0x41) { + return res.status(200).send({ + status: "01", + message: "Wrong Respone from Card", + data: {} + }) + } + + let apiId = Buffer.from([0x02]); + let reqData = generate.makeRequestData(transactionId, apiId, auth2v2requestData); + + client.sendData(reqData); + + let respData = null; + let respData1 = null; + client.ws.on('message', (message) => { + while(message[2] == 2 && message[0] == _validationTrxID[0] && message[1] == _validationTrxID[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Auth2v2: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate 2 Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/application/controllers/hsmAuthenticateResp.js b/_backup/application/controllers/hsmAuthenticateResp.js new file mode 100644 index 0000000..cc64fce --- /dev/null +++ b/_backup/application/controllers/hsmAuthenticateResp.js @@ -0,0 +1,69 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let auth2v2responseSetData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + console.log('Req Auth Resp: ' + body.requestData); + + if (auth2v2responseSetData[0] != 0x43) { + return res.status(200).send({ + status: "01", + message: "Wrong Respone from Card", + data: {} + }) + } + + let apiId = Buffer.from([0x03]); + let reqData = generate.makeRequestData(transactionId, apiId, auth2v2responseSetData); + + client.sendData(reqData); + + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 3 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Auth2v2 Resp: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate Resp Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/application/controllers/hsmEndTranscation.js b/_backup/application/controllers/hsmEndTranscation.js new file mode 100644 index 0000000..133f54e --- /dev/null +++ b/_backup/application/controllers/hsmEndTranscation.js @@ -0,0 +1,59 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + + let transactionEnd = Buffer.from([]); + let apiId = Buffer.from([0x06]); + let reqData = generate.makeRequestData(transactionId, apiId, transactionEnd); + let _stopMessage = 1; + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 6 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE EndTrx: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "End Transaction Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/application/controllers/hsmReadData.js b/_backup/application/controllers/hsmReadData.js new file mode 100644 index 0000000..3b65417 --- /dev/null +++ b/_backup/application/controllers/hsmReadData.js @@ -0,0 +1,61 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let trxrequestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + let apiId = Buffer.from([0x04]); + let reqData = generate.makeRequestData(transactionId, apiId, trxrequestData); + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 4 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Transmit Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Read Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/application/controllers/hsmReadDataResp.js b/_backup/application/controllers/hsmReadDataResp.js new file mode 100644 index 0000000..f3c0f2b --- /dev/null +++ b/_backup/application/controllers/hsmReadDataResp.js @@ -0,0 +1,67 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let packet = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + if (packet[0] != 0x45) { + return { + status: "03", + message: "Respone Card Wrong", + data: {} + } + } + + let apiId = Buffer.from([0x05]); + let reqData = generate.makeRequestData(transactionId, apiId, packet); + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 5 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Received Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Read Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/application/controllers/hsmTopup.js b/_backup/application/controllers/hsmTopup.js new file mode 100644 index 0000000..b5c871f --- /dev/null +++ b/_backup/application/controllers/hsmTopup.js @@ -0,0 +1,61 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let trxrequestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + let apiId = Buffer.from([0x04]); + let reqData = generate.makeRequestData(transactionId, apiId, trxrequestData); + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 4 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Transmit Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Generate Write Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/_backup/application/controllers/hsmTopupResp.js b/_backup/application/controllers/hsmTopupResp.js new file mode 100644 index 0000000..7043421 --- /dev/null +++ b/_backup/application/controllers/hsmTopupResp.js @@ -0,0 +1,79 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let packet = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + if (packet[0] != 0x47) { + return { + status: "03", + message: "Respone Card Wrong", + data: {} + } + } + + let apiId = Buffer.from([0x05]); + let reqData = generate.makeRequestData(transactionId, apiId, packet); + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 5 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Received Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + if (respData[6] != 0x47 || (respData1[9] != 0x00 && respData1[10] != 0x00)){ + return res.status(200).send({ + status: "02", + message: "Gagal", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respData1.slice(6,10), + transcode: null + } + }) + } + + return res.status(200).send({ + status: "00", + message: 'Topup Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/controllers/payment-channel.js b/_backup/application/controllers/payment-channel.js similarity index 100% rename from application/controllers/payment-channel.js rename to _backup/application/controllers/payment-channel.js diff --git a/_backup/application/controllers/services/webSocket.js b/_backup/application/controllers/services/webSocket.js new file mode 100644 index 0000000..a6bdd6f --- /dev/null +++ b/_backup/application/controllers/services/webSocket.js @@ -0,0 +1,132 @@ +const WebSocket = require('ws') +const fs = require('fs') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) +const generate = require('../utils/utils') + +let ssl_ca_crt = './app/assets/cert/CACerts.pem' +let ssl_client_pfx = './app/assets/cert/FeliqClient0002-02.pfx'; +let options = { + ca : fs.readFileSync(ssl_ca_crt), + agent: false, + passphrase : "GPqs+Uia78", + pfx : fs.readFileSync(ssl_client_pfx), +}; +let url = 'wss://gateway04.cyberware.co.jp/feliqserver/v1/wsapi'; + +class WebSocketClient{ + + ws = null; + clientAuthenticated = false; + + // Connection of WebSocket + open = () => { + this.ws = new WebSocket(url, [], options); + this.ws.on('open', this.onOpen); + this.ws.on('close', this.onClose); + } + // Disconnection of WebSocket + close = () => { + this.ws.close(); + console.log('WebSocket Close'); + } + + // Open event + onOpen = () => { + console.log('WebSocket Open'); + this.isOpened(); + if(!this.clientAuthenticated){ + this.clientAuth(); + } + } + + onClose = () => { + console.log('WebSocket Close'); + this.clientAuthenticated = false; + this.isOpened(); + this.open(); + } + + // Connection check + isOpened = () => { + return this.ws.readyState == WebSocket.OPEN; + } + + // Received data check + isReceive(){ + return this.receiveData != null; + } + + // Acquiring received data + getReceiveData(){ + return this.receiveData; + } + + clearReceiveData(){ + this.receiveData = null; + } + + // Send data + sendData(data){ + this.receiveData = null; + this.ws.send(data); + } + + async clientAuth(){ + try{ + const authHead = Buffer.alloc(2); + // Set system code (when 0x0000) + authHead[0] = 0x93; + authHead[1] = 0x9E; + // Set API key + //const apiKeyBytes = Buffer.from('82002732-9148-34e5-843b-c639a0c88cc5-0TC') // T4 + const apiKeyBytes = Buffer.from('4c6dd075-dbcb-375f-81f7-62990a5d7000-0TC') // Nutech + // Secret setting + //const secretBytes = Buffer.from('TdtSo/i5ZmbwPr82gt4fElK96lV9ClVo7votHKMIUuo='); // T4 + const secretBytes = Buffer.from('U5xs7nVonhtbQ+XiYATRSg8Nk5sPu1IpVx7X40KyWiw='); // Nutech + + const authData = Buffer.concat([authHead, apiKeyBytes, secretBytes]); + + let transactionId = Buffer.from([0x00, 0x00]); + let apiId = Buffer.from([0x00]); + let reqData = generate.makeRequestData(transactionId, apiId, authData); + + let respData = null; + let _stopMessage = 1; + + this.sendData(reqData); + + this.ws.on('message', (message) => { + let __validasi = generate.buf2hex(message).slice(14,30) + while(message[2] == 0 && _stopMessage == 1 && message[0] == 0 && message[1] == 0){ + respData = null + console.log('*WS MESSAGE Tenan: ' + generate.buf2hex(message)); + respData = message; + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + let respCode = generate.getResponseCode(respData); + console.log(`Resp Data Tenant = ${respCode}`) + + if (respCode == "0000" || respCode == "0502") this.clientAuthenticated = true; + console.log(`clientAuthenticated = ${this.clientAuthenticated}`); + }catch (error) { + console.log(`error ${error}`) + } + + } +} + +const client = new WebSocketClient(); +client.open(); + +setInterval(function(){ + client.clientAuth() +}, 59000); + +module.exports = { + client +}; \ No newline at end of file diff --git a/application/controllers/user.js b/_backup/application/controllers/user.js similarity index 100% rename from application/controllers/user.js rename to _backup/application/controllers/user.js diff --git a/_backup/application/controllers/utils/utils.js b/_backup/application/controllers/utils/utils.js new file mode 100644 index 0000000..923c500 --- /dev/null +++ b/_backup/application/controllers/utils/utils.js @@ -0,0 +1,157 @@ +const { Buffer } = require("buffer") +const fs = require('fs') + +// Generate request data for FeliQ Server +function makeRequestData(transactionId, apiId, data){ + let request = Buffer.alloc(2 + 1 + 1 + data.length) + let dataSize = Buffer.alloc(1) + dataSize[0] = data.length + request = Buffer.concat([transactionId, apiId, dataSize, data]) + return request; +} + +// Extract response code from API response data +function getResponseCode(data){ + let respCode = Buffer.alloc(2) + respCode[0] = data[3] + respCode[1] = data[4] + return buf2hex(respCode) +} + +// Extract response data from API response data +function getResponseData(apiData){ + let data = Buffer.alloc(apiData[5]) + apiData.copy(data, 0, 6, apiData[5]+6) + return buf2hex(data); +} + + +function buf2hex(buffer){ // buffer is an ArrayBuffer + return [...new Uint8Array(buffer)] + .map(x => x.toString(16).padStart(2, '0')) + .join('') + } + +function hexToBytes(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)) + return bytes + } + + +function hex2ascii(hexx) { + let hex = hexx.toString();//force conversion + let str = '' + for (var i = 0; i < hex.length; i += 2) + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)) + return str +} + +const formatDate = (date, type) => { + var inputDate = new Date(date); + + let tanggal = inputDate.getDate() + let bulan = inputDate.getMonth() + 1 + let tahun = inputDate.getFullYear() + + let jam = inputDate.getHours() + let menit = inputDate.getMinutes() + let detik = inputDate.getSeconds() + + if (bulan.toString().length < 2) bulan = '0' + bulan + if (tanggal.toString().length < 2) tanggal = '0' + tanggal + if (jam.toString().length < 2) jam = '0' + jam + if (menit.toString().length < 2) menit = '0' + menit + if (detik.toString().length < 2) detik = '0' + detik + + let formatTanggal = [tahun, bulan, tanggal].join('') + let formatWaktu = [jam, menit, detik].join('') + + return [formatTanggal, formatWaktu].join('') +} + +function getTranscode(cardData, nominal){ + let trxType = Buffer.from([0x02]) + let uid = Buffer.alloc(8) + let cardType = Buffer.alloc(2) + + var cardNumber = Buffer.alloc(16) + cardData.copy(cardNumber, 0, 12+16, 12+16+16) + + cardNumber = cardNumber.toString() + + cardData.copy(uid, 0, 1,9) + let _cardNumber = Buffer.from(hexToBytes(cardNumber)) + + var balanceArray = Buffer.alloc(4) + var balanceArrayExis = Buffer.alloc(4) + var exec_idArray = Buffer.alloc(2) + + cardData.copy(balanceArray, 0, 12+16+16, 12+16+16+4) + cardData.copy(balanceArrayExis, 0, 12+16+16, 12+16+16+4) + exec_idArray[1] = cardData[cardData.length -1] + exec_idArray[0] = cardData[cardData.length -2] + + let balanceExisting = balanceArrayExis.reverse() + let nominalStr = Buffer.from(hexToBytes(String(nominal).padStart(8, '0'))) + + let balance = Buffer.from(balanceArray).readInt32LE() + balance += parseInt(nominal) + balanceArray.writeInt32LE(balance) + let balanceAfter = balanceArray.reverse() + + let dateTime = Buffer.from(hexToBytes(formatDate(new Date()))) + + cardData.copy(cardType,0, 1 + 8 + 3 + 1, 1 + 8 + 3 + 1 + 2) + + let samID = Buffer.alloc(8) + let samBalBefore = Buffer.alloc(4) + let samBalAfter = Buffer.alloc(4) + + let exec_id = exec_idArray.readUInt16BE() + exec_id++ + + exec_idArray.writeUInt16BE(exec_id) + + let _transcode = Buffer.concat([trxType, _cardNumber, balanceExisting, nominalStr, balanceAfter,dateTime, + cardType, uid, samID, samBalBefore, samBalAfter, exec_idArray]) + return _transcode +} + +const logging = (date, title, message, id = 0) => { + let month = date.getMonth() + 1; + + try { + //create folder/file if not exists + if (!fs.existsSync(`./logs`)) { + fs.mkdirSync(`./logs`) + } + if (!fs.existsSync(`./logs/log-${month}`)) { + fs.mkdirSync(`./logs/log-${month}`) + } + + if (message.command) { + message.command = buf2hex(message.command) + } + + let content = `[${formatDate(date)}] | { "id": ${id}, "title": ${title}, "message": ${message} }`; + + fs.writeFileSync(`./logs/log-${month}/log.txt`, '\n' + content, {flag: 'a+'}); + + return + } catch (err) { + console.error("Error from logging: ", err.message); + return + } +} + +module.exports = { + makeRequestData, + getResponseCode, + getResponseData, + buf2hex, + hexToBytes, + hex2ascii, + getTranscode, + logging +} \ No newline at end of file diff --git a/_backup/application/middlewares/jwt.middleware.js b/_backup/application/middlewares/jwt.middleware.js new file mode 100644 index 0000000..7898e09 --- /dev/null +++ b/_backup/application/middlewares/jwt.middleware.js @@ -0,0 +1,83 @@ +const jwt = require("jsonwebtoken"); + +const generateRefreshToken = (req) => { + return jwt.sign(req, process.env.REFRESH_TOKEN_SECRET); +}; + +const authenticateRefreshToken = (req, res, next) => { + jwt.verify(req.token, process.env.REFRESH_TOKEN_SECRET, (err, data) => { + if (err) { + return res.json({ + code: "01", + message: "Invalid Token", + data: [], + }); + } + + next(); + }); +}; + +const generateAccessToken = (req) => { + let expiresIn = process.env.EXPIRE_JWT ? process.env.EXPIRE_JWT : "1d"; + if (req.user_group_id == "1") { + expiresIn = process.env.EXPIRE_JWT_ADMIN_WEB; + } else if (req.user_group_id == "2") { + expiresIn = process.env.EXPIRE_JWT_MOBILE_PHONE; + } else if ( + req.user_group_id == "3" || + req.user_group_id == "4" || + req.user_group_id == "5" + ) { + expiresIn = process.env.EXPIRE_JWT_TERMINAL; + } + + return jwt.sign(req, process.env.TOKEN_SECRET, { + expiresIn: expiresIn, + }); +}; + +const authenticateToken = async (req, res, next) => { + let authHeader = req.headers["authorization"]; + + if (authHeader) { + let token = authHeader && authHeader.split(" ")[1]; + + if (!token) { + return res.json({ + code: "01", + message: "Token is required", + data: [], + }); + } + + await jwt.verify(token, process.env.TOKEN_SECRET, (err, data) => { + if (err) { + return res.json({ + code: "01", + message: "Invalid Token", + data: [], + }); + } + + req.user_id = data.user_id; + req.username = data.username; + req.user_group_id = data.user_group_id; + + next(); + }); + } else { + return res.json({ + code: "01", + message: "Header not found", + data: [], + }); + } +}; + +module.exports = { + generateRefreshToken, + authenticateRefreshToken, + generateAccessToken, + authenticateToken, +}; diff --git a/_backup/application/routes/auth.routes.js b/_backup/application/routes/auth.routes.js new file mode 100644 index 0000000..5d6f83b --- /dev/null +++ b/_backup/application/routes/auth.routes.js @@ -0,0 +1,10 @@ +const express = require("express"); +const router = express.Router(); +const controller = require("../controllers/auth"); + +// ============================== AUTH ============================== +router.post("/login", controller.validate("login"), controller.login); +router.post("/register", controller.validate("register"), controller.register); +router.post("/token", controller.validate("token"), controller.token); + +module.exports = router; diff --git a/_backup/application/routes/core.routes.js b/_backup/application/routes/core.routes.js new file mode 100644 index 0000000..e78c048 --- /dev/null +++ b/_backup/application/routes/core.routes.js @@ -0,0 +1,25 @@ +const express = require("express"); +const router = express.Router(); +const auth = require("../middlewares/jwt.middleware"); +const controller = require("../controllers/user"); + +// ============================== USER ============================== +router.get("/user", auth.authenticateToken, controller.getUsers); +router.get("/user/:id", auth.authenticateToken, controller.getUserById); +router.post( + "/user", + auth.authenticateToken, + controller.validate("createUser"), + controller.createUser +); +router.put( + "/user/:id", + auth.authenticateToken, + controller.validate("updateUser"), + controller.updateUser +); +router.delete("/user/:id", auth.authenticateToken, controller.deleteUser); + +// ============================== OTHER ============================== + +module.exports = router; diff --git a/_backup/application/routes/hsm.js b/_backup/application/routes/hsm.js new file mode 100644 index 0000000..0f04f4b --- /dev/null +++ b/_backup/application/routes/hsm.js @@ -0,0 +1,29 @@ +const { Router } = require("express") +const router = Router() + +const _readData = require('../controllers/hsmReadData') +const _readDataResp = require('../controllers/hsmReadDataResp') + +const _auth1 = require('../controllers/hsmAuthenticate1') +const _auth2 = require('../controllers/hsmAuthenticate2') +const _authResp = require('../controllers/hsmAuthenticateResp') + +const _topup = require('../controllers/hsmTopup') +const _topupResp = require('../controllers/hsmTopupResp') + +const _end = require('../controllers/hsmEndTranscation') + +router.post('/read', _readData) +router.post('/readResp', _readDataResp) + +router.post('/auth1', _auth1) +router.post('/auth2', _auth2) +router.post('/authResp', _authResp) + +router.post('/topup', _topup) +router.post('/topupResp', _topupResp) + +router.post('/end',_end) + + +module.exports = router \ No newline at end of file diff --git a/_backup/application/routes/master.routes.js b/_backup/application/routes/master.routes.js new file mode 100644 index 0000000..7bc3f83 --- /dev/null +++ b/_backup/application/routes/master.routes.js @@ -0,0 +1,37 @@ +const express = require("express"); +const router = express.Router(); +const auth = require("../middlewares/jwt.middleware"); +const controller = require("../controllers/payment-channel"); + +// ============================== PAYMENT CHANNEL ============================== +router.get( + "/payment-channel", + auth.authenticateToken, + controller.getPaymentChannels +); +router.get( + "/payment-channel/:id", + auth.authenticateToken, + controller.getPaymentChannelById +); +router.post( + "/payment-channel", + auth.authenticateToken, + controller.validate("createPaymentChannel"), + controller.createPaymentChannel +); +router.put( + "/payment-channel/:id", + auth.authenticateToken, + controller.validate("updatePaymentChannel"), + controller.updatePaymentChannel +); +router.delete( + "/payment-channel/:id", + auth.authenticateToken, + controller.deletePaymentChannel +); + +// ============================== OTHER ============================== + +module.exports = router; diff --git a/application/assets/cert/CACerts.pem b/application/assets/cert/CACerts.pem new file mode 100644 index 0000000..644f802 --- /dev/null +++ b/application/assets/cert/CACerts.pem @@ -0,0 +1,50 @@ +-----BEGIN CERTIFICATE----- +MIIE7jCCA9agAwIBAgIJIrmxYwzstDwuMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAkpQMSUwIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENPLixMVEQuMScw +JQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTIwHhcNMTkwOTI3 +MDE1NDIzWhcNMjkwNTI5MDUwMDM5WjBeMQswCQYDVQQGEwJKUDEjMCEGA1UEChMa +Q3liZXJ0cnVzdCBKYXBhbiBDby4sIEx0ZC4xKjAoBgNVBAMTIUN5YmVydHJ1c3Qg +SmFwYW4gU3VyZVNlcnZlciBDQSBHNDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAMtunFmosT8IxBkVFP+OnkGkcVmbui+hdVBlGZhniniVluAhigm2WUxx +p4X5V3B/QKJLZmeAswmzxGKXaDCzcomYxXTygNXcTLI+IMyRisEO7V1NXFHUjSEl +KaY1LzCA9/emldnmRjX6B9Zt5xXK5q12WOIWkJECEwwKku77tvtKZPRKaCNCGsZ5 +Hja7PBs07jLoE0rMuZLQZNQEB0W63attKGCGzEk50lDj+wQ0UlUbQk3zAEsvdE6X +o1qZy9l783Va40vSx3VqhGYb4jWQrg2CrAtJcKQNSJ0m9yxJVVQDwpQQwGxHO5Em +Qv1LGJExASegOXzhzqCr5yiwECfSrOsCAwEAAaOCAa4wggGqMB0GA1UdDgQWBBRi +p9La3oW2kvGFvPbolZ11oPpOHzAfBgNVHSMEGDAWgBQKhal3ZQWYfECB+A+XLDjx +Cuw8zzASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjBJBgNVHR8E +QjBAMD6gPKA6hjhodHRwOi8vcmVwb3NpdG9yeS5zZWNvbXRydXN0Lm5ldC9TQy1S +b290Mi9TQ1Jvb3QyQ1JMLmNybDBSBgNVHSAESzBJMEcGCiqDCIybG2SHBQQwOTA3 +BggrBgEFBQcCARYraHR0cHM6Ly9yZXBvc2l0b3J5LnNlY29tdHJ1c3QubmV0L1ND +LVJvb3QyLzCBhQYIKwYBBQUHAQEEeTB3MDAGCCsGAQUFBzABhiRodHRwOi8vc2Ny +b290Y2EyLm9jc3Auc2Vjb210cnVzdC5uZXQwQwYIKwYBBQUHMAKGN2h0dHA6Ly9y +ZXBvc2l0b3J5LnNlY29tdHJ1c3QubmV0L1NDLVJvb3QyL1NDUm9vdDJjYS5jZXIw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IB +AQDFUXkuQAZKY5Pb/JvgufizJ8uZKpN++fiI8kOTgkrSriNYNjO9iEdTwVV3sW3P +abr3lAdCGrJ+wgArLLUnBZ7VGM//UlDhTRe4A19c0TmV1udTSbxabwQJbN1zIGbG +3KQsumg9/70PaIkawnihx9/TxGCrJkAH5W+9pkX7OWefsahylwiPkKRkJRv2em/v +rMRyb3LxRU5t84k1xQqCnMxTEWOAiWoOtatExZ38a8kn8kqiE1NEvtPOzSrVjSvD +7pH56AlvO7hzGzng60kyWnAz6O5rQ0tsFIgW9xloWTQQVcfEtzvjc8ptuP9onkbA +jMRDJaqLXrIVtB7GMek7S6AO +-----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDEl +MCMGA1UEChMcU0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMe +U2VjdXJpdHkgQ29tbXVuaWNhdGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoX +DTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRy +dXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3VyaXR5IENvbW11bmlj +YXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANAV +OVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGr +zbl+dp+++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVM +VAX3NuRFg3sUZdbcDE3R3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQ +hNBqyjoGADdH5H5XTz+L62e4iKrFvlNVspHEfbmwhRkGeC7bYRr6hfVKkaHnFtWO +ojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1KEOtOghY6rCcMU/Gt1SSw +awNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8QIH4D5cs +OPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3 +DQEBCwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpF +coJxDjrSzG+ntKEju/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXc +okgfGT+Ok+vx+hfuzU7jBBJV1uXk3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8 +t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6qtnRGEmyR7jTV7JqR50S+kDFy +1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29mvVXIwAHIRc/ +SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03 +-----END CERTIFICATE----- \ No newline at end of file diff --git a/application/assets/cert/FeliqClient0002-02.pfx b/application/assets/cert/FeliqClient0002-02.pfx new file mode 100644 index 0000000000000000000000000000000000000000..fd71142de9e0565aa38506e09a727ff18fb12393 GIT binary patch literal 2397 zcmY+Ec{CJ?9>>jQ9b>sDdxIIW&e%m|ljJ0Vr zV=3DhDUq#gmnno~i)*~@Iq$vu-XFj7JLmH~=lkF1iz4#jfB+DR$S2Rur%JLS?Fj;S z08fZ~!eAmF^atie5kZW9BJL+dP~#6&4+L=ic$NPo0F(?j|Gyic0B#fv%v)?MT`Tdq zy9@~AuMW+VVfQEtE(x&D%#s?$E!G|j8)erXxMqBj!7KY zvxo>4(v>@^7+hP|pQ_%F{^s~oxyL~xvPg*qPxW z@c_@$rDrw<>o}|RQi~MB|EQ;_KXYv;e#*aZ*XYdH{B&}jtzH4=A!#qe;*-@5!K;_U zc$#8tkS|BZ<@lapHcdgJgnGI1S{w!;rn(!E4;3c`Uy#+C!mdF9D?%D&&3YD}7{F>p{YEI^# z|3K!s`x0r-QDJr_ow=YJ;A@>UaSFgT2cK}r93ZvNoz;#Ko|I!sjw9Yhy)ml6Tn#J7 zUXgBQ9qwne@Aq9)vnZ3^Q~GXyp?%5U_gPYY+okK-JJeR6Yv>WYKZ19gQ*2bSSyMT) z(idOJf*zQJi3{hQ!}nJ0ITY1Q*7#Q>5;~N-hmX|KB!f89+ll!iFdbt4GuL&=i4oIG z=8KHHTvK8ZqKc zh_K@DzZ?_y>CNG$xTW?AN-gX*8Wsh=Co;5Ud80SLcKEx=8ZCBj?Z83I2>YF6p%$%o{*8>RI zo7C1AeJ2SwphlOGC=y)UhKcSkb?Rprm!(yl_Q<$F#SoklbR*qLN4pG@)Wlul2bJ3W zWs-7WhaoOw{CIx#8iH$qTe$|xK;_QI>!}fm&zn}S_tSOYv18cR@t1?#=Z2;peKgvi z(b9-0(jWWtYpbu}zTdzLuer98cSZTa2N5r{(oYR62f{)ouC4pOXp3Kmdo|c^kODl+ zx=lRxEz=V~RDT|Zta>x^s{DT3CT;9#_?2REbX zjij)@Z3Yv;{YB#+c~+T6srvU*zatp3w$;MdCrPv%frnuZ>CnyU$Gc` zB*=2Q<<{IpJG@Picn4(=o+mh-YeGT=PFP&kr6F?2PKkOPMb+MPlZ6oMvWtr6;2kq- zr}6pd_ua3RM%WX<9@@V^oiMwt&RmeLj%r8G#IoEz4^(-Qv%p{nm-_<1MQo(NcGn5O zVc(8m+3zmDx6>-%x-I;>TZ+ysAgd|*XFs)f8oq^ZfdKscG4=F&Rlk$Jdp9r8zd4s} z1%_r0VxH{{ig1F1MjO5{uP(ZMgW38Tszvw`grDgN!oNgALDh=q1{%7~{wxH$9H-ZzA7sBKP42-KQDbJB8U>Vj3#6g{B3fNEUQSU4({Y`keg7snb6 zLzd{Hcdzyjy9@1xXB!Iz?Ui^7Now^6GSa(EMA*IA5pT8E_G|BPiW6QXxA|x)U+fHK zgOOBtr!O0);9*L2 z#|P`_c~r>Fs0tg01g+>k|Dm4ZTBXasuuZee+Ad`YjO!$`4arQBvuYM|e`;r{kq9b1NGRQ(hF0M`7sOXsIPvyp3pU3s41Gp7sA-J~E2f53?i7DPVKEcVJ_0H&0 zzy|ifMnxe;q9)`pbDnzyt6%3FR-YE~NHSKT`0i)o?)uO~bt3fdA@d>7@>O$Bsis*(W}4gC4>AJIJI?+8Hcj^A2Z zN}xwDok>$X{~@Tb+Zuv4+_M|s`!e<16Am|De0Nps&GZ4Z>wr>ayS@IMrky+aw0&*2 z>!X7lj%*_Ukih)4JJV$R;5R%PCy&s8cWx4I7y;h$PEqV0zpC-r@mYUK?D~+_i3N^j zQ*7`e>rmRj)}+}c-&wSg@p=_Wy{A&D>>>nnLbM)@Kq>xr9r?u35@4}WS$9_f%X;Sw2q*>N0*mzw%fM=o)vjza&!NxCCABWC1WPdQL0~W! LV(HNE@0I))0mxmL literal 0 HcmV?d00001 diff --git a/application/assets/cert/FeliqClient0002.pfx b/application/assets/cert/FeliqClient0002.pfx new file mode 100644 index 0000000000000000000000000000000000000000..cc482a90ac62212e5f70452c8df389faa5245036 GIT binary patch literal 2397 zcmY+EdpHvcAICSF%|`Ac(s5TI8$!9?Pp?YkZbL+Ki>OfOG7N`_32D)g#hPmpxy2G8 zxeR0OGej|jj$5bmJn#FS_xhvnFCSVl&{t!h7 z#f(ntU6PAZk@Z-_r8LrC=Z7iBZ)A5T09-`uPaOf+XibEb?xavv_R>z!ZJ+GDV|AGg zQkGPO^2o*#Y1T5Tt4aRIa&D=s_RrT|ut`4RU{GrQI5h8ztN{z1KQ^ z`;-fTy52qXU{$L?&JJ`x)UWqF$Kgnw3Ge}(stx;olZ}|lusStQbUf`-@jbtzG7NGY z*^k_Hiz#KkW;Ed}(B=k_-i&H;g8~>&OVZ1@?{-qRqy$#Hw%lu{494%wU*Wq=A<2|0 z-5%?`#jTcG?w+QV(9TFxont)0g3}`!DV*!1a{n6|?KXFdLix>^U*2q4xa?bOdrl?n zOw3K62n$cG)d?YewHoInLiTQg#UG!RT4;Hyz||_=bbL~ zY`bRHrJ)O@EWW(H!Nzfi8R8o2iM$^IigVCDd2byt|IrX2^%Fs@zjmGd?X^*ot9Yx_ z>X*ynhcY_1Vk;Ka6n%fhC~J~6N(2xU6|s&36X%&W{GsnoV~g@}eo8($1JVl$xC9&l2a2e4|MS+ef*Kf#_^*)I&)!PwD%XDH6k2b)@qHj z2vco8KbCLz`5P42(5Fkk9)Tl9?v9J~6bR1`MHGiHEgwOL%U$O7pfBq3^6{;_n|~w;6c>o0Ec9KYs+RoLs<1NAJx-V=&mB z;Y$*#jJm6q^LoL)4~;^oefBG{MZ!Oco#2d@fTaO~(wv||GOw3H9zY=%eZxbwK%L*& zcSx}h2u5*A5qCTUM(<=SK}8}{dFo3{{LtT2l9|{;1v`Oy!3xIgZ{R;-OFn< zq%I=H{W^AOjFH{3_7yP>v{?PLp7pcaMl@$kYvD~tW zCl}2DvTgQk&8^8es8i#pF8{Mzx)jyx(sNd_cY^FwR;}*fbdS)FJsMytrjzAq>TXYWGgsftj3&ov%9;DUuwcRnm9vUv zhu(5{YW>m8yGd9$@0^mEx!Eiqp?`Y+KiOi>@*81QQi;Mlui`*<7>H@&#%s!NlkT)wy)mgM4NtUK zn+74N_q8M&vykY*X&V~lQ8ywrVWQ&>NKlrrI-@eD{#+xeCtBcKGMoO!2`g6~hYaJG zWfY72e*HWm&T+PG@;*xWc$5kIqLejP#KZy}*2~ng=pPfc42~rss|PQ^?h$x5TXK&$ zdN1o+1RYgX9K(^LJ|1_ers_7Zj3)gf5A_vS3zYwMWFbbzEuj+r}4cAjgPHPGphVw6vgt%6O3aX-L-#WzeyZ6C?~zKpFLUPD@8_N~) z03~ihOISZ^92bkrrk9-l9D{M&)3?;KiZ}J8iFd4)_yT`8tK>_>U~isZ73k_XSbbYw zx{_IS*9c>_zSQt$d*`j`&?^TtAIEXE5tG>am8zQ4uNp&+}#RZhcHkfcTG(~`|Lyw`@A!(9aFyCS; NqRG&r4E^^?{skjcdjS9d literal 0 HcmV?d00001 diff --git a/application/modules/auth/auth.controller.js b/application/modules/auth/auth.controller.js new file mode 100644 index 0000000..dfbe282 --- /dev/null +++ b/application/modules/auth/auth.controller.js @@ -0,0 +1,235 @@ +const knex = require("../../../infrastructure/database/knex"); +const jwt = require("../../middlewares/jwt.middleware"); +const { body, validationResult } = require("express-validator"); + +// VALIDATION +const validate = (method) => { + switch (method) { + case "login": { + return [ + body("username").not().isEmpty().withMessage("Username ID is required"), + body("password").not().isEmpty().withMessage("Password is required"), + body("user_group_id") + .not() + .isEmpty() + .withMessage("User Group ID is required"), + ]; + } + case "register": { + return [ + body("username").not().isEmpty().withMessage("Username ID is required"), + body("password") + .not() + .isEmpty() + .withMessage("Username Name is required") + .isLength({ min: 5 }) + .withMessage("Password must be least 5 characters"), + body("user_group_id") + .not() + .isEmpty() + .withMessage("User Group ID is required"), + ]; + } + case "token": { + return [ + body("refresh_token") + .not() + .isEmpty() + .withMessage("Refresh Token is required"), + ]; + } + } +}; + +// REFRESH TOKEN +const token = (req, res) => { + try { + const { refresh_token } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + // verify + jwt.authenticateRefreshToken; + + let result = knex + .select() + .from("core.t_mtr_user") + .where("last_token_text", refresh_token) + .where("active_boo", true) + .first(); + if (result.count() > 0) { + let accessToken = jwt.generateAccessToken({ + user_id: result.user_id, + username: result.username, + user_group_id: result.user_group_id, + }); + + return res.json({ + code: "00", + message: "New Token has been generated.", + data: { + access_token: accessToken, + user: { + username: result.username_var, + user_group_id: result.user_group_id_int, + fullname: result.fullname_var, + email: result.email_var, + phone: result.phone_var, + }, + }, + }); + } else { + return res.json({ + code: "01", + message: "Refresh Token is not available.", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// LOGIN +const login = async (req, res, next) => { + try { + let { username, password, user_group_id } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + let result = await knex + .select() + .from("core.t_mtr_user") + .where("username_var", username) + .where("user_group_id_int", user_group_id) + .where("active_boo", true) + .first(); + if (result) { + let accessToken = jwt.generateAccessToken({ + user_id: result.user_id_seq, + username: result.username_var, + user_group_id: result.user_group_id_int, + }); + + let refreshToken = jwt.generateRefreshToken({ + user_id: result.user_id_seq, + username: result.username_var, + user_group_id: result.user_group_id_int, + }); + + return res.json({ + code: "00", + message: "Login Success.", + data: { + access_token: accessToken, + refresh_token: refreshToken, + user: { + username: result.username_var, + user_group_id: result.user_group_id_int, + fullname: result.fullname_var, + email: result.email_var, + phone: result.phone_var, + }, + }, + }); + } else { + return res.json({ + code: "01", + message: "User not registered.", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// REGISTER +const register = async (req, res) => { + try { + let { + username, + password, + user_group_id, + fullname, + email, + phone, + } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + let find = await knex("core.t_mtr_user") + .where("username", username) + .first(); + + if (!find) { + let result = await knex("core.t_mtr_user").insert({ + user_id_seq: username, + password_var: password, + user_group_id_id: user_group_id, + fullname_var: fullname, + email_var: email, + phone_var: phone, + active_boo: true, + created_by_var: "REGISTER FORM", + }); + + return res.json({ + code: "00", + message: "Data has been saved.", + data: result.command, + }); + } else { + return res.json({ + code: "01", + message: "Data already exist", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +module.exports = { + validate, + login, + register, + token, +}; diff --git a/application/modules/hsm/authenticate1.js b/application/modules/hsm/authenticate1.js new file mode 100644 index 0000000..99dda3f --- /dev/null +++ b/application/modules/hsm/authenticate1.js @@ -0,0 +1,80 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let felicaPollingResponse = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + let _timeOut = false; + + let _validasi = body.requestData.slice(4, 20) + + let transactionId = Buffer.from([0x00, 0x00]); + let apiId = Buffer.from([0x01]); + reqData = generate.makeRequestData(transactionId, apiId, felicaPollingResponse); + + client.sendData(reqData) + + let respData = null; + let respData1 = null; + + setInterval(function () { + respData = Buffer.from([ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 + ]) + _timeOut = true + }, 10000); + + client.ws.on('message', (message) => { + let __validasi = generate.buf2hex(message).slice(14, 30) + while (message[2] == 1 && _stopMessage == 1 && _validasi.toLowerCase() == __validasi.toLowerCase()) { + respData = null + console.log('*WS MESSAGE Auth1v2: ' + generate.buf2hex(message)); + respData = message; + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + if (_timeOut) { + return res.status(200).send({ + status: "99", + message: "Timeout", + data: {} + }) + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate 1 Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "02", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/authenticate2.js b/application/modules/hsm/authenticate2.js new file mode 100644 index 0000000..8c0c02b --- /dev/null +++ b/application/modules/hsm/authenticate2.js @@ -0,0 +1,68 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let _validationTrxID = Buffer.from(generate.hexToBytes(body.trxID)); + let auth2v2requestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + if (auth2v2requestData[0] != 0x41) { + return res.status(200).send({ + status: "01", + message: "Wrong Respone from Card", + data: {} + }) + } + + let apiId = Buffer.from([0x02]); + let reqData = generate.makeRequestData(transactionId, apiId, auth2v2requestData); + + client.sendData(reqData); + + let respData = null; + let respData1 = null; + client.ws.on('message', (message) => { + while(message[2] == 2 && message[0] == _validationTrxID[0] && message[1] == _validationTrxID[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Auth2v2: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate 2 Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/authenticateResp.js b/application/modules/hsm/authenticateResp.js new file mode 100644 index 0000000..cc64fce --- /dev/null +++ b/application/modules/hsm/authenticateResp.js @@ -0,0 +1,69 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let auth2v2responseSetData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + console.log('Req Auth Resp: ' + body.requestData); + + if (auth2v2responseSetData[0] != 0x43) { + return res.status(200).send({ + status: "01", + message: "Wrong Respone from Card", + data: {} + }) + } + + let apiId = Buffer.from([0x03]); + let reqData = generate.makeRequestData(transactionId, apiId, auth2v2responseSetData); + + client.sendData(reqData); + + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 3 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Auth2v2 Resp: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "Request Authenticate Resp Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/endTranscation.js b/application/modules/hsm/endTranscation.js new file mode 100644 index 0000000..133f54e --- /dev/null +++ b/application/modules/hsm/endTranscation.js @@ -0,0 +1,59 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + + let transactionEnd = Buffer.from([]); + let apiId = Buffer.from([0x06]); + let reqData = generate.makeRequestData(transactionId, apiId, transactionEnd); + let _stopMessage = 1; + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 6 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE EndTrx: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: "End Transaction Success", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/readData.js b/application/modules/hsm/readData.js new file mode 100644 index 0000000..3b65417 --- /dev/null +++ b/application/modules/hsm/readData.js @@ -0,0 +1,61 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let trxrequestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + let apiId = Buffer.from([0x04]); + let reqData = generate.makeRequestData(transactionId, apiId, trxrequestData); + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 4 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Transmit Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Read Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/readDataResp.js b/application/modules/hsm/readDataResp.js new file mode 100644 index 0000000..f3c0f2b --- /dev/null +++ b/application/modules/hsm/readDataResp.js @@ -0,0 +1,67 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let packet = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + if (packet[0] != 0x45) { + return { + status: "03", + message: "Respone Card Wrong", + data: {} + } + } + + let apiId = Buffer.from([0x05]); + let reqData = generate.makeRequestData(transactionId, apiId, packet); + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 5 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Received Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Read Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/services/webSocket.js b/application/modules/hsm/services/webSocket.js new file mode 100644 index 0000000..a6bdd6f --- /dev/null +++ b/application/modules/hsm/services/webSocket.js @@ -0,0 +1,132 @@ +const WebSocket = require('ws') +const fs = require('fs') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) +const generate = require('../utils/utils') + +let ssl_ca_crt = './app/assets/cert/CACerts.pem' +let ssl_client_pfx = './app/assets/cert/FeliqClient0002-02.pfx'; +let options = { + ca : fs.readFileSync(ssl_ca_crt), + agent: false, + passphrase : "GPqs+Uia78", + pfx : fs.readFileSync(ssl_client_pfx), +}; +let url = 'wss://gateway04.cyberware.co.jp/feliqserver/v1/wsapi'; + +class WebSocketClient{ + + ws = null; + clientAuthenticated = false; + + // Connection of WebSocket + open = () => { + this.ws = new WebSocket(url, [], options); + this.ws.on('open', this.onOpen); + this.ws.on('close', this.onClose); + } + // Disconnection of WebSocket + close = () => { + this.ws.close(); + console.log('WebSocket Close'); + } + + // Open event + onOpen = () => { + console.log('WebSocket Open'); + this.isOpened(); + if(!this.clientAuthenticated){ + this.clientAuth(); + } + } + + onClose = () => { + console.log('WebSocket Close'); + this.clientAuthenticated = false; + this.isOpened(); + this.open(); + } + + // Connection check + isOpened = () => { + return this.ws.readyState == WebSocket.OPEN; + } + + // Received data check + isReceive(){ + return this.receiveData != null; + } + + // Acquiring received data + getReceiveData(){ + return this.receiveData; + } + + clearReceiveData(){ + this.receiveData = null; + } + + // Send data + sendData(data){ + this.receiveData = null; + this.ws.send(data); + } + + async clientAuth(){ + try{ + const authHead = Buffer.alloc(2); + // Set system code (when 0x0000) + authHead[0] = 0x93; + authHead[1] = 0x9E; + // Set API key + //const apiKeyBytes = Buffer.from('82002732-9148-34e5-843b-c639a0c88cc5-0TC') // T4 + const apiKeyBytes = Buffer.from('4c6dd075-dbcb-375f-81f7-62990a5d7000-0TC') // Nutech + // Secret setting + //const secretBytes = Buffer.from('TdtSo/i5ZmbwPr82gt4fElK96lV9ClVo7votHKMIUuo='); // T4 + const secretBytes = Buffer.from('U5xs7nVonhtbQ+XiYATRSg8Nk5sPu1IpVx7X40KyWiw='); // Nutech + + const authData = Buffer.concat([authHead, apiKeyBytes, secretBytes]); + + let transactionId = Buffer.from([0x00, 0x00]); + let apiId = Buffer.from([0x00]); + let reqData = generate.makeRequestData(transactionId, apiId, authData); + + let respData = null; + let _stopMessage = 1; + + this.sendData(reqData); + + this.ws.on('message', (message) => { + let __validasi = generate.buf2hex(message).slice(14,30) + while(message[2] == 0 && _stopMessage == 1 && message[0] == 0 && message[1] == 0){ + respData = null + console.log('*WS MESSAGE Tenan: ' + generate.buf2hex(message)); + respData = message; + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + let respCode = generate.getResponseCode(respData); + console.log(`Resp Data Tenant = ${respCode}`) + + if (respCode == "0000" || respCode == "0502") this.clientAuthenticated = true; + console.log(`clientAuthenticated = ${this.clientAuthenticated}`); + }catch (error) { + console.log(`error ${error}`) + } + + } +} + +const client = new WebSocketClient(); +client.open(); + +setInterval(function(){ + client.clientAuth() +}, 59000); + +module.exports = { + client +}; \ No newline at end of file diff --git a/application/modules/hsm/topup.js b/application/modules/hsm/topup.js new file mode 100644 index 0000000..b5c871f --- /dev/null +++ b/application/modules/hsm/topup.js @@ -0,0 +1,61 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let trxrequestData = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + + let apiId = Buffer.from([0x04]); + let reqData = generate.makeRequestData(transactionId, apiId, trxrequestData); + + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 4 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Transmit Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while(respData == null){ + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + return res.status(200).send({ + status: "00", + message: 'Generate Write Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/topupResp.js b/application/modules/hsm/topupResp.js new file mode 100644 index 0000000..7043421 --- /dev/null +++ b/application/modules/hsm/topupResp.js @@ -0,0 +1,79 @@ +const { client } = require('./services/webSocket') +const generate = require('./utils/utils') +const _sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); + +const controller = async (req, res) => { + try { + let { body } = req + let transactionId = Buffer.from(generate.hexToBytes(body.trxID)); + let packet = Buffer.from(generate.hexToBytes(body.requestData)); + let _stopMessage = 1; + if (packet[0] != 0x47) { + return { + status: "03", + message: "Respone Card Wrong", + data: {} + } + } + + let apiId = Buffer.from([0x05]); + let reqData = generate.makeRequestData(transactionId, apiId, packet); + client.sendData(reqData); + + let respCode = null; + let respData = null; + let respData1 = null; + + client.ws.on('message', (message) => { + while(message[2] == 5 && message[0] == transactionId[0] && message[1] == transactionId[1] && _stopMessage == 1){ + respData = null; + console.log('*WS MESSAGE Received Packet: ' + generate.buf2hex(message)); + respData = message + _stopMessage = 2; + } + }) + + while (respData == null) { + await _sleep(10); + } + + _stopMessage = 0; + + transactionId[0] = respData[0]; + transactionId[1] = respData[1]; + respCode = generate.getResponseCode(respData); + respData1 = generate.getResponseData(respData); + + if (respData[6] != 0x47 || (respData1[9] != 0x00 && respData1[10] != 0x00)){ + return res.status(200).send({ + status: "02", + message: "Gagal", + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respData1.slice(6,10), + transcode: null + } + }) + } + + return res.status(200).send({ + status: "00", + message: 'Topup Succeess', + data: { + trxID: generate.buf2hex(transactionId), + responseCode: respCode, + responseData: respData1, + responseLength: respData1.length/2, + } + }) + + } catch (error) { + return res.status(200).send({ + status: "01", + message: error.message, + data: {} + }) + } +} + +module.exports = controller; \ No newline at end of file diff --git a/application/modules/hsm/utils/utils.js b/application/modules/hsm/utils/utils.js new file mode 100644 index 0000000..923c500 --- /dev/null +++ b/application/modules/hsm/utils/utils.js @@ -0,0 +1,157 @@ +const { Buffer } = require("buffer") +const fs = require('fs') + +// Generate request data for FeliQ Server +function makeRequestData(transactionId, apiId, data){ + let request = Buffer.alloc(2 + 1 + 1 + data.length) + let dataSize = Buffer.alloc(1) + dataSize[0] = data.length + request = Buffer.concat([transactionId, apiId, dataSize, data]) + return request; +} + +// Extract response code from API response data +function getResponseCode(data){ + let respCode = Buffer.alloc(2) + respCode[0] = data[3] + respCode[1] = data[4] + return buf2hex(respCode) +} + +// Extract response data from API response data +function getResponseData(apiData){ + let data = Buffer.alloc(apiData[5]) + apiData.copy(data, 0, 6, apiData[5]+6) + return buf2hex(data); +} + + +function buf2hex(buffer){ // buffer is an ArrayBuffer + return [...new Uint8Array(buffer)] + .map(x => x.toString(16).padStart(2, '0')) + .join('') + } + +function hexToBytes(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)) + return bytes + } + + +function hex2ascii(hexx) { + let hex = hexx.toString();//force conversion + let str = '' + for (var i = 0; i < hex.length; i += 2) + str += String.fromCharCode(parseInt(hex.substr(i, 2), 16)) + return str +} + +const formatDate = (date, type) => { + var inputDate = new Date(date); + + let tanggal = inputDate.getDate() + let bulan = inputDate.getMonth() + 1 + let tahun = inputDate.getFullYear() + + let jam = inputDate.getHours() + let menit = inputDate.getMinutes() + let detik = inputDate.getSeconds() + + if (bulan.toString().length < 2) bulan = '0' + bulan + if (tanggal.toString().length < 2) tanggal = '0' + tanggal + if (jam.toString().length < 2) jam = '0' + jam + if (menit.toString().length < 2) menit = '0' + menit + if (detik.toString().length < 2) detik = '0' + detik + + let formatTanggal = [tahun, bulan, tanggal].join('') + let formatWaktu = [jam, menit, detik].join('') + + return [formatTanggal, formatWaktu].join('') +} + +function getTranscode(cardData, nominal){ + let trxType = Buffer.from([0x02]) + let uid = Buffer.alloc(8) + let cardType = Buffer.alloc(2) + + var cardNumber = Buffer.alloc(16) + cardData.copy(cardNumber, 0, 12+16, 12+16+16) + + cardNumber = cardNumber.toString() + + cardData.copy(uid, 0, 1,9) + let _cardNumber = Buffer.from(hexToBytes(cardNumber)) + + var balanceArray = Buffer.alloc(4) + var balanceArrayExis = Buffer.alloc(4) + var exec_idArray = Buffer.alloc(2) + + cardData.copy(balanceArray, 0, 12+16+16, 12+16+16+4) + cardData.copy(balanceArrayExis, 0, 12+16+16, 12+16+16+4) + exec_idArray[1] = cardData[cardData.length -1] + exec_idArray[0] = cardData[cardData.length -2] + + let balanceExisting = balanceArrayExis.reverse() + let nominalStr = Buffer.from(hexToBytes(String(nominal).padStart(8, '0'))) + + let balance = Buffer.from(balanceArray).readInt32LE() + balance += parseInt(nominal) + balanceArray.writeInt32LE(balance) + let balanceAfter = balanceArray.reverse() + + let dateTime = Buffer.from(hexToBytes(formatDate(new Date()))) + + cardData.copy(cardType,0, 1 + 8 + 3 + 1, 1 + 8 + 3 + 1 + 2) + + let samID = Buffer.alloc(8) + let samBalBefore = Buffer.alloc(4) + let samBalAfter = Buffer.alloc(4) + + let exec_id = exec_idArray.readUInt16BE() + exec_id++ + + exec_idArray.writeUInt16BE(exec_id) + + let _transcode = Buffer.concat([trxType, _cardNumber, balanceExisting, nominalStr, balanceAfter,dateTime, + cardType, uid, samID, samBalBefore, samBalAfter, exec_idArray]) + return _transcode +} + +const logging = (date, title, message, id = 0) => { + let month = date.getMonth() + 1; + + try { + //create folder/file if not exists + if (!fs.existsSync(`./logs`)) { + fs.mkdirSync(`./logs`) + } + if (!fs.existsSync(`./logs/log-${month}`)) { + fs.mkdirSync(`./logs/log-${month}`) + } + + if (message.command) { + message.command = buf2hex(message.command) + } + + let content = `[${formatDate(date)}] | { "id": ${id}, "title": ${title}, "message": ${message} }`; + + fs.writeFileSync(`./logs/log-${month}/log.txt`, '\n' + content, {flag: 'a+'}); + + return + } catch (err) { + console.error("Error from logging: ", err.message); + return + } +} + +module.exports = { + makeRequestData, + getResponseCode, + getResponseData, + buf2hex, + hexToBytes, + hex2ascii, + getTranscode, + logging +} \ No newline at end of file diff --git a/application/modules/loadbalance/loadbalance.controller.js b/application/modules/loadbalance/loadbalance.controller.js new file mode 100644 index 0000000..29280ab --- /dev/null +++ b/application/modules/loadbalance/loadbalance.controller.js @@ -0,0 +1,324 @@ +const { param, body, validationResult } = require("express-validator"); +const model = require("./loadbalance.model"); +const moment = require("moment"); +moment.locale("id"); + +// VALIDATION +const validate = (method) => { + switch (method) { + case "loadingBalanceRequest": + return [ + body("mid").not().isEmpty().withMessage("MID is required"), + body("tid").not().isEmpty().withMessage("TID is required"), + body("card_number") + .not() + .isEmpty() + .withMessage("Card Number is required"), + body("issuer").not().isEmpty().withMessage("Issuer is required"), + ]; + case "loadingBalance": + return [ + body("mid").not().isEmpty().withMessage("MID is required"), + body("tid").not().isEmpty().withMessage("TID is required"), + body("card_number") + .not() + .isEmpty() + .withMessage("Card Number is required"), + body("amount") + .not() + .isEmpty() + .withMessage("Amount is required") + .isNumeric() + .withMessage("Amount is invalid format"), + body("issuer").not().isEmpty().withMessage("Issuer is required"), + body("reservation_number") + .not() + .isEmpty() + .withMessage("Reservation Number is required") + .isArray() + .withMessage("Reservation Number is invalid request format"), + ]; + default: + break; + } +}; + +// LOADING BALANCE REQUEST +const loadingBalanceRequest = async (req, res) => { + try { + // check validator + const err = validationResult(req, res); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + // param + let { mid, tid, card_number, issuer } = req.body; + + // time + let now = moment().format("YYYY-MM-DD HH:mm:ss"); + + // get partner, merchant, terminal from tid + let getPartner = await model.getPartner(mid, tid); + if (!getPartner) { + return res.status(400).json({ + code: "01", + message: "terminal id is not valid", + data: [], + }); + } + + // check card number + let checkCardNumber = await model.checkCardNumber(card_number); + if (!checkCardNumber) { + return res.status(400).json({ + code: "01", + message: "card number is not registered", + data: [], + }); + } + + // get issuer + let getIssuer = await model.getIssuer(issuer); + if (!getIssuer) { + return res.status(400).json({ + code: "01", + message: "issuer doesn't exist", + data: [], + }); + } + + // get total reservation pending + let getReservationPending = await model.getReservationPending( + card_number, + issuer, + now + ); + + if (getReservationPending.length < 1) { + return res.status(400).json({ + code: "01", + message: "reservation doesn't exist", + data: [], + }); + } + + let totalReservation = getReservationPending.length; + let amountTopup = 0; + let reservationNumber = []; + getReservationPending.forEach((rsv) => { + amountTopup += parseInt(rsv.i_reservation_amount); + reservationNumber.push(rsv.c_reservation_no); + }); + + // get BI regulation status + const getBIRegulationStatus = await model.getBIRegulationStatus(); + if (getBIRegulationStatus.c_value == "A") { + // get accumulated balance in this month + let accumulatedBalance = 19900000; + + // validate max topup per month + const getMaxTopupPerMonth = await model.getMaxTopupPerMonth(); + if (getMaxTopupPerMonth.c_value) { + if ( + parseInt(accumulatedBalance) + parseInt(amountTopup) > + parseInt(getMaxTopupPerMonth.c_value) + ) { + return res.status(400).json({ + code: "01", + message: "your card number has been limit top up for this month", + data: [], + }); + } + } + } + + let result = { + amount_topup: amountTopup, + total_reservation: totalReservation, + reservation_number: reservationNumber, + }; + + return res.json({ + code: "00", + message: "reservation exists", + data: result, + }); + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// LOAD BALANCE +const loadingBalance = async (req, res) => { + try { + // check validator + const err = validationResult(req, res); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + // param + let { mid, tid, card_number, issuer, amount, reservation_number } = + req.body; + + // time + let now = moment().format("YYYY-MM-DD HH:mm:ss"); + let today = moment().format("YYYY-MM-DD"); + + // get partner, merchant, terminal from tid + let getPartner = await model.getPartner(mid, tid); + if (!getPartner) { + return res.status(400).json({ + code: "01", + message: "terminal id is not valid", + data: [], + }); + } + + // get issuer + let getIssuer = await model.getIssuer(issuer); + if (!getIssuer) { + return res.status(400).json({ + code: "01", + message: "issuer doesn't exist", + data: [], + }); + } + + // get total reservation pending + let getReservationPending = await model.getReservationPending( + card_number, + issuer, + now + ); + + if (getReservationPending.length < 1) { + return res.status(400).json({ + code: "01", + message: "reservation doesn't exist", + data: [], + }); + } + + // get loading balance + const getLoadBalanceSequence = await model.getLoadBalanceSequence( + getPartner, + today + ); + const loadBalanceNoSequence = getLoadBalanceSequence + ? parseInt(getLoadBalanceSequence.i_load_balance_no_seq) + 1 + : 1; + + // generate load balance number + let loadBalanceNumber = await model.generateLoadBalanceNumber( + getPartner, + moment(today).format("YYYYMMDD"), + loadBalanceNoSequence + ); + + let data = { + c_load_balance_no: loadBalanceNumber, + d_load_balance: now, + i_partner: getPartner ? getPartner.i_partner : null, + c_partner_code: getPartner ? getPartner.partner_code : null, + c_partner_name: getPartner ? getPartner.partner_name : null, + i_merchant: getPartner ? getPartner.i_merchant : null, + c_merchant_code: getPartner ? getPartner.merchant_code : null, + c_merchant_name: getPartner ? getPartner.merchant_name : null, + c_mid: getPartner ? getPartner.mid : null, + i_terminal: getPartner ? getPartner.i_terminal : null, + c_terminal_code: getPartner ? getPartner.terminal_code : null, + c_terminal_name: getPartner ? getPartner.terminal_name : null, + c_tid: getPartner ? getPartner.tid : null, + c_card_number: card_number, + i_topup_amount: amount, + i_issuer: getIssuer ? getIssuer.i_issuer : null, + i_issuer_code: getIssuer ? getIssuer.issuer_code : null, + i_issuer_name: getIssuer ? getIssuer.issuer_name : null, + i_issuer_fee: getIssuer ? getIssuer.issuer_fee : null, + c_return_sap: null, + i_load_balance_no_seq: loadBalanceNoSequence, + c_status: "A", + c_status_name: "SUCCESS", + d_create: now, + i_create: null, + c_create_username: null, + c_create_fullname: null, + d_modify: null, + i_modify: null, + c_modify_username: null, + c_modify_fullname: null, + d_delete: null, + i_delete: null, + c_delete_username: null, + c_delete_fullname: null, + }; + + let detail = []; + for (let index = 0; index < reservation_number.length; index++) { + var reservation = await model.findReservation(reservation_number[index]); + + detail.push({ + i_reservation_balance: reservation.i_reservation_balance + ? reservation.i_reservation_balance + : null, + c_reservation_no: reservation.i_reservation_balance + ? reservation.c_reservation_no + : null, + i_amount: reservation.i_reservation_balance + ? reservation.i_reservation_amount + : null, + i_channel: reservation.i_reservation_balance + ? reservation.i_channel + : null, + i_channel_code: reservation.i_reservation_balance + ? reservation.c_channel_code + : null, + i_channel_name: reservation.i_reservation_balance + ? reservation.c_channel_name + : null, + i_channel_fee: reservation.i_reservation_balance + ? reservation.i_channel_fee + : null, + }); + } + + let result = await model.insertLoadingBalance( + data, + detail, + reservation_number, + now + ); + + return res.json({ + code: "00", + message: "balance loaded successfully", + data: result, + }); + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +module.exports = { + validate, + loadingBalanceRequest, + loadingBalance, +}; diff --git a/application/modules/loadbalance/loadbalance.model.js b/application/modules/loadbalance/loadbalance.model.js new file mode 100644 index 0000000..ef20f96 --- /dev/null +++ b/application/modules/loadbalance/loadbalance.model.js @@ -0,0 +1,192 @@ +const knex = require("../../../infrastructure/database/knex"); + +// CHECK CARD NUMBER +const checkCardNumber = (cardNumber) => { + let result = knex("t_m_card_product") + .where("c_card_number", cardNumber) + .where("c_status", "!=", "X") + .first(); + return result; +}; + +// GET PARTNER, MERCHANT, TERMINAL FROM TID +const getPartner = (mid, tid) => { + let result = knex + .select( + "t_m_partner.i_partner", + "t_m_partner.c_code as partner_code", + "t_m_partner.c_name as partner_name", + "t_m_merchant.i_merchant", + "t_m_merchant.c_code as merchant_code", + "t_m_merchant.c_name as merchant_name", + "t_m_merchant.e_mid as mid", + "t_m_terminal.i_terminal", + "t_m_terminal.c_code as terminal_code", + "t_m_terminal.c_name as terminal_name", + "t_m_terminal.e_tid as tid" + ) + .from("t_m_terminal") + .leftJoin( + "t_m_merchant", + "t_m_terminal.i_merchant", + "t_m_merchant.i_merchant" + ) + .leftJoin("t_m_partner", "t_m_merchant.i_partner", "t_m_partner.i_partner") + .where("t_m_merchant.e_mid", mid) + .where("t_m_terminal.e_tid", tid) + .where("t_m_terminal.c_status", "A") + .where("t_m_merchant.c_status", "A") + .where("t_m_partner.c_status", "A") + .first(); + return result; +}; + +// GET ISSUER +const getIssuer = (code) => { + let result = knex("t_m_issuer") + .select( + "i_issuer", + "c_code as issuer_code", + "c_name as issuer_name", + "i_fee as issuer_fee" + ) + .where("c_code", code) + .where("c_status", "A") + .first(); + return result; +}; + +// GET RESERVATION PENDING +const getReservationPending = (cardNumber, issuer, time) => { + let result = knex("trx.t_d_reservation_balance") + // .sum("i_reservation_amount as total_reservation_amount") + // .count("* as total_reservation") + .select("i_reservation_amount", "c_reservation_no") + .where("c_card_number", cardNumber) + .where("c_issuer_code", issuer) + .where("c_status", "P") + .where("d_expired", ">=", time) + .whereNotNull("c_payment_ref_no"); + return result; +}; + +// GET BI REGULATION STATUS FROM GLOBAL PARAMETER +const getBIRegulationStatus = () => { + let result = knex("t_m_global_parameter") + .select("c_value") + .where("c_code", "HSM_BI_REGULATION_STAT") + .where("c_status", "A") + .first(); + return result; +}; + +// GET MAX TOPUP PER MONTH FROM GLOBAL PARAMETER +const getMaxTopupPerMonth = () => { + let result = knex("t_m_global_parameter") + .select("c_value") + .where("c_code", "HSM_BI_MAX_TOPUP_PER_MONTH") + .where("c_status", "A") + .first(); + return result; +}; + +// FIND RESERVATION +const findReservation = (reservationNumber) => { + let result = knex("trx.t_d_reservation_balance") + .where("c_reservation_no", reservationNumber) + .first(); + return result; +}; + +// INSERT LOADING BALANCE +const insertLoadingBalance = async (data, detail, reservationNumber, now) => { + await knex + .transaction((trx) => { + knex("trx.t_d_load_balance") + .transacting(trx) + .insert(data) + .returning("i_load_balance") + .then((resp) => { + let id = resp[0]; + let loadDetail = []; + detail.forEach((element) => { + loadDetail.push({ + i_load_balance: id, + i_reservation_balance: element.i_reservation_balance, + c_reservation_no: element.c_reservation_no, + i_amount: element.i_amount, + i_channel: element.i_channel, + i_channel_code: element.i_channel_code, + i_channel_name: element.i_channel_name, + i_channel_fee: element.i_channel_fee, + }); + }); + + // insert detail load balance + return knex("trx.t_d_load_balance_detail") + .transacting(trx) + .insert(loadDetail); + }) + .then(() => { + // update reservation + return knex("trx.t_d_reservation_balance") + .transacting(trx) + .update({ + c_status: "A", + c_status_name: "LOADED", + d_modify: now, + i_modify: null, + c_modify_username: null, + c_modify_fullname: null, + }) + .whereIn("c_reservation_no", reservationNumber); + }) + .then(trx.commit) + .catch(trx.rollback); + }) + .then((result) => { + // console.log(result); + return result; + }) + .catch((error) => { + console.log(error.message); + return error.message; + }); +}; + +// GET LOADING BALANCE SEQUENCE +const getLoadBalanceSequence = (data, date) => { + let result = knex("trx.t_d_load_balance") + .select("i_load_balance_no_seq") + .orderBy("i_load_balance_no_seq", "desc") + .whereNotNull("i_load_balance_no_seq") + .where("i_partner", data.i_partner) + .where("i_merchant", data.i_merchant) + .whereRaw("??::date = ?", ["d_load_balance", date]) + .first(); + return result; +}; + +// GENERATE LOAD BALANCE NUMBER +const generateLoadBalanceNumber = (data, date, counter) => { + let code = data.merchant_code ? data.merchant_code : "XXXXXXX"; + + let prefix = "LDB"; + let loadBalanceNumber = + prefix + "" + code + "" + "" + date + counter.toString().padStart(3, "0"); + + return loadBalanceNumber; +}; + +module.exports = { + checkCardNumber, + getPartner, + getIssuer, + getReservationPending, + getBIRegulationStatus, + getMaxTopupPerMonth, + findReservation, + insertLoadingBalance, + getLoadBalanceSequence, + generateLoadBalanceNumber, +}; diff --git a/application/modules/paymentchannels/paymentchannel.controller.js b/application/modules/paymentchannels/paymentchannel.controller.js new file mode 100644 index 0000000..5b6b2c0 --- /dev/null +++ b/application/modules/paymentchannels/paymentchannel.controller.js @@ -0,0 +1,233 @@ +const knex = require("../../../infrastructure/database/knex"); +const { param, body, validationResult } = require("express-validator"); + +// VALIDATION +const validate = (method) => { + switch (method) { + case "createPaymentChannel": { + return [ + body("payment_channel_id") + .not() + .isEmpty() + .withMessage("Payment Channel ID is required") + .matches("[0-9]") + .withMessage("Payment Channel ID is invalid format"), + body("payment_channel_name") + .not() + .isEmpty() + .withMessage("Payment Channel Name is required"), + ]; + } + case "updatePaymentChannel": { + return [ + param("id", "ID data is invalid format").matches("[0-9]"), + body("payment_channel_id") + .not() + .isEmpty() + .withMessage("Payment Channel ID is required") + .matches("[0-9]") + .withMessage("Payment Channel ID is invalid format"), + body("payment_channel_name") + .not() + .isEmpty() + .withMessage("Payment Channel Name is required"), + ]; + } + } +}; + +// SHOW ALL DATA +const getPaymentChannels = async (req, res) => { + try { + let result = await knex.select().from("mtr.t_mtr_payment_channel"); + if (result) { + return res.json({ + code: "00", + message: "Data found.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "Data not found.", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// SHOW DATA BY ID +const getPaymentChannelById = async (req, res) => { + try { + let id = req.params.id; + + let result = await knex + .select() + .from("mtr.t_mtr_payment_channel") + .where("payment_channel_id_seq", id) + .first(); + if (result) { + return res.json({ + code: "00", + message: "Data found.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "Data not found.", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// CREATED NEW DATA +const createPaymentChannel = async (req, res) => { + try { + let { payment_channel_id, payment_channel_name, logo } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + let find = await knex("mtr.t_mtr_payment_channel") + .where("payment_channel_id_seq", payment_channel_id) + .orWhere("payment_channel_name_var", payment_channel_name) + .first(); + + if (!find) { + let result = await knex("mtr.t_mtr_payment_channel").insert({ + payment_channel_id_seq: payment_channel_id, + payment_channel_name_var: payment_channel_name, + logo_txt: logo, + active_boo: true, + created_by_var: "", + }); + + return res.json({ + code: "00", + message: "Data has been saved.", + data: result.command, + }); + } else { + return res.json({ + code: "01", + message: "Data already exist", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// UDPATE DATA BY ID +const updatePaymentChannel = async (req, res) => { + try { + let id = req.params.id; + let { payment_channel_id, payment_channel_name, logo } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + let result = await knex("mtr.t_mtr_payment_channel") + .where("payment_channel_id_seq", id) + .update({ + payment_channel_id_seq: payment_channel_id, + payment_channel_name_var: payment_channel_name, + logo_txt: logo, + active_boo: true, + updated_by_var: "", + }); + + if (result) { + return res.json({ + code: "00", + message: "Data has been updated.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "No Data updated", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// DELETE DATA BY ID +const deletePaymentChannel = async (req, res) => { + try { + let id = req.params.id; + + let result = await knex("mtr.t_mtr_payment_channel") + .where("payment_channel_id_seq", id) + .del(); + + if (result) { + return res.json({ + code: "00", + message: "Data has been deleted.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "No Data deleted", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +module.exports = { + validate, + getPaymentChannels, + getPaymentChannelById, + createPaymentChannel, + updatePaymentChannel, + deletePaymentChannel, +}; diff --git a/application/modules/reservebalance/reservebalance.controller.js b/application/modules/reservebalance/reservebalance.controller.js new file mode 100644 index 0000000..0e1a7f2 --- /dev/null +++ b/application/modules/reservebalance/reservebalance.controller.js @@ -0,0 +1,318 @@ +const { param, body, validationResult } = require("express-validator"); +const model = require("./reservebalance.model"); +const moment = require("moment"); +moment.locale("id"); + +// VALIDATION +const validate = (method) => { + switch (method) { + case "reservation": + return [ + body("mid").not().isEmpty().withMessage("MID is required"), + body("tid").not().isEmpty().withMessage("TID is required"), + body("card_number") + .not() + .isEmpty() + .withMessage("Card Number is required"), + body("amount") + .not() + .isEmpty() + .withMessage("Amount is required") + .isNumeric() + .withMessage("Amount is invalid format"), + body("issuer").not().isEmpty().withMessage("Issuer is required"), + ]; + case "updatePayment": + return [ + body("reservation_number") + .not() + .isEmpty() + .withMessage("Reservation Number is required"), + body("payment_ref_no") + .not() + .isEmpty() + .withMessage("Payment Reference Number is required"), + ]; + + default: + break; + } +}; + +// FIND RESERVATION +const findReservation = async (req, res) => {}; + +// RESERVATION +const reservation = async (req, res) => { + try { + // check validator + const err = validationResult(req, res); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + // param + let { mid, tid, card_number, amount, issuer } = req.body; + + // time + let now = moment().format("YYYY-MM-DD HH:mm:ss"); + let today = moment().format("YYYY-MM-DD"); + + // get partner, merchant, terminal from tid + let getPartner = await model.getPartner(mid, tid); + if (!getPartner) { + return res.status(400).json({ + code: "01", + message: "terminal id is not valid", + data: [], + }); + } + + // check card number + let checkCardNumber = await model.checkCardNumber(card_number); + if (!checkCardNumber) { + return res.status(400).json({ + code: "01", + message: "card number is not registered", + data: [], + }); + } + + // get issuer + let getIssuer = await model.getIssuer(issuer); + if (!getIssuer) { + return res.status(400).json({ + code: "01", + message: "issuer doesn't exist", + data: [], + }); + } + + // get max reservation + let getMaxReservation = await model.getMaxReservation(); + let maxReservation = getMaxReservation.c_value + ? getMaxReservation.c_value + : 1; + + // get total reservation pending + let getReservationPending = await model.getReservationPending( + card_number, + issuer, + now + ); + let totalReservationPending = + getReservationPending.total_reservation > 0 + ? getReservationPending.total_reservation + : 0; + + if (totalReservationPending >= maxReservation) { + return res.status(400).json({ + code: "01", + message: + "your card number has some pending transaction. Please finished it!", + data: [], + }); + } + + // get BI regulation status + const getBIRegulationStatus = await model.getBIRegulationStatus(); + if (getBIRegulationStatus.c_value == "A") { + // get accumulated balance in this month + let accumulatedBalance = 19950000; + + // validate max topup per month + const getMaxTopupPerMonth = await model.getMaxTopupPerMonth(); + if (getMaxTopupPerMonth.c_value) { + if ( + parseInt(accumulatedBalance) + parseInt(amount) > + parseInt(getMaxTopupPerMonth.c_value) + ) { + return res.status(400).json({ + code: "01", + message: "your card number has been limit top up for this month", + data: [], + }); + } + } + } + + // get reservation + const getReservationNumberSequence = + await model.getReservationNumberSequence(getPartner, today); + const reservationNoSequence = getReservationNumberSequence + ? parseInt(getReservationNumberSequence.i_reservation_no_seq) + 1 + : 1; + + // generate reservation number + let reservationNumber = await model.generateReservationNumber( + getPartner, + moment(today).format("YYYYMMDD"), + reservationNoSequence + ); + + // get reservation expiration date by parameter + let getReservationExpirationDateValue = + await model.getReservationExpirationDateValue(); + let time = getReservationExpirationDateValue.c_value + ? parseInt(getReservationExpirationDateValue.c_value) + : 1; + + // get reservation expiration date measure by parameter + let getReservationExpirationDateMeasure = + await model.getReservationExpirationDateMeasure(); + let measure = getReservationExpirationDateMeasure.c_value + ? getReservationExpirationDateMeasure.c_value + : "hours"; + + let expired = moment(now).add(time, measure).format("YYYY-MM-DD HH:mm:ss"); + + // binding data + let data = { + c_reservation_no: reservationNumber, + d_reservation: now, + i_partner: getPartner ? getPartner.i_partner : null, + c_partner_code: getPartner ? getPartner.partner_code : null, + c_partner_name: getPartner ? getPartner.partner_name : null, + i_merchant: getPartner ? getPartner.i_merchant : null, + c_merchant_code: getPartner ? getPartner.merchant_code : null, + c_merchant_name: getPartner ? getPartner.merchant_name : null, + c_mid: getPartner ? getPartner.mid : null, + i_terminal: getPartner ? getPartner.i_terminal : null, + c_terminal_code: getPartner ? getPartner.terminal_code : null, + c_terminal_name: getPartner ? getPartner.terminal_name : null, + c_tid: getPartner ? getPartner.tid : null, + c_card_number: card_number, + i_reservation_amount: amount, + i_issuer: getIssuer ? getIssuer.i_issuer : null, + c_issuer_code: getIssuer ? getIssuer.issuer_code : null, + c_issuer_name: getIssuer ? getIssuer.issuer_name : null, + i_issuer_fee: getIssuer ? getIssuer.issuer_fee : null, + i_channel: null, + c_channel_code: null, + c_channel_name: null, + i_channel_fee: null, + c_payment_ref_no: null, + i_reservation_no_seq: reservationNoSequence, + d_expired: expired, + c_status: "P", + c_status_name: "PENDING", + d_create: now, + i_create: null, + c_create_username: null, + c_create_fullname: null, + d_modify: null, + i_modify: null, + c_modify_username: null, + c_modify_fullname: null, + d_delete: null, + i_delete: null, + c_delete_username: null, + c_delete_fullname: null, + }; + let result = await model.insertReservation(data); + + return res.json({ + code: "00", + message: "reservation saved successfully.", + data: result.command, + }); + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// UPDATE PAYMENT +const updatePayment = async (req, res) => { + try { + // check validator + const err = validationResult(req, res); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + // param + let { reservation_number, channel, channel_fee, payment_ref_no } = req.body; + + // time + let now = moment().format("YYYY-MM-DD HH:mm:ss"); + + // check reservation + const findReservation = await model.findReservation(reservation_number); + if (!findReservation) { + return res.status(400).json({ + code: "01", + message: "reservation doesn't exist", + data: [], + }); + } else { + if (findReservation.c_payment_ref_no) { + return res.json({ + code: "00", + message: "payment already updated", + data: [], + }); + } + } + + // get channel + let getChannel = await model.getChannel(channel); + if (!getChannel) { + return res.status(400).json({ + code: "01", + message: "channel doesn't exist", + data: [], + }); + } + + // binding data + let data = { + i_channel: getChannel ? getChannel.i_channel : null, + c_channel_code: getChannel ? getChannel.channel_code : null, + c_channel_name: getChannel ? getChannel.channel_name : null, + i_channel_fee: channel_fee + ? channel_fee + : getChannel + ? getChannel.channel_fee + : null, + c_payment_ref_no: payment_ref_no, + c_status: "P", + c_status_name: "PENDING", + d_modify: now, + i_modify: null, + c_modify_username: null, + c_modify_fullname: null, + }; + let result = await model.updatePayment(data, reservation_number); + + return res.json({ + code: "00", + message: "payment updated successfully.", + data: result, + }); + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +module.exports = { + validate, + findReservation, + reservation, + updatePayment, +}; diff --git a/application/modules/reservebalance/reservebalance.model.js b/application/modules/reservebalance/reservebalance.model.js new file mode 100644 index 0000000..df2f734 --- /dev/null +++ b/application/modules/reservebalance/reservebalance.model.js @@ -0,0 +1,199 @@ +const knex = require("../../../infrastructure/database/knex"); + +// CHECK CARD NUMBER +const checkCardNumber = (cardNumber) => { + let result = knex("t_m_card_product") + .where("c_card_number", cardNumber) + .where("c_status", "!=", "X") + .first(); + return result; +}; + +// GET RESERVATION +const getReservationNumberSequence = (data, date) => { + let result = knex("trx.t_d_reservation_balance") + .select("i_reservation_no_seq") + .orderBy("i_reservation_no_seq", "desc") + .whereNotNull("i_reservation_no_seq") + .where("i_partner", data.i_partner) + .where("i_merchant", data.i_merchant) + .whereRaw("??::date = ?", ["d_reservation", date]) + .first(); + return result; +}; + +// GENERATE RESERVATION NUMBER +const generateReservationNumber = (data, date, counter) => { + let code = data.merchant_code ? data.merchant_code : "XXXXXXX"; + + let prefix = "RSV"; + let reservationNumber = + prefix + "" + code + "" + "" + date + counter.toString().padStart(3, "0"); + + return reservationNumber; +}; + +// GET PARTNER, MERCHANT, TERMINAL FROM TID +const getPartner = (mid, tid) => { + let result = knex + .select( + "t_m_partner.i_partner", + "t_m_partner.c_code as partner_code", + "t_m_partner.c_name as partner_name", + "t_m_merchant.i_merchant", + "t_m_merchant.c_code as merchant_code", + "t_m_merchant.c_name as merchant_name", + "t_m_merchant.e_mid as mid", + "t_m_terminal.i_terminal", + "t_m_terminal.c_code as terminal_code", + "t_m_terminal.c_name as terminal_name", + "t_m_terminal.e_tid as tid", + ) + .from("t_m_terminal") + .leftJoin( + "t_m_merchant", + "t_m_terminal.i_merchant", + "t_m_merchant.i_merchant" + ) + .leftJoin("t_m_partner", "t_m_merchant.i_partner", "t_m_partner.i_partner") + .where("t_m_merchant.e_mid", mid) + .where("t_m_terminal.e_tid", tid) + .where("t_m_terminal.c_status", "A") + .where("t_m_merchant.c_status", "A") + .where("t_m_partner.c_status", "A") + .first(); + return result; +}; + +// GET ISSUER +const getIssuer = (code) => { + let result = knex("t_m_issuer") + .select( + "i_issuer", + "c_code as issuer_code", + "c_name as issuer_name", + "i_fee as issuer_fee" + ) + .where("c_code", code) + .where("c_status", "A") + .first(); + return result; +}; + +// GET CHANNEL +const getChannel = (code) => { + let result = knex("t_m_channel") + .select( + "i_channel", + "c_code as channel_code", + "c_name as channel_name", + "i_fee as channel_fee" + ) + .where("c_code", code) + .where("c_status", "A") + .first(); + return result; +}; + +// GET RESERVATION EXPIRATION DATE FROM GLOBAL PARAMETER +const getReservationExpirationDateValue = () => { + let result = knex("t_m_global_parameter") + .select("c_value") + .where("c_code", "HSM_EXP_RSV_VAL") + .where("c_status", "A") + .first(); + return result; +}; + +// GET RESERVATION EXPIRATION DATE MEASURE FROM GLOBAL PARAMETER +const getReservationExpirationDateMeasure = () => { + let result = knex("t_m_global_parameter") + .select("c_value") + .where("c_code", "HSM_EXP_RSV_MEA") + .where("c_status", "A") + .first(); + return result; +}; + +// GET BI REGULATION STATUS FROM GLOBAL PARAMETER +const getBIRegulationStatus = () => { + let result = knex("t_m_global_parameter") + .select("c_value") + .where("c_code", "HSM_BI_REGULATION_STAT") + .where("c_status", "A") + .first(); + return result; +}; + +// GET MAX TOPUP PER MONTH FROM GLOBAL PARAMETER +const getMaxTopupPerMonth = () => { + let result = knex("t_m_global_parameter") + .select("c_value") + .where("c_code", "HSM_BI_MAX_TOPUP_PER_MONTH") + .where("c_status", "A") + .first(); + return result; +}; + +// GET MAX RESERVATION FROM GLOBAL PARAMETER +const getMaxReservation = () => { + let result = knex("t_m_global_parameter") + .select("c_value") + .where("c_code", "HSM_MAX_RSV_PEN") + .where("c_status", "A") + .first(); + return result; +}; + +// find reservation +let findReservation = (reservationNumber) => { + let result = knex("trx.t_d_reservation_balance") + .where("c_reservation_no", reservationNumber) + .first(); + return result; +}; + +// GET RESERVATION PENDING +const getReservationPending = (cardNumber, issuer, time) => { + let result = knex("trx.t_d_reservation_balance") + .count("* as total_reservation") + .where("c_card_number", cardNumber) + .where("c_issuer_code", issuer) + .where("c_status", "P") + .where("d_expired", ">=", time) + .whereNotNull("c_payment_ref_no") + .first(); + return result; +}; + +// INSERT RESERVATION +const insertReservation = (data) => { + let result = knex("trx.t_d_reservation_balance").insert(data); + return result; +}; + +// UPDATE PAYMENT +const updatePayment = (data, reservationNumber) => { + let result = knex("trx.t_d_reservation_balance") + .where("c_reservation_no", reservationNumber) + .update(data); + return result; +}; + +module.exports = { + checkCardNumber, + getReservationNumberSequence, + generateReservationNumber, + getPartner, + getIssuer, + getChannel, + getReservationExpirationDateValue, + getReservationExpirationDateMeasure, + getBIRegulationStatus, + getMaxTopupPerMonth, + getMaxReservation, + findReservation, + getReservationPending, + insertReservation, + updatePayment, +}; diff --git a/application/modules/users/user.controller.js b/application/modules/users/user.controller.js new file mode 100644 index 0000000..7547a5a --- /dev/null +++ b/application/modules/users/user.controller.js @@ -0,0 +1,238 @@ +const knex = require("../../../infrastructure/database/knex"); +const { param, body, validationResult } = require("express-validator"); +const model = require('./user.model') + +// VALIDATION +const validate = (method) => { + switch (method) { + case "createUser": { + return [ + body("user_id") + .not() + .isEmpty() + .withMessage("Payment Channel ID is required") + .matches("[0-9]") + .withMessage("Payment Channel ID is invalid format"), + body("username") + .not() + .isEmpty() + .withMessage("Payment Channel Name is required"), + ]; + } + case "updateUser": { + return [ + param("id", "ID data is invalid format").matches("[0-9]"), + body("user_id") + .not() + .isEmpty() + .withMessage("Payment Channel ID is required") + .matches("[0-9]") + .withMessage("Payment Channel ID is invalid format"), + body("username") + .not() + .isEmpty() + .withMessage("Payment Channel Name is required"), + ]; + } + } +}; + +// SHOW ALL DATA +const getUsers = async (req, res) => { + try { + let result = await model.getUsers(); + if (result) { + return res.json({ + code: "00", + message: "Data found.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "Data not found.", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// SHOW DATA BY ID +const getUserById = async (req, res) => { + try { + let id = req.params.id; + + let result = await model.getUserById(id); + if (result) { + return res.json({ + code: "00", + message: "Data found.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "Data not found.", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// CREATED NEW DATA +const createUser = async (req, res) => { + try { + let { + username, + password, + user_group_id, + fullname, + email, + phone, + } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + let find = await knex("core.t_mtr_user") + .where("username", username) + .first(); + + if (!find) { + let result = await knex("core.t_mtr_user").insert({ + username_var: username, + password_var: password, + user_group_id_int: user_group_id, + fullname_var: fullname, + email_var: email, + phone_var: phone, + active_boo: true, + created_by_var: "", + }); + + return res.json({ + code: "00", + message: "Data has been saved.", + data: result.command, + }); + } else { + return res.json({ + code: "01", + message: "User already exist", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// UDPATE DATA BY ID +const updateUser = async (req, res) => { + try { + let id = req.params.id; + let { username, logo } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + let result = await knex("core.t_mtr_user").where("user_id_seq", id).update({ + username_var: username, + password_var: password, + user_group_id_int: user_group_id, + fullname_var: fullname, + email_var: email, + phone_var: phone, + active_boo: true, + updated_by_var: "", + }); + + if (result) { + return res.json({ + code: "00", + message: "Data has been updated.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "No Data updated", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// DELETE DATA BY ID +const deleteUser = async (req, res) => { + try { + let id = req.params.id; + + let result = await knex("core.t_mtr_user").where("user_id_seq", id).del(); + + if (result) { + return res.json({ + code: "00", + message: "Data has been deleted.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "No Data deleted", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +module.exports = { + validate, + getUsers, + getUserById, + createUser, + updateUser, + deleteUser, +}; diff --git a/application/modules/users/user.model.js b/application/modules/users/user.model.js new file mode 100644 index 0000000..ddb281e --- /dev/null +++ b/application/modules/users/user.model.js @@ -0,0 +1,135 @@ +const knex = require("../../../infrastructure/database/knex"); + +// SHOW ALL DATA +const getUsers = () => { + let result = knex.select().from("core.t_mtr_user"); + return result; +}; + +// SHOW DATA BY ID +const getUserById = (id) => { + let result = knex + .select() + .from("core.t_mtr_user") + .where("user_id_seq", id) + .first(); + return result; +}; + +const findByUsername = (username) => { + let result = knex("core.t_mtr_user") + .where("username", username) + .first(); + return result; +} + +// CREATED NEW DATA +const createUser = (param) => { + let { + username, + password, + user_group_id, + fullname, + email, + phone, + } = param; + + let result = knex("core.t_mtr_user").insert({ + username_var: username, + password_var: password, + user_group_id_int: user_group_id, + fullname_var: fullname, + email_var: email, + phone_var: phone, + active_boo: true, + created_by_var: "", + }); + return result.command; +}; + +// UDPATE DATA BY ID +const updateUser = (param) => { + try { + let id = param.id; + let { username, logo } = req.body; + + // validate + const err = validationResult(req); + if (!err.isEmpty()) { + return res.status(400).json({ + code: "01", + message: err.errors[0].msg, + data: [], + }); + } + + let result = knex("core.t_mtr_user").where("user_id_seq", id).update({ + username_var: username, + password_var: password, + user_group_id_int: user_group_id, + fullname_var: fullname, + email_var: email, + phone_var: phone, + active_boo: true, + updated_by_var: "", + }); + + if (result) { + return res.json({ + code: "00", + message: "Data has been updated.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "No Data updated", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +// DELETE DATA BY ID +const deleteUser = (param) => { + try { + let id = param.id; + + let result = knex("core.t_mtr_user").where("user_id_seq", id).del(); + + if (result) { + return res.json({ + code: "00", + message: "Data has been deleted.", + data: result, + }); + } else { + return res.json({ + code: "01", + message: "No Data deleted", + data: [], + }); + } + } catch (error) { + return res.json({ + code: "01", + message: error.message, + data: [], + }); + } +}; + +module.exports = { + getUsers, + getUserById, + createUser, + updateUser, + deleteUser, + findByUsername, +}; diff --git a/application/routes/auth.routes.js b/application/routes/auth.routes.js index 5d6f83b..c4adb4e 100644 --- a/application/routes/auth.routes.js +++ b/application/routes/auth.routes.js @@ -1,6 +1,6 @@ const express = require("express"); const router = express.Router(); -const controller = require("../controllers/auth"); +const controller = require("../modules/auth/auth.controller"); // ============================== AUTH ============================== router.post("/login", controller.validate("login"), controller.login); diff --git a/application/routes/core.routes.js b/application/routes/core.routes.js index e78c048..1eb2bd8 100644 --- a/application/routes/core.routes.js +++ b/application/routes/core.routes.js @@ -1,7 +1,7 @@ const express = require("express"); const router = express.Router(); const auth = require("../middlewares/jwt.middleware"); -const controller = require("../controllers/user"); +const controller = require("../modules/users/user.controller"); // ============================== USER ============================== router.get("/user", auth.authenticateToken, controller.getUsers); diff --git a/application/routes/hsm.js b/application/routes/hsm.js new file mode 100644 index 0000000..22b84b6 --- /dev/null +++ b/application/routes/hsm.js @@ -0,0 +1,29 @@ +const { Router } = require("express") +const router = Router() + +const _readData = require('../modules/hsm/readData') +const _readDataResp = require('../modules/hsm/readDataResp') + +const _auth1 = require('../modules/hsm/authenticate1') +const _auth2 = require('../modules/hsm/authenticate2') +const _authResp = require('../modules/hsm/authenticateResp') + +const _topup = require('../modules/hsm/topup') +const _topupResp = require('../modules/hsm/topupResp') + +const _end = require('../modules/hsm/endTranscation') + +router.post('/read', _readData) +router.post('/readResp', _readDataResp) + +router.post('/auth1', _auth1) +router.post('/auth2', _auth2) +router.post('/authResp', _authResp) + +router.post('/topup', _topup) +router.post('/topupResp', _topupResp) + +router.post('/end',_end) + + +module.exports = router \ No newline at end of file diff --git a/application/routes/loadbalance.routes.js b/application/routes/loadbalance.routes.js new file mode 100644 index 0000000..c60f6f7 --- /dev/null +++ b/application/routes/loadbalance.routes.js @@ -0,0 +1,17 @@ +const express = require("express"); +const router = express.Router(); +const controller = require("../modules/loadbalance/loadbalance.controller"); + +router.post( + "/loadbalance/request", + controller.validate("loadingBalanceRequest"), + controller.loadingBalanceRequest +); + +router.post( + "/loadbalance", + controller.validate("loadingBalance"), + controller.loadingBalance +); + +module.exports = router; diff --git a/application/routes/master.routes.js b/application/routes/master.routes.js index 7bc3f83..40ebe7c 100644 --- a/application/routes/master.routes.js +++ b/application/routes/master.routes.js @@ -1,7 +1,7 @@ const express = require("express"); const router = express.Router(); const auth = require("../middlewares/jwt.middleware"); -const controller = require("../controllers/payment-channel"); +const controller = require("../modules/paymentchannels/paymentchannel.controller"); // ============================== PAYMENT CHANNEL ============================== router.get( diff --git a/application/routes/reservebalance.routes.js b/application/routes/reservebalance.routes.js new file mode 100644 index 0000000..1a88bfd --- /dev/null +++ b/application/routes/reservebalance.routes.js @@ -0,0 +1,17 @@ +const express = require("express"); +const router = express.Router(); +const controller = require("../modules/reservebalance/reservebalance.controller"); + +router.post( + "/reservation", + controller.validate("reservation"), + controller.reservation +); + +router.post( + "/reservation/update-payment", + controller.validate("updatePayment"), + controller.updatePayment + ); + +module.exports = router; diff --git a/index.js b/index.js index 2c7a4bc..ff1ff5c 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,8 @@ const cors = require("cors"); const authRoute = require("./application/routes/auth.routes"); const coreRoute = require("./application/routes/core.routes"); const masterRoute = require("./application/routes/master.routes"); +const reservationRoute = require("./application/routes/reservebalance.routes"); +const loadBalanceRoute = require("./application/routes/loadbalance.routes"); require("dotenv").config(); @@ -29,6 +31,8 @@ app.get("/", (req, res) => { app.use("/api/", authRoute); app.use("/api/", coreRoute); app.use("/api/", masterRoute); +app.use("/api/", reservationRoute); +app.use("/api/", loadBalanceRoute); // set port, listen for requests const PORT = process.env.PORT || 8000; diff --git a/package-lock.json b/package-lock.json index c8dddd6..61ffe70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,2376 @@ { "name": "topuponline", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "topuponline", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "body-parser": "^1.19.0", + "cors": "^2.8.5", + "dotenv": "^8.2.0", + "express": "^4.17.1", + "express-validator": "^6.10.0", + "jsonwebtoken": "^8.5.1", + "knex": "^0.95.4", + "moment": "^2.29.3", + "pg": "^8.6.0", + "ws": "^8.5.0" + }, + "devDependencies": { + "nodemon": "^2.0.7" + } + }, + "node_modules/@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "dependencies": { + "defer-to-connect": "^1.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", + "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.10.3", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "node_modules/buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", + "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==" + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "dependencies": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dotenv": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", + "engines": { + "node": ">=10" + } + }, + "node_modules/duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "node_modules/esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.0.tgz", + "integrity": "sha512-EJEXxiTQJS3lIPrU1AE2vRuT7X7E+0KBbpm5GSoK524yl0K8X+er8zS2P14E64eqsVNoWbMCT7MpmQ+ErAhgRg==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.0", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.10.3", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express-validator": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-6.14.0.tgz", + "integrity": "sha512-ZWHJfnRgePp3FKRSKMtnZVnD1s8ZchWD+jSl7UMseGIqhweCo1Z9916/xXBbJAa6PrA3pUZfkOvIsHZG4ZtIMw==", + "dependencies": { + "lodash": "^4.17.21", + "validator": "^13.7.0" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/getopts": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/getopts/-/getopts-2.2.5.tgz", + "integrity": "sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA==" + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true + }, + "node_modules/import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "node_modules/jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=4", + "npm": ">=1.4.28" + } + }, + "node_modules/jsonwebtoken/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.0" + } + }, + "node_modules/knex": { + "version": "0.95.15", + "resolved": "https://registry.npmjs.org/knex/-/knex-0.95.15.tgz", + "integrity": "sha512-Loq6WgHaWlmL2bfZGWPsy4l8xw4pOE+tmLGkPG0auBppxpI0UcK+GYCycJcqz9W54f2LiGewkCVLBm3Wq4ur/w==", + "dependencies": { + "colorette": "2.0.16", + "commander": "^7.1.0", + "debug": "4.3.2", + "escalade": "^3.1.1", + "esm": "^3.2.25", + "getopts": "2.2.5", + "interpret": "^2.2.0", + "lodash": "^4.17.21", + "pg-connection-string": "2.5.0", + "rechoir": "0.7.0", + "resolve-from": "^5.0.0", + "tarn": "^3.0.1", + "tildify": "2.0.0" + }, + "bin": { + "knex": "bin/cli.js" + }, + "engines": { + "node": ">=10" + }, + "peerDependenciesMeta": { + "mysql": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "pg": { + "optional": true + }, + "pg-native": { + "optional": true + }, + "sqlite3": { + "optional": true + }, + "tedious": { + "optional": true + } + } + }, + "node_modules/knex/node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/knex/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "dependencies": { + "package-json": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/moment": { + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz", + "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==", + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemon": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", + "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5", + "update-notifier": "^5.1.0" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "dependencies": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "node_modules/pg": { + "version": "8.7.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.3.tgz", + "integrity": "sha512-HPmH4GH4H3AOprDJOazoIcpI49XFsHCe8xlrjHkWiapdbHK+HLtbm/GQzXYAZwmPju/kzKhjaSfMACG+8cgJcw==", + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.5.1", + "pg-protocol": "^1.5.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "pg-native": ">=2.0.0" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-connection-string": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.5.1.tgz", + "integrity": "sha512-6iCR0wVrro6OOHFsyavV+i6KYL4lVNyYAB9RD18w66xSzN+d8b66HiwuP30Gp1SH5O9T82fckkzsRjlrhD0ioQ==", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", + "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "dependencies": { + "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", + "dependencies": { + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "dependencies": { + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/split2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", + "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tarn": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", + "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/tildify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-2.0.0.tgz", + "integrity": "sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dev": true, + "dependencies": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, + "node_modules/update-notifier/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "dependencies": { + "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/validator": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + }, "dependencies": { "@sindresorhus/is": { "version": "0.14.0", @@ -26,40 +2394,27 @@ "dev": true }, "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" } }, "ansi-align": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", - "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, "requires": { - "string-width": "^3.0.0" - }, - "dependencies": { - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } + "string-width": "^4.1.0" } }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { @@ -99,36 +2454,38 @@ "dev": true }, "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", + "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", "requires": { - "bytes": "3.1.0", + "bytes": "3.1.2", "content-type": "~1.0.4", "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "on-finished": "2.4.1", + "qs": "6.10.3", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" } }, "boxen": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", - "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", "dev": true, "requires": { "ansi-align": "^3.0.0", - "camelcase": "^5.3.1", - "chalk": "^3.0.0", - "cli-boxes": "^2.2.0", - "string-width": "^4.1.0", - "term-size": "^2.1.0", - "type-fest": "^0.8.1", - "widest-line": "^3.1.0" + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" } }, "brace-expansion": { @@ -161,9 +2518,9 @@ "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" }, "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" }, "cacheable-request": { "version": "6.1.0", @@ -197,16 +2554,25 @@ } } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -231,19 +2597,19 @@ } }, "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, "requires": { - "anymatch": "~3.1.1", + "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "readdirp": "~3.6.0" } }, "ci-info": { @@ -283,9 +2649,9 @@ "dev": true }, "colorette": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", - "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==" + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", + "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==" }, "commander": { "version": "7.2.0", @@ -313,11 +2679,11 @@ } }, "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "5.2.1" } }, "content-type": { @@ -326,9 +2692,9 @@ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" }, "cookie-signature": { "version": "1.0.6", @@ -380,14 +2746,14 @@ "dev": true }, "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" }, "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, "dot-prop": { "version": "5.3.0", @@ -399,9 +2765,9 @@ } }, "dotenv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", - "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", + "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==" }, "duplexer3": { "version": "0.1.4", @@ -423,9 +2789,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "encodeurl": { @@ -469,49 +2835,50 @@ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.0.tgz", + "integrity": "sha512-EJEXxiTQJS3lIPrU1AE2vRuT7X7E+0KBbpm5GSoK524yl0K8X+er8zS2P14E64eqsVNoWbMCT7MpmQ+ErAhgRg==", "requires": { - "accepts": "~1.3.7", + "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", + "body-parser": "1.20.0", + "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.4.0", + "cookie": "0.5.0", "cookie-signature": "1.0.6", "debug": "2.6.9", - "depd": "~1.1.2", + "depd": "2.0.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "~1.1.2", + "finalhandler": "1.2.0", "fresh": "0.5.2", + "http-errors": "2.0.0", "merge-descriptors": "1.0.1", "methods": "~1.1.2", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", + "proxy-addr": "~2.0.7", + "qs": "6.10.3", "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" } }, "express-validator": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-6.10.0.tgz", - "integrity": "sha512-gDtepU94EpUzgFvKO/8JzjZ4uqIF4xHekjYtcNgFDiBK6Hob3MQhPU8s/c3NaWd1xi5e5nA0oVmOJ0b0ZBO36Q==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-6.14.0.tgz", + "integrity": "sha512-ZWHJfnRgePp3FKRSKMtnZVnD1s8ZchWD+jSl7UMseGIqhweCo1Z9916/xXBbJAa6PrA3pUZfkOvIsHZG4ZtIMw==", "requires": { - "lodash": "^4.17.20", - "validator": "^13.5.2" + "lodash": "^4.17.21", + "validator": "^13.7.0" } }, "fill-range": { @@ -524,23 +2891,23 @@ } }, "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", - "on-finished": "~2.3.0", + "on-finished": "2.4.1", "parseurl": "~1.3.3", - "statuses": "~1.5.0", + "statuses": "2.0.1", "unpipe": "~1.0.0" } }, "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" }, "fresh": { "version": "0.5.2", @@ -559,6 +2926,16 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -583,12 +2960,12 @@ } }, "global-dirs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", - "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "requires": { - "ini": "1.3.7" + "ini": "2.0.0" } }, "got": { @@ -611,9 +2988,9 @@ } }, "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "has": { @@ -630,6 +3007,11 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, "has-yarn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", @@ -643,15 +3025,15 @@ "dev": true }, "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" } }, "iconv-lite": { @@ -681,14 +3063,14 @@ "dev": true }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", - "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true }, "interpret": { @@ -720,9 +3102,9 @@ } }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "requires": { "has": "^1.0.3" } @@ -734,34 +3116,34 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" } }, "is-installed-globally": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", - "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "requires": { - "global-dirs": "^2.0.1", - "is-path-inside": "^3.0.1" + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" } }, "is-npm": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", - "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", "dev": true }, "is-number": { @@ -853,29 +3235,29 @@ } }, "knex": { - "version": "0.95.4", - "resolved": "https://registry.npmjs.org/knex/-/knex-0.95.4.tgz", - "integrity": "sha512-IwUcHr6AkZPL707mJCOal1P4jlgxKMy17IMjJm5W23yrkM1jO2/APBM1eyw/MhQ61w8T7NpzGD+LEkr8M46mWw==", + "version": "0.95.15", + "resolved": "https://registry.npmjs.org/knex/-/knex-0.95.15.tgz", + "integrity": "sha512-Loq6WgHaWlmL2bfZGWPsy4l8xw4pOE+tmLGkPG0auBppxpI0UcK+GYCycJcqz9W54f2LiGewkCVLBm3Wq4ur/w==", "requires": { - "colorette": "1.2.1", + "colorette": "2.0.16", "commander": "^7.1.0", - "debug": "4.3.1", + "debug": "4.3.2", "escalade": "^3.1.1", "esm": "^3.2.25", "getopts": "2.2.5", "interpret": "^2.2.0", "lodash": "^4.17.21", - "pg-connection-string": "2.4.0", - "rechoir": "^0.7.0", + "pg-connection-string": "2.5.0", + "rechoir": "0.7.0", "resolve-from": "^5.0.0", "tarn": "^3.0.1", "tildify": "2.0.0" }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "requires": { "ms": "2.1.2" } @@ -884,11 +3266,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "pg-connection-string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", - "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" } } }, @@ -947,6 +3324,15 @@ "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -985,16 +3371,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.47.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", - "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { - "version": "2.1.30", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", - "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "requires": { - "mime-db": "1.47.0" + "mime-db": "1.52.0" } }, "mimic-response": { @@ -1004,46 +3390,51 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "moment": { + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz", + "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw==" + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, "nodemon": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.7.tgz", - "integrity": "sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.15.tgz", + "integrity": "sha512-gdHMNx47Gw7b3kWxJV64NI+Q5nfl0y5DgDbiVtShiwa7Z0IZ07Ll4RLFo6AjrhzMtoEZn5PDE3/c2AbVsiCkpA==", "dev": true, "requires": { - "chokidar": "^3.2.2", - "debug": "^3.2.6", + "chokidar": "^3.5.2", + "debug": "^3.2.7", "ignore-by-default": "^1.0.1", "minimatch": "^3.0.4", - "pstree.remy": "^1.1.7", + "pstree.remy": "^1.1.8", "semver": "^5.7.1", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.3", - "update-notifier": "^4.1.0" + "undefsafe": "^2.0.5", + "update-notifier": "^5.1.0" }, "dependencies": { "debug": { @@ -1079,9 +3470,9 @@ "dev": true }, "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true }, "object-assign": { @@ -1089,10 +3480,15 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" + }, "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "requires": { "ee-first": "1.1.1" } @@ -1143,9 +3539,9 @@ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-to-regexp": { "version": "0.1.7", @@ -1153,14 +3549,14 @@ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "pg": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.6.0.tgz", - "integrity": "sha512-qNS9u61lqljTDFvmk/N66EeGq3n6Ujzj0FFyNMGQr6XuEv4tgNTXvJQTfJdcvGit5p5/DWPu+wj920hAJFI+QQ==", + "version": "8.7.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.3.tgz", + "integrity": "sha512-HPmH4GH4H3AOprDJOazoIcpI49XFsHCe8xlrjHkWiapdbHK+HLtbm/GQzXYAZwmPju/kzKhjaSfMACG+8cgJcw==", "requires": { "buffer-writer": "2.0.0", "packet-reader": "1.0.0", "pg-connection-string": "^2.5.0", - "pg-pool": "^3.3.0", + "pg-pool": "^3.5.1", "pg-protocol": "^1.5.0", "pg-types": "^2.1.0", "pgpass": "1.x" @@ -1177,9 +3573,10 @@ "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" }, "pg-pool": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.3.0.tgz", - "integrity": "sha512-0O5huCql8/D6PIRFAlmccjphLYWC+JIzvUhSzXSpGaf+tjTZc4nn+Lr7mLXBbFJfvwbP0ywDv73EiaBsxn7zdg==" + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.5.1.tgz", + "integrity": "sha512-6iCR0wVrro6OOHFsyavV+i6KYL4lVNyYAB9RD18w66xSzN+d8b66HiwuP30Gp1SH5O9T82fckkzsRjlrhD0ioQ==", + "requires": {} }, "pg-protocol": { "version": "1.5.0", @@ -1199,17 +3596,17 @@ } }, "pgpass": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", - "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", "requires": { - "split2": "^3.1.1" + "split2": "^4.1.0" } }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, "postgres-array": { @@ -1242,11 +3639,11 @@ "dev": true }, "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "requires": { - "forwarded": "~0.1.2", + "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, @@ -1276,9 +3673,12 @@ } }, "qs": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "requires": { + "side-channel": "^1.0.4" + } }, "range-parser": { "version": "1.2.1", @@ -1286,12 +3686,12 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", + "bytes": "3.1.2", + "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" } @@ -1306,22 +3706,20 @@ "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + } } }, "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "requires": { "picomatch": "^2.2.1" @@ -1354,12 +3752,13 @@ } }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "resolve-from": { @@ -1377,9 +3776,9 @@ } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safer-buffer": { "version": "2.1.2", @@ -1409,129 +3808,92 @@ } }, "send": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", "requires": { "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", + "depd": "2.0.0", + "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", - "http-errors": "~1.7.2", + "http-errors": "2.0.0", "mime": "1.6.0", - "ms": "2.1.1", - "on-finished": "~2.3.0", + "ms": "2.1.3", + "on-finished": "2.4.1", "range-parser": "~1.2.1", - "statuses": "~1.5.0" + "statuses": "2.0.1" }, "dependencies": { "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, "serve-static": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.17.1" + "send": "0.18.0" } }, "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } }, "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "split2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", - "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", - "requires": { - "readable-stream": "^3.0.0" - } + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", + "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==" }, "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" }, "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } + "strip-ansi": "^6.0.1" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } }, "strip-json-comments": { @@ -1549,16 +3911,15 @@ "has-flag": "^3.0.0" } }, - "tarn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.1.tgz", - "integrity": "sha512-6usSlV9KyHsspvwu2duKH+FMUhqJnAh6J5J/4MITl8s94iSUQTLkJggdiewKv4RyARQccnigV48Z+khiuVZDJw==" + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, - "term-size": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", - "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", - "dev": true + "tarn": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", + "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==" }, "tildify": { "version": "2.0.0", @@ -1581,9 +3942,9 @@ } }, "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" }, "touch": { "version": "3.1.0", @@ -1595,9 +3956,9 @@ } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "type-is": { @@ -1619,13 +3980,10 @@ } }, "undefsafe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz", - "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==", - "dev": true, - "requires": { - "debug": "^2.2.0" - } + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true }, "unique-string": { "version": "2.0.0", @@ -1642,24 +4000,36 @@ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, "update-notifier": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", - "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "requires": { - "boxen": "^4.2.0", - "chalk": "^3.0.0", + "boxen": "^5.0.0", + "chalk": "^4.1.0", "configstore": "^5.0.1", "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.3.1", - "is-npm": "^4.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", "is-yarn-global": "^0.3.0", - "latest-version": "^5.0.0", - "pupa": "^2.0.1", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", "semver-diff": "^3.1.1", "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "url-parse-lax": { @@ -1671,20 +4041,15 @@ "prepend-http": "^2.0.0" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "validator": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.5.2.tgz", - "integrity": "sha512-mD45p0rvHVBlY2Zuy3F3ESIe1h5X58GPfAtslBjY7EtTqGquZTj+VX/J4RnHWN8FKq0C9WRVt1oWAcytWRuYLQ==" + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==" }, "vary": { "version": "1.1.2", @@ -1700,6 +4065,17 @@ "string-width": "^4.0.0" } }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -1718,6 +4094,12 @@ "typedarray-to-buffer": "^3.1.5" } }, + "ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "requires": {} + }, "xdg-basedir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", @@ -1728,6 +4110,12 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } } diff --git a/package.json b/package.json index 064314d..65ef45c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,9 @@ "express-validator": "^6.10.0", "jsonwebtoken": "^8.5.1", "knex": "^0.95.4", - "pg": "^8.6.0" + "moment": "^2.29.3", + "pg": "^8.6.0", + "ws": "^8.5.0" }, "devDependencies": { "nodemon": "^2.0.7"