druxt-schema 0.10.2 → 0.11.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.
package/dist/druxt-schema.esm.js
CHANGED
|
@@ -197,7 +197,13 @@ class DruxtSchema {
|
|
|
197
197
|
...["view", "form"].map(async (schemaType) => {
|
|
198
198
|
const resourceType = `entity_${schemaType}_display--entity_${schemaType}_display`;
|
|
199
199
|
const query = new DrupalJsonApiParams().addSort("drupal_internal__id");
|
|
200
|
-
|
|
200
|
+
const result = await this.druxt.getCollectionAll(resourceType, query);
|
|
201
|
+
try {
|
|
202
|
+
result.forEach((collection) => this.druxt.checkPermissions({ data: collection }));
|
|
203
|
+
} catch (err) {
|
|
204
|
+
this.druxt.error(err);
|
|
205
|
+
}
|
|
206
|
+
return result.map((collection) => collection.data.filter((data) => !!data.attributes.status).map((data) => ({
|
|
201
207
|
entityType: data.attributes.targetEntityType,
|
|
202
208
|
bundle: data.attributes.bundle,
|
|
203
209
|
mode: data.attributes.mode,
|
|
@@ -344,5 +350,4 @@ const DruxtSchemaStore = ({ store }) => {
|
|
|
344
350
|
});
|
|
345
351
|
};
|
|
346
352
|
|
|
347
|
-
export default
|
|
348
|
-
export { DruxtSchema, DruxtSchemaMixin, DruxtSchemaStore };
|
|
353
|
+
export { DruxtSchema, DruxtSchemaMixin, DruxtSchemaStore, DruxtSchemaNuxtModule as default };
|
package/dist/druxt-schema.ssr.js
CHANGED
|
@@ -205,7 +205,13 @@ class DruxtSchema {
|
|
|
205
205
|
...["view", "form"].map(async (schemaType) => {
|
|
206
206
|
const resourceType = `entity_${schemaType}_display--entity_${schemaType}_display`;
|
|
207
207
|
const query = new drupalJsonapiParams.DrupalJsonApiParams().addSort("drupal_internal__id");
|
|
208
|
-
|
|
208
|
+
const result = await this.druxt.getCollectionAll(resourceType, query);
|
|
209
|
+
try {
|
|
210
|
+
result.forEach((collection) => this.druxt.checkPermissions({ data: collection }));
|
|
211
|
+
} catch (err) {
|
|
212
|
+
this.druxt.error(err);
|
|
213
|
+
}
|
|
214
|
+
return result.map((collection) => collection.data.filter((data) => !!data.attributes.status).map((data) => ({
|
|
209
215
|
entityType: data.attributes.targetEntityType,
|
|
210
216
|
bundle: data.attributes.bundle,
|
|
211
217
|
mode: data.attributes.mode,
|
|
@@ -267,7 +273,7 @@ const DruxtSchemaNuxtModule = function(moduleOptions = {}) {
|
|
|
267
273
|
options: { schema }
|
|
268
274
|
});
|
|
269
275
|
}
|
|
270
|
-
consola__default[
|
|
276
|
+
consola__default["default"].success("Druxt schema files generated");
|
|
271
277
|
});
|
|
272
278
|
};
|
|
273
279
|
DruxtSchemaNuxtModule.meta = require("../package.json");
|
|
@@ -355,4 +361,4 @@ const DruxtSchemaStore = ({ store }) => {
|
|
|
355
361
|
exports.DruxtSchema = DruxtSchema;
|
|
356
362
|
exports.DruxtSchemaMixin = DruxtSchemaMixin;
|
|
357
363
|
exports.DruxtSchemaStore = DruxtSchemaStore;
|
|
358
|
-
exports
|
|
364
|
+
exports["default"] = DruxtSchemaNuxtModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "druxt-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Drupal Content Entity schema generator for Druxt with support for View and Form displays.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"templates"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"consola": "^2.15.
|
|
43
|
-
"drupal-jsonapi-params": "^
|
|
44
|
-
"druxt": "^0.
|
|
42
|
+
"consola": "^2.15.3",
|
|
43
|
+
"drupal-jsonapi-params": "^2.0.0",
|
|
44
|
+
"druxt": "^0.20.0"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
47
|
"vue": "^2.6.14",
|