nuxt-site-config 0.7.4 → 0.7.5

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/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "bridge": false
6
6
  },
7
7
  "configKey": "site",
8
- "version": "0.7.4"
8
+ "version": "0.7.5"
9
9
  }
@@ -1,13 +1,19 @@
1
- import { defu } from "defu";
2
1
  import { joinURL } from "ufo";
3
2
  import { eventHandler, updateSiteConfig, useAppConfig, useNitroOrigin, useRuntimeConfig } from "#imports";
4
3
  export default eventHandler((e) => {
5
4
  if (!e.context.siteConfig) {
6
5
  const appConfig = useAppConfig();
7
6
  const { public: publicRuntimeConfig, app } = useRuntimeConfig();
8
- updateSiteConfig(e, defu(appConfig.site, publicRuntimeConfig.site, {
9
- // fallback to the origin
7
+ updateSiteConfig(e, {
8
+ _context: "nitro:init",
10
9
  url: joinURL(useNitroOrigin(e), app.baseURL)
11
- }));
10
+ });
11
+ updateSiteConfig(e, publicRuntimeConfig.site);
12
+ if (appConfig.site) {
13
+ updateSiteConfig(e, {
14
+ _context: "app:config",
15
+ ...appConfig.site
16
+ });
17
+ }
12
18
  }
13
19
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-site-config",
3
3
  "type": "module",
4
- "version": "0.7.4",
4
+ "version": "0.7.5",
5
5
  "packageManager": "pnpm@8.6.5",
6
6
  "description": "Shared site configuration for Nuxt 3 modules.",
7
7
  "license": "MIT",
@@ -28,10 +28,9 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@nuxt/kit": "3.6.1",
31
- "defu": "^6.1.2",
32
31
  "ufo": "^1.1.2",
33
- "nuxt-site-config-kit": "0.7.4",
34
- "site-config-stack": "0.7.4"
32
+ "nuxt-site-config-kit": "0.7.5",
33
+ "site-config-stack": "0.7.5"
35
34
  },
36
35
  "scripts": {
37
36
  "build": "nuxt-module-build --stub && nuxt-module-build prepare && nuxt-module-build",