Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@studyportals/bob-manifest-generator

Package Overview
Dependencies
Maintainers
12
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@studyportals/bob-manifest-generator - npm Package Compare versions

Comparing version 3.0.0-beta.1 to 3.0.0-beta.2

2

package.json
{
"name": "@studyportals/bob-manifest-generator",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"description": "A Webpack plugin that generates a manifest file for your microservice.",

@@ -5,0 +5,0 @@ "main": "src/main.js",

@@ -28,4 +28,5 @@ const path = require('path');

const assets = compilation.getAssets();
this.validateOptions(compilation);
this.gatherAssets(compilation.assets, compilation.chunks);
this.gatherAssets(assets, compilation.chunks);
this.emitManifest(compilation);

@@ -116,26 +117,30 @@

chunks.forEach(chunk => {
if(chunk.entryModule) return;
chunk.files.forEach(file => {
if (this.isFileMainChunk(file)) {
return;
}
chunk.files.forEach(file => chunkFiles.push(file));
})
chunkFiles.push(file);
});
});
for(let file in files) {
files.forEach(file => {
if (chunkFiles.includes(file.name)) {
return;
}
// Skip files that belong to dynamically imported chunks
if(chunkFiles.includes(file)) { continue; }
if(this.shouldProcessExtension(file, 'js')) {
if (this.shouldProcessExtension(file.name, 'js')) {
this.manifest.assets.js.push({
url: this.baseURL + '/' + file,
async: this.matchFile(file, this.async)
url: this.baseURL + '/' + file.name,
async: this.matchFile(file.name, this.async)
});
}
if(this.shouldProcessExtension(file, 'css')) {
if (this.shouldProcessExtension(file.name, 'css')) {
this.manifest.assets.css.push({
url: this.baseURL + '/' + file,
defer: this.matchFile(file, this.defer)
url: this.baseURL + '/' + file.name,
defer: this.matchFile(file.name, this.defer)
});
}
}
});
}

@@ -163,3 +168,3 @@

fileType(file) {
const parts = file.split('.');

@@ -171,5 +176,12 @@ const extension = parts[parts.length - 1];

isFileMainChunk(file) {
const parts = file.split('.');
const firstPartAsNumber = parseInt(parts[0]);
return isNaN(firstPartAsNumber);
}
matchFile(file, namesToMatch) {
if(namesToMatch === true) return true;
if (namesToMatch === true) return true;

@@ -182,4 +194,3 @@ let matched = false;

if(filename === name
|| file === name) {
if (filename === name || file === name) {

@@ -186,0 +197,0 @@ matched = true;

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