tom-microservice 3.2.17 → 3.2.21

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.
Files changed (2) hide show
  1. package/package.json +13 -17
  2. package/src/config/load.js +13 -2
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.17",
5
+ "version": "3.2.21",
6
6
  "main": "src",
7
7
  "bin": {
8
8
  "tom": "bin/index.js"
@@ -41,25 +41,25 @@
41
41
  "dependencies": {
42
42
  "acho": "~4.0.6",
43
43
  "beauty-error": "~1.2.9",
44
- "body-parser": "~1.19.0",
44
+ "body-parser": "~1.19.1",
45
45
  "compression": "~1.7.4",
46
46
  "cors": "~2.8.5",
47
- "cosmiconfig": "~7.0.1",
48
47
  "country-vat": "~1.0.0",
49
48
  "emittery": "~0.10.0",
50
- "express": "~4.17.1",
49
+ "express": "~4.17.2",
51
50
  "got": "~11.8.3",
52
- "helmet": "~4.6.0",
51
+ "helmet": "~5.0.1",
53
52
  "import-modules": "~2.1.0",
54
53
  "is-buffer": "~2.0.5",
55
54
  "is-european": "~1.0.3",
55
+ "joycon": "~3.1.1",
56
56
  "jsendp": "~2.1.0",
57
57
  "lodash": "~4.17.21",
58
58
  "mailgen": "~2.0.16",
59
59
  "map-values-deep": "~1.0.2",
60
60
  "meow": "~9.0.0",
61
61
  "morgan": "~1.10.0",
62
- "nodemailer": "~6.7.1",
62
+ "nodemailer": "~6.7.2",
63
63
  "ow": "~0.28.1",
64
64
  "p-reflect": "~2.1.0",
65
65
  "p-retry": "~4.6.1",
@@ -68,9 +68,9 @@
68
68
  "pretty-ms": "~7.0.1",
69
69
  "req-country": "~1.2.2",
70
70
  "request-ip": "~2.1.3",
71
- "stripe": "^8.191.0",
71
+ "stripe": "^8.199.0",
72
72
  "time-span": "~4.0.0",
73
- "to-query": "~1.6.1",
73
+ "to-query": "~1.6.2",
74
74
  "twit": "~2.2.11",
75
75
  "update-notifier": "~5.1.0"
76
76
  },
@@ -94,8 +94,7 @@
94
94
  "gulp-cssnano": "latest",
95
95
  "gulp-strip-css-comments": "latest",
96
96
  "gulp-uglify": "latest",
97
- "imagemin-lint-staged": "latest",
98
- "lint-staged": "latest",
97
+ "nano-staged": "latest",
99
98
  "npm-check-updates": "latest",
100
99
  "nyc": "latest",
101
100
  "prettier-standard": "latest",
@@ -145,23 +144,20 @@
145
144
  "@commitlint/config-conventional"
146
145
  ]
147
146
  },
148
- "lint-staged": {
149
- "package.json": [
150
- "finepack --sort-ignore-object-at ava"
151
- ],
147
+ "nano-staged": {
152
148
  "*.js,!*.min.js": [
153
149
  "prettier-standard"
154
150
  ],
155
151
  "*.md": [
156
152
  "standard-markdown"
157
153
  ],
158
- "*.{png,jpeg,jpg,gif,svg}": [
159
- "imagemin-lint-staged"
154
+ "package.json": [
155
+ "finepack --sort-ignore-object-at ava"
160
156
  ]
161
157
  },
162
158
  "simple-git-hooks": {
163
159
  "commit-msg": "npx commitlint --edit",
164
- "pre-commit": "npx lint-staged"
160
+ "pre-commit": "npx nano-staged"
165
161
  },
166
162
  "standard": {
167
163
  "env": [
@@ -1,8 +1,19 @@
1
1
  'use strict'
2
2
 
3
- const cosmiconfig = require('cosmiconfig').cosmiconfig('tom')
3
+ const JoyCon = require('joycon')
4
4
 
5
5
  module.exports = async (cwd = process.cwd()) => {
6
- const { config } = (await cosmiconfig.search(cwd)) || {}
6
+ const joycon = new JoyCon({
7
+ cwd,
8
+ packageKey: 'tom',
9
+ files: [
10
+ 'package.json',
11
+ '.tomrc',
12
+ '.tomrc.json',
13
+ '.tomrc.js',
14
+ 'tom.config.js'
15
+ ]
16
+ })
17
+ const { data: config = {} } = (await joycon.load()) || {}
7
18
  return config
8
19
  }