tom-microservice 3.9.8 → 3.9.10
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
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.10",
|
|
6
6
|
"main": "src",
|
|
7
7
|
"bin": {
|
|
8
8
|
"tom": "bin/index.js"
|
|
@@ -40,12 +40,13 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@kikobeats/time-span": "~1.0.2",
|
|
43
|
+
"@lukeed/ms": "~2.0.2",
|
|
43
44
|
"acho": "~4.0.6",
|
|
44
45
|
"beauty-error": "~1.2.15",
|
|
45
46
|
"cors": "~2.8.5",
|
|
46
47
|
"country-vat": "~1.0.8",
|
|
47
48
|
"got": "~11.8.6",
|
|
48
|
-
"helmet": "~7.
|
|
49
|
+
"helmet": "~7.1.0",
|
|
49
50
|
"http-body": "~1.0.4",
|
|
50
51
|
"http-compression": "~1.0.5",
|
|
51
52
|
"import-modules": "~2.1.0",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"p-retry": "~4.6.1",
|
|
65
66
|
"p-waterfall": "~2.1.1",
|
|
66
67
|
"picocolors": "~1.0.0",
|
|
67
|
-
"
|
|
68
|
+
"pupa": "~2.1.1",
|
|
68
69
|
"req-country": "~1.2.7",
|
|
69
70
|
"request-ip": "~3.3.0",
|
|
70
71
|
"router-http": "~1.0.1",
|
|
@@ -79,17 +80,17 @@
|
|
|
79
80
|
"@faker-js/faker": "latest",
|
|
80
81
|
"@ksmithut/prettier-standard": "latest",
|
|
81
82
|
"async-listen": "latest",
|
|
82
|
-
"ava": "
|
|
83
|
+
"ava": "5",
|
|
83
84
|
"browser-sync": "latest",
|
|
84
85
|
"c8": "latest",
|
|
85
86
|
"ci-env": "latest",
|
|
86
87
|
"ci-publish": "latest",
|
|
87
88
|
"concurrently": "latest",
|
|
88
|
-
"conventional-github-releaser": "latest",
|
|
89
89
|
"coveralls": "latest",
|
|
90
90
|
"finepack": "latest",
|
|
91
91
|
"git-authors-cli": "latest",
|
|
92
92
|
"git-dirty": "latest",
|
|
93
|
+
"github-generate-release": "latest",
|
|
93
94
|
"gulp": "latest",
|
|
94
95
|
"gulp-autoprefixer": "latest",
|
|
95
96
|
"gulp-concat": "latest",
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
"prerelease": "npm run update:check",
|
|
125
126
|
"pretest": "npm run lint",
|
|
126
127
|
"release": "git-authors-cli && git add package.json && standard-version -a",
|
|
127
|
-
"release:github": "
|
|
128
|
+
"release:github": "github-generate-release",
|
|
128
129
|
"release:tags": "git push --follow-tags origin HEAD:master",
|
|
129
130
|
"start": "tom",
|
|
130
131
|
"test": "NODE_ENV=test c8 ava",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const { pick, isNil, get } = require('lodash')
|
|
4
4
|
const nodemailer = require('nodemailer')
|
|
5
5
|
const Mailgen = require('mailgen')
|
|
6
|
+
const pupa = require('pupa')
|
|
6
7
|
|
|
7
8
|
const { wardCredential, ward, is } = require('../../ward')
|
|
8
9
|
const compile = require('../../compile')
|
|
@@ -25,7 +26,10 @@ module.exports = ({ config }) => {
|
|
|
25
26
|
name: get(config, 'company.site'),
|
|
26
27
|
link: get(config, 'company.link'),
|
|
27
28
|
logo: get(config, 'company.logo'),
|
|
28
|
-
copyright: get(config, 'company.copyright')
|
|
29
|
+
copyright: pupa(get(config, 'company.copyright'), {
|
|
30
|
+
company: get(config, 'company'),
|
|
31
|
+
year: new Date().getFullYear()
|
|
32
|
+
})
|
|
29
33
|
}
|
|
30
34
|
})
|
|
31
35
|
|
package/src/interface/action.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const timeSpan = require('@kikobeats/time-span')({
|
|
4
|
-
format: require('pretty-ms')
|
|
5
|
-
})
|
|
6
3
|
const { omit, isEmpty, split, first, reduce } = require('lodash')
|
|
7
4
|
const { randomUUID } = require('crypto')
|
|
8
5
|
const pRetry = require('p-retry')
|
|
9
6
|
|
|
7
|
+
const timeSpan = require('@kikobeats/time-span')({
|
|
8
|
+
format: require('@lukeed/ms').format
|
|
9
|
+
})
|
|
10
|
+
|
|
10
11
|
const printError = require('../log/print-error')
|
|
11
12
|
const createLog = require('../log/create-log')
|
|
12
13
|
|
|
@@ -42,11 +43,9 @@ module.exports = ({ eventName, fn, tom }) => {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
return output
|
|
45
|
-
} catch (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
printError({ log, err })
|
|
49
|
-
throw err
|
|
46
|
+
} catch (error) {
|
|
47
|
+
printError({ log, error })
|
|
48
|
+
throw error
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
}
|
package/src/log/print-error.js
CHANGED