netlify-cli 8.4.0 → 8.5.0
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/npm-shrinkwrap.json +1293 -752
- package/package.json +8 -7
- package/src/commands/env/env-list.js +42 -8
- package/src/functions-templates/javascript/stripe-charge/package-lock.json +6 -6
- package/src/functions-templates/javascript/stripe-subscription/package-lock.json +6 -6
- package/src/functions-templates/typescript/hello-world/package-lock.json +7 -7
- package/src/utils/command-helpers.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
3
|
"description": "Netlify command line tool",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.5.0",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Mathias Biilmann <matt@netlify.com> (https://twitter.com/biilmann)",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"prettier": "--ignore-path .gitignore --loglevel=warn \"{src,tools,scripts,site,tests,.github}/**/*.{js,md,yml,json,html}\" \"*.{js,yml,json,html}\" \".*.{js,yml,json,html}\" \"!CHANGELOG.md\" \"!npm-shrinkwrap.json\" \"!.github/**/*.md\""
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@netlify/build": "^26.0.
|
|
82
|
-
"@netlify/config": "^17.0.
|
|
81
|
+
"@netlify/build": "^26.0.2",
|
|
82
|
+
"@netlify/config": "^17.0.2",
|
|
83
83
|
"@netlify/framework-info": "^7.0.0",
|
|
84
84
|
"@netlify/local-functions-proxy": "^1.1.1",
|
|
85
85
|
"@netlify/plugin-edge-handlers": "^3.0.0",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"@netlify/zip-it-and-ship-it": "5.3.1",
|
|
89
89
|
"@octokit/rest": "^18.0.0",
|
|
90
90
|
"@sindresorhus/slugify": "^1.1.0",
|
|
91
|
+
"ansi-escapes": "^5.0.0",
|
|
91
92
|
"ansi-styles": "^5.0.0",
|
|
92
93
|
"ascii-table": "0.0.9",
|
|
93
94
|
"backoff": "^2.5.0",
|
|
@@ -140,6 +141,7 @@
|
|
|
140
141
|
"locate-path": "^6.0.0",
|
|
141
142
|
"lodash": "^4.17.20",
|
|
142
143
|
"log-symbols": "^4.0.0",
|
|
144
|
+
"log-update": "^5.0.0",
|
|
143
145
|
"make-dir": "^3.0.0",
|
|
144
146
|
"memoize-one": "^6.0.0",
|
|
145
147
|
"minimist": "^1.2.5",
|
|
@@ -190,11 +192,10 @@
|
|
|
190
192
|
"devDependencies": {
|
|
191
193
|
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
192
194
|
"@babel/preset-react": "^7.12.13",
|
|
193
|
-
"@commitlint/cli": "^
|
|
194
|
-
"@commitlint/config-conventional": "^
|
|
195
|
-
"@netlify/eslint-config-node": "^4.0.
|
|
195
|
+
"@commitlint/cli": "^16.0.0",
|
|
196
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
197
|
+
"@netlify/eslint-config-node": "^4.0.4",
|
|
196
198
|
"ava": "^3.15.0",
|
|
197
|
-
"eslint-plugin-local-rules": "file:tools/eslint-rules",
|
|
198
199
|
"eslint-plugin-sort-destructure-keys": "^1.3.5",
|
|
199
200
|
"fast-glob": "^3.2.7",
|
|
200
201
|
"form-data": "^4.0.0",
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
const AsciiTable = require('ascii-table')
|
|
3
|
+
const { isCI } = require('ci-info')
|
|
4
|
+
const inquirer = require('inquirer')
|
|
3
5
|
const isEmpty = require('lodash/isEmpty')
|
|
4
6
|
|
|
5
|
-
const { log, logJson } = require('../../utils')
|
|
7
|
+
const { chalk, log, logJson } = require('../../utils')
|
|
8
|
+
|
|
9
|
+
const [logUpdatePromise, ansiEscapesPromise] = [import('log-update'), import('ansi-escapes')]
|
|
10
|
+
|
|
11
|
+
const MASK_LENGTH = 50
|
|
12
|
+
const MASK = '*'.repeat(MASK_LENGTH)
|
|
13
|
+
|
|
14
|
+
const getTable = ({ environment, hideValues }) => {
|
|
15
|
+
const table = new AsciiTable(`Environment variables`)
|
|
16
|
+
table.setHeading('Key', 'Value')
|
|
17
|
+
table.addRowMatrix(Object.entries(environment).map(([key, value]) => [key, hideValues ? MASK : value]))
|
|
18
|
+
return table.toString()
|
|
19
|
+
}
|
|
6
20
|
|
|
7
21
|
/**
|
|
8
22
|
* The env:list command
|
|
@@ -34,17 +48,37 @@ const envList = async (options, command) => {
|
|
|
34
48
|
}
|
|
35
49
|
|
|
36
50
|
if (isEmpty(environment)) {
|
|
37
|
-
log(`No environment variables set for site ${siteData.name}`)
|
|
51
|
+
log(`No environment variables set for site ${chalk.greenBright(siteData.name)}`)
|
|
38
52
|
return false
|
|
39
53
|
}
|
|
40
54
|
|
|
41
|
-
// List environment
|
|
42
|
-
log(`site: ${siteData.name}`)
|
|
43
|
-
const table = new AsciiTable(`Environment variables`)
|
|
55
|
+
// List environment in a table
|
|
56
|
+
log(`Listing environment variables for site: ${chalk.greenBright(siteData.name)}`)
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
58
|
+
if (isCI) {
|
|
59
|
+
log(getTable({ environment, hideValues: false }))
|
|
60
|
+
return false
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const { default: logUpdate } = await logUpdatePromise
|
|
64
|
+
|
|
65
|
+
logUpdate(getTable({ environment, hideValues: true }))
|
|
66
|
+
const { showValues } = await inquirer.prompt([
|
|
67
|
+
{
|
|
68
|
+
type: 'confirm',
|
|
69
|
+
name: 'showValues',
|
|
70
|
+
message: 'Show values?',
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
if (showValues) {
|
|
76
|
+
const { default: ansiEscapes } = await ansiEscapesPromise
|
|
77
|
+
// since inquirer adds a prompt, we need to account for it when printing the table again
|
|
78
|
+
log(ansiEscapes.eraseLines(3))
|
|
79
|
+
logUpdate(getTable({ environment, hideValues: false }))
|
|
80
|
+
log(`${chalk.cyan('?')} Show values? ${chalk.cyan('Yes')}`)
|
|
81
|
+
}
|
|
48
82
|
}
|
|
49
83
|
|
|
50
84
|
/**
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"node_modules/stripe": {
|
|
108
|
-
"version": "8.
|
|
109
|
-
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.
|
|
110
|
-
"integrity": "sha512-
|
|
108
|
+
"version": "8.195.0",
|
|
109
|
+
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.195.0.tgz",
|
|
110
|
+
"integrity": "sha512-pXEZFNJb4p9uZ69+B4A+zJEmBiFw3BzNG51ctPxUZij7ghFTnk2/RuUHmSGto2XVCcC46uG75czXVAvCUkOGtQ==",
|
|
111
111
|
"dependencies": {
|
|
112
112
|
"@types/node": ">=8.1.0",
|
|
113
113
|
"qs": "^6.6.0"
|
|
@@ -184,9 +184,9 @@
|
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
"stripe": {
|
|
187
|
-
"version": "8.
|
|
188
|
-
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.
|
|
189
|
-
"integrity": "sha512-
|
|
187
|
+
"version": "8.195.0",
|
|
188
|
+
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.195.0.tgz",
|
|
189
|
+
"integrity": "sha512-pXEZFNJb4p9uZ69+B4A+zJEmBiFw3BzNG51ctPxUZij7ghFTnk2/RuUHmSGto2XVCcC46uG75czXVAvCUkOGtQ==",
|
|
190
190
|
"requires": {
|
|
191
191
|
"@types/node": ">=8.1.0",
|
|
192
192
|
"qs": "^6.6.0"
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"node_modules/stripe": {
|
|
108
|
-
"version": "8.
|
|
109
|
-
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.
|
|
110
|
-
"integrity": "sha512-
|
|
108
|
+
"version": "8.195.0",
|
|
109
|
+
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.195.0.tgz",
|
|
110
|
+
"integrity": "sha512-pXEZFNJb4p9uZ69+B4A+zJEmBiFw3BzNG51ctPxUZij7ghFTnk2/RuUHmSGto2XVCcC46uG75czXVAvCUkOGtQ==",
|
|
111
111
|
"dependencies": {
|
|
112
112
|
"@types/node": ">=8.1.0",
|
|
113
113
|
"qs": "^6.6.0"
|
|
@@ -184,9 +184,9 @@
|
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
"stripe": {
|
|
187
|
-
"version": "8.
|
|
188
|
-
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.
|
|
189
|
-
"integrity": "sha512-
|
|
187
|
+
"version": "8.195.0",
|
|
188
|
+
"resolved": "https://registry.npmjs.org/stripe/-/stripe-8.195.0.tgz",
|
|
189
|
+
"integrity": "sha512-pXEZFNJb4p9uZ69+B4A+zJEmBiFw3BzNG51ctPxUZij7ghFTnk2/RuUHmSGto2XVCcC46uG75czXVAvCUkOGtQ==",
|
|
190
190
|
"requires": {
|
|
191
191
|
"@types/node": ">=8.1.0",
|
|
192
192
|
"qs": "^6.6.0"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@netlify/functions": "^0.10.0",
|
|
13
|
-
"@types/node": "^14.
|
|
13
|
+
"@types/node": "^14.18.3",
|
|
14
14
|
"typescript": "^4.0.0"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"node_modules/@types/node": {
|
|
29
|
-
"version": "14.18.
|
|
30
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.
|
|
31
|
-
"integrity": "sha512-
|
|
29
|
+
"version": "14.18.3",
|
|
30
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.3.tgz",
|
|
31
|
+
"integrity": "sha512-GtTH2crF4MtOIrrAa+jgTV9JX/PfoUCYr6MiZw7O/dkZu5b6gm5dc1nAL0jwGo4ortSBBtGyeVaxdC8X6V+pLg=="
|
|
32
32
|
},
|
|
33
33
|
"node_modules/is-promise": {
|
|
34
34
|
"version": "4.0.0",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"@types/node": {
|
|
61
|
-
"version": "14.18.
|
|
62
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.
|
|
63
|
-
"integrity": "sha512-
|
|
61
|
+
"version": "14.18.3",
|
|
62
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.3.tgz",
|
|
63
|
+
"integrity": "sha512-GtTH2crF4MtOIrrAa+jgTV9JX/PfoUCYr6MiZw7O/dkZu5b6gm5dc1nAL0jwGo4ortSBBtGyeVaxdC8X6V+pLg=="
|
|
64
64
|
},
|
|
65
65
|
"is-promise": {
|
|
66
66
|
"version": "4.0.0",
|
|
@@ -3,7 +3,6 @@ const os = require('os')
|
|
|
3
3
|
const process = require('process')
|
|
4
4
|
const { format, inspect } = require('util')
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line local-rules/no-direct-chalk-import
|
|
7
6
|
const { Instance: ChalkInstance } = require('chalk')
|
|
8
7
|
const WSL = require('is-wsl')
|
|
9
8
|
const { default: omit } = require('omit.js')
|