@stonecrop/nuxt 0.9.1 → 0.9.2

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@stonecrop/nuxt",
3
3
  "configKey": "stonecrop",
4
- "version": "0.9.1",
4
+ "version": "0.9.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -101,6 +101,10 @@ const module$1 = defineNuxtModule({
101
101
  addLayout(homepage, "home");
102
102
  const appDir = nuxt.options.srcDir;
103
103
  const doctypesDir = resolve(appDir, options.doctypesDir ?? "doctypes");
104
+ nuxt.options.runtimeConfig.stonecrop = {
105
+ ...nuxt.options.runtimeConfig.stonecrop ?? {},
106
+ doctypesDir
107
+ };
104
108
  if (existsSync(doctypesDir)) {
105
109
  try {
106
110
  const dirContents = await readdir(doctypesDir);
@@ -31,7 +31,7 @@ export default defineEventHandler(async (event) => {
31
31
  return {
32
32
  name: doctype.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" "),
33
33
  slug: doctype,
34
- schema: data.schema || []
34
+ schema: data.schema ?? data.fields ?? []
35
35
  };
36
36
  } catch (error) {
37
37
  throw createError({
@@ -20,7 +20,7 @@ export default defineEventHandler(async (event) => {
20
20
  return {
21
21
  name: name.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" "),
22
22
  slug: name,
23
- fieldCount: data.schema?.length || 0
23
+ fieldCount: (data.schema ?? data.fields)?.length || 0
24
24
  };
25
25
  })
26
26
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/nuxt",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Nuxt module for Stonecrop",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -44,14 +44,14 @@
44
44
  "jiti": "^2.4.2",
45
45
  "pathe": "^2.0.3",
46
46
  "prompts": "^2.4.2",
47
- "@stonecrop/aform": "0.9.1",
48
- "@stonecrop/graphql-middleware": "0.9.1",
49
- "@stonecrop/atable": "0.9.1",
50
- "@stonecrop/nuxt-grafserv": "0.9.1",
51
- "@stonecrop/casl-middleware": "0.9.1",
52
- "@stonecrop/node-editor": "0.9.1",
53
- "@stonecrop/schema": "0.9.1",
54
- "@stonecrop/stonecrop": "0.9.1"
47
+ "@stonecrop/atable": "0.9.2",
48
+ "@stonecrop/aform": "0.9.2",
49
+ "@stonecrop/graphql-middleware": "0.9.2",
50
+ "@stonecrop/node-editor": "0.9.2",
51
+ "@stonecrop/casl-middleware": "0.9.2",
52
+ "@stonecrop/nuxt-grafserv": "0.9.2",
53
+ "@stonecrop/stonecrop": "0.9.2",
54
+ "@stonecrop/schema": "0.9.2"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@eslint/js": "^9.39.2",