@netlify/functions-dev 1.0.5 → 1.1.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/dist/main.d.ts CHANGED
@@ -13,7 +13,10 @@ interface FunctionRegistryOptions {
13
13
  manifest?: Manifest;
14
14
  projectRoot: string;
15
15
  settings: any;
16
- timeouts: any;
16
+ timeouts?: {
17
+ syncFunctions?: number;
18
+ backgroundFunctions?: number;
19
+ };
17
20
  watch?: boolean;
18
21
  }
19
22
 
package/dist/main.js CHANGED
@@ -7,6 +7,7 @@ import { createRequire as createRequire2 } from "module";
7
7
  import { basename as basename2, extname as extname2, isAbsolute, join, resolve } from "path";
8
8
  import { env } from "process";
9
9
  import { watchDebounced } from "@netlify/dev-utils";
10
+ import { SYNCHRONOUS_FUNCTION_TIMEOUT, BACKGROUND_FUNCTION_TIMEOUT } from "@netlify/functions";
10
11
  import { listFunctions } from "@netlify/zip-it-and-ship-it";
11
12
  import extractZip from "extract-zip";
12
13
 
@@ -701,7 +702,13 @@ var FunctionsRegistry = class {
701
702
  });
702
703
  this.internalFunctionsPath = internalFunctionsPath;
703
704
  this.projectRoot = projectRoot;
704
- this.timeouts = timeouts;
705
+ const siteTimeout = config?.siteInfo?.functions_timeout ?? config?.siteInfo?.functions_config?.timeout;
706
+ this.timeouts = {
707
+ syncFunctions: timeouts?.syncFunctions ?? siteTimeout ?? SYNCHRONOUS_FUNCTION_TIMEOUT,
708
+ // NOTE: This isn't documented, but the generically named "functions timeout" config fields only
709
+ // apply to synchronous Netlify Functions.
710
+ backgroundFunctions: timeouts?.backgroundFunctions ?? BACKGROUND_FUNCTION_TIMEOUT
711
+ };
705
712
  this.settings = settings;
706
713
  this.watch = watch === true;
707
714
  this.buildCache = {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  }
12
12
  }
13
13
  },
14
- "version": "1.0.5",
14
+ "version": "1.1.0",
15
15
  "description": "Local dev emulation of Netlify Functions",
16
16
  "files": [
17
17
  "dist/**/*.js",
@@ -42,10 +42,10 @@
42
42
  },
43
43
  "author": "Netlify Inc.",
44
44
  "dependencies": {
45
- "@netlify/blobs": "10.3.2",
46
- "@netlify/dev-utils": "4.3.0",
47
- "@netlify/functions": "5.0.1",
48
- "@netlify/zip-it-and-ship-it": "^14.1.11",
45
+ "@netlify/blobs": "10.3.3",
46
+ "@netlify/dev-utils": "4.3.1",
47
+ "@netlify/functions": "5.1.0",
48
+ "@netlify/zip-it-and-ship-it": "^14.1.13",
49
49
  "cron-parser": "^4.9.0",
50
50
  "decache": "^4.6.2",
51
51
  "extract-zip": "^2.0.1",