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.7.3 to 1.7.4

35

lib/index.js

@@ -385,2 +385,3 @@

const Build = options => {
let oautFilepath = "oauth-credentials.json"
let destDir = options.destination

@@ -410,4 +411,10 @@

let license = getMetaValue(meta, "license")
let oauth = getMetaValue(meta, "oauth")
// dev "run requirements"
let runReqs = meta.find(item => item && item._attributes.name === "requires")
let runRequires = runReqs ? {} : false
if (runReqs) {
runReqs.entry.map(item => runRequires[item._attributes.id] = item._attributes.description)
}
// perform build tasks - if any

@@ -472,10 +479,10 @@ await buildTasks(appXmlDom, options.source, appId, namespace, options.uglify)

if (oauth) {
if (runRequires.oauth) {
// copy oauth-file to public, if exist
let srcOauth = FS.path.join(options.source, oauth)
let srcOauth = FS.path.join(options.source, oautFilepath)
if (await FS.fileExists(srcOauth)) {
let destOauth = FS.path.join(destDir, oauth)
let destOauth = FS.path.join(destDir, oautFilepath)
await FS.copyFile(srcOauth, destOauth)
} else {
return reject("Couldn't locate OAuth file: "+ oauth)
return reject(`Couldn't locate OAuth file: ${oautFilepath}`)
}

@@ -497,3 +504,3 @@ }

await Promise.all(files.map(async entry => {
if (oauth && entry === oauth) return
if (runRequires.oauth && entry === oautFilepath) return
let filePath = FS.path.join(destDir, entry)

@@ -537,3 +544,3 @@

let rootFiles = ["icon.svg"]
if (oauth) rootFiles.push(oauth)
if (runRequires.oauth) rootFiles.push(oautFilepath)

@@ -556,3 +563,3 @@ if (rootFiles.includes(entry)) {

let buildInfo = {
resolve({
version,

@@ -566,13 +573,5 @@ name,

buildDir: destDir.slice(process.cwd().length + 1),
runRequires,
files,
}
let runRequires = meta.find(item => item && item._attributes.name === "requires")
if (runRequires) {
buildInfo.runRequires = {}
runRequires.entry.map(item =>
buildInfo.runRequires[item._attributes.id] = item._attributes.description)
}
resolve(buildInfo)
})
})

@@ -579,0 +578,0 @@ }

{
"name": "defiant-builder",
"version": "1.7.3",
"version": "1.7.4",
"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