@monkeyplus/flow 6.0.110 → 6.0.113

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "6.0.110",
3
+ "version": "6.0.113",
4
4
  "description": "@monkeyplus/flow package-first runtime with Vite, Nitro, Vue and a workspace playground.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -17,20 +17,6 @@ function resolveRequest(input) {
17
17
  }
18
18
  async function resolvePrerenderFetchHandler() {
19
19
  prerenderFetchHandlerPromise ||= (async () => {
20
- if (typeof globalThis.useRuntimeConfig !== "function" && typeof globalThis.__nitro__?.runtimeConfig !== "undefined") {
21
- const config = globalThis.__nitro__.runtimeConfig;
22
- globalThis.useRuntimeConfig = () => config;
23
- }
24
- try {
25
- const ssrService = await import("../../.nitro/vite/services/ssr/index.js");
26
- const defaultService = ssrService.default || ssrService;
27
- const fetchHandler = defaultService?.fetch;
28
- if (typeof fetchHandler === "function") {
29
- return fetchHandler.bind(defaultService);
30
- }
31
- } catch (e) {
32
- console.error("[RENDERER] Native static import failed:", e);
33
- }
34
20
  for (const ssrServiceUrl of resolvePrerenderServiceUrls()) {
35
21
  try {
36
22
  const ssrService = await import(
@@ -74,6 +74,7 @@ export default defineComponent({
74
74
  baseURL: "/_ipx",
75
75
  dirImages: "/images"
76
76
  });
77
+ console.log("mkImageOptions", options.value);
77
78
  const nSizes = computed(() => {
78
79
  if (!props.sizes || !imageUtils.getImage?.getSizes) {
79
80
  return void 0;
@@ -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 ? "b64" + (typeof btoa !== "undefined" ? btoa(unescape(encodeURIComponent(JSON.stringify(props.watermark)))) : "") : props.watermark
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,