New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dewib/xhr-cache

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dewib/xhr-cache - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [3.2.1](https://github.com/gaetansenn/xhr-cache/compare/v3.2.0...v3.2.1) (2021-03-11)
### Bug Fixes
* inject plugin during build process ([1371e80](https://github.com/gaetansenn/xhr-cache/commit/1371e80580f9a36e77d26d5e988bf07f9b8822f6))
## [3.2.0](https://github.com/gaetansenn/xhr-cache/compare/v3.1.2...v3.2.0) (2021-03-11)

@@ -7,0 +14,0 @@

51

lib/module.js

@@ -210,5 +210,3 @@ import { join, resolve } from 'path'

module.exports = async function xhrCache () {
// Skip module during build
if (this.options._build !== undefined && this.options.dev === false) { return false }
// Set default path into static directory
// Set default path into static directory
defaultsConfig.path = join(this.nuxt.options.srcDir, defaultsConfig.rootFolder)

@@ -218,2 +216,27 @@

// Inject plugin
this.addPlugin({
src: resolve(__dirname, 'plugin.js'),
fileName: 'xhr-cache/plugin.js',
options: {
config: JSON.stringify({
rootUrl: conf.rootUrl,
rootFolder: conf.rootFolder,
serverUrl: conf.serverUrl
}),
resources: JSON.stringify(resources.map(resource => ({
id: resource.id
})))
}
})
// Extend xhrCache with plugins
if (conf.plugins) {
conf.plugins.forEach(p => this.options.plugins.push(p))
delete conf.plugins
}
// Skip server middleware injection during build
if (this.options._build !== undefined && this.options.dev === false) { return false }
conf.serverUrl = `http${this.options.server.https ? 's' : ''}://${this.options.server.host}:${this.options.server.port}`

@@ -335,24 +358,2 @@

})
// Inject plugin
this.addPlugin({
src: resolve(__dirname, 'plugin.js'),
fileName: 'xhr-cache/plugin.js',
options: {
config: JSON.stringify({
rootUrl: conf.rootUrl,
rootFolder: conf.rootFolder,
serverUrl: conf.serverUrl
}),
resources: JSON.stringify(resources.map(resource => ({
id: resource.id
})))
}
})
// Extend xhrCache with plugins
if (conf.plugins) {
conf.plugins.forEach(p => this.options.plugins.push(p))
delete conf.plugins
}
}
{
"name": "@dewib/xhr-cache",
"version": "3.2.0",
"version": "3.2.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Cache api resources and serve it as static resource",

@@ -1,2 +0,2 @@

# XHR Cache Module v3.2.0
# XHR Cache Module v3.2.1

@@ -3,0 +3,0 @@ [![npm version][npm-version-src]][npm-version-href]

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