quoting-service 17.1.0 → 17.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/server.js +0 -5
- package/src/api/plugins/index.js +0 -31
- package/src/api/plugins/loggingPlugin.js +0 -78
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [17.1.1](https://github.com/mojaloop/quoting-service/compare/v17.1.0...v17.1.1) (2025-01-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Chore
|
|
9
|
+
|
|
10
|
+
* fixed merge to main issue ([#391](https://github.com/mojaloop/quoting-service/issues/391)) ([f54d215](https://github.com/mojaloop/quoting-service/commit/f54d215419149f7cbe3b1d058ac4fad815f08263))
|
|
11
|
+
|
|
5
12
|
## [17.1.0](https://github.com/mojaloop/quoting-service/compare/v17.0.5...v17.1.0) (2025-01-30)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -54,7 +54,6 @@ const { failActionHandler, resolveOpenApiSpecPath } = require('../src/lib/util')
|
|
|
54
54
|
const Config = require('./lib/config')
|
|
55
55
|
const Handlers = require('./api')
|
|
56
56
|
const Routes = require('./api/routes')
|
|
57
|
-
const plugins = require('./api/plugins')
|
|
58
57
|
const dto = require('./lib/dto')
|
|
59
58
|
const { version } = require('../package.json')
|
|
60
59
|
|
|
@@ -157,10 +156,6 @@ const initServer = async function (config, topicNames) {
|
|
|
157
156
|
|
|
158
157
|
// add plugins to the server
|
|
159
158
|
await server.register([
|
|
160
|
-
{
|
|
161
|
-
plugin: plugins.loggingPlugin,
|
|
162
|
-
options: {}
|
|
163
|
-
},
|
|
164
159
|
{
|
|
165
160
|
plugin: Good,
|
|
166
161
|
options: {
|
package/src/api/plugins/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*****
|
|
2
|
-
License
|
|
3
|
-
--------------
|
|
4
|
-
Copyright © 2020-2025 Mojaloop Foundation
|
|
5
|
-
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
Contributors
|
|
12
|
-
--------------
|
|
13
|
-
This is the official list of the Mojaloop project contributors for this file.
|
|
14
|
-
Names of the original copyright holders (individuals or organizations)
|
|
15
|
-
should be listed with a '*' in the first column. People who have
|
|
16
|
-
contributed from an organization can be listed under the organization
|
|
17
|
-
that actually holds the copyright for their contributions (see the
|
|
18
|
-
Mojaloop Foundation for an example). Those individuals should have
|
|
19
|
-
their names indented and be marked with a '-'. Email address can be added
|
|
20
|
-
optionally within square brackets <email>.
|
|
21
|
-
|
|
22
|
-
* Mojaloop Foundation
|
|
23
|
-
- Name Surname <name.surname@mojaloop.io>
|
|
24
|
-
|
|
25
|
-
*****/
|
|
26
|
-
|
|
27
|
-
const loggingPlugin = require('./loggingPlugin')
|
|
28
|
-
|
|
29
|
-
module.exports = {
|
|
30
|
-
loggingPlugin
|
|
31
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/*****
|
|
2
|
-
License
|
|
3
|
-
--------------
|
|
4
|
-
Copyright © 2020-2025 Mojaloop Foundation
|
|
5
|
-
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
Contributors
|
|
12
|
-
--------------
|
|
13
|
-
This is the official list of the Mojaloop project contributors for this file.
|
|
14
|
-
Names of the original copyright holders (individuals or organizations)
|
|
15
|
-
should be listed with a '*' in the first column. People who have
|
|
16
|
-
contributed from an organization can be listed under the organization
|
|
17
|
-
that actually holds the copyright for their contributions (see the
|
|
18
|
-
Mojaloop Foundation for an example). Those individuals should have
|
|
19
|
-
their names indented and be marked with a '-'. Email address can be added
|
|
20
|
-
optionally within square brackets <email>.
|
|
21
|
-
|
|
22
|
-
* Mojaloop Foundation
|
|
23
|
-
- Name Surname <name.surname@mojaloop.io>
|
|
24
|
-
|
|
25
|
-
* Infitx
|
|
26
|
-
- Vijay Kumar Guthi <vijaya.guthi@infitx.com>
|
|
27
|
-
- Kevin Leyow <kevin.leyow@infitx.com>
|
|
28
|
-
- Kalin Krustev <kalin.krustev@infitx.com>
|
|
29
|
-
- Steven Oderayi <steven.oderayi@infitx.com>
|
|
30
|
-
- Eugen Klymniuk <eugen.klymniuk@infitx.com>
|
|
31
|
-
|
|
32
|
-
--------------
|
|
33
|
-
|
|
34
|
-
******/
|
|
35
|
-
|
|
36
|
-
const { asyncStorage } = require('@mojaloop/central-services-logger/src/contextLogger')
|
|
37
|
-
const { logger } = require('../../lib') // pass though options
|
|
38
|
-
|
|
39
|
-
const loggingPlugin = {
|
|
40
|
-
name: 'loggingPlugin',
|
|
41
|
-
version: '1.0.0',
|
|
42
|
-
once: true,
|
|
43
|
-
register: async (server, options) => {
|
|
44
|
-
// const { logger } = options;
|
|
45
|
-
server.ext({
|
|
46
|
-
type: 'onPreHandler',
|
|
47
|
-
method: (request, h) => {
|
|
48
|
-
const { path, method, headers, payload, query } = request
|
|
49
|
-
const { remoteAddress } = request.info
|
|
50
|
-
const requestId = request.info.id = `${request.info.id}__${headers.traceid}`
|
|
51
|
-
asyncStorage.enterWith({ requestId })
|
|
52
|
-
|
|
53
|
-
logger.isInfoEnabled && logger.info(`[==> req] ${method.toUpperCase()} ${path}`, { headers, payload, query, remoteAddress })
|
|
54
|
-
return h.continue
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
server.ext({
|
|
59
|
-
type: 'onPreResponse',
|
|
60
|
-
method: (request, h) => {
|
|
61
|
-
if (logger.isInfoEnabled) {
|
|
62
|
-
const { path, method, headers, payload, query, response } = request
|
|
63
|
-
const { received } = request.info
|
|
64
|
-
|
|
65
|
-
const statusCode = response instanceof Error
|
|
66
|
-
? response.output?.statusCode
|
|
67
|
-
: response.statusCode
|
|
68
|
-
const respTimeSec = ((Date.now() - received) / 1000).toFixed(3)
|
|
69
|
-
|
|
70
|
-
logger.info(`[<== ${statusCode}][${respTimeSec} s] ${method.toUpperCase()} ${path}`, { headers, payload, query })
|
|
71
|
-
}
|
|
72
|
-
return h.continue
|
|
73
|
-
}
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
module.exports = loggingPlugin
|