@dyrected/nuxt 1.0.10 → 2.0.1

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
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@dyrected/nuxt",
3
3
  "configKey": "dyrected",
4
- "version": "1.0.9"
4
+ "version": "2.0.0"
5
5
  }
package/dist/module.mjs CHANGED
@@ -66,10 +66,16 @@ const module = defineNuxtModule({
66
66
  }
67
67
  nuxt.options.runtimeConfig.dyrected = runtimeConfig;
68
68
  nuxt.options.runtimeConfig.public.dyrected = {
69
- baseUrl: process.env.NUXT_PUBLIC_DYRECTED_URL || options.apiBase || `/${configPath}`,
69
+ baseUrl: process.env.NUXT_PUBLIC_DYRECTED_URL || options.apiBase,
70
70
  apiKey: process.env.NUXT_PUBLIC_DYRECTED_API_KEY || options.apiKey,
71
71
  siteId: options.siteId
72
72
  };
73
+ nuxt.options.build.transpile.push("@dyrected/admin");
74
+ nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {};
75
+ nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [];
76
+ if (!nuxt.options.vite.optimizeDeps.include.includes("@dyrected/admin")) {
77
+ nuxt.options.vite.optimizeDeps.include.push("@dyrected/admin");
78
+ }
73
79
  }
74
80
  });
75
81
 
@@ -5,7 +5,8 @@ export default defineNitroPlugin(async (nitroApp) => {
5
5
  if (runtimeConfig?.configPath) {
6
6
  try {
7
7
  const configPath = runtimeConfig.configPath;
8
- const { default: userConfig } = await import(configPath);
8
+ const { pathToFileURL } = await import("url");
9
+ const { default: userConfig } = await import(pathToFileURL(configPath).href);
9
10
  if (userConfig && userConfig.db) {
10
11
  globalThis.__dyrected_db = userConfig.db;
11
12
  console.log("[dyrected/nuxt] Database re-attached to global context");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyrected/nuxt",
3
- "version": "1.0.10",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "main": "./dist/module.mjs",
6
6
  "types": "./dist/module.d.ts",
@@ -10,9 +10,13 @@
10
10
  "dependencies": {
11
11
  "@nuxt/kit": "^3.11.2",
12
12
  "h3": "^1.15.0",
13
- "@dyrected/admin": "1.0.9",
14
- "@dyrected/core": "1.0.9",
15
- "@dyrected/sdk": "1.0.9"
13
+ "@dyrected/admin": "2.0.1",
14
+ "@dyrected/core": "2.1.0",
15
+ "@dyrected/sdk": "2.0.0"
16
+ },
17
+ "peerDependencies": {
18
+ "nuxt": "^3.0.0",
19
+ "vue": "^3.0.0"
16
20
  },
17
21
  "devDependencies": {
18
22
  "@nuxt/module-builder": "^0.5.5",