@easy-cms/nuxt 0.12.0 → 0.13.0

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.
Files changed (2) hide show
  1. package/dist/module.js +12 -2
  2. package/package.json +5 -5
package/dist/module.js CHANGED
@@ -4,10 +4,12 @@ import { createRequire } from "module";
4
4
  import { dirname, isAbsolute, join, relative, resolve } from "path";
5
5
  import { renderShell, SECURITY_HEADERS, SHELL_FILE } from "@easy-cms/admin";
6
6
  import {
7
+ applyPlugins,
7
8
  CONFIG_FILE_NAMES,
8
9
  DEFAULT_ADMIN_PATH,
9
10
  DEFAULT_API_PATH,
10
- importConfig
11
+ importConfig,
12
+ resolveAdminModule
11
13
  } from "@easy-cms/core";
12
14
  import {
13
15
  addImports,
@@ -122,7 +124,15 @@ export const headers = ${JSON.stringify(SECURITY_HEADERS)}
122
124
  const adminHandler = resolveRuntime("./runtime/admin.js");
123
125
  addServerHandler({ route: adminPath, handler: adminHandler });
124
126
  addServerHandler({ route: `${adminPath}/**`, handler: adminHandler });
125
- const traceInclude = rawConfig?.db?.bundle?.traceInclude ?? [];
127
+ const traceInclude = [...rawConfig?.db?.bundle?.traceInclude ?? []];
128
+ if (rawConfig) {
129
+ const withPlugins = await applyPlugins(rawConfig).catch(() => rawConfig);
130
+ for (const specifier of withPlugins?.admin?.modules ?? []) {
131
+ const file = resolveAdminModule(specifier, rootDir);
132
+ if (file) traceInclude.push(file);
133
+ else logger.warn(`Admin module "${specifier}" not found from ${rootDir}.`);
134
+ }
135
+ }
126
136
  if (traceInclude.length > 0) {
127
137
  const externals = nitro.externals ?? {};
128
138
  nitro.externals = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/nuxt",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Nuxt module for Easy CMS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,19 +20,19 @@
20
20
  "dependencies": {
21
21
  "@nuxt/kit": "^4.5.2",
22
22
  "h3": "^1.15.11",
23
- "@easy-cms/admin": "^0.12.0"
23
+ "@easy-cms/admin": "^0.13.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "nuxt": "^4.0.0",
27
- "@easy-cms/core": "^0.12.0"
27
+ "@easy-cms/core": "^0.13.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@nuxt/schema": "^4.5.2",
31
31
  "@nuxt/test-utils": "^4.3.2",
32
32
  "nuxt": "^4.5.2",
33
33
  "vue": "^3.5.0",
34
- "@easy-cms/core": "^0.12.0",
35
- "@easy-cms/db-sqlite": "^0.12.0"
34
+ "@easy-cms/core": "^0.13.0",
35
+ "@easy-cms/db-sqlite": "^0.13.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"