"feat: 同步功能增强与配置优化,支持多类型同步及日志分级"

This commit is contained in:
2025-05-12 23:53:45 +08:00
parent eaccbf5ada
commit 785bd7b004
13 changed files with 278 additions and 35 deletions

20
src/scripts/glob.ts Normal file
View File

@@ -0,0 +1,20 @@
import { logger } from '@/module/logger.ts';
import glob from 'fast-glob';
import path from 'node:path';
const root = process.cwd();
export const globFiles = async (pattern: string) => {
const res = await glob(pattern, {
cwd: root,
onlyFiles: true,
dot: true,
// absolute: true,
// ignore: ['build/01-summary.md'],
});
logger.info(`globFiles:,`, res);
const key = path.relative(root, res[0]);
logger.info(`key: `, key);
};
globFiles('./build/**/*');