Socket
Socket
Sign inDemoInstall

fastboot

Package Overview
Dependencies
Maintainers
9
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastboot - npm Package Compare versions

Comparing version 3.2.0-beta.3 to 3.2.0-beta.4

2

package.json
{
"name": "fastboot",
"version": "3.2.0-beta.3",
"version": "3.2.0-beta.4",
"description": "Library for rendering Ember apps in node.js",

@@ -5,0 +5,0 @@ "keywords": [

@@ -7,17 +7,33 @@ 'use strict';

function mergeContent(metaElement, config, configName) {
let name = metaElement.getAttribute('name');
if (name && name.endsWith(configName)) {
let content = JSON.parse(decodeURIComponent(metaElement.getAttribute('content')));
content.APP = Object.assign({ autoboot: false }, content.APP);
config[name.slice(0, -1 * configName.length)] = content;
return true;
}
return false;
}
function htmlEntrypoint(appName, distPath, htmlPath) {
let html = fs.readFileSync(path.join(distPath, htmlPath), 'utf8');
let dom = new JSDOM(html);
let scripts = [];
let fastbootConfig = {};
let config = {};
for (let element of dom.window.document.querySelectorAll('meta')) {
let name = element.getAttribute('name');
if (name && name.endsWith('/config/environment')) {
let content = JSON.parse(decodeURIComponent(element.getAttribute('content')));
content.APP = Object.assign({ autoboot: false }, content.APP);
config[name.slice(0, -1 * '/config/environment'.length)] = content;
mergeContent(element, config, '/config/environment');
let fastbootMerged = mergeContent(element, fastbootConfig, '/config/fastboot-environment');
if (fastbootMerged) {
element.remove();
}
}
let isFastbootConfigBuilt = Object.keys(fastbootConfig).length > 0;
if (isFastbootConfigBuilt) {
config = fastbootConfig;
}
let scripts = [];
let rootURL = getRootURL(appName, config);

@@ -24,0 +40,0 @@

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