fix: YAML-first 治理 CI/CD target (#919)
* docs: specify cicd yaml target governance * fix: resolve cicd targets from yaml --------- Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// SPEC: PJ2026-01060308 cicd-yaml-targets draft-2026-06-25-cicd-yaml-targets.
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { Buffer } from "node:buffer";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
@@ -1348,8 +1349,9 @@ function validateConfig(config: WechatArchiveConfig): void {
|
||||
validatePersonalWechatIngress(config.personalWechatIngress);
|
||||
}
|
||||
|
||||
function assertTarget(config: WechatArchiveConfig, targetId: string): void {
|
||||
if (targetId !== config.target.id) throw new Error(`wechat archive target ${targetId} is not declared in ${configLabel}`);
|
||||
function assertTarget(config: WechatArchiveConfig, targetId: string | null): void {
|
||||
const resolved = targetId ?? config.target.id;
|
||||
if (resolved !== config.target.id) throw new Error(`wechat archive target ${resolved} is not declared in ${configLabel}`);
|
||||
}
|
||||
|
||||
function configSummary(config: WechatArchiveConfig): Record<string, unknown> {
|
||||
|
||||
Reference in New Issue
Block a user