Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cache-buster

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-buster - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

21

bin/index.js

@@ -6,16 +6,16 @@ #!/usr/bin/env node

commander
.option('-w, --webapp-dir <webappDir>', 'Webapp directory')
.option('-i, --index-file-name <indexFileName>', 'Index file name')
.option('-w <webappDir>', 'location of generate webapp relative to cwd')
.option('-i <indexFileName>', 'name of index file in webapp (default index.html)')
.parse(process.argv);
var fs = require('fs');
var fs = require('fs-extra');
var path = require('path');
var timeInSec = Math.floor(new Date() / 1000) + '';
var webappDir = path.join(process.cwd(), commander.webappDir);
var index = '<html>' +
fs.outputFileSync(path.join(process.cwd(), 'deploy'),
'<html>' +
'<head>' +
'<script>' +
'var redirect = window.location.protocol + "//" + window.location.host + window.location.pathname' +
'/' + timeInSec + '/' + commander.indexFileName + 'window.location.search' +
'var redirect = window.location.protocol + "//" + window.location.host + window.location.pathname' +
'/' + timeInSec + '/' + commander.indexFileName + 'window.location.search' +
'</script>' +

@@ -25,7 +25,4 @@ '</head>' +

'</body>' +
'</html>';
'</html>');
fs.chmodSync(webappDir, 0666);
fs.mkdirSync(path.join(webappDir, timeInSec));
fs.renameSync(webappDir, path.join(webappDir, timeInSec));
fs.writeFileSync(path.join(webappDir, 'index.html'), index);
fs.copySync(path.join(process.cwd(), commander.webappDir), path.join(process.cwd(), 'deploy', timeInSec + ''));
{
"name": "cache-buster",
"version": "5.0.0",
"version": "5.1.0",
"description": "cache buster for static webapp",

@@ -18,4 +18,5 @@ "main": "index.js",

"dependencies": {
"commander": "^2.9.0"
"commander": "^2.9.0",
"fs-extra": "^2.1.2"
}
}

Sorry, the diff of this file is not supported yet

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