@netlify/dev 4.3.8 → 4.4.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 +6 -1
- package/dist/main.d.cts +8 -0
- package/dist/main.d.ts +8 -0
- package/dist/main.js +6 -1
- package/package.json +2 -2
package/dist/main.cjs
CHANGED
|
@@ -316,6 +316,7 @@ var NetlifyDev = class {
|
|
|
316
316
|
#config;
|
|
317
317
|
#features;
|
|
318
318
|
#headersHandler;
|
|
319
|
+
#imageRemoteURLPatterns;
|
|
319
320
|
#imageHandler;
|
|
320
321
|
#logger;
|
|
321
322
|
#projectRoot;
|
|
@@ -344,6 +345,7 @@ var NetlifyDev = class {
|
|
|
344
345
|
static: options.staticFiles?.enabled !== false
|
|
345
346
|
};
|
|
346
347
|
this.#functionsServePath = import_node_path2.default.join(projectRoot, ".netlify", "functions-serve");
|
|
348
|
+
this.#imageRemoteURLPatterns = options.images?.remoteURLPatterns ?? [];
|
|
347
349
|
this.#logger = options.logger ?? globalThis.console;
|
|
348
350
|
this.#serverAddress = options.serverAddress;
|
|
349
351
|
this.#projectRoot = projectRoot;
|
|
@@ -619,8 +621,11 @@ var NetlifyDev = class {
|
|
|
619
621
|
});
|
|
620
622
|
}
|
|
621
623
|
if (this.#features.images) {
|
|
624
|
+
const remoteImages = [...this.#config?.config?.images?.remote_images ?? [], ...this.#imageRemoteURLPatterns];
|
|
622
625
|
this.#imageHandler = new import_images.ImageHandler({
|
|
623
|
-
imagesConfig:
|
|
626
|
+
imagesConfig: {
|
|
627
|
+
remote_images: remoteImages
|
|
628
|
+
},
|
|
624
629
|
logger: this.#logger
|
|
625
630
|
});
|
|
626
631
|
}
|
package/dist/main.d.cts
CHANGED
|
@@ -50,6 +50,14 @@ interface Features {
|
|
|
50
50
|
*/
|
|
51
51
|
images?: {
|
|
52
52
|
enabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Allowed URL patterns for remote images, described as an array of regular
|
|
55
|
+
* expression strings. This list will be merged with the `remote_images`
|
|
56
|
+
* configuration property.
|
|
57
|
+
*
|
|
58
|
+
* {@link} https://docs.netlify.com/image-cdn/overview/#remote-path
|
|
59
|
+
*/
|
|
60
|
+
remoteURLPatterns?: string[];
|
|
53
61
|
};
|
|
54
62
|
/**
|
|
55
63
|
* Configuration options for Netlify redirects and rewrites.
|
package/dist/main.d.ts
CHANGED
|
@@ -50,6 +50,14 @@ interface Features {
|
|
|
50
50
|
*/
|
|
51
51
|
images?: {
|
|
52
52
|
enabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Allowed URL patterns for remote images, described as an array of regular
|
|
55
|
+
* expression strings. This list will be merged with the `remote_images`
|
|
56
|
+
* configuration property.
|
|
57
|
+
*
|
|
58
|
+
* {@link} https://docs.netlify.com/image-cdn/overview/#remote-path
|
|
59
|
+
*/
|
|
60
|
+
remoteURLPatterns?: string[];
|
|
53
61
|
};
|
|
54
62
|
/**
|
|
55
63
|
* Configuration options for Netlify redirects and rewrites.
|
package/dist/main.js
CHANGED
|
@@ -282,6 +282,7 @@ var NetlifyDev = class {
|
|
|
282
282
|
#config;
|
|
283
283
|
#features;
|
|
284
284
|
#headersHandler;
|
|
285
|
+
#imageRemoteURLPatterns;
|
|
285
286
|
#imageHandler;
|
|
286
287
|
#logger;
|
|
287
288
|
#projectRoot;
|
|
@@ -310,6 +311,7 @@ var NetlifyDev = class {
|
|
|
310
311
|
static: options.staticFiles?.enabled !== false
|
|
311
312
|
};
|
|
312
313
|
this.#functionsServePath = path2.join(projectRoot, ".netlify", "functions-serve");
|
|
314
|
+
this.#imageRemoteURLPatterns = options.images?.remoteURLPatterns ?? [];
|
|
313
315
|
this.#logger = options.logger ?? globalThis.console;
|
|
314
316
|
this.#serverAddress = options.serverAddress;
|
|
315
317
|
this.#projectRoot = projectRoot;
|
|
@@ -585,8 +587,11 @@ var NetlifyDev = class {
|
|
|
585
587
|
});
|
|
586
588
|
}
|
|
587
589
|
if (this.#features.images) {
|
|
590
|
+
const remoteImages = [...this.#config?.config?.images?.remote_images ?? [], ...this.#imageRemoteURLPatterns];
|
|
588
591
|
this.#imageHandler = new ImageHandler({
|
|
589
|
-
imagesConfig:
|
|
592
|
+
imagesConfig: {
|
|
593
|
+
remote_images: remoteImages
|
|
594
|
+
},
|
|
590
595
|
logger: this.#logger
|
|
591
596
|
});
|
|
592
597
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/dev",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Emulation of the Netlify environment for local development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@netlify/edge-functions": "2.15.6",
|
|
59
59
|
"@netlify/functions": "4.1.10",
|
|
60
60
|
"@netlify/headers": "2.0.4",
|
|
61
|
-
"@netlify/images": "1.
|
|
61
|
+
"@netlify/images": "1.2.0",
|
|
62
62
|
"@netlify/redirects": "3.0.4",
|
|
63
63
|
"@netlify/runtime": "4.0.8",
|
|
64
64
|
"@netlify/static": "3.0.4",
|