ssd-ql-workflow 0.1.6 ā 0.2.0
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/cli.js +4 -18
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -19,21 +19,15 @@ program
|
|
|
19
19
|
.command('init')
|
|
20
20
|
.description('Initialize SDD workflow configuration in current project')
|
|
21
21
|
.option('-f, --force', 'Overwrite existing files', false)
|
|
22
|
-
.option('--
|
|
23
|
-
.option('--
|
|
22
|
+
.option('--skip-commands', 'Skip copying command files', false)
|
|
23
|
+
.option('--skip-schema', 'Skip copying schema files', false)
|
|
24
24
|
.action(async (options) => {
|
|
25
25
|
const cwd = process.cwd();
|
|
26
26
|
console.log(chalk.blue('\nš Initializing SDD workflow...\n'));
|
|
27
27
|
|
|
28
|
-
// Debug: print options
|
|
29
|
-
console.log(chalk.gray(`Options: ${JSON.stringify(options)}`));
|
|
30
|
-
console.log(chalk.gray(`Templates dir: ${TEMPLATES_DIR}`));
|
|
31
|
-
console.log(chalk.gray(`Templates exists: ${await fs.pathExists(TEMPLATES_DIR)}`));
|
|
32
|
-
console.log(chalk.gray(`Working dir: ${cwd}\n`));
|
|
33
|
-
|
|
34
28
|
try {
|
|
35
29
|
// 1. Copy openspec config and schema
|
|
36
|
-
if (options.
|
|
30
|
+
if (!options.skipSchema) {
|
|
37
31
|
const openspecDir = path.join(cwd, 'openspec');
|
|
38
32
|
|
|
39
33
|
// Create openspec directory structure
|
|
@@ -45,9 +39,6 @@ program
|
|
|
45
39
|
const configSrc = path.join(TEMPLATES_DIR, 'openspec', 'config.yaml');
|
|
46
40
|
const configDest = path.join(openspecDir, 'config.yaml');
|
|
47
41
|
|
|
48
|
-
console.log(chalk.gray(`Config src: ${configSrc}`));
|
|
49
|
-
console.log(chalk.gray(`Config src exists: ${await fs.pathExists(configSrc)}`));
|
|
50
|
-
|
|
51
42
|
if (await fs.exists(configDest) && !options.force) {
|
|
52
43
|
console.log(chalk.yellow('ā config.yaml already exists, use --force to overwrite'));
|
|
53
44
|
} else {
|
|
@@ -81,16 +72,12 @@ program
|
|
|
81
72
|
}
|
|
82
73
|
|
|
83
74
|
// 2. Copy opencode commands
|
|
84
|
-
if (options.
|
|
75
|
+
if (!options.skipCommands) {
|
|
85
76
|
const commandsDir = path.join(cwd, '.opencode', 'commands');
|
|
86
77
|
await fs.ensureDir(commandsDir);
|
|
87
78
|
|
|
88
79
|
const templateCommandsDir = path.join(TEMPLATES_DIR, 'opencode', 'commands');
|
|
89
|
-
console.log(chalk.gray(`Commands template dir: ${templateCommandsDir}`));
|
|
90
|
-
console.log(chalk.gray(`Commands dir exists: ${await fs.pathExists(templateCommandsDir)}`));
|
|
91
|
-
|
|
92
80
|
const commands = await fs.readdir(templateCommandsDir);
|
|
93
|
-
console.log(chalk.gray(`Found ${commands.length} command files\n`));
|
|
94
81
|
|
|
95
82
|
let copiedCount = 0;
|
|
96
83
|
for (const cmd of commands) {
|
|
@@ -118,7 +105,6 @@ program
|
|
|
118
105
|
|
|
119
106
|
} catch (error) {
|
|
120
107
|
console.error(chalk.red('\nā Initialization failed:'), error.message);
|
|
121
|
-
console.error(chalk.red(error.stack));
|
|
122
108
|
process.exit(1);
|
|
123
109
|
}
|
|
124
110
|
});
|