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

ant-app-builder

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ant-app-builder - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

28

lib/index.js

@@ -204,12 +204,26 @@

const importFile = async (baseDir, importStr, exclude) => {
let importPath = FS.path.join(baseDir, importStr.slice(9,-1))
if (!await FS.fileExists(importPath)) return
let importedFile = await FS.readFile(importPath)
let rx = new RegExp(importStr, "im")
data = data.replace(rx, importedFile)
let subImports = data.match(regexp) || []
if (exclude) {
subImports = subImports.filter(i => exclude.indexOf(i))
}
if (subImports.length) {
let importDir = FS.path.dirname(importPath)
await Promise.all(subImports.map(async item => importFile(importDir, item, subImports)))
}
}
// find all imports
let regexp = /@import ['"](.+?)['"]/mg
let imports = data.match(regexp) || []
// loop all requires
await Promise.all(imports.map(async item => importFile(dirPath, item)))
await Promise.all(imports.map(async item => {
let importPath = FS.path.join(dirPath, item.slice(9,-1))
let importFile = await FS.readFile(importPath)
let rx = new RegExp(item, "im")
data = data.replace(rx, importFile)
}))
data = data.replace(/@store ['"](.+?)['"]/mg, "")

@@ -216,0 +230,0 @@ data = data.replace(/(url\('?)\~/g, `$1/app/${namespace}/${id}`)

{
"name": "ant-app-builder",
"version": "1.3.5",
"version": "1.3.6",
"description": "",

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

@@ -5,3 +5,3 @@

let srcDir = path.join(__dirname, "temp/chess")
let srcDir = path.join(__dirname, "temp/preferences")
let destDir = path.join(__dirname, "temp/_build")

@@ -8,0 +8,0 @@ let uglify = false

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