+7
-6
| import fs from "fs/promises"; | ||
| import path from "path"; | ||
| import glob from "fast-glob"; | ||
| import {config} from "../index.js"; | ||
| import {NFError, NFUnauthorizedError} from "./errors.js" | ||
| import { config } from "../index.js"; | ||
| import { NFError } from "./errors.js" | ||
@@ -41,10 +41,11 @@ | ||
| const workspaceName = rootPackage.workspaces[i].replace('/*', '/'); | ||
| paths.forEach((dirPath) => { | ||
| for (let dirPath of paths) { | ||
| const pkgPath = dirPath.slice(dirPath.indexOf(workspaceName)); | ||
| const packageJson = JSON.parse(await fs.readFile(path.join(dirPath, 'package.json').replace(/\\/g, '/'), 'utf-8')); | ||
| packages.push({ | ||
| fullpath: dirPath, | ||
| path: pkgPath, | ||
| moduleName: pkgPath.replace(workspaceName, '').replace('/', '') | ||
| moduleName: packageJson.name | ||
| }); | ||
| }); | ||
| } | ||
| } | ||
@@ -290,3 +291,3 @@ | ||
| static processSyncHooks(name, self, ...args) { | ||
| hooks[name]?.forEach( i => i.func.apply(self,args)); | ||
| hooks[name]?.forEach(i => i.func.apply(self, args)); | ||
| } | ||
@@ -293,0 +294,0 @@ |
+1
-1
| { | ||
| "name": "@nfjs/core", | ||
| "version": "1.0.5", | ||
| "version": "1.0.6", | ||
| "description": "Core", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
38198
0.2%961
0.1%1
Infinity%