@arkstack/driver-h3 0.14.16 → 0.14.18

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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as staticAssetHandler } from "./middlewares-DWDWNHGY.js";
1
+ import { t as staticAssetHandler } from "./middlewares-R1nVIoY_.js";
2
2
  import { ArkstackKitDriver } from "@arkstack/contract";
3
3
  import { H3, HTTPResponse, serve, toResponse } from "h3";
4
4
  import { ErrorHandler, Logger, env, renderError, resolveRuntimeModule } from "@arkstack/common";
@@ -1,2 +1,2 @@
1
- import { a as CorsMiddleware, c as auth, i as requestLogger, n as resora, o as cors, r as RequestLoggerMiddleware, s as AuthMiddleware, t as staticAssetHandler } from "../middlewares-DWDWNHGY.js";
1
+ import { a as CorsMiddleware, c as auth, i as requestLogger, n as resora, o as cors, r as RequestLoggerMiddleware, s as AuthMiddleware, t as staticAssetHandler } from "../middlewares-R1nVIoY_.js";
2
2
  export { AuthMiddleware, CorsMiddleware, RequestLoggerMiddleware, auth, cors, requestLogger, resora, staticAssetHandler };
@@ -1,6 +1,6 @@
1
1
  import { Arkstack } from "@arkstack/contract";
2
2
  import { serveStatic } from "h3";
3
- import { Logger, config, nodeEnv } from "@arkstack/common";
3
+ import { Logger, config, nodeEnv, resolveRuntimeDir } from "@arkstack/common";
4
4
  import { Hook } from "@arkstack/foundry";
5
5
  import { applyRuntimeConfig, getDefaultConfig, runWithCtx, setCtx } from "resora";
6
6
  import { join, resolve } from "node:path";
@@ -324,12 +324,17 @@ var RequestLoggerMiddleware = class {
324
324
  * async context so downstream handlers resolve the correct context.
325
325
  */
326
326
  const resora = () => {
327
+ let resources;
327
328
  return async (event, next) => {
328
329
  try {
329
- applyRuntimeConfig({
330
- ...getDefaultConfig(),
331
- ...config("resources", {})
332
- });
330
+ if (!resources) {
331
+ resources = {
332
+ ...getDefaultConfig(),
333
+ ...config("resources", {})
334
+ };
335
+ if (typeof resources.resourcesDir === "string") resources.resourcesDir = resolveRuntimeDir(resources.resourcesDir);
336
+ }
337
+ applyRuntimeConfig(resources);
333
338
  } catch {}
334
339
  const ctx = {
335
340
  req: event.req,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkstack/driver-h3",
3
- "version": "0.14.16",
3
+ "version": "0.14.18",
4
4
  "type": "module",
5
5
  "description": "H3 driver for Arkstack, providing H3-based runtime integration for the framework.",
6
6
  "homepage": "https://arkstack.toneflix.net",
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@ngrok/ngrok": "^1.7.0",
41
- "@resora/plugin-clear-router": "^1.0.63",
42
- "clear-router": "^2.8.8",
43
- "resora": "^1.3.26",
44
- "@arkstack/contract": "^0.14.16"
41
+ "@resora/plugin-clear-router": "^1.0.65",
42
+ "clear-router": "^2.8.9",
43
+ "resora": "^1.3.27",
44
+ "@arkstack/contract": "^0.14.18"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "h3": "2.0.1-rc.22",
48
- "@arkstack/auth": "^0.14.16",
49
- "@arkstack/foundry": "^0.14.16",
50
- "@arkstack/common": "^0.14.16"
48
+ "@arkstack/foundry": "^0.14.18",
49
+ "@arkstack/common": "^0.14.18",
50
+ "@arkstack/auth": "^0.14.18"
51
51
  },
52
52
  "peerDependenciesMeta": {
53
53
  "@arkstack/auth": {