@netlify/dev 4.8.8 → 4.9.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.cjs CHANGED
@@ -348,6 +348,7 @@ var NetlifyDev = class {
348
348
  this.#cleanupJobs = [];
349
349
  this.#geolocationConfig = options.geolocation;
350
350
  this.#features = {
351
+ aiGateway: options.aiGateway?.enabled !== false,
351
352
  blobs: options.blobs?.enabled !== false,
352
353
  edgeFunctions: options.edgeFunctions?.enabled !== false,
353
354
  environmentVariables: options.environmentVariables?.enabled !== false,
@@ -537,7 +538,10 @@ var NetlifyDev = class {
537
538
  siteID: siteID ?? "0"
538
539
  });
539
540
  this.#cleanupJobs.push(() => runtime.stop());
540
- if (this.#features.environmentVariables && config?.api && siteID && config?.siteInfo?.url) {
541
+ if (this.#features.aiGateway && config?.siteInfo?.capabilities?.ai_gateway_disabled) {
542
+ this.#features.aiGateway = false;
543
+ }
544
+ if (this.#features.aiGateway && this.#features.environmentVariables && config?.api && siteID && config?.siteInfo?.url) {
541
545
  await (0, import_bootstrap.setupAIGateway)({
542
546
  api: config.api,
543
547
  env: config.env || {},
package/dist/main.d.cts CHANGED
@@ -93,6 +93,14 @@ interface Features {
93
93
  */
94
94
  directories?: string[];
95
95
  };
96
+ /**
97
+ * Configuration options for Netlify AI Gateway.
98
+ *
99
+ * {@link} https://docs.netlify.com/ai/overview/
100
+ */
101
+ aiGateway?: {
102
+ enabled?: boolean;
103
+ };
96
104
  }
97
105
  interface NetlifyDevOptions extends Features {
98
106
  apiURL?: string;
package/dist/main.d.ts CHANGED
@@ -93,6 +93,14 @@ interface Features {
93
93
  */
94
94
  directories?: string[];
95
95
  };
96
+ /**
97
+ * Configuration options for Netlify AI Gateway.
98
+ *
99
+ * {@link} https://docs.netlify.com/ai/overview/
100
+ */
101
+ aiGateway?: {
102
+ enabled?: boolean;
103
+ };
96
104
  }
97
105
  interface NetlifyDevOptions extends Features {
98
106
  apiURL?: string;
package/dist/main.js CHANGED
@@ -320,6 +320,7 @@ var NetlifyDev = class {
320
320
  this.#cleanupJobs = [];
321
321
  this.#geolocationConfig = options.geolocation;
322
322
  this.#features = {
323
+ aiGateway: options.aiGateway?.enabled !== false,
323
324
  blobs: options.blobs?.enabled !== false,
324
325
  edgeFunctions: options.edgeFunctions?.enabled !== false,
325
326
  environmentVariables: options.environmentVariables?.enabled !== false,
@@ -509,7 +510,10 @@ var NetlifyDev = class {
509
510
  siteID: siteID ?? "0"
510
511
  });
511
512
  this.#cleanupJobs.push(() => runtime.stop());
512
- if (this.#features.environmentVariables && config?.api && siteID && config?.siteInfo?.url) {
513
+ if (this.#features.aiGateway && config?.siteInfo?.capabilities?.ai_gateway_disabled) {
514
+ this.#features.aiGateway = false;
515
+ }
516
+ if (this.#features.aiGateway && this.#features.environmentVariables && config?.api && siteID && config?.siteInfo?.url) {
513
517
  await setupAIGateway({
514
518
  api: config.api,
515
519
  env: config.env || {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/dev",
3
- "version": "4.8.8",
3
+ "version": "4.9.0",
4
4
  "description": "Emulation of the Netlify environment for local development",
5
5
  "type": "module",
6
6
  "engines": {
@@ -50,18 +50,18 @@
50
50
  },
51
51
  "author": "Netlify Inc.",
52
52
  "devDependencies": {
53
- "@netlify/api": "^14.0.12",
53
+ "@netlify/api": "^14.0.13",
54
54
  "@netlify/types": "2.3.0",
55
55
  "tsup": "^8.0.0",
56
56
  "vitest": "^3.0.0"
57
57
  },
58
58
  "dependencies": {
59
- "@netlify/ai": "^0.3.5",
59
+ "@netlify/ai": "^0.3.6",
60
60
  "@netlify/blobs": "10.5.0",
61
- "@netlify/config": "^24.2.0",
61
+ "@netlify/config": "^24.3.0",
62
62
  "@netlify/dev-utils": "4.3.3",
63
- "@netlify/edge-functions-dev": "1.0.8",
64
- "@netlify/functions-dev": "1.1.8",
63
+ "@netlify/edge-functions-dev": "1.0.9",
64
+ "@netlify/functions-dev": "1.1.9",
65
65
  "@netlify/headers": "2.1.3",
66
66
  "@netlify/images": "1.3.3",
67
67
  "@netlify/redirects": "3.1.4",