@comfanion/workflow 3.5.0 → 3.5.1

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 CHANGED
@@ -18,7 +18,7 @@ const program = new Command();
18
18
  program
19
19
  .name('create-opencode-workflow')
20
20
  .description('Initialize OpenCode Workflow system for AI-assisted development')
21
- .version('3.5.0');
21
+ .version('3.5.1');
22
22
 
23
23
  program
24
24
  .command('init')
@@ -108,6 +108,7 @@ program
108
108
  const targetDir = path.join(process.cwd(), '.opencode');
109
109
 
110
110
  // Check if already exists
111
+ let existingConfig = null;
111
112
  if (await fs.pathExists(targetDir)) {
112
113
  spinner.warn(chalk.yellow('.opencode/ already exists'));
113
114
  const { overwrite } = await inquirer.prompt([{
@@ -121,12 +122,24 @@ program
121
122
  console.log(chalk.yellow('\nAborted. Use `update` command to update existing installation.\n'));
122
123
  process.exit(0);
123
124
  }
125
+
126
+ // Create backup and remove old directory
127
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
128
+ const backupDir = path.join(process.cwd(), `.opencode.backup-${timestamp}`);
129
+
130
+ spinner.start('Creating backup...');
131
+ await fs.copy(targetDir, backupDir);
132
+
133
+ spinner.text = 'Removing old .opencode/...';
134
+ await fs.remove(targetDir);
135
+
136
+ console.log(chalk.yellow(`\nšŸ“¦ Backup created: ${chalk.cyan(`.opencode.backup-${timestamp}/`)}`));
124
137
  }
125
138
 
126
139
  spinner.start('Copying OpenCode Workflow files...');
127
140
 
128
- // Copy .opencode structure
129
- await fs.copy(OPENCODE_SRC, targetDir, { overwrite: true });
141
+ // Copy .opencode structure (fresh, no old files)
142
+ await fs.copy(OPENCODE_SRC, targetDir);
130
143
 
131
144
  // Update config.yaml with user values
132
145
  spinner.text = 'Configuring...';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfanion/workflow",
3
- "version": "3.5.0",
3
+ "version": "3.5.1",
4
4
  "description": "Initialize OpenCode Workflow system for AI-assisted development",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "3.0.0",
3
- "buildDate": "2026-01-23T16:24:04.259Z",
3
+ "buildDate": "2026-01-23T16:26:53.487Z",
4
4
  "files": [
5
5
  "config.yaml",
6
6
  "FLOW.yaml",
@@ -6,7 +6,7 @@
6
6
  # PROJECT CONFIGURATION
7
7
  # =============================================================================
8
8
  project_name: "ai-wf"
9
- version: "3.5.0"
9
+ version: "3.5.1"
10
10
 
11
11
  # =============================================================================
12
12
  # USER CONFIGURATION