![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
cssserve
Advanced tools
Changelog
1.4.0 — 1.4.1
2022-02-05
config.preload
(default: true
)Readme
cssserve
is a small dedicated HTTP/2 server that serves lots of small CSS
files.
Chapters:
npm install --save cssserve
cssserve
cssserve
is highly opinionated but accepts
configuration options, using the
rc
package.
See the TypeScript type definition for AppConfig for the available config values and defaults.
The server looks for .cssservec
in your package root (or its containing
folders) and also accepts CSSSERVE_*
-prefixed environment variables, direct
CLI arguments and a --config file
option as well.
(See the rc
docs for more
details.)
Additionally the port
option can be overridden via the environment variables
NODE_PORT
and/or PORT
.
Logging is controlled by the NODE_ENV
variable.
NODE_ENV=production
logs nothing muchNODE_ENV=development
logs server 500
errors and info about all invalid
token names found while parsing CSS files.NODE_ENV=debug
same as development
, but adds detailed stacktrace for all
thrown errorsThe server's primary purpose is to accept a list of CSS module names build a
correctly ordered, deduplicated list of @include
links to the corresponding
CSS files and their dependencies (see below), recursively.
For this, the server exposes the endpoint
/bundle/:version?m={module1,module2,...}
The :version
path token can be any value ascii alpha-numerical value with
(single) periods, slashes and underscores. (/^[a-z0-9._-]+$/i
). Note,
however, that multiple adjacent .
characters are forbidden. (See
iSafeToken.tests.)
The :version
token is matched against direct subfolders of
options.staticFolder + 'css/'
and supports simple semantic versioning - so
that if your folder tree looks like this:
public/
css/
v1.1/
v1.2/
v1.10/
...then the :version
token v1
will resolve to the folder css/v1.10/
.
(See getAllValidCssVersions.tests and
resolveCssVersionFolder.tests for more
nerdy details.)
<link
rel="stylesheet"
href="https://css.server/bundle/v1?m=_base,ModuleB,ModuleA"
/>
Example response (with comments):
/* "_base" from query-string */
@import '/css/v1.10/_base.css';
/* Dependencies of ModuleA.css */
@import '/css/v1.10/Button.css';
@import '/css/v1.10/Carousel.css';
@import '/css/v1.10/Herobanner.css';
@import '/css/v1.10/Tabs.css';
/* "ModuleA" from query-string */
@import '/css/v1.10/ModuleA.css';
/* Dependencies of ModuleB.css not already met by ModuleA */
@import '/css/v1.10/FormInput.css';
@import '/css/v1.10/Selectbox.css';
@import '/css/v1.10/BasicTable.css';
/* "ModuleB" from query-string */
@import '/css/v1.10/ModuleB.css';
Example of how ModuleA.css
declares its dependencies:
/*!@deps
Button
Carousel // NOTE: comments are allowed
Herobanner
Tabs
*/
@media screen {
.ModuleA {
/* ...styles for ModuleA */
}
}
(See parseDepsFromCSS.tests and parseModules.tests for details.)
Any files/folders you place inside options.staticFolder
will automatically
exposed and served with a HTTP caching lifetime set to options.ttl_static
(same as the @import
ed CSS files and their linked assets).
FAQs
`cssserve` is a small dedicated HTTP/2 server that serves lots of small CSS files.
The npm package cssserve receives a total of 0 weekly downloads. As such, cssserve popularity was classified as not popular.
We found that cssserve demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.