本提交为 dsh_mcn_workshop 仓库的首个提交(旧仓 dsh_MCNProject 已停用), 完整固化 C:/Users/Administrator/.dsh 当前磁盘状态。 1) 临时数据清理:移出 sessions/(81M)、logs/、skill-backup-20260906/(14M)、 scripts/__pycache__、storages/workspace.json.bak —— 合计 94M(.dsh 162M → 68M) 2) 凭据脱敏:.credentials.yaml(含明文 DEEPSEEK_API_KEY)移出 git 跟踪并加入 .gitignore;mcn-data-insight/scripts/setup_redfox_key.py 中真实 key 示例改为占位符 3) .gitignore 增补 logs/、skill-backup-*/ 规则 4) 技能结构以当前磁盘状态为准:skills/ = mcn-short-video / impeccable / taste-skill / dsh-multi-user-migration;旧技能目录(mcn-dou-analysis、storyboard-prompt、 short-video-script、browser-harness、mcn-data-insight)与 profiles/web/node_modules/dsh-vision-router 本地已不存在,本提交记为删除
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
class TargetArgError extends Error {
|
|
constructor(message, code) {
|
|
super(message);
|
|
this.name = 'TargetArgError';
|
|
this.code = code;
|
|
}
|
|
}
|
|
|
|
export function parseTargetPath(args = [], { strict = false } = {}) {
|
|
let targetPath = null;
|
|
for (let i = 0; i < args.length; i++) {
|
|
const arg = String(args[i]);
|
|
if (arg === '--target' || arg === '-t') {
|
|
const next = args[i + 1];
|
|
if (next && !String(next).startsWith('-')) {
|
|
targetPath = String(next);
|
|
i++;
|
|
continue;
|
|
}
|
|
if (strict) {
|
|
throw new TargetArgError('--target requires a path value.', 'TARGET_VALUE_MISSING');
|
|
}
|
|
continue;
|
|
}
|
|
if (arg.startsWith('--target=')) {
|
|
const value = arg.slice('--target='.length);
|
|
if (value) {
|
|
targetPath = value;
|
|
continue;
|
|
}
|
|
if (strict) {
|
|
throw new TargetArgError('--target requires a path value.', 'TARGET_VALUE_MISSING');
|
|
}
|
|
}
|
|
}
|
|
return targetPath;
|
|
}
|
|
|
|
export function parseTargetOptions(args = [], options = {}) {
|
|
const targetPath = parseTargetPath(args, options);
|
|
return targetPath ? { targetPath } : {};
|
|
}
|