Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@midwayjs/locate
Advanced tools
扫描仓库目录结构,找出 midway 的代码位置。
import { Locator } from '@midwayjs/locate';
const locator = new Locator();
const result = await locator.run();
console.log(result);
cwd
当前命令执行路径,一般是项目根目录midwayRoot
midway 项目根目录,根据 package.json 查找tsCodeRoot
typescript 构建时获取的代码根路径,比如 src/controller/a.ts 和 src/controller/b.ts,tsc 构建时,会在 dist 目录中输出 a.js 和 b.js,这个时候根路径为 src/controllertsConfigFilePath
tsconfig.json 的路径,从 tsCodeRoot 到 midwayRoot 之间的最接近的 tsconfig 文件tsBuildRoot
根据 tsconfig.json,获取到的构建输出的目录integrationProject
: 是否是一体化项目integrationProjectType
: 项目类型usingDependencies
: 使用的依赖,一体化项目会根据 tsCodeRoot 分析使用的依赖(package.json 的子集),其他项目直接读取 package.json 中的依赖usingDependenciesVersion
: 带版本,同上可以在 package.json 中传入 tsCodeRoot
和 tsBuildRoot
,但是以 run
的参数为主。
{
"midway-integration": {
"tsCodeRoot": "src/apis",
"tsBuildRoot": "build/faas"
}
}
FAQs
Locating midway application locations
The npm package @midwayjs/locate receives a total of 533 weekly downloads. As such, @midwayjs/locate popularity was classified as not popular.
We found that @midwayjs/locate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.