Socket
Socket
Sign inDemoInstall

druxt-router

Package Overview
Dependencies
4
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.24.2 to 0.25.0

11

CHANGELOG.md
# druxt-router
## 0.25.0
### Minor Changes
- 7b749bd: Added improved error handling.
### Patch Changes
- Updated dependencies [7b749bd]
- druxt@0.16.0
## 0.24.2

@@ -4,0 +15,0 @@

15

dist/druxt-router.esm.js

@@ -107,3 +107,3 @@ import { DruxtClient } from 'druxt';

const url = `/router/translate-path?path=${path}`;
const response = await this.druxt.axios.get(url, {
const response = await this.druxt.get(url, {
validateStatus: (status) => status < 500

@@ -151,5 +151,12 @@ });

if (!(response.status >= 200 && response.status < 300)) {
const error = new Error();
error.response = response;
throw error;
if (response.status === 404) {
if (typeof response.data !== "object") {
response.data = { errors: [{
detail: "Please ensure the Decoupled Router module is installed and configured correctly."
}] };
} else if (response.data.message || response.data.details) {
response.data.errors = [{ detail: [response.data.message, response.data.details].filter((s) => s).join("\n") }];
}
}
this.druxt.error({ response }, { url });
}

@@ -156,0 +163,0 @@ return route;

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

const url = `/router/translate-path?path=${path}`;
const response = await this.druxt.axios.get(url, {
const response = await this.druxt.get(url, {
validateStatus: (status) => status < 500

@@ -159,5 +159,12 @@ });

if (!(response.status >= 200 && response.status < 300)) {
const error = new Error();
error.response = response;
throw error;
if (response.status === 404) {
if (typeof response.data !== "object") {
response.data = { errors: [{
detail: "Please ensure the Decoupled Router module is installed and configured correctly."
}] };
} else if (response.data.message || response.data.details) {
response.data.errors = [{ detail: [response.data.message, response.data.details].filter((s) => s).join("\n") }];
}
}
this.druxt.error({ response }, { url });
}

@@ -164,0 +171,0 @@ return route;

{
"name": "druxt-router",
"version": "0.24.2",
"version": "0.25.0",
"description": "Drupal router for Nuxt, powered by the Drupal Decoupled Router module.",

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

"dependencies": {
"druxt": "^0.15.0",
"druxt": "^0.16.0",
"url-parse": "^1.4.7"

@@ -48,0 +48,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc