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

netlify-plugin-firebase-cache

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-plugin-firebase-cache - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

26

index.js

@@ -1,18 +0,26 @@

const cacheDirs = `/opt/buildhome/.cache/firebase/emulators`;
const path = require("path");
const { cwd } = require("process");
const { homedir } = require("os");
const getCacheDir = () => {
const absoluteCacheDir = path.resolve(homedir(), ".cache/firebase/emulators");
const netlifyBuildPluginResolvesFrom = cwd();
return path.relative(netlifyBuildPluginResolvesFrom, absoluteCacheDir);
};
module.exports = {
async onPreBuild({ utils }) {
if (await utils.cache.restore(cacheDirs)) {
console.log('Found cached Firebase emulators!');
async onPreBuild({ utils: { cache } }) {
if (await cache.restore(getCacheDir())) {
console.log("Found cached Firebase emulators!");
} else {
console.log('No cached Firebase emulators found.');
console.log("No cached Firebase emulators found.");
}
},
async onPostBuild({ utils }) {
if (await utils.cache.save(cacheDirs)) {
console.log('Cached the Firebase emulators to speed up future builds!');
async onPostBuild({ utils: { cache } }) {
if (await cache.save(getCacheDir())) {
console.log("Cached the Firebase emulators to speed up future builds!");
} else {
console.log('No Firebase emulators found.');
console.log("No Firebase emulators found.");
}
},
};
{
"name": "netlify-plugin-firebase-cache",
"version": "0.0.1",
"version": "0.0.2",
"description": "Persist the Firebase emulators between Netlify builds for moderate build speed improvements!",

@@ -5,0 +5,0 @@ "main": "index.js",

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