Socket
Socket
Sign inDemoInstall

druxt

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

druxt - npm Package Compare versions

Comparing version 0.21.1 to 0.22.0

53

dist/druxt.esm.js

@@ -253,3 +253,3 @@ import chalk from 'chalk';

var name = "druxt";
var version = "0.21.1";
var version = "0.22.0";
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";

@@ -296,7 +296,7 @@ var keywords = [

"@nuxtjs/proxy": "^2.1.0",
"@vue/devtools-api": "^6.4.5",
"@vue/devtools-api": "^6.5.0",
chalk: "^4.1.2",
deepmerge: "^4.2.2",
"drupal-jsonapi-params": "^2.1.0",
"express-rate-limit": "^6.6.0",
deepmerge: "^4.3.1",
"drupal-jsonapi-params": "^2.2.0",
"express-rate-limit": "^6.7.0",
"launch-editor": "^2.6.0",

@@ -308,3 +308,3 @@ md5: "^2.3.0",

var devDependencies = {
"@storybook/addon-docs": "^6.5.10"
"@storybook/addon-docs": "^6.5.16"
};

@@ -316,4 +316,4 @@ var peerDependencies = {

var optionalDependencies = {
"core-js": "^3.25.1",
vue: "^2.7.10",
"core-js": "^3.31.0",
vue: "^2.7.14",
vuex: "^3.6.2"

@@ -528,9 +528,29 @@ };

Vue.set(state.resources[type][id], prefix, resource);
},
flushCollection(state, { type, hash, prefix }) {
if (!type)
Vue.set(state, "collections", {});
else if (type && !hash && !prefix)
Vue.set(state.collections, type, {});
else if (type && hash && !prefix)
Vue.set(state.collections[type], hash, {});
else if (type && hash && prefix)
Vue.set(state.collections[type][hash], prefix, {});
},
flushResource(state, { type, id, prefix }) {
if (!type)
Vue.set(state, "resources", {});
else if (type && !id && !prefix)
Vue.set(state.resources, type, {});
else if (type && id && !prefix)
Vue.set(state.resources[type], id, {});
else if (type && id && prefix)
Vue.set(state.resources[type][id], prefix, {});
}
},
actions: {
async getCollection({ commit, state }, { type, query, prefix }) {
async getCollection({ commit, state }, { type, query, prefix, bypassCache = false }) {
const queryObject = getDrupalJsonApiParams(query).getQueryObject();
const hash = query ? md5(JSON.stringify({ ...queryObject, fields: {}, include: [] })) : "_default";
if (((state.collections[type] || {})[hash] || {})[prefix]) {
if (!bypassCache && ((state.collections[type] || {})[hash] || {})[prefix]) {
return {

@@ -545,3 +565,3 @@ ...state.collections[type][hash][prefix],

},
async getResource({ commit, dispatch, state }, { type, id, query, prefix }) {
async getResource({ commit, dispatch, state }, { type, id, query, prefix, bypassCache = false }) {
const storedResource = ((state.resources[type] || {})[id] || {})[prefix] ? { ...state.resources[type][id][prefix] } : null;

@@ -575,3 +595,3 @@ const queryObject = getDrupalJsonApiParams(query).getQueryObject();

}
if ((storedResource || {})._druxt_full) {
if (!bypassCache && (storedResource || {})._druxt_full) {
return storedResource;

@@ -592,5 +612,8 @@ }

let resource;
if (!storedResource || fields) {
resource = await this.$druxt.getResource(type, id, getDrupalJsonApiParams(queryObject), prefix);
commit("addResource", { prefix, resource: { ...resource } });
if (bypassCache || !storedResource || fields) {
try {
resource = await this.$druxt.getResource(type, id, getDrupalJsonApiParams(queryObject), prefix);
commit("addResource", { prefix, resource: { ...resource } });
} catch (e) {
}
}

@@ -597,0 +620,0 @@ const result = { ...((state.resources[type] || {})[id] || {})[prefix] };

@@ -266,3 +266,3 @@ 'use strict';

var name = "druxt";
var version = "0.21.1";
var version = "0.22.0";
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";

@@ -309,7 +309,7 @@ var keywords = [

"@nuxtjs/proxy": "^2.1.0",
"@vue/devtools-api": "^6.4.5",
"@vue/devtools-api": "^6.5.0",
chalk: "^4.1.2",
deepmerge: "^4.2.2",
"drupal-jsonapi-params": "^2.1.0",
"express-rate-limit": "^6.6.0",
deepmerge: "^4.3.1",
"drupal-jsonapi-params": "^2.2.0",
"express-rate-limit": "^6.7.0",
"launch-editor": "^2.6.0",

@@ -321,3 +321,3 @@ md5: "^2.3.0",

var devDependencies = {
"@storybook/addon-docs": "^6.5.10"
"@storybook/addon-docs": "^6.5.16"
};

@@ -329,4 +329,4 @@ var peerDependencies = {

var optionalDependencies = {
"core-js": "^3.25.1",
vue: "^2.7.10",
"core-js": "^3.31.0",
vue: "^2.7.14",
vuex: "^3.6.2"

@@ -541,9 +541,29 @@ };

Vue__default["default"].set(state.resources[type][id], prefix, resource);
},
flushCollection(state, { type, hash, prefix }) {
if (!type)
Vue__default["default"].set(state, "collections", {});
else if (type && !hash && !prefix)
Vue__default["default"].set(state.collections, type, {});
else if (type && hash && !prefix)
Vue__default["default"].set(state.collections[type], hash, {});
else if (type && hash && prefix)
Vue__default["default"].set(state.collections[type][hash], prefix, {});
},
flushResource(state, { type, id, prefix }) {
if (!type)
Vue__default["default"].set(state, "resources", {});
else if (type && !id && !prefix)
Vue__default["default"].set(state.resources, type, {});
else if (type && id && !prefix)
Vue__default["default"].set(state.resources[type], id, {});
else if (type && id && prefix)
Vue__default["default"].set(state.resources[type][id], prefix, {});
}
},
actions: {
async getCollection({ commit, state }, { type, query, prefix }) {
async getCollection({ commit, state }, { type, query, prefix, bypassCache = false }) {
const queryObject = getDrupalJsonApiParams(query).getQueryObject();
const hash = query ? md5__default["default"](JSON.stringify({ ...queryObject, fields: {}, include: [] })) : "_default";
if (((state.collections[type] || {})[hash] || {})[prefix]) {
if (!bypassCache && ((state.collections[type] || {})[hash] || {})[prefix]) {
return {

@@ -558,3 +578,3 @@ ...state.collections[type][hash][prefix],

},
async getResource({ commit, dispatch, state }, { type, id, query, prefix }) {
async getResource({ commit, dispatch, state }, { type, id, query, prefix, bypassCache = false }) {
const storedResource = ((state.resources[type] || {})[id] || {})[prefix] ? { ...state.resources[type][id][prefix] } : null;

@@ -588,3 +608,3 @@ const queryObject = getDrupalJsonApiParams(query).getQueryObject();

}
if ((storedResource || {})._druxt_full) {
if (!bypassCache && (storedResource || {})._druxt_full) {
return storedResource;

@@ -605,5 +625,8 @@ }

let resource;
if (!storedResource || fields) {
resource = await this.$druxt.getResource(type, id, getDrupalJsonApiParams(queryObject), prefix);
commit("addResource", { prefix, resource: { ...resource } });
if (bypassCache || !storedResource || fields) {
try {
resource = await this.$druxt.getResource(type, id, getDrupalJsonApiParams(queryObject), prefix);
commit("addResource", { prefix, resource: { ...resource } });
} catch (e) {
}
}

@@ -610,0 +633,0 @@ const result = { ...((state.resources[type] || {})[id] || {})[prefix] };

{
"name": "druxt",
"version": "0.21.1",
"version": "0.22.0",
"description": "The Fully Decoupled Drupal Framework for Nuxt.js.",

@@ -45,7 +45,7 @@ "keywords": [

"@nuxtjs/proxy": "^2.1.0",
"@vue/devtools-api": "^6.4.5",
"@vue/devtools-api": "^6.5.0",
"chalk": "^4.1.2",
"deepmerge": "^4.2.2",
"drupal-jsonapi-params": "^2.1.0",
"express-rate-limit": "^6.6.0",
"deepmerge": "^4.3.1",
"drupal-jsonapi-params": "^2.2.0",
"express-rate-limit": "^6.7.0",
"launch-editor": "^2.6.0",

@@ -57,3 +57,3 @@ "md5": "^2.3.0",

"devDependencies": {
"@storybook/addon-docs": "^6.5.10"
"@storybook/addon-docs": "^6.5.16"
},

@@ -65,4 +65,4 @@ "peerDependencies": {

"optionalDependencies": {
"core-js": "^3.25.1",
"vue": "^2.7.10",
"core-js": "^3.31.0",
"vue": "^2.7.14",
"vuex": "^3.6.2"

@@ -69,0 +69,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc