tom-microservice 3.9.1 → 3.9.2
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/package.json +3 -2
- package/src/interface/action.js +4 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "tom-microservice",
|
|
3
3
|
"description": "Tom creates customers, subscriptions plans & send notifications.",
|
|
4
4
|
"homepage": "https://tom.js.org",
|
|
5
|
-
"version": "3.9.
|
|
5
|
+
"version": "3.9.2",
|
|
6
6
|
"main": "src",
|
|
7
7
|
"bin": {
|
|
8
8
|
"tom": "bin/index.js"
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"subscriptions"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@kikobeats/time-span": "~1.0.2",
|
|
42
43
|
"acho": "~4.0.6",
|
|
43
44
|
"beauty-error": "~1.2.15",
|
|
44
45
|
"cors": "~2.8.5",
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
]
|
|
145
146
|
},
|
|
146
147
|
"nano-staged": {
|
|
147
|
-
"*.js
|
|
148
|
+
"*.js": [
|
|
148
149
|
"prettier-standard"
|
|
149
150
|
],
|
|
150
151
|
"*.md": [
|
package/src/interface/action.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const timeSpan = require('@kikobeats/time-span')({
|
|
4
|
+
format: require('pretty-ms')
|
|
5
|
+
})
|
|
3
6
|
const { omit, isEmpty, split, first, reduce } = require('lodash')
|
|
4
7
|
const { randomUUID } = require('crypto')
|
|
5
|
-
const timeSpan = require('time-span')
|
|
6
|
-
const prettyMs = require('pretty-ms')
|
|
7
8
|
const pRetry = require('p-retry')
|
|
8
9
|
|
|
9
10
|
const printError = require('../log/print-error')
|
|
@@ -28,7 +29,7 @@ module.exports = ({ eventName, fn, tom }) => {
|
|
|
28
29
|
tom.emit(eventName, data)
|
|
29
30
|
])
|
|
30
31
|
|
|
31
|
-
time =
|
|
32
|
+
time = time()
|
|
32
33
|
|
|
33
34
|
const output = reduce(
|
|
34
35
|
meta,
|