rbin-task-flow 1.19.4 → 1.19.5
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/README.md +8 -0
- package/bin/cli.js +10 -0
- package/lib/install.js +25 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,6 +71,7 @@ rbin-task-flow init
|
|
|
71
71
|
```bash
|
|
72
72
|
rbin-task-flow init # Inicializa no projeto atual
|
|
73
73
|
rbin-task-flow update # Atualiza configurações
|
|
74
|
+
rbin-task-flow reset # Reinstala o Task Flow do zero
|
|
74
75
|
rbin-task-flow version-check # Verifica atualizações de modelos
|
|
75
76
|
rbin-task-flow info # Mostra informações
|
|
76
77
|
rbin-task-flow check # Roda lint/fix e build quando existirem
|
|
@@ -253,6 +254,9 @@ Para atualizar configurações em um projeto existente:
|
|
|
253
254
|
cd /caminho/para/seu/projeto
|
|
254
255
|
rbin-task-flow update
|
|
255
256
|
|
|
257
|
+
# Para reiniciar o Task Flow do zero, incluindo .task-flow/.internal
|
|
258
|
+
rbin-task-flow reset
|
|
259
|
+
|
|
256
260
|
# Ou usando método legacy
|
|
257
261
|
~/.rbin-task-flow/install.sh
|
|
258
262
|
# Digite o caminho do projeto
|
|
@@ -418,6 +422,7 @@ rbin-task-flow init
|
|
|
418
422
|
```bash
|
|
419
423
|
rbin-task-flow init # Initialize in current project
|
|
420
424
|
rbin-task-flow update # Update configurations
|
|
425
|
+
rbin-task-flow reset # Reinstall Task Flow from scratch
|
|
421
426
|
rbin-task-flow version-check # Check for model updates
|
|
422
427
|
rbin-task-flow info # Show information
|
|
423
428
|
rbin-task-flow check # Run lint/fix and build when available
|
|
@@ -600,6 +605,9 @@ To update configs in an existing project:
|
|
|
600
605
|
cd /path/to/your/project
|
|
601
606
|
rbin-task-flow update
|
|
602
607
|
|
|
608
|
+
# To reset Task Flow from scratch, including .task-flow/.internal
|
|
609
|
+
rbin-task-flow reset
|
|
610
|
+
|
|
603
611
|
# Or using legacy method
|
|
604
612
|
~/.rbin-task-flow/install.sh
|
|
605
613
|
# Enter the project path
|
package/bin/cli.js
CHANGED
|
@@ -33,6 +33,15 @@ program
|
|
|
33
33
|
await installInProject(targetPath, { update: true });
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
+
program
|
|
37
|
+
.command('reset')
|
|
38
|
+
.description('Reset RBIN Task Flow in current directory')
|
|
39
|
+
.option('-p, --path <path>', 'Target directory (default: current directory)')
|
|
40
|
+
.action(async (options) => {
|
|
41
|
+
const targetPath = options.path || process.cwd();
|
|
42
|
+
await installInProject(targetPath, { reset: true });
|
|
43
|
+
});
|
|
44
|
+
|
|
36
45
|
program
|
|
37
46
|
.command('version-check')
|
|
38
47
|
.description('Check for model version updates')
|
|
@@ -91,6 +100,7 @@ program
|
|
|
91
100
|
console.log(chalk.yellow('\nCommands:'));
|
|
92
101
|
console.log(chalk.cyan(' rbin-task-flow init') + ' - Initialize in current directory');
|
|
93
102
|
console.log(chalk.cyan(' rbin-task-flow update') + ' - Update configurations');
|
|
103
|
+
console.log(chalk.cyan(' rbin-task-flow reset') + ' - Reset task flow files from scratch');
|
|
94
104
|
console.log(chalk.cyan(' rbin-task-flow version-check') + ' - Check for model updates');
|
|
95
105
|
console.log(chalk.cyan(' rbin-task-flow estimate <ids>') + ' - Estimate time (e.g., "1" or "1,2" or "all")');
|
|
96
106
|
console.log(chalk.cyan(' rbin-task-flow report <ids>') + ' - Generate report (e.g., "1" or "1,2" or "all")');
|
package/lib/install.js
CHANGED
|
@@ -8,10 +8,13 @@ const TEMPLATE_DIR = path.join(__dirname, '..');
|
|
|
8
8
|
|
|
9
9
|
async function installInProject(targetPath, options = {}) {
|
|
10
10
|
const isUpdate = options.update || false;
|
|
11
|
+
const isReset = options.reset || false;
|
|
11
12
|
|
|
12
13
|
showHeader();
|
|
13
14
|
|
|
14
|
-
if (
|
|
15
|
+
if (isReset) {
|
|
16
|
+
console.log(chalk.blue('♻️ Resetting RBIN Task Flow...'));
|
|
17
|
+
} else if (isUpdate) {
|
|
15
18
|
console.log(chalk.blue('🔄 Updating RBIN Task Flow...'));
|
|
16
19
|
} else {
|
|
17
20
|
console.log(chalk.blue('🚀 Installing RBIN Task Flow...'));
|
|
@@ -36,6 +39,10 @@ async function installInProject(targetPath, options = {}) {
|
|
|
36
39
|
|
|
37
40
|
spinner.text = 'Creating directories...';
|
|
38
41
|
|
|
42
|
+
if (isReset) {
|
|
43
|
+
await fs.remove(path.join(targetPath, '.task-flow'));
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
const dirs = [
|
|
40
47
|
'.cursor/rules',
|
|
41
48
|
'.claude',
|
|
@@ -48,7 +55,7 @@ async function installInProject(targetPath, options = {}) {
|
|
|
48
55
|
|
|
49
56
|
spinner.text = 'Copying configuration files...';
|
|
50
57
|
|
|
51
|
-
await copyConfigs(targetPath, isUpdate);
|
|
58
|
+
await copyConfigs(targetPath, { update: isUpdate, reset: isReset });
|
|
52
59
|
|
|
53
60
|
spinner.text = 'Updating .gitignore...';
|
|
54
61
|
|
|
@@ -69,11 +76,14 @@ async function installInProject(targetPath, options = {}) {
|
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
78
|
|
|
72
|
-
async function copyConfigs(targetPath,
|
|
79
|
+
async function copyConfigs(targetPath, options = {}) {
|
|
80
|
+
const isUpdate = options.update || false;
|
|
81
|
+
const isReset = options.reset || false;
|
|
82
|
+
|
|
73
83
|
const cursorRulesPath = path.join(TEMPLATE_DIR, '.cursor/rules');
|
|
74
84
|
const cursorRulesDest = path.join(targetPath, '.cursor/rules');
|
|
75
85
|
if (fs.existsSync(cursorRulesPath)) {
|
|
76
|
-
if (isUpdate && fs.existsSync(cursorRulesDest)) {
|
|
86
|
+
if ((isUpdate || isReset) && fs.existsSync(cursorRulesDest)) {
|
|
77
87
|
await fs.emptyDir(cursorRulesDest);
|
|
78
88
|
}
|
|
79
89
|
await fs.copy(cursorRulesPath, cursorRulesDest, { overwrite: true });
|
|
@@ -120,10 +130,12 @@ async function copyConfigs(targetPath, isUpdate = false) {
|
|
|
120
130
|
showSuccess('Codex instructions (AGENTS.md)');
|
|
121
131
|
}
|
|
122
132
|
|
|
123
|
-
await copyTaskFlow(targetPath, isUpdate);
|
|
133
|
+
await copyTaskFlow(targetPath, { update: isUpdate, reset: isReset });
|
|
124
134
|
}
|
|
125
135
|
|
|
126
|
-
async function copyTaskFlow(targetPath,
|
|
136
|
+
async function copyTaskFlow(targetPath, options = {}) {
|
|
137
|
+
const isUpdate = options.update || false;
|
|
138
|
+
const isReset = options.reset || false;
|
|
127
139
|
const taskFlowSrc = path.join(TEMPLATE_DIR, '.task-flow');
|
|
128
140
|
const taskFlowDest = path.join(targetPath, '.task-flow');
|
|
129
141
|
|
|
@@ -141,6 +153,10 @@ async function copyTaskFlow(targetPath, isUpdate = false) {
|
|
|
141
153
|
await fs.copy(taskFlowSrc, taskFlowDest, {
|
|
142
154
|
overwrite: true,
|
|
143
155
|
filter: (src, dest) => {
|
|
156
|
+
if (isReset) {
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
|
|
144
160
|
if (PROTECTED.some((p) => src.startsWith(p) || dest.startsWith(p))) {
|
|
145
161
|
return false;
|
|
146
162
|
}
|
|
@@ -168,7 +184,9 @@ async function copyTaskFlow(targetPath, isUpdate = false) {
|
|
|
168
184
|
}
|
|
169
185
|
|
|
170
186
|
showSuccess('Task Flow directory');
|
|
171
|
-
if (
|
|
187
|
+
if (isReset) {
|
|
188
|
+
showWarning('Reset completed: .task-flow was recreated from scratch');
|
|
189
|
+
} else if (isUpdate) {
|
|
172
190
|
showInfo('Protected: .internal/ (your task data is safe)');
|
|
173
191
|
} else {
|
|
174
192
|
showInfo('Protected on init: .internal/, tasks.input.txt, tasks.status.md, tasks.flow.md');
|