@iyowei/rim 0.0.0-stage → 0.0.1-stage
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/LICENSE +21 -0
- package/README.md +74 -2
- package/README.zh-CN.md +75 -0
- package/dist/baseline.d.ts +47 -0
- package/dist/bridge-command.d.ts +25 -0
- package/dist/bridge.d.ts +18 -0
- package/dist/cdp.d.ts +41 -0
- package/dist/chrome.d.ts +51 -0
- package/dist/config-validate-sections.d.ts +18 -0
- package/dist/config-validate.d.ts +4 -0
- package/dist/config.d.ts +27 -0
- package/dist/doctor.d.ts +15 -0
- package/dist/errors.d.ts +10 -0
- package/dist/gate-pipeline.d.ts +34 -0
- package/dist/gate.d.ts +3 -0
- package/dist/html-report.d.ts +14 -0
- package/dist/html-scan.d.ts +32 -0
- package/dist/http-gate.d.ts +11 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +10234 -0
- package/dist/lighthouse-extract.d.ts +20 -0
- package/dist/lighthouse-gate.d.ts +35 -0
- package/dist/locale.d.ts +14 -0
- package/dist/manifest.json +8 -0
- package/dist/probe-h2h3.d.ts +39 -0
- package/dist/probe-load-adapters.d.ts +38 -0
- package/dist/probe-load-builtin.d.ts +16 -0
- package/dist/probe-load-h2.d.ts +41 -0
- package/dist/probe-load.d.ts +28 -0
- package/dist/probe-perf.d.ts +36 -0
- package/dist/probe-proto-checks.d.ts +58 -0
- package/dist/probe-proto-helpers.d.ts +77 -0
- package/dist/probe-proto.d.ts +55 -0
- package/dist/probe-quality-adapters.d.ts +42 -0
- package/dist/probe-quality-axe.d.ts +57 -0
- package/dist/probe-quality-link-eval.d.ts +46 -0
- package/dist/probe-quality-links.d.ts +23 -0
- package/dist/probe-quality.d.ts +53 -0
- package/dist/probe-sec-csp.d.ts +21 -0
- package/dist/probe-sec-testssl.d.ts +22 -0
- package/dist/probe-sec-tls-eval.d.ts +34 -0
- package/dist/probe-sec-tls.d.ts +18 -0
- package/dist/probe-sec.d.ts +42 -0
- package/dist/runtime.d.ts +45 -0
- package/dist/security-ip.d.ts +42 -0
- package/dist/security.d.ts +43 -0
- package/dist/smoke-gate.d.ts +14 -0
- package/dist/static-server.d.ts +19 -0
- package/dist/types-config.d.ts +339 -0
- package/dist/types.d.ts +352 -0
- package/dist/verdict-lighthouse.d.ts +14 -0
- package/dist/verdict.d.ts +21 -0
- package/dist/waivers.d.ts +10 -0
- package/package.json +66 -4
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 确定性门禁裁定引擎与 `--strict` 防假绿 `SKIP` 策略 (`verdict.ts`, ADR 0034)。
|
|
3
|
+
*/
|
|
4
|
+
import { type RimLocale } from './locale.js';
|
|
5
|
+
import type { GateCheckStatus, GateVerdict, HttpGateResult, LighthousePresetSummary, LighthouseThresholds, ProbeId, ProbeResult, SmokeGateResult, WaiverRule } from './types.js';
|
|
6
|
+
export interface EvaluateVerdictInput {
|
|
7
|
+
readonly strict: boolean;
|
|
8
|
+
readonly strictAllowSkip?: readonly string[];
|
|
9
|
+
readonly thresholds: LighthouseThresholds;
|
|
10
|
+
readonly waivers?: readonly WaiverRule[];
|
|
11
|
+
readonly probes?: readonly ProbeResult[];
|
|
12
|
+
readonly disabledProbes?: readonly ProbeId[];
|
|
13
|
+
readonly http: HttpGateResult;
|
|
14
|
+
readonly lighthouseStatus: GateCheckStatus;
|
|
15
|
+
readonly lighthouseReason?: string;
|
|
16
|
+
readonly lighthouseSummaries: readonly LighthousePresetSummary[];
|
|
17
|
+
readonly smoke: SmokeGateResult;
|
|
18
|
+
readonly locale: RimLocale;
|
|
19
|
+
}
|
|
20
|
+
/** 汇总所有闸门检查并依据 `--strict` 防假绿策略给出最终裁定 */
|
|
21
|
+
export declare function evaluateGateVerdict(input: EvaluateVerdictInput): GateVerdict;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 统一规则豁免 (`waivers[]`) 匹配与五态聚合原语 (`waivers.ts`)。
|
|
3
|
+
*/
|
|
4
|
+
import type { ProbeFinding, ProbeId, ProbeStatus, WaiverRule } from './types.js';
|
|
5
|
+
/** 查找匹配指定规则与探针的豁免声明 */
|
|
6
|
+
export declare function matchWaiver(waivers: readonly WaiverRule[] | undefined, ruleId: string, probe?: ProbeId): WaiverRule | undefined;
|
|
7
|
+
/** 将配置豁免应用于探针发现列表: 命中的 FAIL/WARN 转为 WAIVED 并附带豁免理由 */
|
|
8
|
+
export declare function applyWaiversToFindings(findings: readonly ProbeFinding[], waivers: readonly WaiverRule[] | undefined): ProbeFinding[];
|
|
9
|
+
/** 根据发现列表确定性聚合单个探针的整体状态 (FAIL > WARN > WAIVED > PASS; 全 SKIP 时返回 SKIP) */
|
|
10
|
+
export declare function aggregateProbeStatus(findings: readonly ProbeFinding[], defaultStatus?: ProbeStatus): ProbeStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyowei/rim",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1-stage",
|
|
4
|
+
"description": "All-in-one black-box website audit and release gate API (proto, sec/TLS, perf/Lighthouse, quality, load). 全链路黑盒站点体检与上线门禁 API。",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"rim",
|
|
7
|
+
"website-audit",
|
|
8
|
+
"release-gate",
|
|
9
|
+
"lighthouse",
|
|
10
|
+
"axe-core",
|
|
11
|
+
"csp",
|
|
12
|
+
"tls",
|
|
13
|
+
"http3",
|
|
14
|
+
"quic",
|
|
15
|
+
"cdp",
|
|
16
|
+
"bun",
|
|
17
|
+
"node"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://github.com/iyowei/clis/tree/main/packages/rim#readme",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/iyowei/clis.git",
|
|
23
|
+
"directory": "packages/rim"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/iyowei/clis/issues"
|
|
27
|
+
},
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"author": "iTonyYo (https://github.com/iTonyYo)",
|
|
30
|
+
"type": "module",
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"default": "./dist/index.js"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist/index.js",
|
|
42
|
+
"dist/**/*.d.ts",
|
|
43
|
+
"dist/manifest.json",
|
|
44
|
+
"README.md",
|
|
45
|
+
"README.zh-CN.md",
|
|
46
|
+
"LICENSE",
|
|
47
|
+
"CHANGELOG.md"
|
|
48
|
+
],
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=22.18.0"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"axe-core": "4.14.1",
|
|
54
|
+
"lighthouse": "13.7.0"
|
|
55
|
+
},
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public",
|
|
58
|
+
"registry": "https://registry.npmjs.org/"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "bun scripts/build.ts",
|
|
62
|
+
"bench": "bun bench/run.ts",
|
|
63
|
+
"prepublishOnly": "npm run build && npm run verify:release",
|
|
64
|
+
"verify:release": "bun scripts/verify-release.ts",
|
|
65
|
+
"typecheck": "bun check",
|
|
66
|
+
"test": "bun test"
|
|
67
|
+
}
|
|
68
|
+
}
|