@ranger1/dx 0.1.92 → 0.1.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,8 @@ import os from 'node:os'
4
4
 
5
5
  import { logger } from './logger.js'
6
6
 
7
+ const DEPRECATED_SKILL_DIRS = ['pr-review-loop', 'git-commit-and-pr']
8
+
7
9
  async function collectAllFiles(dir) {
8
10
  const out = []
9
11
 
@@ -65,6 +67,12 @@ async function copyDirMerge({ srcDir, dstDir }) {
65
67
  return { fileCount: files.length }
66
68
  }
67
69
 
70
+ async function removeDeprecatedSkillDirs(skillsDir) {
71
+ for (const dirName of DEPRECATED_SKILL_DIRS) {
72
+ await fs.rm(join(skillsDir, dirName), { recursive: true, force: true })
73
+ }
74
+ }
75
+
68
76
  export async function runCodexInitial(options = {}) {
69
77
  const packageRoot = options.packageRoot
70
78
  if (!packageRoot) throw new Error('runCodexInitial: 缺少 packageRoot')
@@ -81,6 +89,7 @@ export async function runCodexInitial(options = {}) {
81
89
  const stats = []
82
90
  for (const target of targets) {
83
91
  await ensureDir(target.dir)
92
+ await removeDeprecatedSkillDirs(target.dir)
84
93
  const copyStats = await copyDirMerge({ srcDir: srcSkillsDir, dstDir: target.dir })
85
94
  stats.push({ ...target, ...copyStats })
86
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranger1/dx",
3
- "version": "0.1.92",
3
+ "version": "0.1.93",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {