Socket
Socket
Sign inDemoInstall

cache-buster

Package Overview
Dependencies
1
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

.idea/jsLibraryMappings.xml

27

bin/index.js
#!/usr/bin/env node
console.log(process.cwd());
var commander = require('commander');
commander
.option('-w, --webapp-dir <webappDir>', 'Webapp directory')
.option('-i, --index-file-name <indexFileName>', 'Index file name')
.parse(process.argv);
var fs = require('fs');
var path = require('path');
var timeInSec = Math.floor(new Date() / 1000) + '';
var webappDir = path.join(process.cwd(), commander.webappDir);
var index = '<html>' +
'<head>' +
'<script>' +
'var redirect = window.location.protocol + "//" + window.location.host + window.location.pathname' +
'/' + timeInSec + '/' + commander.indexFileName + 'window.location.search' +
'</script>' +
'</head>' +
'<body>' +
'</body>' +
'</html>';
fs.chmodSync(webappDir, 666);
fs.renameSync(webappDir, path.join(webappDir, timeInSec));
fs.writeFileSync(path.join(webappDir, 'index.html'), index);

7

package.json
{
"name": "cache-buster",
"version": "2.0.0",
"version": "3.0.0",
"description": "cache buster for static webapp",

@@ -16,3 +16,6 @@ "main": "index.js",

"author": "Puneet Sabharwal",
"license": "MIT"
"license": "MIT",
"dependencies": {
"commander": "^2.9.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc