Scan your whole stack
From OX Research Newsroom
Are you using alcor?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v2.0.0
alcor was last scanned on 27 Nov 2026 at version 2.0.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 2.0.0 LATEST | 27 Nov 2026 | No rules fired |
| 2.0.1 | 27 Nov 2026 | No rules fired |
Findings for v2.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 2.0.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
alcor 是 mizar 的配套编译 / 打包 CLI。它读取应用的 config/,把 src/ 编译为 dist/:多入口(多 SPA)、loadable、Module Federation、standalone、远程服务端包与产物清单都由它生成。
npm install -g alcor # 或作为 devDependency 安装
alcor --version
>= 26.13.1。@loadable/babel-plugin)。alcor create <project-directory> # 从模板创建应用
alcor build [options] # 编译应用 → dist/
alcor pack [options] # 把 ./src 当作库编译(tsc -p)
alcor build| 选项 | 说明 |
|---|---|
-d, --debug |
development 构建(有 source map;eslint 失败不致命中) |
-w, --watch |
监听文件变化重新编译 |
-s, --server |
debug 构建后启动开发服务器(node inspector) |
-h, --hotReload |
配合 --debug 启用浏览器热更新(不保持状态) |
--ost |
只编译 src/standalone(要求 standalone 是对象) |
--analyz |
产出 stats;debug 下启动分析服务器 |
--notify |
编译关键信息弹系统通知 |
--verbose |
打印详细日志 |
短选项:-d / -w / -s / -h 可缩写,其余必须用 --。可组合,如 alcor build -ds。
alcor pack| 选项 | 说明 |
|---|---|
-d, --debug |
生成 source map |
-w, --watch |
watch |
-p, --publish |
编译后 npm publish |
--verbose |
详细日志 |
-config
-app.json # 部署实例:name / port / cdn / assetsPathPrefix
-apps.json # 多 SPA 清单(可选)
-configure.json # 编译配置(alcor 读)
-src
-isomorphic # 同构代码
-index.ts # SPA 入口:本级目录下每个 .ts/.tsx 都是一个入口,文件名 = app 名
-routers/index.tsx
-pages/PageA/{index.tsx,index.less,reducer.ts,interface.ts}
-common
-public # 非模块化静态文件(原样拷贝)
-server
-apis # 服务端 API(文件路径 = URL 路径)
-index.ts
-federate/index.ts # 微应用入口(仅作为 remote 时)
-standalone # 独立产物入口(可选)
-typings/externals.d.ts
-webpack.config # 可选:自定义 webpack 配置
-package.json
-tsconfig.json
入口约定:
src/isomorphic本级目录(不含子目录)的所有.ts/.tsx都是 SPA 入口,文件名即 app/entry 名。client: false的 app 不构建浏览器入口。
config/app.json(部署实例){
"name": "my-app",
"port": 8891,
"assetsPathPrefix": "static/",
"cdn": "/"
}
| 字段 | 说明 |
|---|---|
name |
应用名(也可用作 CSS Modules 前缀,见 isPrefixProjectName) |
port |
服务端启动端口(mizar WebServer 默认读取) |
assetsPathPrefix |
静态资源路径前缀,默认 "";决定 dist/static/... 与公开前缀 |
cdn |
CDN 域名 + 根目录;生产环境客户端资源 publicPath 前缀 |
config/apps.json(多 SPA 清单)单 SPA 可省略。多 SPA 时声明每个 app 的元信息:
{
"apps": [
{ "name": "spa1", "ssr": true },
{ "name": "spa2", "basePath": "/admin", "ssr": true },
{ "name": "spa3", "ssr": true, "client": false, "hidden": true }
]
}
| 字段 | 默认 | 说明 |
|---|---|---|
name |
必填 | app 名,同时是入口名(对应 src/isomorphic/<name>.ts(x)) |
basePath |
"/" |
可选 URL 前缀。只拼接本 app 的路由;不参与同/跨 SPA 判定 |
ssr |
true |
是否 SSR |
client |
true |
false = server-only:不构建浏览器入口 |
hidden |
false |
不写入公开的 apps-manifest.json / window.__APPS__ |
构建行为:
src/isomorphic/spa1.ts → 入口 spa1,spa2.ts → 入口 spa2。dist/static/client/apps-manifest.json(公开资产清单,仅非 hidden app)。client: false 的 app 没有 apps-manifest 条目,也不产生客户端 chunk。config/configure.json(编译配置){
"debugPort": 9020,
"eslint": true,
"stylelint": true,
"isPrefixProjectName": false,
"productionSourceMap": false,
"secretScan": { "severity": "warn" },
"postcss-loader": {},
"less-loader": {},
"sass-loader": {},
"serverapi": true,
"hotReload": { "host": "http://127.0.0.1", "port": 9900 },
"proxy": [{ "path": "/ajax", "config": { "target": "http://target.com" } }],
"standalone": {
"mode": "external",
"externals": { "react": "React", "react-dom": "ReactDOM" },
"page": { "name": "standalonePage", "type": "assign" }
},
"federation": {
"name": "hostapp",
"remotes": {
"micro_1": {
"client": "micro_1@http://localhost:8899/static/client/federate/micro_1_remote.js",
"modules": ["counting"]
}
},
"shared": {
"react": { "singleton": true, "eager": true, "requiredVersion": "~18.3.1" },
"react-dom": { "singleton": true, "eager": true, "requiredVersion": "~18.3.1" }
}
}
}
| 字段 | 类型 | 默认 | 说明 |
|---|---|---|---|
debugPort |
number |
0 |
--server 调试端口(node inspector) |
eslint |
boolean \| options |
true |
eslint-webpack-plugin;true = 扫描 ./src 的 ts/tsx/js/jsx/mjs/cjs;生产构建 failOnError |
stylelint |
boolean \| options |
true |
stylelint-webpack-plugin;true = 扫描 ./src 的 css/less/scss/sass |
isPrefixProjectName |
boolean |
false |
用 app.json.name 作为 CSS Modules 类名前缀(生产用短 hash,避免冲突) |
productionSourceMap |
boolean |
false |
生产 source map(hidden-source-map,opt-in,避免泄漏源码) |
secretScan |
boolean \| {severity,test,exclude} |
true |
客户端产物密钥扫描;severity: "warn"(默认)或 "error" |
postcss-loader |
object |
{} |
追加到 postcss-loader options |
less-loader |
object |
{} |
追加到 less-loader options |
sass-loader |
object |
{} |
追加到 sass-loader options |
serverapi |
boolean |
false |
编译 src/server/apis → dist/apis |
hotReload |
{host?,port?} |
{host:"http://localhost",port:9000} |
客户端热更新 / dev server |
proxy |
{path,config}[] |
[] |
debug 模式接口代理(http-proxy-middleware 配置) |
standalone |
true \| object |
false |
独立产物配置,见下文 |
federation |
object |
false |
Module Federation / 远程组件,见下文 |
configure.json是编译期配置,不会复制进dist的公开静态目录(dist/config/下仅服务端读取)。
src/isomorphic 本级所有 .ts/.tsx(排除 .d.ts)→ 多入口,文件名 = entry 名。config/apps.json 提供每个 app 的 basePath / ssr / client / hidden。dist/static/client/<entry>_[hash].js(每个 SPA 一个 entry + 公共 chunk)dist/static/client/apps-manifest.json:{ apps: [{ name, entry, ssr, assets: { js, css } }] }(仅非 hidden)dist/static/client/loadable-stats.json:@loadable 的 chunk 映射(服务端 SSR 用)alcor build)clean
→ PackageInfo(写 dist/package.json)
→ CopyTask(config → dist/config)
→ RemoteCodegen(按 federation.remotes 生成 .mizar/ 静态 importer + 服务端 shim)
→ IsomorphicPack(src/isomorphic → dist/static/<prefix>client)
→ ServerApiPack(serverapi 开启时:src/server/apis → dist/apis)
→ ModuleFederatePack + RemoteServerPack(federation.exposes 时)
→ ServerPack(src/server → dist/index.js)
→ StandalonePack(standalone 配置开启时)
alcor pack(库构建):clean → PackageInfo → PublicAsset → tsc -p ./src → StandalonePack(可选)。
build)dist/
index.js # 服务端入口(ESM)
package.json # type=module
apis/*.js # 服务端 API(serverapi)
config/{app.json,apps.json,configure.json}
static/ # = <assetsPathPrefix>,默认 "static/"
client/ # = <assetsPathPrefix>client/
<entry>_[hash].js, lib/nmdeps/common、loadable-stats.json、apps-manifest.json
federate/<name>_remote.js # 作为 remote 时的浏览器容器
server/<name>-ssr_server.js # 作为 remote 时的 M1 服务端入口
server/<name>-ssr.manifest.json # 远程 manifest(checksum/contractVersion/exposes/css)
server/<name>-ssr.css
standalone/ # standalone 产物 + standalone-manifest.json
"federation": {
"name": "hostapp",
"remotes": {
"micro_1": {
"client": "micro_1@http://localhost:8899/static/client/federate/micro_1_remote.js",
"modules": ["counting"]
}
}
}
remotes[name] 支持两种形式:
"micro_1@http://.../micro_1_remote.js"(仅浏览器容器)。| 字段 | 说明 |
|---|---|
client |
浏览器容器地址(name@url 或纯 url) |
modules |
暴露名数组。["counting"] → module id micro_1/counting;alcor 据此生成静态 importer |
serverUrl |
服务端入口 URL(缺省由 mizar 从 client 派生) |
自动生成(无需手写):
.mizar/remote-components.ts:每个 expose 一条内联 loadable(() => import("micro_1/counting")),注册到 mizar 运行时注册表;prepend 到每个客户端 entry 与服务端 entry。.mizar/server-remotes/<remote>_<expose>.tsx:createRemoteComponent(remote, expose) 服务端 shim;写入 ServerPack 的 resolve.alias。页面只需要 <RemoteBoundary module="micro_1/counting" ... />(见 mizar README)。
federation.name必须是合法 JS 标识符;只做 host 也需要它作为 MF 容器名。
"federation": {
"name": "micro_1",
"filename": "micro_1_remote.js",
"exposes": {
"./counting": "./src/isomorphic/common/components/Counting",
"./PageA": "./src/isomorphic/pages/PageA"
},
"contractVersion": "1.0.0",
"shared": {
"react": { "singleton": true, "requiredVersion": "~18.3.1" }
}
}
exposes:"./<expose>" -> 源文件或目录(目录取 index.tsx/index.ts;同目录 data.ts(x) 会作为 getInitialData)。filename:浏览器远程容器文件名(dist/static/client/federate/)。contractVersion:契约版本,默认 1.0.0(写入入口与 manifest,host 校验)。ModuleFederatePack:src/federate/index.ts → dist/static/client/federate/<filename>(浏览器容器)。RemoteServerPack:dist/static/client/server/<name>-ssr_server.js(服务端入口)+ <name>-ssr.manifest.json + <name>-ssr.css。{ name, contractVersion, entry, checksum(sha256), size, css, exposes, peerVersions, builtAt }。host 通过 URL 在运行时加载服务端入口(
vm非安全沙箱,远程视为可信内网代码)。
在 config/configure.json 中配置 standalone,编译 src/standalone 下的文件为独立产物(dist/static/standalone/)。
"standalone": {
"mode": "external",
"externals": { "jquery": "jQuery", "react": "React" },
"shared": ["react", "react-dom"],
"page": { "name": "standalonePage", "type": "assign" }
} Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.