cursor-sdd 1.0.7 → 1.0.9
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.
- package/bin/setup.ts +11 -10
- package/package.json +6 -3
package/bin/setup.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
2
|
// @ts-nocheck
|
|
3
3
|
|
|
4
4
|
const fs = require('fs');
|
|
@@ -109,12 +109,12 @@ function createTTYInterface() {
|
|
|
109
109
|
const input = process.stdin.isTTY
|
|
110
110
|
? process.stdin
|
|
111
111
|
: (() => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
try {
|
|
113
|
+
return fs.createReadStream('/dev/tty');
|
|
114
|
+
} catch {
|
|
115
|
+
return process.stdin;
|
|
116
|
+
}
|
|
117
|
+
})();
|
|
118
118
|
const output = process.stdout; // 出力は常に標準出力に寄せる
|
|
119
119
|
return readline.createInterface({ input, output });
|
|
120
120
|
}
|
|
@@ -151,9 +151,13 @@ function setup({ mode, sourceRoot, folders }) {
|
|
|
151
151
|
console.log(`📁 Target: ${targetDir}`);
|
|
152
152
|
console.log(`🎚️ Mode: ${mode}\n`);
|
|
153
153
|
|
|
154
|
+
// 選択したモード以外のフォルダを先に掃除
|
|
155
|
+
cleanOtherFolders(mode);
|
|
156
|
+
|
|
154
157
|
// 自動実行時は既存の .cursor がある場合スキップ
|
|
155
158
|
if (isAuto && fs.existsSync(targetDir) && !isForce) {
|
|
156
159
|
console.log('ℹ️ .cursor already exists. Run `npx cursor-sdd --force` to overwrite.');
|
|
160
|
+
console.log('ℹ️ Cleaned other mode folders, skipping copy due to --auto.');
|
|
157
161
|
process.exit(0);
|
|
158
162
|
}
|
|
159
163
|
|
|
@@ -162,9 +166,6 @@ function setup({ mode, sourceRoot, folders }) {
|
|
|
162
166
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
163
167
|
}
|
|
164
168
|
|
|
165
|
-
// 選択したモード以外のフォルダを掃除
|
|
166
|
-
cleanOtherFolders(mode);
|
|
167
|
-
|
|
168
169
|
if (!folders.length) {
|
|
169
170
|
console.log(`ℹ️ No folders to copy for mode: ${mode}.`);
|
|
170
171
|
return;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursor-sdd",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Cursor SDD (Spec-Driven Development) - AI-powered spec templates, rules and commands for Cursor IDE",
|
|
5
5
|
"bin": {
|
|
6
|
-
"cursor-sdd": "./bin/setup.
|
|
6
|
+
"cursor-sdd": "./bin/setup.ts"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"bin",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"assign"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"postinstall": "
|
|
16
|
+
"postinstall": "tsx bin/setup.ts --auto"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"cursor",
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
],
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"tsx": "^4.7.0"
|
|
31
|
+
},
|
|
29
32
|
"repository": {
|
|
30
33
|
"type": "git",
|
|
31
34
|
"url": ""
|