netlify-cli 15.9.1 → 15.10.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 +365 -265
- package/package.json +8 -8
- package/src/functions-templates/typescript/hello-world/package-lock.json +6 -6
- package/src/lib/edge-functions/bootstrap.mjs +1 -1
- package/src/lib/edge-functions/headers.mjs +1 -0
- package/src/lib/edge-functions/proxy.mjs +2 -1
- package/src/lib/functions/runtimes/js/index.mjs +1 -1
- package/src/lib/functions/runtimes/js/worker.mjs +1 -1
- package/src/lib/functions/server.mjs +3 -2
- package/src/utils/telemetry/report-error.mjs +8 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
3
|
"description": "Netlify command line tool",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.10.0",
|
|
5
5
|
"author": "Netlify Inc.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|
|
@@ -44,16 +44,15 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@bugsnag/js": "7.20.2",
|
|
46
46
|
"@fastify/static": "6.10.2",
|
|
47
|
-
"@netlify/build": "29.
|
|
48
|
-
"@netlify/build-info": "7.
|
|
49
|
-
"@netlify/config": "20.6.
|
|
50
|
-
"@netlify/edge-bundler": "8.
|
|
47
|
+
"@netlify/build": "29.17.3",
|
|
48
|
+
"@netlify/build-info": "7.7.3",
|
|
49
|
+
"@netlify/config": "20.6.4",
|
|
50
|
+
"@netlify/edge-bundler": "8.17.1",
|
|
51
51
|
"@netlify/framework-info": "9.8.10",
|
|
52
52
|
"@netlify/local-functions-proxy": "1.1.1",
|
|
53
|
-
"@netlify/serverless-functions-api": "1.5.
|
|
54
|
-
"@netlify/zip-it-and-ship-it": "9.13.
|
|
53
|
+
"@netlify/serverless-functions-api": "1.5.2",
|
|
54
|
+
"@netlify/zip-it-and-ship-it": "9.13.1",
|
|
55
55
|
"@octokit/rest": "19.0.13",
|
|
56
|
-
"@skn0tt/lambda-local": "2.0.3",
|
|
57
56
|
"ansi-escapes": "6.2.0",
|
|
58
57
|
"ansi-styles": "6.2.1",
|
|
59
58
|
"ansi-to-html": "0.7.2",
|
|
@@ -108,6 +107,7 @@
|
|
|
108
107
|
"isexe": "2.0.0",
|
|
109
108
|
"jsonwebtoken": "9.0.1",
|
|
110
109
|
"jwt-decode": "3.1.2",
|
|
110
|
+
"lambda-local": "2.1.1",
|
|
111
111
|
"listr": "0.14.3",
|
|
112
112
|
"locate-path": "7.2.0",
|
|
113
113
|
"lodash": "4.17.21",
|
|
@@ -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.54",
|
|
30
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.54.tgz",
|
|
31
|
+
"integrity": "sha512-uq7O52wvo2Lggsx1x21tKZgqkJpvwCseBBPtX/nKQfpVlEsLOb11zZ1CRsWUKvJF0+lzuA9jwvA7Pr2Wt7i3xw=="
|
|
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.54",
|
|
62
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.54.tgz",
|
|
63
|
+
"integrity": "sha512-uq7O52wvo2Lggsx1x21tKZgqkJpvwCseBBPtX/nKQfpVlEsLOb11zZ1CRsWUKvJF0+lzuA9jwvA7Pr2Wt7i3xw=="
|
|
64
64
|
},
|
|
65
65
|
"is-promise": {
|
|
66
66
|
"version": "4.0.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { env } from 'process'
|
|
2
2
|
|
|
3
|
-
const latestBootstrapURL = 'https://
|
|
3
|
+
const latestBootstrapURL = 'https://64c264287e9cbb0008621df3--edge.netlify.com/bootstrap/index-combined.ts'
|
|
4
4
|
|
|
5
5
|
export const getBootstrapURL = () => env.NETLIFY_EDGE_BOOTSTRAP || latestBootstrapURL
|
|
@@ -114,7 +114,8 @@ export const initializeProxy = async ({
|
|
|
114
114
|
if (!registry) return
|
|
115
115
|
|
|
116
116
|
// Setting header with geolocation and site info.
|
|
117
|
-
req.headers[headers.Geo] = JSON.stringify(geoLocation)
|
|
117
|
+
req.headers[headers.Geo] = Buffer.from(JSON.stringify(geoLocation)).toString('base64')
|
|
118
|
+
req.headers[headers.DeployID] = '0'
|
|
118
119
|
req.headers[headers.Site] = createSiteInfoHeader(siteInfo)
|
|
119
120
|
req.headers[headers.Account] = createAccountInfoHeader({ id: accountId })
|
|
120
121
|
|
|
@@ -3,7 +3,7 @@ import { dirname } from 'path'
|
|
|
3
3
|
import { pathToFileURL } from 'url'
|
|
4
4
|
import { Worker } from 'worker_threads'
|
|
5
5
|
|
|
6
|
-
import lambdaLocal from '
|
|
6
|
+
import lambdaLocal from 'lambda-local'
|
|
7
7
|
import winston from 'winston'
|
|
8
8
|
|
|
9
9
|
import detectNetlifyLambdaBuilder from './builders/netlify-lambda.mjs'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createServer } from 'net'
|
|
2
2
|
import { isMainThread, workerData, parentPort } from 'worker_threads'
|
|
3
3
|
|
|
4
|
-
import lambdaLocal from '@skn0tt/lambda-local'
|
|
5
4
|
import { isStream } from 'is-stream'
|
|
5
|
+
import lambdaLocal from 'lambda-local'
|
|
6
6
|
import sourceMapSupport from 'source-map-support'
|
|
7
7
|
|
|
8
8
|
if (isMainThread) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
|
+
import { Buffer } from 'buffer'
|
|
3
|
+
|
|
2
4
|
import express from 'express'
|
|
3
5
|
import expressLogging from 'express-logging'
|
|
4
6
|
import jwtDecode from 'jwt-decode'
|
|
@@ -47,7 +49,6 @@ const hasBody = (req) =>
|
|
|
47
49
|
// eslint-disable-next-line unicorn/prefer-number-properties
|
|
48
50
|
(req.header('transfer-encoding') !== undefined || !isNaN(req.header('content-length'))) &&
|
|
49
51
|
// we expect a string or a buffer, because we use the two bodyParsers(text, raw) from express
|
|
50
|
-
// eslint-disable-next-line n/prefer-global/buffer
|
|
51
52
|
(typeof req.body === 'string' || Buffer.isBuffer(req.body))
|
|
52
53
|
|
|
53
54
|
export const createHandler = function (options) {
|
|
@@ -114,7 +115,7 @@ export const createHandler = function (options) {
|
|
|
114
115
|
'client-ip': [remoteAddress],
|
|
115
116
|
'x-nf-client-connection-ip': [remoteAddress],
|
|
116
117
|
'x-nf-account-id': [options.accountId],
|
|
117
|
-
[efHeaders.Geo]: JSON.stringify(geoLocation),
|
|
118
|
+
[efHeaders.Geo]: Buffer.from(JSON.stringify(geoLocation)).toString('base64'),
|
|
118
119
|
}).reduce((prev, [key, value]) => ({ ...prev, [key]: Array.isArray(value) ? value : [value] }), {})
|
|
119
120
|
const rawQuery = new URLSearchParams(requestQuery).toString()
|
|
120
121
|
const protocol = options.config?.dev?.https ? 'https' : 'http'
|
|
@@ -25,15 +25,19 @@ export const reportError = async function (error, config = {}) {
|
|
|
25
25
|
return
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// convert a NotifiableError to an error class
|
|
29
|
+
// eslint-disable-next-line unicorn/no-nested-ternary
|
|
30
|
+
const err = error instanceof Error ? error : typeof error === 'string' ? new Error(error) : error
|
|
31
|
+
|
|
28
32
|
const globalConfig = await getGlobalConfig()
|
|
29
33
|
|
|
30
34
|
const options = JSON.stringify({
|
|
31
35
|
type: 'error',
|
|
32
36
|
data: {
|
|
33
|
-
message:
|
|
34
|
-
name:
|
|
35
|
-
stack:
|
|
36
|
-
cause:
|
|
37
|
+
message: err.message,
|
|
38
|
+
name: err.name,
|
|
39
|
+
stack: err.stack,
|
|
40
|
+
cause: err.cause,
|
|
37
41
|
severity: config.severity,
|
|
38
42
|
user: {
|
|
39
43
|
id: globalConfig.get('userId'),
|