tom-microservice 3.2.33 → 3.2.36

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/README.md CHANGED
@@ -551,7 +551,7 @@ Your [Telegram @BotFather token](https://core.telegram.org/bots#3-how-do-i-creat
551
551
 
552
552
  ## License
553
553
 
554
- **tom** © [Kiko Beats](https://kikobeats.com), Released under the [MIT](https://github.com/Kikobeats/tom-microservice/blob/master/LICENSE.md) License.<br>
554
+ **tom** © [Kiko Beats](https://kikobeats.com), released under the [MIT](https://github.com/Kikobeats/tom-microservice/blob/master/LICENSE.md) License.<br>
555
555
 
556
556
  Spaceman logo by [Nook Fulloption](https://thenounproject.com/term/spaceman/854189) from [the Noun Project](https://thenounproject.com/search/?q=dog%20spaceman&i=854189#).
557
557
 
package/bin/listen.js CHANGED
@@ -4,9 +4,6 @@
4
4
 
5
5
  const express = require('express')
6
6
 
7
- const createRoutes = require('../src/routes')
8
- const logo = require('./logo')
9
-
10
7
  const PORT =
11
8
  process.env.PORT || process.env.port || process.env.TOM_PORT || 3000
12
9
 
@@ -16,11 +13,11 @@ const createServer = routes =>
16
13
  .disable('x-powered-by')
17
14
 
18
15
  module.exports = async (tomConfig, { port = PORT } = {}) => {
19
- const routes = createRoutes(tomConfig)
16
+ const routes = require('../src/routes')(tomConfig)
20
17
 
21
18
  createServer(routes).listen(port, () => {
22
19
  console.log(
23
- logo({
20
+ require('./logo')({
24
21
  header: 'tom is running',
25
22
  description: `http://localhost:${port}`
26
23
  })
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.33",
5
+ "version": "3.2.36",
6
6
  "main": "src",
7
7
  "bin": {
8
8
  "tom": "bin/index.js"
@@ -40,22 +40,22 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "acho": "~4.0.6",
43
- "beauty-error": "~1.2.14",
43
+ "beauty-error": "~1.2.15",
44
44
  "body-parser": "~1.20.0",
45
45
  "compression": "~1.7.4",
46
46
  "cors": "~2.8.5",
47
- "country-vat": "~1.0.5",
47
+ "country-vat": "~1.0.6",
48
48
  "emittery": "~0.11.0",
49
49
  "express": "~4.18.1",
50
50
  "got": "~11.8.3",
51
- "helmet": "~5.0.2",
51
+ "helmet": "~5.1.0",
52
52
  "import-modules": "~2.1.0",
53
53
  "is-buffer": "~2.0.5",
54
54
  "is-european": "~1.0.3",
55
55
  "joycon": "~3.1.1",
56
56
  "jsendp": "~2.1.0",
57
57
  "lodash": "~4.17.21",
58
- "mailgen": "~2.0.24",
58
+ "mailgen": "~2.0.25",
59
59
  "map-values-deep": "~1.0.2",
60
60
  "meow": "~9.0.0",
61
61
  "morgan": "~1.10.0",
@@ -67,10 +67,10 @@
67
67
  "picocolors": "~1.0.0",
68
68
  "pretty-ms": "~7.0.1",
69
69
  "req-country": "~1.2.2",
70
- "request-ip": "~2.1.3",
71
- "stripe": "^9.0.0",
70
+ "request-ip": "~2.2.0",
71
+ "stripe": "^9.5.0",
72
72
  "time-span": "~4.0.0",
73
- "to-query": "~1.6.8",
73
+ "to-query": "~1.6.9",
74
74
  "twit": "~2.2.11",
75
75
  "update-notifier": "~5.1.0"
76
76
  },
@@ -129,7 +129,7 @@
129
129
  "release:tags": "git push --follow-tags origin HEAD:master",
130
130
  "start": "tom",
131
131
  "test": "NODE_ENV=test c8 ava",
132
- "update": "ncu -u",
132
+ "update": "ncu -i",
133
133
  "update:check": "ncu -- --error-level 2"
134
134
  },
135
135
  "license": "MIT",
package/src/index.js CHANGED
@@ -21,7 +21,7 @@ const loadCommand = (cmdName, { config, commands }) => {
21
21
  })
22
22
  }
23
23
 
24
- module.exports = rawConfig => {
24
+ const createTom = rawConfig => {
25
25
  const config = createConfig(rawConfig)
26
26
  return reduce(
27
27
  COMMANDS,
@@ -33,7 +33,11 @@ module.exports = rawConfig => {
33
33
  )
34
34
  }
35
35
 
36
- module.exports.listen = require('../bin/listen')
37
- module.exports.createServer = require('../bin/listen').createServer
36
+ const listen = require('../bin/listen')
37
+
38
+ module.exports = createTom
39
+ module.exports.createTom = createTom
40
+ module.exports.listen = listen
41
+ module.exports.createServer = listen.createServer
38
42
  module.exports.createRoutes = require('./routes')
39
43
  module.exports.createConfig = createConfig
package/src/ward.js CHANGED
@@ -19,9 +19,7 @@ const wardCredential = (config, collection) => {
19
19
  if (!isNil(cond)) {
20
20
  return () => {
21
21
  throw new TypeError(
22
- `Need to specify a valid 'config.${
23
- cond.key
24
- }' or environment variable '${cond.env}'`
22
+ `Need to specify a valid 'config.${cond.key}' or environment variable '${cond.env}'`
25
23
  )
26
24
  }
27
25
  }