Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
asset-pipe-build-server
Advanced tools
npm install asset-pipe-build-server
Configuration of the server is done via environment variables.
The following configuration options are available:
Variable | Description | Options | Default |
---|---|---|---|
NODE_ENV | Applicaton environment | development, production | development |
LOG_LEVEL | Which level the console transport log should log at | debug, info, warn, error | debug |
PORT | The port the server should bind to | - | 7100 |
asset-pipe-server
OR with configuration options:
PORT=3321 LOG_LEVEL=info NODE_ENV=production asset-pipe-server
The server provides the following endpoints:
Verb | Endpoint | Description | url params | payload | response |
---|---|---|---|---|---|
POST | /feed/js | Upload a javascript asset feed | - | js feed | feed response |
POST | /feed/css | Upload a css asset feed | - | css feed | feed response |
GET | /feed/:id | Download an asset feed | feed id | - | feed |
POST | /bundle/js | Request bundling of a list of js feeds | - | js bundle | bundle response |
POST | /bundle/css | Request bundling of a list of css feeds | - | css bundle | bundle response |
GET | /bundle/:id | Download an asset bundle | bundle id | - | bundle |
See below for explanation and additional detail regarding the various url params, payloads and responses.
feed id
A js or css feed filename. (Depending on endpoint)
Examples
GET /feed/js/acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json
GET /feed/css/bcd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json
bundle id
A js or css bundle filename. (Depending on endpoint)
Examples
GET /bundle/js/acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json
GET /bundle/css/bcd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json
js feed
An array of feed objects as produced by asset-pipe-js-writer
Example
[
{
"id":"c645cf572a8f5acf8716e4846b408d3b1ca45c58",
"source":"\"use strict\";module.exports.world=function(){return\"world\"};",
"deps":{},
"file":"./assets/js/bar.js"
}
]
css feed
An array of feed objects as produced by asset-pipe-css-writer
Example
[
{
id: '4f32a8e1c6cf6e5885241f3ea5fee583560b2dfde38b21ec3f9781c91d58f42e',
name: 'my-module-1',
version: '1.0.1',
file: 'my-module-1/main.css',
content: '/* ... */'
}
]
js bundle
An ordered array of js feed filenames.
Example
[
'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json',
'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json',
'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json'
]
css bundle
An ordered array of css feed filenames.
Example
[
'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json',
'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json',
'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json'
]
feed response
After a feed is uploaded, the server will respond with a json body containing the keys file
and uri
where file
is the name of the feed file that was saved on the server and uri
is the same as file
but with the server address prepended.
Example
{
file: 'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json',
uri: 'http://127.0.0.1:7100/acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json'
}
feed
Feed is the original js or css feed content that was saved on the server during a feed upload (via POST /feed/js or POST /feed/css)
Example
[
{
"id":"c645cf572a8f5acf8716e4846b408d3b1ca45c58",
"source":"\"use strict\";module.exports.world=function(){return\"world\"};",
"deps":{},
"file":"./assets/js/bar.js"
}
]
bundle response
After a bundling is complete, the server will respond with a json body containing the keys file
and uri
where file
is the name of the file for the bundled content that was saved on the server and uri
is the same as file
but with the server address prepended.
Example
{
file: 'acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json',
uri: 'http://127.0.0.1:7100/acd1ac21dac12dac12dac12dac1d2ac1d2ac1d2a.json'
}
bundle
Bundle is a piece of bundled javascript or css content.
The contribution process is as follows:
npm test
. This will also check to ensure that 100% code coverage is maintained. If not you may need to add additional tests.git commit
or, if you are not familiar with semantic commit messages, please run npm run cm
and follow the prompts instead which will help you write a correct semantic commit message.FAQs
Asset pipe build server
The npm package asset-pipe-build-server receives a total of 2 weekly downloads. As such, asset-pipe-build-server popularity was classified as not popular.
We found that asset-pipe-build-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.