netlify-cli 17.19.3 → 17.19.5
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/dist/commands/base-command.d.ts +1 -1
- package/dist/commands/base-command.js +1 -1
- package/dist/commands/blobs/blobs.js +5 -5
- package/dist/commands/serve/serve.d.ts.map +1 -1
- package/dist/commands/serve/serve.js +7 -3
- package/dist/lib/edge-functions/proxy.d.ts.map +1 -1
- package/dist/lib/edge-functions/proxy.js +2 -1
- package/dist/lib/edge-functions/registry.d.ts.map +1 -1
- package/dist/lib/edge-functions/registry.js +17 -8
- package/dist/lib/functions/server.d.ts.map +1 -1
- package/dist/lib/functions/server.js +14 -1
- package/dist/lib/settings.d.ts +4 -11
- package/dist/lib/settings.d.ts.map +1 -1
- package/dist/lib/settings.js +4 -23
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/proxy.d.ts.map +1 -1
- package/dist/utils/proxy.js +0 -25
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/utils/proxy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/utils/proxy.ts"],"names":[],"mappings":"AAiwBA;;;GAGG;AAEH,eAAO,MAAM,WAAW,2BAGvB,CAAA;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;qBAmItB,CAAA"}
|
package/dist/utils/proxy.js
CHANGED
|
@@ -37,12 +37,6 @@ const gunzip = util.promisify(zlib.gunzip);
|
|
|
37
37
|
const brotliDecompress = util.promisify(zlib.brotliDecompress);
|
|
38
38
|
const deflate = util.promisify(zlib.deflate);
|
|
39
39
|
const shouldGenerateETag = Symbol('Internal: response should generate ETag');
|
|
40
|
-
/**
|
|
41
|
-
* @param {Buffer} body
|
|
42
|
-
* @param {string | undefined} contentEncoding
|
|
43
|
-
* @returns {Promise<Buffer>}
|
|
44
|
-
*/
|
|
45
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'body' implicitly has an 'any' type.
|
|
46
40
|
const decompressResponseBody = async function (body, contentEncoding = '') {
|
|
47
41
|
switch (contentEncoding) {
|
|
48
42
|
case 'gzip':
|
|
@@ -67,36 +61,17 @@ const formatEdgeFunctionError = (errorBuffer, acceptsHtml) => {
|
|
|
67
61
|
trace: stack.split('\\n'),
|
|
68
62
|
});
|
|
69
63
|
};
|
|
70
|
-
/**
|
|
71
|
-
* @param {string} url
|
|
72
|
-
*/
|
|
73
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'url' implicitly has an 'any' type.
|
|
74
64
|
function isInternal(url) {
|
|
75
65
|
return url.startsWith('/.netlify/');
|
|
76
66
|
}
|
|
77
|
-
/**
|
|
78
|
-
* @param {boolean|number|undefined} functionsPort
|
|
79
|
-
* @param {string} url
|
|
80
|
-
*/
|
|
81
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'functionsPort' implicitly has an 'any' ... Remove this comment to see the full error message
|
|
82
67
|
function isFunction(functionsPort, url) {
|
|
83
68
|
return functionsPort && url.match(DEFAULT_FUNCTION_URL_EXPRESSION);
|
|
84
69
|
}
|
|
85
|
-
/**
|
|
86
|
-
* @param {Record<string, string>} addonsUrls
|
|
87
|
-
* @param {http.IncomingMessage} req
|
|
88
|
-
*/
|
|
89
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'addonsUrls' implicitly has an 'any' typ... Remove this comment to see the full error message
|
|
90
70
|
function getAddonUrl(addonsUrls, req) {
|
|
91
71
|
const matches = req.url?.match(/^\/.netlify\/([^/]+)(\/.*)/);
|
|
92
72
|
const addonUrl = matches && addonsUrls[matches[1]];
|
|
93
73
|
return addonUrl ? `${addonUrl}${matches[2]}` : null;
|
|
94
74
|
}
|
|
95
|
-
/**
|
|
96
|
-
* @param {string} pathname
|
|
97
|
-
* @param {string} publicFolder
|
|
98
|
-
*/
|
|
99
|
-
// @ts-expect-error TS(7006) FIXME: Parameter 'pathname' implicitly has an 'any' type.
|
|
100
75
|
const getStatic = async function (pathname, publicFolder) {
|
|
101
76
|
const alternatives = [pathname, ...alternativePathsFor(pathname)].map((filePath) => path.resolve(publicFolder, filePath.slice(1)));
|
|
102
77
|
const file = await locatePath(alternatives);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "17.19.
|
|
3
|
+
"version": "17.19.5",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "17.19.
|
|
9
|
+
"version": "17.19.5",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|