scryptlib
Advanced tools
Comparing version 2.1.18-test.1 to 2.1.18-test.2
{ | ||
"name": "scryptlib", | ||
"version": "2.1.18-test.1", | ||
"version": "2.1.18-test.2", | ||
"description": "Javascript SDK for integration of Bitcoin SV Smart Contracts written in sCrypt language.", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -8,3 +8,2 @@ | ||
const glob = require('glob'); | ||
const findNodeModules = require('find-node-modules'); | ||
@@ -22,17 +21,24 @@ function isDev() { | ||
function apply(patches) { | ||
function findNodeModules() { | ||
let npath = join(__dirname, "..", "node_modules"); | ||
if (existsSync(npath)) { | ||
return npath; | ||
} | ||
const paths = findNodeModules({ cwd: '.', relative: false }) | ||
npath = join(__dirname, "..", "..", "node_modules"); | ||
if (paths.length < 1) { | ||
throw new Error('No node_modules found.'); | ||
if (existsSync(npath)) { | ||
return npath; | ||
} | ||
console.log('paths', paths) | ||
throw new Error('No node_modules found') | ||
} | ||
function apply(patches) { | ||
const target = findNodeModules() | ||
console.log('target', target) | ||
patches.map(patch => { | ||
const dest = join(paths[0], patch) | ||
const dest = join(target, patch) | ||
console.log('dest', dest) | ||
if (!existsSync(dest)) { | ||
@@ -39,0 +45,0 @@ new Error(`apply patch ${patch} fail, dest file ${dest} not exist`); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
981206
23784