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

@web/dev-server-core

Package Overview
Dependencies
Maintainers
7
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web/dev-server-core - npm Package Compare versions

Comparing version 0.2.19 to 0.3.0

dist/middleware/serveFilesMiddleware.d.ts

6

CHANGELOG.md
# @web/dev-server-core
## 0.3.0
### Minor Changes
- 0f613e0e: handle modules resolved outside root dir
## 0.2.19

@@ -4,0 +10,0 @@

13

dist/server/createMiddleware.js

@@ -8,3 +8,2 @@ "use strict";

const koa_etag_1 = __importDefault(require("koa-etag"));
const koa_static_1 = __importDefault(require("koa-static"));
const basePathMiddleware_1 = require("../middleware/basePathMiddleware");

@@ -18,2 +17,3 @@ const etagCacheMiddleware_1 = require("../middleware/etagCacheMiddleware");

const pluginFileParsedMiddleware_1 = require("../middleware/pluginFileParsedMiddleware");
const serveFilesMiddleware_1 = require("../middleware/serveFilesMiddleware");
/**

@@ -54,12 +54,3 @@ * Creates middlewares based on the given configuration. The middlewares can be

middlewares.push(pluginServeMiddleware_1.pluginServeMiddleware(logger, plugins));
// serve static files
middlewares.push(koa_static_1.default(config.rootDir, {
hidden: true,
defer: true,
brotli: false,
gzip: false,
setHeaders(res) {
res.setHeader('cache-control', 'no-cache');
},
}));
middlewares.push(...serveFilesMiddleware_1.serveFilesMiddleware(config.rootDir));
return middlewares;

@@ -66,0 +57,0 @@ }

{
"name": "@web/dev-server-core",
"version": "0.2.19",
"version": "0.3.0",
"publishConfig": {

@@ -70,2 +70,3 @@ "access": "public"

"koa-etag": "^4.0.0",
"koa-send": "^5.0.1",
"koa-static": "^5.0.0",

@@ -76,6 +77,8 @@ "lru-cache": "^6.0.0",

"picomatch": "^2.2.2",
"ws": "^7.4.0"
"ws": "^7.4.1"
},
"devDependencies": {
"@types/clone": "^2.1.0",
"@types/koa-etag": "^3.0.0",
"@types/koa-static": "^4.0.1",
"@types/lru-cache": "^5.1.0",

@@ -87,4 +90,4 @@ "@types/parse5": "^5.0.3",

"portfinder": "^1.0.28",
"uuid": "^8.3.1"
"uuid": "^8.3.2"
}
}
import { Middleware } from 'koa';
import koaEtag from 'koa-etag';
import koaStatic from 'koa-static';
import { FSWatcher } from 'chokidar';

@@ -16,2 +15,3 @@

import { pluginFileParsedMiddleware } from '../middleware/pluginFileParsedMiddleware';
import { serveFilesMiddleware } from '../middleware/serveFilesMiddleware';

@@ -64,17 +64,5 @@ /**

middlewares.push(pluginServeMiddleware(logger, plugins));
middlewares.push(...serveFilesMiddleware(config.rootDir));
// serve static files
middlewares.push(
koaStatic(config.rootDir, {
hidden: true,
defer: true,
brotli: false,
gzip: false,
setHeaders(res) {
res.setHeader('cache-control', 'no-cache');
},
}),
);
return middlewares;
}

Sorry, the diff of this file is not supported yet

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