druxt-schema 0.10.1 → 0.10.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.
@@ -246,6 +246,9 @@ const DruxtSchemaNuxtModule = function(moduleOptions = {}) {
246
246
  proxy: { ...options.proxy || {}, api: false }
247
247
  });
248
248
  const { schemas } = await druxtSchema.get();
249
+ if (!Object.entries(schemas).length) {
250
+ throw new Error("No Druxt Schema files generated.\n Have you created any content types yet?");
251
+ }
249
252
  for (const name in schemas) {
250
253
  const schema = schemas[name];
251
254
  if (typeof schema === "undefined")
@@ -256,7 +259,7 @@ const DruxtSchemaNuxtModule = function(moduleOptions = {}) {
256
259
  options: { schema }
257
260
  });
258
261
  }
259
- consola.success("Druxt schema generated");
262
+ consola.success("Druxt schema files generated");
260
263
  });
261
264
  };
262
265
  DruxtSchemaNuxtModule.meta = require("../package.json");
@@ -254,6 +254,9 @@ const DruxtSchemaNuxtModule = function(moduleOptions = {}) {
254
254
  proxy: { ...options.proxy || {}, api: false }
255
255
  });
256
256
  const { schemas } = await druxtSchema.get();
257
+ if (!Object.entries(schemas).length) {
258
+ throw new Error("No Druxt Schema files generated.\n Have you created any content types yet?");
259
+ }
257
260
  for (const name in schemas) {
258
261
  const schema = schemas[name];
259
262
  if (typeof schema === "undefined")
@@ -264,7 +267,7 @@ const DruxtSchemaNuxtModule = function(moduleOptions = {}) {
264
267
  options: { schema }
265
268
  });
266
269
  }
267
- consola__default['default'].success("Druxt schema generated");
270
+ consola__default['default'].success("Druxt schema files generated");
268
271
  });
269
272
  };
270
273
  DruxtSchemaNuxtModule.meta = require("../package.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "druxt-schema",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "description": "Drupal Content Entity schema generator for Druxt with support for View and Form displays.",
5
5
  "keywords": [
6
6
  "cms",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "consola": "^2.15.0",
43
43
  "drupal-jsonapi-params": "^1.2.2",
44
- "druxt": "^0.17.0"
44
+ "druxt": "^0.18.0"
45
45
  },
46
46
  "optionalDependencies": {
47
47
  "vue": "^2.6.14",