@monkeyplus/flow 6.0.110 → 6.0.112
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.
|
@@ -127,7 +127,6 @@ export default defineFlowModule({
|
|
|
127
127
|
dirImages: options.dirImages
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
|
-
console.log("imagesRuntimeConfig", imagesRuntimeConfig);
|
|
131
130
|
process.env.FLOW_IMAGES_RUNTIME_CONFIG = JSON.stringify(imagesRuntimeConfig);
|
|
132
131
|
if (shouldGenerateOutput) {
|
|
133
132
|
rmSync(generatedManifestPath, { force: true });
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { appendFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { dirname } from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
|
-
import { useRuntimeConfig } from "nitro/runtime-config";
|
|
5
4
|
import { createImageResolver } from "./image.mjs";
|
|
6
5
|
import { loadImageRenames } from "./renames.mjs";
|
|
7
6
|
let cachedKey;
|
|
@@ -41,7 +40,6 @@ export function getFlowImageBootPayload(config = getFlowImagesRuntimeConfig()) {
|
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
export function getFlowImageRuntimeUtils(config = getFlowImagesRuntimeConfig()) {
|
|
44
|
-
console.log("Config......", config, "....", useRuntimeConfig());
|
|
45
43
|
if (!config) {
|
|
46
44
|
return void 0;
|
|
47
45
|
}
|
package/package.json
CHANGED
|
@@ -69,6 +69,7 @@ export default defineComponent({
|
|
|
69
69
|
baseURL: "/_ipx",
|
|
70
70
|
dirImages: "/images"
|
|
71
71
|
});
|
|
72
|
+
console.log("mkPictureOptions", options.value);
|
|
72
73
|
const originalFormat = () => getFileExtension(resolvedSrc.value);
|
|
73
74
|
const isTransparent = () => ["png", "webp", "gif"].includes(originalFormat());
|
|
74
75
|
const nFormat = () => {
|
|
@@ -127,20 +128,6 @@ export default defineComponent({
|
|
|
127
128
|
return typeof thumbnail === "string" ? thumbnail : resolvedSrc.value;
|
|
128
129
|
});
|
|
129
130
|
return () => {
|
|
130
|
-
if (isRuntimeLambda()) {
|
|
131
|
-
const meta = imageUtils.getImageMeta?.(resolvedSrc.value);
|
|
132
|
-
const lambdaSrc = meta?.rename || resolvedSrc.value;
|
|
133
|
-
return h("img", {
|
|
134
|
-
...attrs,
|
|
135
|
-
...nImgAttrs.value,
|
|
136
|
-
"src": lambdaSrc,
|
|
137
|
-
"alt": props.alt || image.value.alt,
|
|
138
|
-
"title": props.title || image.value.title,
|
|
139
|
-
"width": props.eWidth || nImgAttrs.value.width,
|
|
140
|
-
"height": props.eHeight || nImgAttrs.value.height,
|
|
141
|
-
"x-src": getLocalSource(resolvedSrc.value)
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
131
|
const primarySource = nSources.value[0] || { src: resolvedSrc.value, srcset: resolvedSrc.value };
|
|
145
132
|
const fallbackSource = nSources.value[1];
|
|
146
133
|
const compatibilityThumb = nThumbnail.value;
|
|
@@ -32,6 +32,7 @@ export function createBootImageUtils(boot) {
|
|
|
32
32
|
return {
|
|
33
33
|
getImage: resolver.getImage,
|
|
34
34
|
getImageMeta(src) {
|
|
35
|
+
console.log("getImageMeta", src, stateImages.all[src]);
|
|
35
36
|
return stateImages.all[src];
|
|
36
37
|
},
|
|
37
38
|
getImageOptions() {
|
|
@@ -66,7 +67,7 @@ export function useImage(props) {
|
|
|
66
67
|
grayscale: props.grayscale,
|
|
67
68
|
rotate: props.rotate,
|
|
68
69
|
size: props.size,
|
|
69
|
-
watermark: typeof props.watermark === "object" && props.watermark !== null ?
|
|
70
|
+
watermark: typeof props.watermark === "object" && props.watermark !== null ? `b64${typeof btoa !== "undefined" ? btoa(unescape(encodeURIComponent(JSON.stringify(props.watermark)))) : ""}` : props.watermark
|
|
70
71
|
}));
|
|
71
72
|
const nOption = computed(() => ({
|
|
72
73
|
provider: props.provider,
|