
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
epii-node-html5
HTML5 template for node server
epii-html5
can only describe HTML5 bone document with initial state and render at server side.
** Simple. Fast.**
HTML5 document can be described by a JS Object that looks very simple.
Also you can write JS in meta file, since loadViewMeta
using require
to load meta.
epii-html5
provides builtin meta storage. There's no need to concern about meta cache.
npm install --save epii-html5@latest
const HTML5 = require('epii-html5')
// create view meta
var meta = new HTML5.ViewMeta()
// mount state & inline resource
await meta.mount({ hello: 'world' })
// also you can specify loader for resource
await meta.mount({}, (asset, query) => (
fetch(asset.src)
.then(response => response.text())
.then(text => asset.source = text)
))
// render view to HTML5
var html = HTML5.renderToString(meta)
const HTML5 = require('epii-html5')
// create meta pack
var metaPack = new HTML5.MetaPack('/')
// load layout meta
var layout = metaPack.loadViewMeta({
name: 'simple',
head: {
title: 'simple',
styles: ['reset.css', 'theme.css'],
icon: 'logo.ico'
},
body: {
launch: { src: 'launch.js', inline: true }
}
})
// load view meta, auto inherit layout
var meta = metaPack.loadViewMeta({
base: 'simple',
head: {
styles: 'index.css'
},
body: {
scripts: 'index.js'
}
})
// render view to HTML5
var html = HTML5.renderToString(meta)
MetaPack
= [ ViewMeta
= [ AssetRef
... ] ... ]
{
// template name
name: 'modern',
// inherited template name
base: 'simple',
// custom document URL or content
// head & body will be ignored
// html: 'index.html',
// head part of HTML5
head: {
// HTML metas
metas: [
{ name: 'keywords', content: '123' },
{ http: 'expires', content: '1 Jan 2017' },
],
// HTML title
title: 'my page',
// HTML icon
icon: 'logo.ico',
// HTML styles
// support String or String[]
styles: [
// simple URL
'style1.css',
// custom resource
{ src: 'style2.css', inline: true },
{ source: 'p { color: red; }' }
],
// HTML scripts
// support String or String[]
scripts: [
// simple URL
'script1.js',
// custom resource
{ src: 'script2.js', inline: true },
{ source: 'alert(1);' }
]
},
// body part of HTML5
body: {
// HTML placeholder
// simple URL or content
holder: { source: '<div id="app"></div>' },
// HTML scripts
// support String or String[]
scripts: [],
// web app launch script
// e.g. ReactDOM.render
launch: 'launch.js'
}
}
The following table shows elapsed time for rendering bone document to string 1e5 times.
name | time |
---|---|
EPII | 180ms |
handlebars | 1300ms |
React | 29000ms |
FAQs
HTML5 template for node server
The npm package epii-html5 receives a total of 0 weekly downloads. As such, epii-html5 popularity was classified as not popular.
We found that epii-html5 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.