@nlpjs/core-loader
Advanced tools
Comparing version 4.2.1 to 4.3.0
{ | ||
"name": "@nlpjs/core-loader", | ||
"version": "4.2.1", | ||
"version": "4.3.0", | ||
"description": "Core", | ||
@@ -28,6 +28,6 @@ "author": { | ||
"dependencies": { | ||
"@nlpjs/core": "^4.1.4", | ||
"@nlpjs/request": "^4.1.0" | ||
"@nlpjs/core": "^4.3.0", | ||
"@nlpjs/request": "^4.3.0" | ||
}, | ||
"gitHead": "96ade95b2be5b659a2271d975ca8acdc5b2ed19e" | ||
"gitHead": "68b063504d4cc94d11de373516114befc7c4e648" | ||
} |
@@ -67,3 +67,5 @@ /* | ||
if (fs.lstatSync(fileName).isDirectory()) { | ||
const files = listFilesAbsolute(fileName).filter(x => x.endsWith('.md')); | ||
const files = listFilesAbsolute(fileName).filter((x) => | ||
x.endsWith('.md') | ||
); | ||
for (let i = 0; i < files.length; i += 1) { | ||
@@ -85,3 +87,5 @@ loadPipelines(instance, files[i]); | ||
if (fs.lstatSync(fileName).isDirectory()) { | ||
const files = listFilesAbsolute(fileName).filter(x => x.endsWith('.js')); | ||
const files = listFilesAbsolute(fileName).filter((x) => | ||
x.endsWith('.js') | ||
); | ||
for (let i = 0; i < files.length; i += 1) { | ||
@@ -108,3 +112,3 @@ loadPlugins(instance, files[i]); | ||
if (Array.isArray(obj)) { | ||
return obj.map(x => traverse(x, preffix)); | ||
return obj.map((x) => traverse(x, preffix)); | ||
} | ||
@@ -111,0 +115,0 @@ if (typeof obj === 'object') { |
@@ -0,0 +0,0 @@ /* |
@@ -38,6 +38,6 @@ /* | ||
if (fs.existsSync(folderPath)) { | ||
const all = fs.readdirSync(folderPath).map(x => path.join(folderPath, x)); | ||
const files = all.filter(x => fs.statSync(x).isFile()); | ||
const all = fs.readdirSync(folderPath).map((x) => path.join(folderPath, x)); | ||
const files = all.filter((x) => fs.statSync(x).isFile()); | ||
if (recursive) { | ||
const dirs = all.filter(x => !files.includes(x)); | ||
const dirs = all.filter((x) => !files.includes(x)); | ||
const dirFiles = dirs.reduce( | ||
@@ -63,3 +63,3 @@ (prev, current) => prev.concat(listFiles(current)), | ||
const files = listFiles(folderPath, recursive); | ||
return files.map(x => getAbsolutePath(x)); | ||
return files.map((x) => getAbsolutePath(x)); | ||
} | ||
@@ -66,0 +66,0 @@ |
@@ -0,0 +0,0 @@ /* |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
629
12
30713
Updated@nlpjs/core@^4.3.0
Updated@nlpjs/request@^4.3.0