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

defiant-builder

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defiant-builder - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

41

lib/index.js

@@ -424,2 +424,25 @@

// ** Compiles svg icons
async function importXml(dirPath, data) {
let result = []
let regexp = /@import ['"](.+?)['"]/mg
let imports = data.toString().match(regexp) || []
await Promise.all(imports.map(async item => {
let importPath = FS.path.join(dirPath, item.slice(9,-1))
let importDir = FS.path.dirname(importPath)
let importFile = await FS.readFile(importPath)
importFile = importFile.toString()
let subImports = importFile.toString().match(regexp) || []
if (subImports.length) importFile = await importXml(importDir, importFile)
let rx = new RegExp(item, "im")
data = data.replace(rx, importFile)
}))
return data
}
// ** Builds def-ant application

@@ -471,10 +494,12 @@ const Build = options => {

let regexp = /@import ['"](.+?)['"]/mg
let imports = appXml.match(regexp) || []
await Promise.all(imports.map(async item => {
let importPath = FS.path.join(options.source, item.slice(9,-1))
let importFile = await FS.readFile(importPath)
let rx = new RegExp(item, "im")
appXml = appXml.replace(rx, importFile)
}))
// let regexp = /@import ['"](.+?)['"]/mg
// let imports = appXml.match(regexp) || []
// await Promise.all(imports.map(async item => {
// let importPath = FS.path.join(options.source, item.slice(9,-1))
// let importFile = await FS.readFile(importPath)
// let rx = new RegExp(item, "im")
// appXml = appXml.replace(rx, importFile)
// }))
appXml = await importXml(options.source, appXml)
// fixes urls in xml, starting with '~'

@@ -481,0 +506,0 @@ appXml = appXml.replace(/(url=")\~/g, `$1/app/${namespace}/${appId}`)

2

package.json
{
"name": "defiant-builder",
"version": "1.8.0",
"version": "1.8.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib",

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