This commit is contained in:
2022-07-18 13:50:34 +07:00
6 changed files with 491 additions and 115 deletions
+237
View File
@@ -27,8 +27,245 @@ function getUniqueCode() {
return timestamp;
}
// GENERATE XML REQUEST
function generateXMLRequest(urn, headers, items) {
let xmlRequest = ''
switch (urn.toUpperCase()) {
case 'ZFMCMS_FI_001':
let xmlItem = ''
items.map((item, index) => {
xmlItem += `<item>
<!--Optional:-->
<ITEMNO_ACC>${String(index+1).padStart(10, '0')}</ITEMNO_ACC>
<!--Optional:-->
<CUSTOMER>${item.c_account_code_topup ? item.c_account_code_topup : ""}</CUSTOMER>
<!--Optional:-->
<GL_ACCOUNT>${item.c_account_topup ? item.c_account_topup : ""}</GL_ACCOUNT>
<!--Optional:-->
<BUS_AREA>${item.ba ? item.ba : ""}</BUS_AREA>
<!--Optional:-->
<AMT_DOCCUR>${item.amount ? item.amount : ""}</AMT_DOCCUR>
<!--Optional:-->
<BLINE_DATE>${item.posting_date ? item.posting_date : ""}</BLINE_DATE>
<!--Optional:-->
<COSTCENTER></COSTCENTER>
<!--Optional:-->
<PROFITCENTER></PROFITCENTER>
<!--Optional:-->
<ALLOC_NMBR>${item.c_invoice_no ? item.c_invoice_no : ""}</ALLOC_NMBR>
<!--Optional:-->
<ITEM_TEXT>${item.item_text ? item.item_text : ""}</ITEM_TEXT>
<!--Optional:-->
<DE_CRE_IND>${item.de_cre}</DE_CRE_IND>
</item>`
})
xmlRequest = `<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:urn='urn:sap-com:document:sap:rfc:functions'>
<SOAP:Body>
<!--Optional-->
<urn:${urn}>
<!--You may enter the following 7 items in any order-->
<!--Optional:-->
<I_SIMULATE></I_SIMULATE>
<I_S_HEADER>
<!--Optional:-->
<HEADER_TXT>${headers.doc_header_text}</HEADER_TXT>
<!--Optional:-->
<COMP_CODE>${headers.ba}</COMP_CODE>
<!--Optional:-->
<DOC_DATE>${headers.doc_date}</DOC_DATE>
<!--Optional:-->
<PSTNG_DATE>${headers.posting_date}</PSTNG_DATE>
<!--Optional:-->
<FISC_YEAR>${headers.fisc_year}</FISC_YEAR>
<!--Optional:-->
<FIS_PERIOD>${headers.fisc_period}</FIS_PERIOD>
<!--Optional:-->
<!--default-->
<DOC_TYPE>${headers.doc_type}</DOC_TYPE>
<!--Optional:-->
<REF_DOC_NO>${headers.c_invoice_no}</REF_DOC_NO>
<!--Optional:-->
<CURRENCY>IDR</CURRENCY>
</I_S_HEADER>
<I_T_ITEM>
<!--Zero or more repetitions:-->
${xmlItem}
</I_T_ITEM>
<!--Optional:-->
<C_T_RETURN>
<!--Zero or more repetitions:-->
<item>
<!--Optional:-->
<TYPE></TYPE>
<!--Optional:-->
<DOC_NUMBER></DOC_NUMBER>
<!--Optional:-->
<MESSAGE_1></MESSAGE_1>
<!--Optional:-->
<MESSAGE_2></MESSAGE_2>
<!--Optional:-->
<MESSAGE_3></MESSAGE_3>
<!--Optional:-->
<MESSAGE_4></MESSAGE_4>
<!--Optional:-->
<MESSAGE_5></MESSAGE_5>
<!--Optional:-->
<MESSAGE_6></MESSAGE_6>
<!--Optional:-->
<MESSAGE_7></MESSAGE_7>
<!--Optional:-->
<MESSAGE_8></MESSAGE_8>
<!--Optional:-->
<MESSAGE_9></MESSAGE_9>
<!--Optional:-->
<MESSAGE_10></MESSAGE_10>
</item>
</C_T_RETURN>
</urn:${urn}>
</SOAP:Body>
</SOAP:Envelope>`
break;
default:
console.log('Sorry, we are out of ' + urn + '.');
}
return xmlRequest
}
// POSTING SAP
async function postingSAP(url, body){
try {
const axios = require("axios");
const credential = {
username: "basisxiqas",
password: "12345678"
}
const config = {
headers : {
'Content-Type': 'text/xml',
'responseType': 'text',
},
auth: {
username: credential.username,
password: credential.password
}
}
const resp = await axios.post(url, body, config)
return {
status : resp.status,
message: "Success",
data : resp.data
}
} catch (error) {
// Error 😨
if (error.response) {
/*
* The request was made and the server responded with a
* status code that falls out of the range of 2xx
*/
return {
status : error.response.status,
message: error.message,
data : []
}
} else if (error.request) {
/*
* The request was made but no response was received, `error.request`
* is an instance of XMLHttpRequest in the browser and an instance
* of http.ClientRequest in Node.js
*/
return {
status : 500,
message: "SAP : no response",
data : []
}
} else {
// Something happened in setting up the request and triggered an Error
return {
status : 500,
message: error.message,
data : []
}
}
}
}
// GET SOAP RESPONSE DATA
function getXMLData(response) {
const xml2js = require('xml2js');
// console.log(xmlString)
let resSAP = {
type: '',
message : '',
data : {
E_DOCUMENTYEAR: '',
E_DOCUMENTNUMBER: '',
// ITEM: [],
}
}
if(response.status == 200){
const options = {
explicitArray: false,
tagNameProcessors: [xml2js.processors.stripPrefix]
}
xml2js.parseString(response.data, options, (err, result) => {
if (err) throw err
let soapBody = result.Envelope.Body;
if (soapBody.$) delete soapBody.$
resSAP.data.E_DOCUMENTYEAR = soapBody['ZFMCMS_FI_001.Response']['E_DOCUMENTYEAR'] ? soapBody['ZFMCMS_FI_001.Response']['E_DOCUMENTYEAR'] : "0000"
resSAP.data.E_DOCUMENTNUMBER = soapBody['ZFMCMS_FI_001.Response']['E_DOCUMENTNUMBER'] ? soapBody['ZFMCMS_FI_001.Response']['E_DOCUMENTNUMBER'] : ""
if(soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item']){
if (!Array.isArray(soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item'])) {
// resSAP.data.ITEM.push(soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item'])
resSAP.type = soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item']['TYPE']
resSAP.message = soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item']['MESSAGE_1']
} else {
// resSAP.data.ITEM = soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item']
resSAP.type = soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item'][0]['TYPE']
resSAP.message = soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item'][0]['MESSAGE_1']
}
}
});
}else {
resSAP.type = 'E'
resSAP.message = response.message ? response.message : "aa"
}
return resSAP
}
module.exports = {
encryptText,
decryptText,
getUniqueCode,
generateXMLRequest,
postingSAP,
getXMLData
};
@@ -11,138 +11,126 @@ var result = {};
var uniqueCode;
// POSTING INVOICE
const postingInvoice = async (req, res) => {
const postingInvoice = async () => {
try {
// generate unique code
uniqueCode = await helper.getUniqueCode();
uniqueCode = helper.getUniqueCode();
// return uniqueCode
// time
let invoiceDate = moment('2022-06-25').subtract(1, "days").format("YYYY-MM-DD");
let invoiceDate = moment('2020-01-25').format("YYYY-MM-DD")
let invoice = [];
let invoice = []
let xmlRequest = ''
await knex.transaction(async trx => {
winston.logger.info(`${uniqueCode} execute payment.sp_payment_req_topup_online`);
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} TRANSACTION 1`);
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} execute payment.sp_payment_req_topup_online(${invoiceDate})`);
invoice = await model.generateInvoice(invoiceDate, trx)
winston.logger.info(`${uniqueCode} result payment.sp_payment_req_topup_online ${JSON.stringify(invoice)}`);
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} result payment.sp_payment_req_topup_online ${JSON.stringify(invoice)}`);
if(invoice){
for (const key in invoice) {
if(invoice.length > 0) for (const key in invoice) {
winston.logger.info(`${uniqueCode} insert posting et ${JSON.stringify(invoice[key])}`)
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} insert posting et ${JSON.stringify(invoice[key])}`)
let postingEt = await model.insertPostingEt(invoice[key], trx)
winston.logger.info(`${uniqueCode} success insert posting : ${postingEt}`)
}
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} success insert posting et : ${JSON.stringify(postingEt)}`)
}
// })
if(invoice){
winston.logger.info(`${uniqueCode} preparing posting FB70 to SAP`);
if(invoice.length > 0){
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} preparing posting FB70 to SAP`);
const url = 'http://piqas.kereta-api.co.id:51500/XISOAPAdapter/MessageServlet?senderParty=&senderService=KCI_ETICKETING_2&receiverParty=&receiverService=&interface=SI_KCI_CMS_FI01&interfaceNamespace=urn:Posting_ETicketing_2'
const credential = {
username: "basisxiqas",
password: "12345678"
}
for (const key in invoice) {
winston.logger.info(`${uniqueCode} REQUEST posting ${invoice[key].c_invoice_no} to SAP`);
// const response = await fetch(url, {
// method: 'POST',
// headers: {
// 'Content-Type': 'text/xml',
// 'Authorization': 'Basic' + base64.encode(credential.username + ":" + credential.password)
// },
// body: xmlRequest
// });
// const soap = await response.text();
const soap = `<SOAP:Envelope
xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Header/>
<SOAP:Body>
<ns0:ZFMCMS_FI_001.Response
xmlns:ns0='urn:sap-com:document:sap:rfc:functions'>
<E_MATDOCUMENTYEAR>2021</E_MATDOCUMENTYEAR>
<E_MATERIALDOCUMENT>4905741245</E_MATERIALDOCUMENT>
<C_T_RETURN/>
</ns0:ZFMCMS_FI_001.Response>
</SOAP:Body>
</SOAP:Envelope>`
winston.logger.info(`${uniqueCode} RESPONSE posting ${invoice[key].c_invoice_no} to SAP : ${soap}`);
let resSAP = {
E_MATDOCUMENTYEAR: '',
E_MATERIALDOCUMENT: '',
ITEM: [],
let xmlHeader = {
doc_header_text : invoice[key].doc_header_text ? invoice[key].doc_header_text : "",
ba: invoice[key].ba ? invoice[key].ba : "",
doc_date : invoice[key].doc_date ? invoice[key].doc_date : "",
posting_date : invoice[key].posting_date ? invoice[key].posting_date : "",
fisc_year : invoice[key].fisc_year ? invoice[key].fisc_year : "",
fisc_period : invoice[key].fisc_period ? invoice[key].fisc_period: "",
doc_type: invoice[key].doc_type ? invoice[key].doc_type : "",
c_invoice_no : invoice[key].c_invoice_no ? invoice[key].c_invoice_no : ""
}
xml2js.parseString(soap, {
explicitArray: false,
tagNameProcessors: [xml2js.processors.stripPrefix]
}, (err, result) => {
if (err) {
winston.logger.error(`${uniqueCode} ERROR parsing XML : ${err}`);
return;
let xmlItem = ['S', 'H'].map((item, index) => {
return {
c_account_code_topup : item == 'S' ? invoice[key].c_account_code_topup : "",
c_account_topup : item == 'H' ? invoice[key].c_account_topup : "",
ba : invoice[key].ba,
amount : invoice[key].amount,
posting_date : invoice[key].posting_date,
c_invoice_no : invoice[key].c_invoice_no,
item_text : `${item == 'S' ? "DEBIT" : "KREDIT"} INVOICE CMS ${invoice[key].doc_header_text}`,
de_cre : item
}
let soapBody = result.Envelope.Body;
if (soapBody.$) delete soapBody.$
resSAP.E_MATDOCUMENTYEAR = soapBody['ZFMCMS_FI_001.Response']['E_MATDOCUMENTYEAR']
resSAP.E_MATERIALDOCUMENT = soapBody['ZFMCMS_FI_001.Response']['E_MATERIALDOCUMENT']
if (!Array.isArray(soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item'])) {
resSAP.ITEM.push(soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item'])
} else {
resSAP.ITEM = soapBody['ZFMCMS_FI_001.Response']['C_T_RETURN']['item']
}
});
// UPDATE CMS
winston.logger.info(`${uniqueCode} UPDATE resposn FB70 to CMS ${JSON.stringify(resSAP)}`);
const cms = await model.setReturnSAP(invoice[key], resSAP, trx)
winston.logger.info(`${uniqueCode} SUKSES UPDATE resposn FB70 to CMS ${JSON.stringify(resSAP)}`);
};
let xmlRequest = helper.generateXMLRequest('ZFMCMS_FI_001', xmlHeader, xmlItem)
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} REQUEST posting ${invoice[key].c_invoice_no} to SAP : ${xmlRequest}`);
const response = await helper.postingSAP(url, xmlRequest)
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} RESPONSE posting ${invoice[key].c_invoice_no} to SAP : ${JSON.stringify(response)}`);
// new transaction
// await knex.transaction(async trx => {
const resSAP = helper.getXMLData(response)
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} TRANSACTION 2`);
// UPDATE CMS
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} SET resposn FB70 to CMS : ${JSON.stringify(resSAP)}`)
const cms = await model.setReturnSAP(invoice[key], resSAP, trx)
winston.logger.info(`SCHEDULER-FB70-${uniqueCode} RESULT CMS : ${JSON.stringify(cms)}`)
// })
}
}
})
result = {
code: "200",
message: "Succes posting",
data: invoice,
};
return res.status(200).json(result);
return JSON.stringify(result)
} catch (error) {
// create log
winston.logger.error(
`500 internal server error - backend server | ${error.message}`
);
return res.status(200).json({
result = {
code: "500",
message:
process.env.NODE_ENV != "production"
? error.message
: "500 internal server error - backend server.",
data: {},
});
}
return JSON.stringify(result)
}
};
module.exports = {
+66 -21
View File
@@ -1,13 +1,13 @@
// GET PARTNER, MERCHANT, TERMINAL FROM TID
const generateInvoice = (invoiceDate, trx) => {
const generateInvoice = async (invoiceDate, trx) => {
let result = trx.select(trx.raw(`* FROM payment.sp_payment_req_topup_online('${invoiceDate}')`))
let result = await trx.select(trx.raw(`* FROM payment.sp_payment_req_topup_online('${invoiceDate}')`))
return result;
}
const insertPostingEt = (invoice, trx) => {
const insertPostingEt = async (invoice, trx) => {
console.log("invoice : ", invoice)
let type = ['S', 'H']
let et = []
@@ -27,19 +27,22 @@ const insertPostingEt = (invoice, trx) => {
ba: invoice.ba,
indeks: (index+1),
totalidx: type.length,
doc_header_text: `POSTING INVOICE CMS ${invoice.c_invoice_no} - ${invoice.doc_header_text}`,
doc_header_text: `POSTING INVOICE CMS ${invoice.c_invoice_no}`,
pos_status : null
}
if(item == 'H'){
data = {...data, ...{
text: `DEBIT INVOICE CMS ${invoice.c_invoice_no} - ${invoice.doc_header_text}`,
text: `DEBIT INVOICE CMS ${invoice.doc_header_text}`,
debit_kredit: item,
account: invoice.c_account_topup,
customer: null
}}
}else{
data = {...data, ...{
text: `KREDIT INVOICE CMS ${invoice.c_invoice_no} - ${invoice.doc_header_text}`,
text: `KREDIT INVOICE CMS ${invoice.doc_header_text}`,
debit_kredit: item,
account: null,
customer: invoice.c_account_code_topup
}}
}
@@ -48,26 +51,68 @@ const insertPostingEt = (invoice, trx) => {
});
posting_et = trx('public.posting_et').insert(et, ['no_dok'])
posting_et = await trx('public.posting_et').insert(et, ['indeks', 'customer', 'account', 'ba', 'fiscal_year', 'amount', 'no_dok', 'text', 'debit_kredit'])
return posting_et
return posting_et[0]
}
const setReturnSAP = (invoice, resSAP, trx) => {
// update invoice
trx('trx.t_d_load_balance').update({
c_return_sap: resSAP.E_MATERIALDOCUMENT
}, ['c_load_balance'])
.whereRaw(`c_load_balance_no IN (SELECT c_load_balance_no FROM payment.t_d_payment_request_topup_online WHERE c_payment = ${invoice.c_invoice_no})`)
// update load balance
trx('trx.t_d_load_balance').update({
c_return_sap: resSAP.E_MATERIALDOCUMENT
})
.whereRaw(`c_load_balance_no IN (SELECT c_load_balance_no FROM payment.t_d_payment_request_topup_online WHERE c_payment = ${invoice.c_invoice_no})`)
// const getPostingEt = async(invoiceDate, trx) => {
// const result = await trx('public.posting_et').select([
// trx.raw(`LPAD(indeks::text, 10, '0') `),
// 'file_name',
// 't_code',
// 'doc_type',
// 'posting_date',
// 'doc_date',
// 'debit_kredit',
// 'account',
// 'amount',
// 'ba',
// 'customer',
// 'fiscal_year',
// 'text',
// 'doc_header_text'
// ])
// }
const setReturnSAP = async (invoice, resSAP, trx) => {
let t_invoice = {}
let t_load_balance = {}
if(resSAP.type == 'S'){
// update invoice
t_invoice = await trx('payment.t_d_invoice').update({
c_return_sap: resSAP.data.E_DOCUMENTNUMBER
}, ['c_invoice_no','c_return_sap'])
.where({
c_invoice_no: invoice.c_invoice_no
});
// update load balance
t_load_balance = await trx('trx.t_d_load_balance').update({
c_return_sap: resSAP.data.E_DOCUMENTNUMBER
}, ['c_load_balance_no', 'c_return_sap'])
.whereRaw(`c_load_balance_no IN (SELECT c_load_balance_no FROM payment.t_d_payment_request_topup_online WHERE c_payment = '${invoice.c_invoice_no}')`)
}
// update posting et
const posting_et = await trx('public.posting_et').update({
pos_status : resSAP.type == 'S' ? 0 : 3,
status0 : resSAP.type,
no_doksap : resSAP.data.E_DOCUMENTNUMBER ? resSAP.data.E_DOCUMENTNUMBER : null,
status1 : resSAP.message ? resSAP.message : null
}, ['file_name','status0']).where({
file_name: invoice.c_invoice_no
})
return {
invoice : t_invoice,
load_balance : t_load_balance,
posting_et : posting_et
}
}
module.exports = {
+23 -2
View File
@@ -11,7 +11,8 @@ const hsmRoute = require("./application/routes/hsm.routes");
const historyRoute = require("./application/routes/history.routes");
const paymentReconRoute = require("./application/routes/paymentrecon.routes");
const invoiceRoute = require("./application/routes/invoice.routes");
const cron = require('node-cron');
const moment = require('moment')
require("dotenv").config();
const app = express();
@@ -53,4 +54,24 @@ app.use("/api/", invoiceRoute);
const PORT = process.env.PORT || 8000;
app.listen(PORT, () => {
winston.logger.info(`Server is running on environment: ${process.env.NODE_ENV.toUpperCase()}`);
});
});
// winston.logger.info(`Response : ${response()}`);
// SCHEDULER FOR POSTING INVOICE
const invoiceSch = require("./application/modules/invoice/invoice.controller");
cron.schedule('*/10 * * * * *', async () => { // Every minute offset 30 seconds
// // console.log()
try {
winston.logger.info(`[${moment().format('YYYY-MM-DD hh:mm:ss')}] : `, await invoiceSch.postingInvoice());
} catch (error) {
winston.logger.info(`[${moment().format('YYYY-MM-DD hh:mm:ss')}] : `, error.message);
}
});
// const soap = `<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header/><SOAP:Body><ns0:ZFMCMS_FI_001.Response xmlns:ns0='urn:sap-com:document:sap:rfc:functions'><E_DOCUMENTNUMBER/><E_DOCUMENTYEAR>0000</E_DOCUMENTYEAR><C_T_RETURN><item><TYPE>E</TYPE><DOC_NUMBER>$</DOC_NUMBER><MESSAGE_1>Error in document: BKPFF $ KAQCLNT100</MESSAGE_1><MESSAGE_2/><MESSAGE_3/><MESSAGE_4/><MESSAGE_5/><MESSAGE_6/><MESSAGE_7/><MESSAGE_8/><MESSAGE_9/><MESSAGE_10/></item><item><TYPE>E</TYPE><DOC_NUMBER>$</DOC_NUMBER><MESSAGE_1>Period 01 is not allowed</MESSAGE_1><MESSAGE_2/><MESSAGE_3/><MESSAGE_4/><MESSAGE_5/><MESSAGE_6/><MESSAGE_7/><MESSAGE_8/><MESSAGE_9/><MESSAGE_10/></item><item><TYPE>E</TYPE><DOC_NUMBER>$</DOC_NUMBER><MESSAGE_1>Period 01 is not valid</MESSAGE_1><MESSAGE_2/><MESSAGE_3/><MESSAGE_4/><MESSAGE_5/><MESSAGE_6/><MESSAGE_7/><MESSAGE_8/><MESSAGE_9/><MESSAGE_10/></item></C_T_RETURN></ns0:ZFMCMS_FI_001.Response></SOAP:Body></SOAP:Envelope>`
// `
// let resSAP = helper.getXMLData({status: 200}, soap)
// winston.logger.info(`SCHEDULER-FB70 RESPONSE posting to SAP ${JSON.stringify(resSAP)}`);
+92 -8
View File
@@ -9,6 +9,7 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"axios": "^0.27.2",
"bcrypt": "^5.0.1",
"body-parser": "^1.19.0",
"check-internet-connected": "^2.0.6",
@@ -327,6 +328,14 @@
"lodash": "^4.17.14"
}
},
"node_modules/@pm2/js-api/node_modules/axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"dependencies": {
"follow-redirects": "^1.14.0"
}
},
"node_modules/@pm2/js-api/node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -601,12 +610,18 @@
"node": "<=0.11.8 || >0.11.10"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"dependencies": {
"follow-redirects": "^1.14.0"
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"node_modules/balanced-match": {
@@ -898,6 +913,17 @@
"text-hex": "1.0.x"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
@@ -1029,6 +1055,14 @@
"node": ">= 6"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
@@ -1352,6 +1386,19 @@
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@@ -4103,6 +4150,14 @@
"lodash": "^4.17.14"
}
},
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.14.0"
}
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -4307,12 +4362,18 @@
"shimmer": "^1.1.0"
}
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
"integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
"requires": {
"follow-redirects": "^1.14.0"
"follow-redirects": "^1.14.9",
"form-data": "^4.0.0"
}
},
"balanced-match": {
@@ -4544,6 +4605,14 @@
"text-hex": "1.0.x"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
@@ -4654,6 +4723,11 @@
"vm2": "^3.9.8"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
@@ -4892,6 +4966,16 @@
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+1
View File
@@ -21,6 +21,7 @@
},
"homepage": "https://github.com/mohamadihsan/topuponline#readme",
"dependencies": {
"axios": "^0.27.2",
"bcrypt": "^5.0.1",
"body-parser": "^1.19.0",
"check-internet-connected": "^2.0.6",