netlify-cli 16.3.6 → 16.4.1
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
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.4.1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "16.
|
|
9
|
+
"version": "16.4.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"netlify": "13.1.10",
|
|
86
86
|
"netlify-headers-parser": "7.1.2",
|
|
87
87
|
"netlify-redirect-parser": "14.2.0",
|
|
88
|
-
"netlify-redirector": "0.
|
|
88
|
+
"netlify-redirector": "0.5.0",
|
|
89
89
|
"node-fetch": "2.6.12",
|
|
90
90
|
"node-version-alias": "3.4.1",
|
|
91
91
|
"ora": "6.3.1",
|
|
@@ -11996,9 +11996,9 @@
|
|
|
11996
11996
|
}
|
|
11997
11997
|
},
|
|
11998
11998
|
"node_modules/netlify-redirector": {
|
|
11999
|
-
"version": "0.
|
|
12000
|
-
"resolved": "https://registry.npmjs.org/netlify-redirector/-/netlify-redirector-0.
|
|
12001
|
-
"integrity": "sha512-
|
|
11999
|
+
"version": "0.5.0",
|
|
12000
|
+
"resolved": "https://registry.npmjs.org/netlify-redirector/-/netlify-redirector-0.5.0.tgz",
|
|
12001
|
+
"integrity": "sha512-4zdzIP+6muqPCuE8avnrgDJ6KW/2+UpHTRcTbMXCIRxiRmyrX+IZ4WSJGZdHPWF3WmQpXpy603XxecZ9iygN7w=="
|
|
12002
12002
|
},
|
|
12003
12003
|
"node_modules/netlify/node_modules/node-fetch": {
|
|
12004
12004
|
"version": "3.3.2",
|
|
@@ -24277,9 +24277,9 @@
|
|
|
24277
24277
|
}
|
|
24278
24278
|
},
|
|
24279
24279
|
"netlify-redirector": {
|
|
24280
|
-
"version": "0.
|
|
24281
|
-
"resolved": "https://registry.npmjs.org/netlify-redirector/-/netlify-redirector-0.
|
|
24282
|
-
"integrity": "sha512-
|
|
24280
|
+
"version": "0.5.0",
|
|
24281
|
+
"resolved": "https://registry.npmjs.org/netlify-redirector/-/netlify-redirector-0.5.0.tgz",
|
|
24282
|
+
"integrity": "sha512-4zdzIP+6muqPCuE8avnrgDJ6KW/2+UpHTRcTbMXCIRxiRmyrX+IZ4WSJGZdHPWF3WmQpXpy603XxecZ9iygN7w=="
|
|
24283
24283
|
},
|
|
24284
24284
|
"node-domexception": {
|
|
24285
24285
|
"version": "1.0.0",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
3
|
"description": "Netlify command line tool",
|
|
4
|
-
"version": "16.
|
|
4
|
+
"version": "16.4.1",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"netlify": "13.1.10",
|
|
118
118
|
"netlify-headers-parser": "7.1.2",
|
|
119
119
|
"netlify-redirect-parser": "14.2.0",
|
|
120
|
-
"netlify-redirector": "0.
|
|
120
|
+
"netlify-redirector": "0.5.0",
|
|
121
121
|
"node-fetch": "2.6.12",
|
|
122
122
|
"node-version-alias": "3.4.1",
|
|
123
123
|
"ora": "6.3.1",
|
package/src/commands/main.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { BANG, chalk, error, exit, log, NETLIFY_CYAN, USER_AGENT, warn } from '.
|
|
|
10
10
|
import execa from '../utils/execa.mjs'
|
|
11
11
|
import getGlobalConfig from '../utils/get-global-config.mjs'
|
|
12
12
|
import getPackageJson from '../utils/get-package-json.mjs'
|
|
13
|
-
import { track } from '../utils/telemetry/index.mjs'
|
|
13
|
+
import { track, reportError } from '../utils/telemetry/index.mjs'
|
|
14
14
|
|
|
15
15
|
import { createAddonsCommand } from './addons/index.mjs'
|
|
16
16
|
import { createApiCommand } from './api/index.mjs'
|
|
@@ -37,16 +37,42 @@ import { createWatchCommand } from './watch/index.mjs'
|
|
|
37
37
|
|
|
38
38
|
const SUGGESTION_TIMEOUT = 1e4
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
process.on('uncaughtException', async (err) => {
|
|
41
|
+
console.log('')
|
|
42
|
+
error(
|
|
43
|
+
`${chalk.red(
|
|
44
|
+
'Netlify CLI has terminated unexpectedly',
|
|
45
|
+
)}\nThis is a problem with the Netlify CLI, not with your application.\nIf you recently updated the CLI, consider reverting to an older version by running:\n\n${chalk.bold(
|
|
46
|
+
'npm install -g netlify-cli@VERSION',
|
|
47
|
+
)}\n\nYou can use any version from ${chalk.underline(
|
|
48
|
+
'https://ntl.fyi/cli-versions',
|
|
49
|
+
)}.\n\nPlease report this problem at ${chalk.underline(
|
|
50
|
+
'https://ntl.fyi/cli-error',
|
|
51
|
+
)} including the error details below.\n`,
|
|
52
|
+
{ exit: false },
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
const systemInfo = await getSystemInfo()
|
|
56
|
+
|
|
57
|
+
console.log(chalk.dim(err.stack || err))
|
|
58
|
+
console.log(chalk.dim(systemInfo))
|
|
59
|
+
|
|
60
|
+
reportError(err, { severity: 'error' })
|
|
61
|
+
|
|
62
|
+
process.exit(1)
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const getSystemInfo = () =>
|
|
66
|
+
envinfo.run({
|
|
44
67
|
System: ['OS', 'CPU'],
|
|
45
68
|
Binaries: ['Node', 'Yarn', 'npm'],
|
|
46
69
|
Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],
|
|
47
70
|
npmGlobalPackages: ['netlify-cli'],
|
|
48
71
|
})
|
|
49
72
|
|
|
73
|
+
const getVersionPage = async () => {
|
|
74
|
+
const data = await getSystemInfo()
|
|
75
|
+
|
|
50
76
|
return `
|
|
51
77
|
────────────────────┐
|
|
52
78
|
Environment Info │
|
|
@@ -106,7 +106,7 @@ const hashFns = async (
|
|
|
106
106
|
statusCb,
|
|
107
107
|
tmpDir,
|
|
108
108
|
})
|
|
109
|
-
const fileObjs = functionZips.map(({ displayName, generator, path: functionPath, runtime }) => ({
|
|
109
|
+
const fileObjs = functionZips.map(({ displayName, generator, invocationMode, path: functionPath, runtime }) => ({
|
|
110
110
|
filepath: functionPath,
|
|
111
111
|
root: tmpDir,
|
|
112
112
|
relname: path.relative(tmpDir, functionPath),
|
|
@@ -118,6 +118,7 @@ const hashFns = async (
|
|
|
118
118
|
runtime,
|
|
119
119
|
displayName,
|
|
120
120
|
generator,
|
|
121
|
+
invocationMode,
|
|
121
122
|
}))
|
|
122
123
|
const fnConfig = functionZips
|
|
123
124
|
.filter((func) => Boolean(func.displayName || func.generator))
|
|
@@ -14,7 +14,7 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRet
|
|
|
14
14
|
})
|
|
15
15
|
|
|
16
16
|
const uploadFile = async (fileObj, index) => {
|
|
17
|
-
const { assetType, filepath, normalizedPath, runtime } = fileObj
|
|
17
|
+
const { assetType, filepath, invocationMode, normalizedPath, runtime } = fileObj
|
|
18
18
|
const readStreamCtor = () => fs.createReadStream(filepath)
|
|
19
19
|
|
|
20
20
|
statusCb({
|
|
@@ -41,6 +41,7 @@ const uploadFiles = async (api, deployId, uploadList, { concurrentUpload, maxRet
|
|
|
41
41
|
const params = {
|
|
42
42
|
body: readStreamCtor,
|
|
43
43
|
deployId,
|
|
44
|
+
invocationMode,
|
|
44
45
|
name: encodeURI(normalizedPath),
|
|
45
46
|
runtime,
|
|
46
47
|
}
|
package/src/utils/proxy.mjs
CHANGED
|
@@ -544,7 +544,7 @@ const initializeProxy = async function ({ configPath, distDir, env, host, port,
|
|
|
544
544
|
|
|
545
545
|
if (isEdgeFunctionsRequest(req) && isUncaughtError) {
|
|
546
546
|
const acceptsHtml = req.headers && req.headers.accept && req.headers.accept.includes('text/html')
|
|
547
|
-
const decompressedBody = await decompressResponseBody(responseBody,
|
|
547
|
+
const decompressedBody = await decompressResponseBody(responseBody, proxyRes.headers['content-encoding'])
|
|
548
548
|
const formattedBody = formatEdgeFunctionError(decompressedBody, acceptsHtml)
|
|
549
549
|
const errorResponse = acceptsHtml
|
|
550
550
|
? await renderErrorTemplate(formattedBody, './templates/function-error.html', 'edge function')
|