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

@mashroom/mashroom-browser-cache

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mashroom/mashroom-browser-cache - npm Package Compare versions

Comparing version 1.6.4 to 1.7.0

6

dist/MashroomCacheControlService.js

@@ -12,3 +12,3 @@ "use strict";

this.maxAgeSec = maxAgeSec;
this.disabled = disabled;
this._disabled = disabled;
const logger = loggerFactory('mashroom.browserCache.service');

@@ -18,3 +18,3 @@

logger.info('Disabling browser cache because some packages are in dev mode');
this.disabled = true;
this._disabled = true;
}

@@ -31,3 +31,3 @@ }

if (this.disabled) {
if (this._disabled) {
this._disableCache(response);

@@ -34,0 +34,0 @@

@@ -7,3 +7,3 @@ {

"license": "MIT",
"version": "1.6.4",
"version": "1.7.0",
"files": [

@@ -14,11 +14,12 @@ "dist/**",

"devDependencies": {
"@babel/cli": "^7.12.1",
"@mashroom/mashroom": "1.6.4",
"@mashroom/mashroom-security": "1.6.4",
"@mashroom/mashroom-utils": "1.6.4",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.6",
"eslint": "^7.13.0",
"@babel/cli": "^7.12.16",
"@mashroom/mashroom": "1.7.0",
"@mashroom/mashroom-security": "1.7.0",
"@mashroom/mashroom-utils": "1.7.0",
"@types/express": "^4.17.11",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.28",
"eslint": "^7.20.0",
"jest": "^26.6.3",
"typescript": "^4.0.5"
"typescript": "^4.1.5"
},

@@ -25,0 +26,0 @@ "jest": {

@@ -14,8 +14,6 @@

```js
// @flow
```ts
import type {MashroomCacheControlService} from '@mashroom/mashroom-browser-cache/type-definitions';
export default async (req: ExpressRequest, res: ExpressResponse) => {
export default async (req: Request, res: Response) => {

@@ -59,6 +57,6 @@ const cacheControlService: MashroomCacheControlService = req.pluginContext.services.browserCache.cacheControl;

*/
addCacheControlHeader(
addCacheControlHeader(
resourceCanContainSensitiveInformation: boolean,
request: ExpressRequest,
response: ExpressResponse,
request: Request,
response: Response,
): Promise<void>;

@@ -69,5 +67,5 @@

*/
removeCacheControlHeader(response: ExpressResponse): void;
removeCacheControlHeader(response: Response): void;
}
```
import type {ExpressRequest, ExpressResponse} from '@mashroom/mashroom/type-definitions';
import type {Request, Response} from 'express';

@@ -12,4 +12,4 @@ export interface MashroomCacheControlService {

resourceCanContainSensitiveInformation: boolean,
request: ExpressRequest,
response: ExpressResponse,
request: Request,
response: Response,
): Promise<void>;

@@ -20,3 +20,3 @@

*/
removeCacheControlHeader(response: ExpressResponse): void;
removeCacheControlHeader(response: Response): void;
}
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