feat(POSTV1-03): 增加本机测试直达入口
Dada P0-A isolated Windows CI / validate-and-package (push) Waiting to run

This commit is contained in:
suyx
2026-08-05 14:53:20 +08:00
parent f7cac5dabf
commit 92434aec17
9 changed files with 297 additions and 2 deletions
+2 -1
View File
@@ -27,12 +27,13 @@ export async function receiveApiCredentials(input: NodeJS.ReadableStream = proce
}
export function initializeApiCredentialClients(credentials: Record<(typeof API_CREDENTIALS)[number], string>) {
try {
try {
const adminPepper = credentials["Dada/P0A/admin/pepper"];
if (!adminPepper) throw new Error("admin_pepper_not_configured");
return {
adminAllowlistPepper: Buffer.from(adminPepper, "utf8"),
amap: credentials["Dada/P0A/api/amap"] ? new RealAmapAdapter(credentials["Dada/P0A/api/amap"]) : new MockAmapAdapter(),
resendConfigured: Boolean(credentials["Dada/P0A/api/resend"]),
};
} finally {
for (const name of API_CREDENTIALS) credentials[name] = "";