tom-microservice 3.2.9 → 3.2.13
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 +8 -0
- package/bin/help.js +12 -11
- package/package.json +9 -10
- package/src/interface/action.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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
|
+
### 3.2.13 (2021-10-12)
|
|
6
|
+
|
|
7
|
+
### 3.2.12 (2021-09-23)
|
|
8
|
+
|
|
9
|
+
### 3.2.11 (2021-09-13)
|
|
10
|
+
|
|
11
|
+
### [3.2.10](https://github.com/kikobeats/tom-microservice/compare/v3.2.9...v3.2.10) (2021-07-19)
|
|
12
|
+
|
|
5
13
|
### 3.2.9 (2021-07-05)
|
|
6
14
|
|
|
7
15
|
### 3.2.8 (2021-07-05)
|
package/bin/help.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const colors = require('picocolors')
|
|
4
|
+
|
|
3
5
|
const logo = require('./logo')
|
|
4
|
-
const chalk = require('chalk')
|
|
5
6
|
|
|
6
7
|
module.exports = `
|
|
7
|
-
${
|
|
8
|
+
${colors.dim(logo({ header: 'tom microservice – https://tom.js.org' }))}
|
|
8
9
|
|
|
9
|
-
${
|
|
10
|
+
${colors.dim('Usage')}
|
|
10
11
|
|
|
11
12
|
$ tom [<flags>] <command> [<args> ...]
|
|
12
13
|
|
|
13
|
-
${
|
|
14
|
+
${colors.dim('Options')}
|
|
14
15
|
|
|
15
16
|
-c, --config Specify a configuration file path
|
|
16
17
|
-h, --help Show this usage information
|
|
17
18
|
-p, --port <n> Port to listen on (defaults to 3000)
|
|
18
19
|
-v, --version Output the version number
|
|
19
20
|
|
|
20
|
-
${
|
|
21
|
+
${colors.dim('Examples')}
|
|
21
22
|
|
|
22
|
-
${
|
|
23
|
+
${colors.dim('–')} Run microservice on port 1337
|
|
23
24
|
|
|
24
|
-
$ tom ${
|
|
25
|
+
$ tom ${colors.dim('-p 1337')}
|
|
25
26
|
|
|
26
|
-
${
|
|
27
|
+
${colors.dim('–')} Send a email notification from CLI
|
|
27
28
|
|
|
28
|
-
$ tom ${
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
$ tom ${colors.dim(
|
|
30
|
+
"--command=notification.email --templateId=welcome --to=hello@kikobeats.com --subject='hello world'"
|
|
31
|
+
)}`
|
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.2.
|
|
5
|
+
"version": "3.2.13",
|
|
6
6
|
"main": "src",
|
|
7
7
|
"bin": {
|
|
8
8
|
"tom": "bin/index.js"
|
|
@@ -42,12 +42,11 @@
|
|
|
42
42
|
"acho": "~4.0.6",
|
|
43
43
|
"beauty-error": "~1.2.8",
|
|
44
44
|
"body-parser": "~1.19.0",
|
|
45
|
-
"chalk": "~4.1.1",
|
|
46
45
|
"compression": "~1.7.4",
|
|
47
46
|
"cors": "~2.8.5",
|
|
48
|
-
"cosmiconfig": "~7.0.
|
|
47
|
+
"cosmiconfig": "~7.0.1",
|
|
49
48
|
"country-vat": "~1.0.0",
|
|
50
|
-
"emittery": "~0.
|
|
49
|
+
"emittery": "~0.10.0",
|
|
51
50
|
"express": "~4.17.1",
|
|
52
51
|
"got": "~11.8.2",
|
|
53
52
|
"helmet": "~4.6.0",
|
|
@@ -56,20 +55,20 @@
|
|
|
56
55
|
"is-european": "~1.0.3",
|
|
57
56
|
"jsendp": "~2.1.0",
|
|
58
57
|
"lodash": "~4.17.21",
|
|
59
|
-
"mailgen": "~2.0.
|
|
58
|
+
"mailgen": "~2.0.15",
|
|
60
59
|
"map-values-deep": "~1.0.2",
|
|
61
60
|
"meow": "~9.0.0",
|
|
62
61
|
"morgan": "~1.10.0",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"ow": "~0.26.0",
|
|
62
|
+
"nodemailer": "~6.7.0",
|
|
63
|
+
"ow": "~0.28.0",
|
|
66
64
|
"p-reflect": "~2.1.0",
|
|
67
|
-
"p-retry": "~4.6.
|
|
65
|
+
"p-retry": "~4.6.1",
|
|
68
66
|
"p-waterfall": "~2.1.1",
|
|
67
|
+
"picocolors": "~0.2.1",
|
|
69
68
|
"pretty-ms": "~7.0.1",
|
|
70
69
|
"req-country": "~1.2.2",
|
|
71
70
|
"request-ip": "~2.1.3",
|
|
72
|
-
"stripe": "^8.
|
|
71
|
+
"stripe": "^8.174.0",
|
|
73
72
|
"time-span": "~4.0.0",
|
|
74
73
|
"to-query": "~1.6.1",
|
|
75
74
|
"twit": "~2.2.11",
|
package/src/interface/action.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const { omit, isEmpty, split, first, reduce } = require('lodash')
|
|
4
|
-
const {
|
|
4
|
+
const { randomUUID } = require('crypto')
|
|
5
5
|
const timeSpan = require('time-span')
|
|
6
6
|
const prettyMs = require('pretty-ms')
|
|
7
7
|
const pRetry = require('p-retry')
|
|
@@ -37,7 +37,7 @@ module.exports = ({ eventName, fn, tom }) => {
|
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
if (!isEmpty(output)) {
|
|
40
|
-
log.debug({ id:
|
|
40
|
+
log.debug({ id: randomUUID(), ...omit(output, ['headers']), time })
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
return output
|