druxt-schema 0.10.4 → 0.11.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.
@@ -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
- return (await this.druxt.getCollectionAll(resourceType, query)).map((collection) => collection.data.filter((data) => !!data.attributes.status).map((data) => ({
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,
@@ -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
- return (await this.druxt.getCollectionAll(resourceType, query)).map((collection) => collection.data.filter((data) => !!data.attributes.status).map((data) => ({
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "druxt-schema",
3
- "version": "0.10.4",
3
+ "version": "0.11.1",
4
4
  "description": "Drupal Content Entity schema generator for Druxt with support for View and Form displays.",
5
5
  "keywords": [
6
6
  "cms",
@@ -40,11 +40,11 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "consola": "^2.15.3",
43
- "drupal-jsonapi-params": "^2.0.0",
44
- "druxt": "^0.19.0"
43
+ "drupal-jsonapi-params": "^2.1.0",
44
+ "druxt": "^0.21.0"
45
45
  },
46
46
  "optionalDependencies": {
47
- "vue": "^2.6.14",
47
+ "vue": "^2.7.10",
48
48
  "vuex": "^3.6.2"
49
49
  },
50
50
  "publishConfig": {