@netlify/dev 4.10.0 → 4.11.1
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 +13 -0
- package/dist/main.js +13 -0
- package/package.json +15 -6
package/dist/main.cjs
CHANGED
|
@@ -350,6 +350,7 @@ var NetlifyDev = class {
|
|
|
350
350
|
this.#features = {
|
|
351
351
|
aiGateway: options.aiGateway?.enabled !== false,
|
|
352
352
|
blobs: options.blobs?.enabled !== false,
|
|
353
|
+
db: import_node_process2.default.env.EXPERIMENTAL_NETLIFY_DB_ENABLED === "1",
|
|
353
354
|
edgeFunctions: options.edgeFunctions?.enabled !== false,
|
|
354
355
|
environmentVariables: options.environmentVariables?.enabled !== false,
|
|
355
356
|
functions: options.functions?.enabled !== false,
|
|
@@ -538,6 +539,18 @@ var NetlifyDev = class {
|
|
|
538
539
|
siteID: siteID ?? "0"
|
|
539
540
|
});
|
|
540
541
|
this.#cleanupJobs.push(() => runtime.stop());
|
|
542
|
+
if (this.#features.db) {
|
|
543
|
+
try {
|
|
544
|
+
const { NetlifyDB } = await import("@netlify/db-dev");
|
|
545
|
+
const dbDirectory = import_node_path2.default.join(this.#projectRoot, ".netlify", "db");
|
|
546
|
+
const db = new NetlifyDB({ directory: dbDirectory });
|
|
547
|
+
const connectionString = await db.start();
|
|
548
|
+
runtime.env.set("NETLIFY_DB_URL", connectionString);
|
|
549
|
+
this.#cleanupJobs.push(() => db.stop());
|
|
550
|
+
} catch {
|
|
551
|
+
this.#logger.warn("To use Netlify DB locally, install the @netlify/db-dev package.");
|
|
552
|
+
}
|
|
553
|
+
}
|
|
541
554
|
if (this.#features.aiGateway && config?.siteInfo?.capabilities?.ai_gateway_disabled) {
|
|
542
555
|
this.#features.aiGateway = false;
|
|
543
556
|
}
|
package/dist/main.js
CHANGED
|
@@ -322,6 +322,7 @@ var NetlifyDev = class {
|
|
|
322
322
|
this.#features = {
|
|
323
323
|
aiGateway: options.aiGateway?.enabled !== false,
|
|
324
324
|
blobs: options.blobs?.enabled !== false,
|
|
325
|
+
db: process2.env.EXPERIMENTAL_NETLIFY_DB_ENABLED === "1",
|
|
325
326
|
edgeFunctions: options.edgeFunctions?.enabled !== false,
|
|
326
327
|
environmentVariables: options.environmentVariables?.enabled !== false,
|
|
327
328
|
functions: options.functions?.enabled !== false,
|
|
@@ -510,6 +511,18 @@ var NetlifyDev = class {
|
|
|
510
511
|
siteID: siteID ?? "0"
|
|
511
512
|
});
|
|
512
513
|
this.#cleanupJobs.push(() => runtime.stop());
|
|
514
|
+
if (this.#features.db) {
|
|
515
|
+
try {
|
|
516
|
+
const { NetlifyDB } = await import("@netlify/db-dev");
|
|
517
|
+
const dbDirectory = path2.join(this.#projectRoot, ".netlify", "db");
|
|
518
|
+
const db = new NetlifyDB({ directory: dbDirectory });
|
|
519
|
+
const connectionString = await db.start();
|
|
520
|
+
runtime.env.set("NETLIFY_DB_URL", connectionString);
|
|
521
|
+
this.#cleanupJobs.push(() => db.stop());
|
|
522
|
+
} catch {
|
|
523
|
+
this.#logger.warn("To use Netlify DB locally, install the @netlify/db-dev package.");
|
|
524
|
+
}
|
|
525
|
+
}
|
|
513
526
|
if (this.#features.aiGateway && config?.siteInfo?.capabilities?.ai_gateway_disabled) {
|
|
514
527
|
this.#features.aiGateway = false;
|
|
515
528
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/dev",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.1",
|
|
4
4
|
"description": "Emulation of the Netlify environment for local development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -51,22 +51,31 @@
|
|
|
51
51
|
"author": "Netlify Inc.",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@netlify/api": "^14.0.13",
|
|
54
|
+
"@netlify/db-dev": "0.2.0",
|
|
54
55
|
"@netlify/types": "2.3.0",
|
|
55
56
|
"tsup": "^8.0.0",
|
|
56
57
|
"vitest": "^3.0.0"
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
|
-
"@netlify/ai": "^0.3.
|
|
60
|
-
"@netlify/blobs": "10.
|
|
60
|
+
"@netlify/ai": "^0.3.7",
|
|
61
|
+
"@netlify/blobs": "10.7.0",
|
|
61
62
|
"@netlify/config": "^24.3.0",
|
|
62
63
|
"@netlify/dev-utils": "4.3.3",
|
|
63
64
|
"@netlify/edge-functions-dev": "1.0.10",
|
|
64
|
-
"@netlify/functions-dev": "1.1.
|
|
65
|
+
"@netlify/functions-dev": "1.1.11",
|
|
65
66
|
"@netlify/headers": "2.1.3",
|
|
66
67
|
"@netlify/images": "1.3.3",
|
|
67
|
-
"@netlify/redirects": "3.1.
|
|
68
|
-
"@netlify/runtime": "4.1.
|
|
68
|
+
"@netlify/redirects": "3.1.5",
|
|
69
|
+
"@netlify/runtime": "4.1.15",
|
|
69
70
|
"@netlify/static": "3.1.3",
|
|
70
71
|
"ulid": "^3.0.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"@netlify/db-dev": "1.0.0"
|
|
75
|
+
},
|
|
76
|
+
"peerDependenciesMeta": {
|
|
77
|
+
"@netlify/db-dev": {
|
|
78
|
+
"optional": true
|
|
79
|
+
}
|
|
71
80
|
}
|
|
72
81
|
}
|