api更改
deploy-userbase-front / build-and-deploy (push) Successful in 3m23s

This commit is contained in:
chenxing
2026-08-19 00:19:03 +08:00
parent 5247515a85
commit a096948371
5 changed files with 247 additions and 211 deletions
+14
View File
@@ -0,0 +1,14 @@
const fs = require('fs');
const base = 'D:/SoftProject/yunhai/UserBase/front/src/api/';
const files = ['apiDefinitions.ts', 'globals.d.ts'];
// 仅匹配单引号包裹的 api-path key:'xxxController.method'
const re = /'([a-zA-Z]+?)Controller\./g;
for (const f of files) {
const p = base + f;
let s = fs.readFileSync(p, 'utf8');
const before = (s.match(re) || []).length;
s = s.replace(re, (m, ns) => "'" + ns.charAt(0).toUpperCase() + ns.slice(1) + ".");
fs.writeFileSync(p, s, 'utf8');
const after = (s.match(re) || []).length;
console.log(f + ': replaced ' + before + ' -> remaining ' + after);
}