@monkeyplus/flow 6.0.81 → 6.0.82
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { dirname } from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
|
-
import
|
|
4
|
+
import * as runtime from "nitro/runtime-config";
|
|
5
5
|
import { createImageResolver } from "./image.mjs";
|
|
6
6
|
import { loadImageRenames } from "./renames.mjs";
|
|
7
7
|
let cachedKey;
|
|
@@ -20,8 +20,7 @@ function getEnvFlowImagesRuntimeConfig() {
|
|
|
20
20
|
}
|
|
21
21
|
function getFlowImagesRuntimeConfig() {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
return runtime.flow?.images || getEnvFlowImagesRuntimeConfig();
|
|
23
|
+
return runtime.useRuntimeConfig?.().flow?.images || getEnvFlowImagesRuntimeConfig();
|
|
25
24
|
} catch {
|
|
26
25
|
return getEnvFlowImagesRuntimeConfig();
|
|
27
26
|
}
|
package/package.json
CHANGED
package/server/lib/pages.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as runtime from "nitro/runtime-config";
|
|
2
2
|
import flowVirtualConfig from "virtual:flow/config";
|
|
3
3
|
import layoutContexts from "virtual:flow/layout-contexts";
|
|
4
4
|
import pageDefinitions from "virtual:flow/pages";
|
|
@@ -38,8 +38,8 @@ const dynamicRouteCache = /* @__PURE__ */ new Map();
|
|
|
38
38
|
function getFlowRuntimeConfig() {
|
|
39
39
|
try {
|
|
40
40
|
let config = {};
|
|
41
|
-
if (typeof useRuntimeConfig === "function") {
|
|
42
|
-
config = useRuntimeConfig() || {};
|
|
41
|
+
if (typeof runtime.useRuntimeConfig === "function") {
|
|
42
|
+
config = runtime.useRuntimeConfig() || {};
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
45
|
...config,
|