nitro-nightly 3.0.1-20251116-154428-b8b68d1b → 3.0.1-20251116-171456-64898bbc
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/_presets.mjs +6 -2
- package/dist/types/index.d.mts +49 -13
- package/package.json +1 -1
package/dist/_presets.mjs
CHANGED
|
@@ -1194,10 +1194,14 @@ const netlify = defineNitroPreset({
|
|
|
1194
1194
|
await writeHeaders(nitro);
|
|
1195
1195
|
await writeRedirects(nitro);
|
|
1196
1196
|
await promises.writeFile(join$1(nitro.options.output.dir, "server", "server.mjs"), generateNetlifyFunction(nitro));
|
|
1197
|
-
if (nitro.options.netlify) {
|
|
1197
|
+
if (nitro.options.netlify?.images) {
|
|
1198
|
+
nitro.options.netlify.config ||= {};
|
|
1199
|
+
nitro.options.netlify.config.images ||= nitro.options.netlify?.images;
|
|
1200
|
+
}
|
|
1201
|
+
if (Object.keys(nitro.options.netlify?.config || {}).length > 0) {
|
|
1198
1202
|
const configPath = join$1(nitro.options.output.dir, "../deploy/v1/config.json");
|
|
1199
1203
|
await promises.mkdir(dirname$1(configPath), { recursive: true });
|
|
1200
|
-
await promises.writeFile(configPath, JSON.stringify(nitro.options.netlify), "utf8");
|
|
1204
|
+
await promises.writeFile(configPath, JSON.stringify(nitro.options.netlify?.config), "utf8");
|
|
1201
1205
|
}
|
|
1202
1206
|
} }
|
|
1203
1207
|
}, {
|
package/dist/types/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { FetchOptions, FetchRequest, FetchResponse } from "ofetch";
|
|
|
5
5
|
import { IncomingMessage, OutgoingMessage } from "node:http";
|
|
6
6
|
import { H3Core, HTTPError, HTTPEvent, HTTPHandler, HTTPMethod, Middleware, ProxyOptions } from "h3";
|
|
7
7
|
import { Duplex } from "node:stream";
|
|
8
|
-
import { ServerRequest } from "srvx";
|
|
8
|
+
import { ServerRequest, ServerRequest as ServerRequest$1 } from "srvx";
|
|
9
9
|
import { Preset } from "unenv";
|
|
10
10
|
import { ConnectorName } from "db0";
|
|
11
11
|
import { JsxOptions, TransformOptions } from "oxc-transform";
|
|
@@ -157,7 +157,7 @@ interface NitroAppPlugin {
|
|
|
157
157
|
}): void;
|
|
158
158
|
}
|
|
159
159
|
interface NitroAsyncContext {
|
|
160
|
-
request: ServerRequest;
|
|
160
|
+
request: ServerRequest$1;
|
|
161
161
|
}
|
|
162
162
|
interface RenderResponse {
|
|
163
163
|
body: any;
|
|
@@ -1671,17 +1671,53 @@ interface AppHostingOutputBundleConfig {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
//#endregion
|
|
1673
1673
|
//#region src/presets/netlify/types.d.ts
|
|
1674
|
-
/**
|
|
1675
|
-
* Netlify options
|
|
1676
|
-
*/
|
|
1677
1674
|
interface NetlifyOptions {
|
|
1678
|
-
images
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1675
|
+
/** @deprecated Use `config.images` */
|
|
1676
|
+
images?: NetlifyImagesConfig;
|
|
1677
|
+
config?: NetlifyConfigJson;
|
|
1678
|
+
}
|
|
1679
|
+
interface NetlifyConfigJson {
|
|
1680
|
+
edge_functions?: NetlifyEdgeFunctionDeclaration[];
|
|
1681
|
+
functions?: NetlifyFunctionsConfig | NetlifyFunctionsConfigByPattern;
|
|
1682
|
+
headers?: NetlifyHeaderRule[];
|
|
1683
|
+
images?: NetlifyImagesConfig;
|
|
1684
|
+
redirects?: NetlifyRedirectRule[];
|
|
1685
|
+
"redirects!"?: NetlifyRedirectRule[];
|
|
1686
|
+
}
|
|
1687
|
+
interface NetlifyEdgeFunctionDeclaration {
|
|
1688
|
+
function: string;
|
|
1689
|
+
path?: string;
|
|
1690
|
+
pattern?: string;
|
|
1691
|
+
excludedPath?: string;
|
|
1692
|
+
excludedPattern?: string;
|
|
1693
|
+
cache?: string;
|
|
1694
|
+
[key: string]: unknown;
|
|
1695
|
+
}
|
|
1696
|
+
interface NetlifyFunctionsConfig extends NetlifyFunctionInlineConfig {
|
|
1697
|
+
directory?: string;
|
|
1698
|
+
}
|
|
1699
|
+
type NetlifyFunctionsConfigByPattern = Record<string, NetlifyFunctionInlineConfig>;
|
|
1700
|
+
interface NetlifyFunctionInlineConfig {
|
|
1701
|
+
included_files?: string[];
|
|
1702
|
+
[key: string]: unknown;
|
|
1703
|
+
}
|
|
1704
|
+
interface NetlifyHeaderRule {
|
|
1705
|
+
for: string;
|
|
1706
|
+
values: Record<string, string>;
|
|
1707
|
+
[key: string]: unknown;
|
|
1708
|
+
}
|
|
1709
|
+
interface NetlifyImagesConfig {
|
|
1710
|
+
remote_images?: string[];
|
|
1711
|
+
[key: string]: unknown;
|
|
1712
|
+
}
|
|
1713
|
+
interface NetlifyRedirectRule {
|
|
1714
|
+
from: string;
|
|
1715
|
+
to: string;
|
|
1716
|
+
status?: number;
|
|
1717
|
+
force?: boolean;
|
|
1718
|
+
conditions?: Record<string, string[]>;
|
|
1719
|
+
query?: Record<string, string>;
|
|
1720
|
+
[key: string]: unknown;
|
|
1685
1721
|
}
|
|
1686
1722
|
//#endregion
|
|
1687
1723
|
//#region src/presets/vercel/types.d.ts
|
|
@@ -3138,4 +3174,4 @@ declare module "srvx" {
|
|
|
3138
3174
|
}
|
|
3139
3175
|
}
|
|
3140
3176
|
//#endregion
|
|
3141
|
-
export { $Fetch, AssetMeta, AvailableRouterMethod, Base$Fetch, CacheEntry, CacheOptions, CachedEventHandlerOptions, CaptureError, CapturedErrorContext, CompressOptions, DatabaseConnectionConfig, DatabaseConnectionConfigs, DatabaseConnectionName, DevMessageListener, DevRPCHooks, DevWorker, EventHandlerFormat, ExtractedRouteMethod, FetchHandler, H3Event$Fetch, H3EventFetch, HTTPstatus, InternalApi, LoadConfigOptions, MatchedRouteRule, MatchedRouteRules, MatchedRoutes, MiddlewareOf, Nitro, NitroApp, NitroAppPlugin, NitroAsyncContext, NitroBuildInfo, NitroConfig, NitroDevEventHandler, NitroDevServerOptions, NitroDynamicConfig, NitroErrorHandler, NitroEventHandler, NitroFetchOptions, NitroFetchRequest, NitroFrameworkInfo, NitroHooks, NitroImportMeta, NitroModule, NitroModuleInput, type NitroOpenAPIConfig, NitroOptions, NitroPreset, NitroPresetMeta, NitroRouteConfig, NitroRouteMeta, NitroRouteRules, NitroRuntimeConfig, NitroRuntimeConfigApp, NitroRuntimeHooks, NitroTypes, type NodeExternalsOptions, OXCOptions, PrerenderGenerateRoute, PrerenderRoute, PublicAsset, PublicAssetDir, RenderContext, RenderHandler, RenderResponse, ResponseCacheEntry, RollupConfig, RollupVirtualOptions, Serialize, SerializeObject, SerializeTuple, ServerAssetDir, ServerAssetOptions, Simplify, StorageMounts, Task, TaskContext, TaskEvent, TaskMeta, TaskPayload, TaskResult, TaskRunnerOptions, TypedInternalResponse, UpgradeHandler, VirtualModule, WorkerAddress, WorkerHooks };
|
|
3177
|
+
export { $Fetch, AssetMeta, AvailableRouterMethod, Base$Fetch, CacheEntry, CacheOptions, CachedEventHandlerOptions, CaptureError, CapturedErrorContext, CompressOptions, DatabaseConnectionConfig, DatabaseConnectionConfigs, DatabaseConnectionName, DevMessageListener, DevRPCHooks, DevWorker, EventHandlerFormat, ExtractedRouteMethod, FetchHandler, H3Event$Fetch, H3EventFetch, HTTPstatus, InternalApi, LoadConfigOptions, MatchedRouteRule, MatchedRouteRules, MatchedRoutes, MiddlewareOf, Nitro, NitroApp, NitroAppPlugin, NitroAsyncContext, NitroBuildInfo, NitroConfig, NitroDevEventHandler, NitroDevServerOptions, NitroDynamicConfig, NitroErrorHandler, NitroEventHandler, NitroFetchOptions, NitroFetchRequest, NitroFrameworkInfo, NitroHooks, NitroImportMeta, NitroModule, NitroModuleInput, type NitroOpenAPIConfig, NitroOptions, NitroPreset, NitroPresetMeta, NitroRouteConfig, NitroRouteMeta, NitroRouteRules, NitroRuntimeConfig, NitroRuntimeConfigApp, NitroRuntimeHooks, NitroTypes, type NodeExternalsOptions, OXCOptions, PrerenderGenerateRoute, PrerenderRoute, PublicAsset, PublicAssetDir, RenderContext, RenderHandler, RenderResponse, ResponseCacheEntry, RollupConfig, RollupVirtualOptions, Serialize, SerializeObject, SerializeTuple, ServerAssetDir, ServerAssetOptions, type ServerRequest, Simplify, StorageMounts, Task, TaskContext, TaskEvent, TaskMeta, TaskPayload, TaskResult, TaskRunnerOptions, TypedInternalResponse, UpgradeHandler, VirtualModule, WorkerAddress, WorkerHooks };
|
package/package.json
CHANGED