From dc1bf20c2b0e5d56d0e1f990d045a8ba8b9b85fd Mon Sep 17 00:00:00 2001 From: Steven Oderayi Date: Mon, 28 Oct 2024 15:34:17 +0100 Subject: [PATCH] fix: uuid/ulid regex --- package-lock.json | 45 +++++++++++++++++----------------- package.json | 6 ++--- src/api/participants/routes.js | 4 +-- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4f502699f..1dca1f7d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@hapi/basic": "7.0.2", "@hapi/catbox-memory": "6.0.2", "@hapi/good": "9.0.1", - "@hapi/hapi": "21.3.10", + "@hapi/hapi": "21.3.12", "@hapi/inert": "7.1.0", "@hapi/joi": "17.1.1", "@hapi/vision": "7.0.3", @@ -20,7 +20,7 @@ "@mojaloop/central-services-health": "15.0.0", "@mojaloop/central-services-logger": "11.5.1", "@mojaloop/central-services-metrics": "12.0.8", - "@mojaloop/central-services-shared": "18.10.1-snapshot.3", + "@mojaloop/central-services-shared": "18.11.0", "@mojaloop/central-services-stream": "11.3.1", "@mojaloop/database-lib": "11.0.6", "@mojaloop/event-sdk": "14.1.1", @@ -60,7 +60,7 @@ "jsonpath": "1.1.1", "mock-knex": "0.4.13", "nodemon": "3.1.7", - "npm-check-updates": "17.1.4", + "npm-check-updates": "17.1.8", "nyc": "17.1.0", "pre-commit": "1.2.2", "proxyquire": "2.1.3", @@ -795,9 +795,9 @@ } }, "node_modules/@hapi/bounce": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-3.0.1.tgz", - "integrity": "sha512-G+/Pp9c1Ha4FDP+3Sy/Xwg2O4Ahaw3lIZFSX+BL4uWi64CmiETuZPxhKDUD4xBMOUZbBlzvO8HjiK8ePnhBadA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-3.0.2.tgz", + "integrity": "sha512-d0XmlTi3H9HFDHhQLjg4F4auL1EY3Wqj7j7/hGDhFFe6xAbnm3qiGrXeT93zZnPH8gH+SKAFYiRzu26xkXcH3g==", "dependencies": { "@hapi/boom": "^10.0.1", "@hapi/hoek": "^11.0.2" @@ -894,19 +894,19 @@ "deprecated": "This version has been deprecated and is no longer supported or maintained" }, "node_modules/@hapi/hapi": { - "version": "21.3.10", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.10.tgz", - "integrity": "sha512-CmEcmTREW394MaGGKvWpoOK4rG8tKlpZLs30tbaBzhCrhiL2Ti/HARek9w+8Ya4nMBGcd+kDAzvU44OX8Ms0Jg==", + "version": "21.3.12", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-21.3.12.tgz", + "integrity": "sha512-GCUP12dkb3QMjpFl+wEFO73nqKRmsnD5um/QDOn6lj2GjGBrDXPcT194mNARO+PPNXZOR4KmvIpHt/lceUncfg==", "dependencies": { - "@hapi/accept": "^6.0.1", + "@hapi/accept": "^6.0.3", "@hapi/ammo": "^6.0.1", "@hapi/boom": "^10.0.1", - "@hapi/bounce": "^3.0.1", + "@hapi/bounce": "^3.0.2", "@hapi/call": "^9.0.1", "@hapi/catbox": "^12.1.1", "@hapi/catbox-memory": "^6.0.2", "@hapi/heavy": "^8.0.1", - "@hapi/hoek": "^11.0.2", + "@hapi/hoek": "^11.0.6", "@hapi/mimos": "^7.0.1", "@hapi/podium": "^5.0.1", "@hapi/shot": "^6.0.1", @@ -914,7 +914,7 @@ "@hapi/statehood": "^8.1.1", "@hapi/subtext": "^8.1.0", "@hapi/teamwork": "^6.0.0", - "@hapi/topo": "^6.0.1", + "@hapi/topo": "^6.0.2", "@hapi/validate": "^2.0.1" }, "engines": { @@ -950,9 +950,9 @@ } }, "node_modules/@hapi/hoek": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", - "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==" + "version": "11.0.6", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.6.tgz", + "integrity": "sha512-mu8He+jghTDJ+la/uGBT4b1rqQdqFADZiXhzd98b3XW5nb/c+5woXx3FiNco2nm4wPJFHQVRGxYeWeSDPIYpYw==" }, "node_modules/@hapi/inert": { "version": "7.1.0", @@ -1618,9 +1618,9 @@ } }, "node_modules/@mojaloop/central-services-shared": { - "version": "18.10.1-snapshot.3", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-18.10.1-snapshot.3.tgz", - "integrity": "sha512-jLvAAj6VGPxC2PqsH0yry7YlXHook4MdYLA8VDyxdJVtJijhFjVbCj3C0c4qCUJHnufZlt+AR2/ktZ9mCndtIw==", + "version": "18.11.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-18.11.0.tgz", + "integrity": "sha512-1yym7JNT7ZVSzH755AY7piqd69IxqRJpWekjj9RnE5lTnjOS03wckoy4Ns5gq0Btpk8a864bRZNJbsSxovRkPg==", "dependencies": { "@hapi/catbox": "12.1.1", "@hapi/catbox-memory": "5.0.1", @@ -9542,11 +9542,10 @@ } }, "node_modules/npm-check-updates": { - "version": "17.1.4", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.4.tgz", - "integrity": "sha512-crOUeN2GngqlkRCFQ/zi1zsneWd9IGZgIfAWYGAuhYiPnfbBTmJBL7Yq1wI0e1dsW8CfWc+h348WmfCREqeOBA==", + "version": "17.1.8", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.8.tgz", + "integrity": "sha512-oVPYIdl4NHyz6+TXWWko7c1+cqp7bm+D2fNPjIWQxWm+plJ7cyePc2WcXRKbfuVEnR2QtvBhL58rolkk/H687g==", "dev": true, - "license": "Apache-2.0", "bin": { "ncu": "build/cli.js", "npm-check-updates": "build/cli.js" diff --git a/package.json b/package.json index f366b9597..1834897de 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "@hapi/basic": "7.0.2", "@hapi/catbox-memory": "6.0.2", "@hapi/good": "9.0.1", - "@hapi/hapi": "21.3.10", + "@hapi/hapi": "21.3.12", "@hapi/inert": "7.1.0", "@hapi/joi": "17.1.1", "@hapi/vision": "7.0.3", @@ -92,7 +92,7 @@ "@mojaloop/central-services-health": "15.0.0", "@mojaloop/central-services-logger": "11.5.1", "@mojaloop/central-services-metrics": "12.0.8", - "@mojaloop/central-services-shared": "18.10.1-snapshot.3", + "@mojaloop/central-services-shared": "18.11.0", "@mojaloop/central-services-stream": "11.3.1", "@mojaloop/database-lib": "11.0.6", "@mojaloop/event-sdk": "14.1.1", @@ -135,7 +135,7 @@ "jsonpath": "1.1.1", "mock-knex": "0.4.13", "nodemon": "3.1.7", - "npm-check-updates": "17.1.4", + "npm-check-updates": "17.1.8", "nyc": "17.1.0", "pre-commit": "1.2.2", "proxyquire": "2.1.3", diff --git a/src/api/participants/routes.js b/src/api/participants/routes.js index df275b68b..3a7ca6223 100644 --- a/src/api/participants/routes.js +++ b/src/api/participants/routes.js @@ -307,7 +307,7 @@ module.exports = [ description: 'Record Funds In or Out of participant account', validate: { payload: Joi.object({ - transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]}$|^[0-9A-HJKMNP-TV-Z]{26}$6})$/).required(), + transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26})$/).required(), externalReference: Joi.string().required(), action: Joi.string().required().valid('recordFundsIn', 'recordFundsOutPrepareReserve').label('action is missing or not supported'), reason: Joi.string().required(), @@ -345,7 +345,7 @@ module.exports = [ params: Joi.object({ name: nameValidator, id: Joi.number().integer().positive(), - transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]}$|^[0-9A-HJKMNP-TV-Z]{26}$6})$/).required() + transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$|^[0-9A-HJKMNP-TV-Z]{26})$/).required() }) } }