Comparing version 2.0.7 to 2.0.8
@@ -16,8 +16,9 @@ "use strict"; | ||
const convertBridgeRoutesToServerRoutes = (routes, prefix = '') => { | ||
for (const [key, value] of Object.entries(routes)) { | ||
if ((0, core_1.isBridgeHandler)(value)) | ||
serverRoutes[`${prefix}/${key}`] = { endpoint: value }; | ||
else if ((0, types_1.isBridgeRoutes)(value)) | ||
(0, exports.convertBridgeRoutesToServerRoutes)(value, `${prefix}/${key}`); | ||
} | ||
if (typeof routes === 'object') | ||
for (const [key, value] of Object.entries(routes)) { | ||
if ((0, core_1.isBridgeHandler)(value)) | ||
serverRoutes[`${prefix}/${key}`] = { endpoint: value }; | ||
else if ((0, types_1.isBridgeRoutes)(value)) | ||
(0, exports.convertBridgeRoutesToServerRoutes)(value, `${prefix}/${key}`); | ||
} | ||
return { ...defaultServerRoutes, ...serverRoutes }; | ||
@@ -24,0 +25,0 @@ }; |
{ | ||
"name": "bridge", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Bridge is a new way of developing your api's", | ||
@@ -5,0 +5,0 @@ "author": "El Ouahabi Nabil", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99231
1075