netlify-cli 17.19.2 → 17.19.4
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 +4 -0
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/base-command.js +6 -0
- package/dist/commands/blobs/blobs.js +5 -5
- package/dist/commands/deploy/deploy.d.ts.map +1 -1
- package/dist/commands/deploy/deploy.js +23 -57
- package/dist/commands/dev/dev.d.ts.map +1 -1
- package/dist/commands/dev/dev.js +2 -1
- package/dist/commands/serve/serve.d.ts.map +1 -1
- package/dist/commands/serve/serve.js +1 -0
- package/dist/lib/edge-functions/deploy.d.ts +3 -6
- package/dist/lib/edge-functions/deploy.d.ts.map +1 -1
- package/dist/lib/edge-functions/deploy.js +0 -5
- package/dist/lib/edge-functions/proxy.d.ts +23 -41
- package/dist/lib/edge-functions/proxy.d.ts.map +1 -1
- package/dist/lib/edge-functions/proxy.js +7 -86
- package/dist/lib/edge-functions/registry.d.ts +5 -2
- package/dist/lib/edge-functions/registry.d.ts.map +1 -1
- package/dist/lib/edge-functions/registry.js +18 -10
- package/dist/lib/functions/server.d.ts.map +1 -1
- package/dist/lib/functions/server.js +14 -1
- package/dist/lib/settings.d.ts +1 -0
- package/dist/lib/settings.d.ts.map +1 -1
- package/dist/lib/settings.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/deploy/deploy-site.d.ts +4 -1
- package/dist/utils/deploy/deploy-site.d.ts.map +1 -1
- package/dist/utils/deploy/deploy-site.js +8 -18
- package/dist/utils/deploy/hash-fns.d.ts +14 -10
- package/dist/utils/deploy/hash-fns.d.ts.map +1 -1
- package/dist/utils/deploy/hash-fns.js +5 -34
- package/dist/utils/proxy-server.d.ts +2 -1
- package/dist/utils/proxy-server.d.ts.map +1 -1
- package/dist/utils/proxy-server.js +3 -0
- package/dist/utils/proxy.d.ts +2 -1
- package/dist/utils/proxy.d.ts.map +1 -1
- package/dist/utils/proxy.js +12 -9
- package/npm-shrinkwrap.json +214 -9
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/lib/functions/server.ts"],"names":[],"mappings":"AAIA,OAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AAKtD,OAAO,KAAK,WAAW,MAAM,gCAAgC,CAAA;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAUvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAMrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAyDjD,eAAO,MAAM,aAAa,YAAsB,yBAAyB,KAAG,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/lib/functions/server.ts"],"names":[],"mappings":"AAIA,OAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AAKtD,OAAO,KAAK,WAAW,MAAM,gCAAgC,CAAA;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAUvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAMrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAyDjD,eAAO,MAAM,aAAa,YAAsB,yBAAyB,KAAG,cA6K3E,CAAA;AAED,UAAU,yBAAyB;IACjC,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,QAAQ,CAAA;IACf,MAAM,EAAE,QAAQ,CAAA;IAChB,eAAe,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;CAC7C;AA4BD,eAAO,MAAM,oBAAoB,YACtB;IACP,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,EAAE,WAAW,CAAA;IACpB,MAAM,EAAE,QAAQ,CAAA;IAChB,YAAY,EAAE,QAAQ,CAAA;IACtB,KAAK,EAAE,OAAO,CAAA;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,QAAQ,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;CACnB,GAAG,KAAK,yBAAyB,EAAE,mBAAmB,CAAC,KACvD,QAAQ,iBAAiB,GAAG,SAAS,CAiFvC,CAAA"}
|
|
@@ -159,6 +159,11 @@ export const createHandler = function (options) {
|
|
|
159
159
|
handleBackgroundFunctionResult(functionName, error);
|
|
160
160
|
}
|
|
161
161
|
else if (await func.isScheduled()) {
|
|
162
|
+
// In production, scheduled functions always receive POST requests, so we
|
|
163
|
+
// have to emulate that here, even if a user has triggered a GET request
|
|
164
|
+
// as part of their tests. If we don't do this, we'll hit problems when
|
|
165
|
+
// we send the invocation body in a request that can't have a body.
|
|
166
|
+
event.httpMethod = 'POST';
|
|
162
167
|
const { error, result } = await func.invoke({
|
|
163
168
|
...event,
|
|
164
169
|
body: JSON.stringify({
|
|
@@ -173,9 +178,17 @@ export const createHandler = function (options) {
|
|
|
173
178
|
}, clientContext);
|
|
174
179
|
handleScheduledFunction({
|
|
175
180
|
error,
|
|
176
|
-
result,
|
|
177
181
|
request,
|
|
178
182
|
response,
|
|
183
|
+
// When we handle the result of invoking a scheduled function, we'll warn
|
|
184
|
+
// people in case their function returned a body or headers, since those
|
|
185
|
+
// will have no practical effect in production. However, in v2 functions
|
|
186
|
+
// we don't currently have a good way of asserting whether the body we're
|
|
187
|
+
// seeing has been actually produced by user code or by the bootstrap, so
|
|
188
|
+
// we risk printing that warn unnecessarily, which causes more harm than
|
|
189
|
+
// good. Until we find a way of making this detection better, ignore the
|
|
190
|
+
// invocation result entirely for v2 functions.
|
|
191
|
+
result: func.runtimeAPIVersion === 1 ? result : {},
|
|
179
192
|
});
|
|
180
193
|
}
|
|
181
194
|
else {
|
package/dist/lib/settings.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const getPathInHome: (paths: any) => string;
|
|
|
14
14
|
/**
|
|
15
15
|
* get a path inside the project folder
|
|
16
16
|
* @param {string[]} paths
|
|
17
|
+
* @deprecated This does not work in monorepos use Basecommand.getPathInProject instead
|
|
17
18
|
* @returns {string}
|
|
18
19
|
*/
|
|
19
20
|
export declare const getPathInProject: (paths: any) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AAEH,eAAO,MAAM,mBAAmB,wBAG/B,CAAA;AAED;;;;GAIG;AAEH,eAAO,MAAM,aAAa,wBAGzB,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/lib/settings.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AAEH,eAAO,MAAM,mBAAmB,wBAG/B,CAAA;AAED;;;;GAIG;AAEH,eAAO,MAAM,aAAa,wBAGzB,CAAA;AAED;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,wBAG5B,CAAA"}
|
package/dist/lib/settings.js
CHANGED
|
@@ -27,6 +27,7 @@ export const getPathInHome = (paths) => {
|
|
|
27
27
|
/**
|
|
28
28
|
* get a path inside the project folder
|
|
29
29
|
* @param {string[]} paths
|
|
30
|
+
* @deprecated This does not work in monorepos use Basecommand.getPathInProject instead
|
|
30
31
|
* @returns {string}
|
|
31
32
|
*/
|
|
32
33
|
// @ts-expect-error TS(7006) FIXME: Parameter 'paths' implicitly has an 'any' type.
|