@monkeyplus/flow 6.0.96 → 6.0.97
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.
|
@@ -8,6 +8,7 @@ import { defineFlowModule } from "../../src/runtime/config.mjs";
|
|
|
8
8
|
import { materializeGeneratedImages } from "./runtime/build.mjs";
|
|
9
9
|
import { screens } from "./runtime/helpers.mjs";
|
|
10
10
|
import { resetFlowImageRuntimeState } from "./runtime/server.mjs";
|
|
11
|
+
import { loadImageRenames } from "./runtime/renames.mjs";
|
|
11
12
|
import { withWatermark } from "./watermark.mjs";
|
|
12
13
|
function withoutTrailingSlash(value) {
|
|
13
14
|
return value.replace(/\/+$/, "");
|
|
@@ -106,6 +107,7 @@ export default defineFlowModule({
|
|
|
106
107
|
const isCloudflarePreset = preset === "cloudflare" || preset === "cloudflare-pages" || !!process.env.CF_PAGES;
|
|
107
108
|
const defaultOutputDir = isVercelPreset ? ".vercel/output/static" : isNetlifyPreset || isCloudflarePreset ? "dist" : ".output/public";
|
|
108
109
|
const nitroPublicDir = context.flowConfig.nitro?.output?.publicDir;
|
|
110
|
+
const precomputedRenames = loadImageRenames([renameDir, publicDir].filter(Boolean));
|
|
109
111
|
const imagesRuntimeConfig = {
|
|
110
112
|
dirRenames: renameDir,
|
|
111
113
|
dirFiles: options.dirFiles,
|
|
@@ -118,6 +120,7 @@ export default defineFlowModule({
|
|
|
118
120
|
generatedCacheManifestPath,
|
|
119
121
|
generate: shouldGenerateOutput,
|
|
120
122
|
netlifyCache: isNetlify,
|
|
123
|
+
all: precomputedRenames,
|
|
121
124
|
options: {
|
|
122
125
|
lazy: options.lazy,
|
|
123
126
|
screens: options.screens,
|
|
@@ -33,7 +33,7 @@ export function getFlowImageBootPayload(config = getFlowImagesRuntimeConfig()) {
|
|
|
33
33
|
}
|
|
34
34
|
const renameSources = [config.dirRenames, config.publicDir].filter(Boolean);
|
|
35
35
|
return {
|
|
36
|
-
all: loadImageRenames(renameSources),
|
|
36
|
+
all: config.all || loadImageRenames(renameSources),
|
|
37
37
|
options: { ...config.options },
|
|
38
38
|
generateOutput: !!config.generate,
|
|
39
39
|
...shouldExposeStrapiUrlToClient() && config.strapiURL ? { strapiURL: config.strapiURL } : {}
|
|
@@ -50,7 +50,7 @@ export function getFlowImageRuntimeUtils(config = getFlowImagesRuntimeConfig())
|
|
|
50
50
|
}
|
|
51
51
|
const renameSources = [config.dirRenames, config.publicDir].filter(Boolean);
|
|
52
52
|
const images = {
|
|
53
|
-
all: loadImageRenames(renameSources),
|
|
53
|
+
all: config.all || loadImageRenames(renameSources),
|
|
54
54
|
generate: {}
|
|
55
55
|
};
|
|
56
56
|
const resolver = createImageResolver(config.options, images, {
|
|
Binary file
|