@monkeyplus/flow 6.0.80 → 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,5 +1,5 @@
1
1
  import type { FlowImageBootPayload } from '../../../src/runtime/boot.ts';
2
- import type { FlowImageRuntimeUtils, FlowImagesRuntimeConfig } from './types.ts';
3
- export declare function getFlowImageBootPayload(config?: FlowImagesRuntimeConfig | undefined): FlowImageBootPayload | undefined;
4
- export declare function getFlowImageRuntimeUtils(config?: FlowImagesRuntimeConfig | undefined): FlowImageRuntimeUtils | undefined;
2
+ import type { FlowImageRuntimeUtils } from './types.ts';
3
+ export declare function getFlowImageBootPayload(config?: any): FlowImageBootPayload | undefined;
4
+ export declare function getFlowImageRuntimeUtils(config?: any): FlowImageRuntimeUtils | undefined;
5
5
  export declare function resetFlowImageRuntimeState(): void;
@@ -1,10 +1,9 @@
1
1
  import { appendFileSync, mkdirSync } from "node:fs";
2
- import { createRequire } from "node:module";
3
2
  import { dirname } from "node:path";
4
3
  import process from "node:process";
4
+ import * as runtime from "nitro/runtime-config";
5
5
  import { createImageResolver } from "./image.mjs";
6
6
  import { loadImageRenames } from "./renames.mjs";
7
- let runtimeConfigRequire;
8
7
  let cachedKey;
9
8
  let cachedUtils;
10
9
  let generatedEntryKeys = /* @__PURE__ */ new Set();
@@ -21,8 +20,6 @@ function getEnvFlowImagesRuntimeConfig() {
21
20
  }
22
21
  function getFlowImagesRuntimeConfig() {
23
22
  try {
24
- runtimeConfigRequire ??= createRequire(import.meta.url);
25
- const runtime = runtimeConfigRequire("nitro/runtime-config");
26
23
  return runtime.useRuntimeConfig?.().flow?.images || getEnvFlowImagesRuntimeConfig();
27
24
  } catch {
28
25
  return getEnvFlowImagesRuntimeConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkeyplus/flow",
3
- "version": "6.0.80",
3
+ "version": "6.0.82",
4
4
  "description": "@monkeyplus/flow package-first runtime with Vite, Nitro, Vue and a workspace playground.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -1,4 +1,4 @@
1
- import { createRequire } from "node:module";
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";
@@ -35,11 +35,8 @@ function mergeHeadDefinitions(...heads) {
35
35
  return result;
36
36
  }
37
37
  const dynamicRouteCache = /* @__PURE__ */ new Map();
38
- let runtimeConfigRequire;
39
38
  function getFlowRuntimeConfig() {
40
39
  try {
41
- runtimeConfigRequire ??= createRequire(import.meta.url);
42
- const runtime = runtimeConfigRequire("nitro/runtime-config");
43
40
  let config = {};
44
41
  if (typeof runtime.useRuntimeConfig === "function") {
45
42
  config = runtime.useRuntimeConfig() || {};