
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
HYbrid TEmplating for the browser and Node. Using Hogan.js (based on mustache) as templating engine.
npm install
node server.js
You can now browse to http://localhost:3000/index.html for a demo.
The included server provides:
/compiled.js/compile/[template]/render/[template]/[encoded-endpoint-url]/render/[template]The hyte module can also be integrated stand-alone using this API:
hyte.compile(template)hyte.compileAll()hyte.render(template, data, callback)hyte.renderFromEndpoint(template, url, callback)On the client, pre-compiled templates can be rendered...
var renderedTemplate = compiledTemplate.render(data);...or just, when pre-rendered on the server...
$('#placeholder).html(renderedTemplate);Running the server will give you services at http://localhost:3000 to:
All templates at /public/views/*.html are pre-compiled and concatenated to JS and available at /compiled.js. This file itself is also using a template: /public/views/compiled.template.mustache.
Example result for /compiled.js (object property keys directly taken from filename):
window.app.templates = {
"list": new Hogan.Template(function(c,p,i){}),
"paragraph": new Hogan.Template(function(c,p,i){})
};
This can then be used like this:
var data = {"message": "This is rendered client-side in a pre-compiled template"}
var html = app.templates['list'].render(data);
$('#placeholder').append(html);
Location: (GET) http://localhost:3000/compiled.js
Suggested usage: make sure the first and/or most used templates are pre-compiled like this.
Pre-compiled templates are available at /compile/[template]. Compiled to JS in AMD style from /public/views/[template].html.
define(new Hogan.Template(function(c,p,i){}))
So you can use it like this:
require(['/compile/paragraph'], function(compiledTemplate) {
var html = compiledTemplate.render({"message": "This is rendered client-side in a pre-compiled template"});
$('#placeholder').append(html);
});
Location: (GET) http://localhost:3000//compile/[template]
Suggested usage: this usage can come in handy when the data is available client-side, and the template still needs to be fetched and compiled.
By providing a reference to the template and a full URL to the data endpoint, this service returns pre-rendered HTML.
For example:
http://localhost:3000/render/paragraph/http%3A%2F%2Flocalhost%3A3000%2Fdata%2Fparagraph.json
returns an HTML string ready to be inserted in the page:
<p>This is data in a JSON resource</p>
For now, the data endpoint should deliver JSON that is tailored to the template (no intermediate parsing of data).
Location: (GET) http://localhost:3000/render/[template]/[encoded-endpoint-url]
Suggested usage: this is the best usage performance-wise, just make sure template and data (JSON) match directly.
Get pre-rendered HTML from server by providing reference to template and POST data (no processing client-side)
var data = {"message": "This is pre-rendered server-side"};
$.post('/render/paragraph', data, function(renderedTemplate) {
$('#placeholder').append(renderedTemplate);
});
Location: (POST) http://localhost:3000/render/[template]
Suggested usage: the data is available client-side, but the compiled template is not.
Static files from /public are available from the root url. E.g. /index.html is served from /public/index.html.
Many thanks to anyone that contributed to the libraries used in this tool:
FAQs
HYbrid TEmplating for the browser and Node.
The npm package hyte receives a total of 0 weekly downloads. As such, hyte popularity was classified as not popular.
We found that hyte 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.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.