task-pipeliner 0.2.2 → 0.2.4

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.
Files changed (168) hide show
  1. package/README.ko.md +17 -1
  2. package/README.md +17 -1
  3. package/dist/index.cjs +18 -16
  4. package/dist/index.js +18 -16
  5. package/dist/task-pipeliner-rs.node +0 -0
  6. package/package.json +17 -1
  7. package/dist/cli/index.d.ts +0 -19
  8. package/dist/cli/index.d.ts.map +0 -1
  9. package/dist/cli/index.js +0 -305
  10. package/dist/cli/index.js.map +0 -1
  11. package/dist/cli/prompts.d.ts +0 -48
  12. package/dist/cli/prompts.d.ts.map +0 -1
  13. package/dist/cli/prompts.js +0 -75
  14. package/dist/cli/prompts.js.map +0 -1
  15. package/dist/cli/ui.d.ts +0 -39
  16. package/dist/cli/ui.d.ts.map +0 -1
  17. package/dist/cli/ui.js +0 -84
  18. package/dist/cli/ui.js.map +0 -1
  19. package/dist/core/__tests__/actual-execution.test.d.ts +0 -2
  20. package/dist/core/__tests__/actual-execution.test.d.ts.map +0 -1
  21. package/dist/core/__tests__/actual-execution.test.js +0 -147
  22. package/dist/core/__tests__/actual-execution.test.js.map +0 -1
  23. package/dist/core/__tests__/base-dir.test.d.ts +0 -2
  24. package/dist/core/__tests__/base-dir.test.d.ts.map +0 -1
  25. package/dist/core/__tests__/base-dir.test.js +0 -146
  26. package/dist/core/__tests__/base-dir.test.js.map +0 -1
  27. package/dist/core/__tests__/built-code-execution.test.d.ts +0 -2
  28. package/dist/core/__tests__/built-code-execution.test.d.ts.map +0 -1
  29. package/dist/core/__tests__/built-code-execution.test.js +0 -48
  30. package/dist/core/__tests__/built-code-execution.test.js.map +0 -1
  31. package/dist/core/__tests__/choose-as-var-condition.test.d.ts +0 -2
  32. package/dist/core/__tests__/choose-as-var-condition.test.d.ts.map +0 -1
  33. package/dist/core/__tests__/choose-as-var-condition.test.js +0 -308
  34. package/dist/core/__tests__/choose-as-var-condition.test.js.map +0 -1
  35. package/dist/core/__tests__/cli-integration.test.d.ts +0 -2
  36. package/dist/core/__tests__/cli-integration.test.d.ts.map +0 -1
  37. package/dist/core/__tests__/cli-integration.test.js +0 -83
  38. package/dist/core/__tests__/cli-integration.test.js.map +0 -1
  39. package/dist/core/__tests__/comprehensive-basic-yaml.test.d.ts +0 -2
  40. package/dist/core/__tests__/comprehensive-basic-yaml.test.d.ts.map +0 -1
  41. package/dist/core/__tests__/comprehensive-basic-yaml.test.js +0 -114
  42. package/dist/core/__tests__/comprehensive-basic-yaml.test.js.map +0 -1
  43. package/dist/core/__tests__/condition-evaluator.test.d.ts +0 -2
  44. package/dist/core/__tests__/condition-evaluator.test.d.ts.map +0 -1
  45. package/dist/core/__tests__/condition-evaluator.test.js +0 -164
  46. package/dist/core/__tests__/condition-evaluator.test.js.map +0 -1
  47. package/dist/core/__tests__/debug-basic-yaml.test.d.ts +0 -2
  48. package/dist/core/__tests__/debug-basic-yaml.test.d.ts.map +0 -1
  49. package/dist/core/__tests__/debug-basic-yaml.test.js +0 -126
  50. package/dist/core/__tests__/debug-basic-yaml.test.js.map +0 -1
  51. package/dist/core/__tests__/example-files.test.d.ts +0 -2
  52. package/dist/core/__tests__/example-files.test.d.ts.map +0 -1
  53. package/dist/core/__tests__/example-files.test.js +0 -199
  54. package/dist/core/__tests__/example-files.test.js.map +0 -1
  55. package/dist/core/__tests__/executor-choice-integration.test.d.ts +0 -2
  56. package/dist/core/__tests__/executor-choice-integration.test.d.ts.map +0 -1
  57. package/dist/core/__tests__/executor-choice-integration.test.js +0 -169
  58. package/dist/core/__tests__/executor-choice-integration.test.js.map +0 -1
  59. package/dist/core/__tests__/executor-choice.test.d.ts +0 -2
  60. package/dist/core/__tests__/executor-choice.test.d.ts.map +0 -1
  61. package/dist/core/__tests__/executor-choice.test.js +0 -170
  62. package/dist/core/__tests__/executor-choice.test.js.map +0 -1
  63. package/dist/core/__tests__/executor-parallel.test.d.ts +0 -2
  64. package/dist/core/__tests__/executor-parallel.test.d.ts.map +0 -1
  65. package/dist/core/__tests__/executor-parallel.test.js +0 -129
  66. package/dist/core/__tests__/executor-parallel.test.js.map +0 -1
  67. package/dist/core/__tests__/executor-prompt.test.d.ts +0 -2
  68. package/dist/core/__tests__/executor-prompt.test.d.ts.map +0 -1
  69. package/dist/core/__tests__/executor-prompt.test.js +0 -147
  70. package/dist/core/__tests__/executor-prompt.test.js.map +0 -1
  71. package/dist/core/__tests__/executor-real-scenario.test.d.ts +0 -2
  72. package/dist/core/__tests__/executor-real-scenario.test.d.ts.map +0 -1
  73. package/dist/core/__tests__/executor-real-scenario.test.js +0 -169
  74. package/dist/core/__tests__/executor-real-scenario.test.js.map +0 -1
  75. package/dist/core/__tests__/file-condition.test.d.ts +0 -2
  76. package/dist/core/__tests__/file-condition.test.d.ts.map +0 -1
  77. package/dist/core/__tests__/file-condition.test.js +0 -172
  78. package/dist/core/__tests__/file-condition.test.js.map +0 -1
  79. package/dist/core/__tests__/final-verification.test.d.ts +0 -2
  80. package/dist/core/__tests__/final-verification.test.d.ts.map +0 -1
  81. package/dist/core/__tests__/final-verification.test.js +0 -56
  82. package/dist/core/__tests__/final-verification.test.js.map +0 -1
  83. package/dist/core/__tests__/parallel-when-condition.test.d.ts +0 -2
  84. package/dist/core/__tests__/parallel-when-condition.test.d.ts.map +0 -1
  85. package/dist/core/__tests__/parallel-when-condition.test.js +0 -155
  86. package/dist/core/__tests__/parallel-when-condition.test.js.map +0 -1
  87. package/dist/core/__tests__/parser.test.d.ts +0 -2
  88. package/dist/core/__tests__/parser.test.d.ts.map +0 -1
  89. package/dist/core/__tests__/parser.test.js +0 -91
  90. package/dist/core/__tests__/parser.test.js.map +0 -1
  91. package/dist/core/__tests__/real-inquirer-test.test.d.ts +0 -2
  92. package/dist/core/__tests__/real-inquirer-test.test.d.ts.map +0 -1
  93. package/dist/core/__tests__/real-inquirer-test.test.js +0 -20
  94. package/dist/core/__tests__/real-inquirer-test.test.js.map +0 -1
  95. package/dist/core/__tests__/reproduce-bug.test.d.ts +0 -2
  96. package/dist/core/__tests__/reproduce-bug.test.d.ts.map +0 -1
  97. package/dist/core/__tests__/reproduce-bug.test.js +0 -85
  98. package/dist/core/__tests__/reproduce-bug.test.js.map +0 -1
  99. package/dist/core/__tests__/timeout-retry.test.d.ts +0 -2
  100. package/dist/core/__tests__/timeout-retry.test.d.ts.map +0 -1
  101. package/dist/core/__tests__/timeout-retry.test.js +0 -184
  102. package/dist/core/__tests__/timeout-retry.test.js.map +0 -1
  103. package/dist/core/__tests__/workflow-validation.test.d.ts +0 -2
  104. package/dist/core/__tests__/workflow-validation.test.d.ts.map +0 -1
  105. package/dist/core/__tests__/workflow-validation.test.js +0 -116
  106. package/dist/core/__tests__/workflow-validation.test.js.map +0 -1
  107. package/dist/core/__tests__/workspace.test.d.ts +0 -2
  108. package/dist/core/__tests__/workspace.test.d.ts.map +0 -1
  109. package/dist/core/__tests__/workspace.test.js +0 -29
  110. package/dist/core/__tests__/workspace.test.js.map +0 -1
  111. package/dist/core/__tests__/yaml-integration.test.d.ts +0 -2
  112. package/dist/core/__tests__/yaml-integration.test.d.ts.map +0 -1
  113. package/dist/core/__tests__/yaml-integration.test.js +0 -114
  114. package/dist/core/__tests__/yaml-integration.test.js.map +0 -1
  115. package/dist/core/__tests__/yaml-scenarios.test.d.ts +0 -2
  116. package/dist/core/__tests__/yaml-scenarios.test.d.ts.map +0 -1
  117. package/dist/core/__tests__/yaml-scenarios.test.js +0 -197
  118. package/dist/core/__tests__/yaml-scenarios.test.js.map +0 -1
  119. package/dist/core/condition-evaluator.d.ts +0 -44
  120. package/dist/core/condition-evaluator.d.ts.map +0 -1
  121. package/dist/core/condition-evaluator.js +0 -121
  122. package/dist/core/condition-evaluator.js.map +0 -1
  123. package/dist/core/executor.d.ts +0 -172
  124. package/dist/core/executor.d.ts.map +0 -1
  125. package/dist/core/executor.js +0 -590
  126. package/dist/core/executor.js.map +0 -1
  127. package/dist/core/history.d.ts +0 -51
  128. package/dist/core/history.d.ts.map +0 -1
  129. package/dist/core/history.js +0 -57
  130. package/dist/core/history.js.map +0 -1
  131. package/dist/core/parser.d.ts +0 -41
  132. package/dist/core/parser.d.ts.map +0 -1
  133. package/dist/core/parser.js +0 -206
  134. package/dist/core/parser.js.map +0 -1
  135. package/dist/core/recorder.d.ts +0 -48
  136. package/dist/core/recorder.d.ts.map +0 -1
  137. package/dist/core/recorder.js +0 -56
  138. package/dist/core/recorder.js.map +0 -1
  139. package/dist/core/rust-task-runner.d.ts +0 -14
  140. package/dist/core/rust-task-runner.d.ts.map +0 -1
  141. package/dist/core/rust-task-runner.js +0 -34
  142. package/dist/core/rust-task-runner.js.map +0 -1
  143. package/dist/core/task-runner.d.ts +0 -63
  144. package/dist/core/task-runner.d.ts.map +0 -1
  145. package/dist/core/task-runner.js +0 -259
  146. package/dist/core/task-runner.js.map +0 -1
  147. package/dist/core/template.d.ts +0 -11
  148. package/dist/core/template.d.ts.map +0 -1
  149. package/dist/core/template.js +0 -36
  150. package/dist/core/template.js.map +0 -1
  151. package/dist/core/workflow-schema.d.ts +0 -31
  152. package/dist/core/workflow-schema.d.ts.map +0 -1
  153. package/dist/core/workflow-schema.js +0 -127
  154. package/dist/core/workflow-schema.js.map +0 -1
  155. package/dist/core/workspace.d.ts +0 -90
  156. package/dist/core/workspace.d.ts.map +0 -1
  157. package/dist/core/workspace.js +0 -143
  158. package/dist/core/workspace.js.map +0 -1
  159. package/dist/index.d.ts.map +0 -1
  160. package/dist/index.js.map +0 -1
  161. package/dist/types/condition.d.ts +0 -62
  162. package/dist/types/condition.d.ts.map +0 -1
  163. package/dist/types/condition.js +0 -6
  164. package/dist/types/condition.js.map +0 -1
  165. package/dist/types/workflow.d.ts +0 -90
  166. package/dist/types/workflow.d.ts.map +0 -1
  167. package/dist/types/workflow.js +0 -2
  168. package/dist/types/workflow.js.map +0 -1
package/dist/cli/index.js DELETED
@@ -1,305 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * CLI Entry Point
4
- *
5
- * This is the main command-line interface for task-pipeliner.
6
- *
7
- * Usage:
8
- * task-pipeliner run workflow.yaml
9
- * task-pipeliner run workflow.json
10
- *
11
- * What it does:
12
- * 1. Reads workflow file (YAML or JSON)
13
- * 2. Parses workflow definition
14
- * 3. Extracts step line numbers (for error reporting)
15
- * 4. Executes workflow using Executor
16
- * 5. Handles errors and displays results
17
- */
18
- import { exec } from 'child_process';
19
- import { readFileSync } from 'fs';
20
- import { resolve } from 'path';
21
- import { promisify } from 'util';
22
- import chalk from 'chalk';
23
- import { Command } from 'commander';
24
- import { Executor } from '../core/executor';
25
- import { WorkflowHistoryManager } from '../core/history';
26
- import { getParser } from '../core/parser';
27
- import { ChoicePrompt } from './prompts';
28
- const execAsync = promisify(exec);
29
- const program = new Command();
30
- program
31
- .name('task-pipeliner')
32
- .description('A powerful task pipeline runner with condition-based workflow execution.\n\n' +
33
- 'Define workflows in YAML or JSON files with conditional execution, parallel tasks,\n' +
34
- 'interactive prompts, and variable substitution.\n\n' +
35
- 'Features:\n' +
36
- ' • Condition-based execution (file checks, variable comparisons)\n' +
37
- ' • Parallel task execution\n' +
38
- ' • Interactive prompts and choices\n' +
39
- ' • Variable substitution with {{variables}}\n' +
40
- ' • Beautiful terminal output\n' +
41
- ' • Supports both YAML (.yaml, .yml) and JSON (.json) formats\n\n' +
42
- 'Quick Start:\n' +
43
- ' 1. Create a workflow.yaml or workflow.json file:\n' +
44
- ' steps:\n' +
45
- ' - run: echo "Hello, World!"\n' +
46
- ' - choose:\n' +
47
- ' message: "Select action:"\n' +
48
- ' options:\n' +
49
- ' - id: build\n' +
50
- ' label: "Build"\n' +
51
- ' as: action\n' +
52
- ' - when:\n' +
53
- ' var:\n' +
54
- ' action: build\n' +
55
- ' run: npm run build\n\n' +
56
- ' 2. Run it:\n' +
57
- ' tp run workflow.yaml\n' +
58
- ' tp run workflow.json\n\n' +
59
- 'Resources:\n' +
60
- ' 📚 Documentation: https://task-pipeliner.racgoo.com/\n' +
61
- ' 🎨 Visual Generator: https://task-pipeliner-generator.racgoo.com/\n' +
62
- ' 💻 Quick access: tp open docs | tp open generator')
63
- .version('0.1.0')
64
- .addHelpText('after', '\nExamples:\n $ tp run workflow.yaml\n $ tp run examples/simple-project/workflow.yaml\n $ tp open docs # Open documentation\n $ tp open generator # Open visual generator\n\nResources:\n 📚 Documentation: https://task-pipeliner.racgoo.com/\n 🎨 Visual Generator: https://task-pipeliner-generator.racgoo.com/\n\nSee README.md for complete DSL reference.');
65
- program
66
- .command('run')
67
- .description('Run a workflow from a YAML or JSON file')
68
- .argument('<file>', 'Path to the workflow file (YAML or JSON, relative or absolute)')
69
- .addHelpText('after', '\nExamples:\n $ tp run workflow.yaml\n $ tp run workflow.json\n $ tp run ./my-workflow.yaml\n $ tp run examples/simple-project/workflow.json\n\nWorkflow File Structure:\n A workflow file must contain a "steps" array with step definitions.\n Each step can be:\n • run: Execute a shell command\n • choose: Prompt user to select from options\n • prompt: Ask user for text input\n • parallel: Run multiple steps simultaneously\n • fail: Stop workflow with error message\n\n Steps can have "when" conditions to control execution:\n • file: Check if file/directory exists\n • var: Check variable value or existence\n • all/any/not: Combine conditions\n\n Supported formats: YAML (.yaml, .yml) and JSON (.json)\n See README.md for complete DSL documentation.')
70
- .action(async (file) => {
71
- try {
72
- // Step 1: Get appropriate parser based on file extension
73
- const parser = getParser(file);
74
- // Step 2: Load and parse workflow file
75
- console.log(chalk.blue(`Loading workflow from ${file}...`));
76
- const content = readFileSync(file, 'utf-8');
77
- const workflow = parser.parse(content);
78
- // Step 3: Validate workflow structure
79
- if (!workflow.steps || !Array.isArray(workflow.steps)) {
80
- throw new Error('Invalid workflow: steps array is required');
81
- }
82
- // Step 4: Extract metadata for error reporting
83
- workflow._lineNumbers = parser.extractStepLineNumbers(content); // Map step index -> line number
84
- workflow._fileName = extractFileName(file); // Just the filename, not full path
85
- // Step 5: Store absolute file path (needed for resolving relative baseDir)
86
- workflow._filePath = resolve(file);
87
- // Step 6: Execute workflow
88
- console.log(chalk.green('Starting workflow execution...\n'));
89
- const executor = new Executor();
90
- await executor.execute(workflow);
91
- // Step 7: Success message
92
- console.log(chalk.green('\n✓ Workflow completed successfully'));
93
- }
94
- catch (error) {
95
- // Handle errors: show simple message, no stack trace
96
- const errorMessage = error instanceof Error ? error.message : String(error);
97
- console.error(chalk.red(`\n✗ Workflow failed: ${errorMessage}`));
98
- process.exit(1);
99
- }
100
- });
101
- program
102
- .command('open')
103
- .description('Open generator or docs website in browser')
104
- .argument('<target>', 'Target to open: "generator" or "docs"')
105
- .addHelpText('after', '\nExamples:\n $ tp open generator\n $ tp open docs\n\nTargets:\n generator Open the visual workflow generator (https://task-pipeliner-generator.racgoo.com/)\n docs Open the documentation site (https://task-pipeliner.racgoo.com/)')
106
- .action(async (target) => {
107
- const urls = {
108
- generator: 'https://task-pipeliner-generator.racgoo.com/',
109
- docs: 'https://task-pipeliner.racgoo.com/',
110
- };
111
- const url = urls[target.toLowerCase()];
112
- if (!url) {
113
- console.error(chalk.red(`\n✗ Invalid target: ${target}`));
114
- console.log(chalk.yellow('\nValid targets:'));
115
- console.log(chalk.yellow(' • generator - Open the visual workflow generator'));
116
- console.log(chalk.yellow(' • docs - Open the documentation site'));
117
- process.exit(1);
118
- }
119
- try {
120
- const platform = process.platform;
121
- let command;
122
- if (platform === 'darwin') {
123
- command = `open "${url}"`;
124
- }
125
- else if (platform === 'win32') {
126
- command = `start "${url}"`;
127
- }
128
- else {
129
- command = `xdg-open "${url}"`;
130
- }
131
- await execAsync(command);
132
- console.log(chalk.green(`\n✓ Opening ${target === 'generator' ? 'generator' : 'documentation'} in browser...`));
133
- console.log(chalk.blue(` ${url}`));
134
- }
135
- catch (error) {
136
- const errorMessage = error instanceof Error ? error.message : String(error);
137
- console.error(chalk.red(`\n✗ Failed to open browser: ${errorMessage}`));
138
- console.log(chalk.yellow(`\nPlease visit manually: ${url}`));
139
- process.exit(1);
140
- }
141
- });
142
- /**
143
- * History command group
144
- * Manages workflow execution history with subcommands or interactive selection
145
- */
146
- const historyCommand = program.command('history').description('Manage workflow execution history');
147
- /**
148
- * Main history command action
149
- * When no subcommand is provided, shows interactive menu to select action
150
- */
151
- historyCommand.action(async () => {
152
- const choicePrompt = new ChoicePrompt();
153
- const choice = await choicePrompt.prompt('Select an action', [
154
- { id: 'show', label: 'Show - View and select a history to view' },
155
- { id: 'remove', label: 'Remove - Delete a specific history file' },
156
- { id: 'remove-all', label: 'Remove All - Delete all history files' },
157
- ]);
158
- if (!choice?.id) {
159
- console.error(chalk.red('\n✗ Invalid choice'));
160
- process.exit(1);
161
- }
162
- // Execute the selected action
163
- switch (choice.id) {
164
- case 'show':
165
- await handleHistoryShow();
166
- break;
167
- case 'remove':
168
- await handleHistoryRemove();
169
- break;
170
- case 'remove-all':
171
- await handleHistoryRemoveAll();
172
- break;
173
- default:
174
- console.error(chalk.red(`\n✗ Unknown action: ${choice.id}`));
175
- process.exit(1);
176
- }
177
- });
178
- /**
179
- * History show subcommand
180
- * Lists all history files and allows user to select one to view
181
- */
182
- historyCommand
183
- .command('show')
184
- .alias('list')
185
- .description('Show and select a history to view')
186
- .action(async () => {
187
- await handleHistoryShow();
188
- });
189
- /**
190
- * History remove subcommand
191
- * Removes a specific history file by filename
192
- */
193
- historyCommand
194
- .command('remove')
195
- .alias('rm')
196
- .description('Remove a specific history file')
197
- .argument('<filename>', 'History filename to remove')
198
- .action(async (filename) => {
199
- await handleHistoryRemove(filename);
200
- });
201
- /**
202
- * History remove-all subcommand
203
- * Removes all workflow execution history files
204
- */
205
- historyCommand
206
- .command('remove-all')
207
- .alias('clear')
208
- .description('Remove all workflow execution histories')
209
- .option('-y, --yes', 'Skip confirmation prompt')
210
- .action(async (options) => {
211
- await handleHistoryRemoveAll(options.yes);
212
- });
213
- /**
214
- * Handle history show action
215
- * Shows list of history files and allows user to select one
216
- */
217
- async function handleHistoryShow() {
218
- const historyManager = new WorkflowHistoryManager();
219
- const historyNames = await historyManager.getHistoryNames();
220
- if (historyNames.length === 0) {
221
- console.log(chalk.yellow('\n⚠ No history found'));
222
- return;
223
- }
224
- const choicePrompt = new ChoicePrompt();
225
- const choice = await choicePrompt.prompt('Select a history to view', historyNames.map((name) => ({
226
- id: name,
227
- label: name,
228
- })));
229
- if (!choice?.id) {
230
- console.error(chalk.red('\n✗ Invalid choice'));
231
- process.exit(1);
232
- }
233
- // TODO: 실제 히스토리 내용 표시
234
- console.log(chalk.green(`\n✓ Selected history: ${choice.id}`));
235
- console.log(chalk.blue(` ${choice.id}`));
236
- }
237
- /**
238
- * Handle history remove action
239
- * Removes a specific history file, with interactive selection if filename not provided
240
- */
241
- async function handleHistoryRemove(filename) {
242
- try {
243
- const historyManager = new WorkflowHistoryManager();
244
- // If filename not provided, show interactive selection
245
- if (!filename) {
246
- const historyNames = await historyManager.getHistoryNames();
247
- if (historyNames.length === 0) {
248
- console.log(chalk.yellow('\n⚠ No history found'));
249
- return;
250
- }
251
- const choicePrompt = new ChoicePrompt();
252
- const choice = await choicePrompt.prompt('Select a history to remove', historyNames.map((name) => ({
253
- id: name,
254
- label: name,
255
- })));
256
- if (!choice?.id) {
257
- console.error(chalk.red('\n✗ Invalid choice'));
258
- process.exit(1);
259
- }
260
- filename = choice.id;
261
- }
262
- await historyManager.removeHistory(filename);
263
- console.log(chalk.green(`\n✓ Removed history: ${filename}`));
264
- }
265
- catch (error) {
266
- const errorMessage = error instanceof Error ? error.message : String(error);
267
- console.error(chalk.red(`\n✗ Failed to remove history: ${errorMessage}`));
268
- process.exit(1);
269
- }
270
- }
271
- /**
272
- * Handle history remove-all action
273
- * Removes all workflow execution history files with confirmation
274
- */
275
- async function handleHistoryRemoveAll(skipConfirmation) {
276
- try {
277
- if (!skipConfirmation) {
278
- const choicePrompt = new ChoicePrompt();
279
- const choice = await choicePrompt.prompt('Are you sure you want to remove all histories?', [
280
- { id: 'yes', label: 'Yes, remove all' },
281
- { id: 'no', label: 'No, cancel' },
282
- ]);
283
- if (choice?.id !== 'yes') {
284
- console.log(chalk.yellow('\n✗ Cancelled'));
285
- return;
286
- }
287
- }
288
- const historyManager = new WorkflowHistoryManager();
289
- await historyManager.clearAllHistories();
290
- console.log(chalk.green('\n✓ All histories removed'));
291
- }
292
- catch (error) {
293
- const errorMessage = error instanceof Error ? error.message : String(error);
294
- console.error(chalk.red(`\n✗ Failed to remove histories: ${errorMessage}`));
295
- process.exit(1);
296
- }
297
- }
298
- /**
299
- * Extract filename from file path
300
- */
301
- function extractFileName(filePath) {
302
- return filePath.split('/').pop() || filePath;
303
- }
304
- program.parse();
305
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,gBAAgB,CAAC;KACtB,WAAW,CACV,8EAA8E;IAC5E,sFAAsF;IACtF,qDAAqD;IACrD,aAAa;IACb,qEAAqE;IACrE,+BAA+B;IAC/B,uCAAuC;IACvC,gDAAgD;IAChD,iCA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KAAK,KAAK,EAAE,CAAC;gBACzB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;gBAC3C,OAAO;YACT,CAAC;QACH,CAAC;QAED,MAAM,cAAc,GAAG,IAAI,sBAAsB,EAAE,CAAC;QACpD,MAAM,cAAc,CAAC,iBAAiB,EAAE,CAAC;QACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACxD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,mCAAmC,YAAY,EAAE,CAAC,CAAC,CAAC;QAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,QAAgB;IACvC,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,QAAQ,CAAC;AAC/C,CAAC;AAED,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Choice Prompt
3
- *
4
- * Shows user a selection menu with multiple options.
5
- * User can select one option using arrow keys and Enter.
6
- *
7
- * Example:
8
- * Choose environment:
9
- * > Development
10
- * Staging
11
- * Production
12
- */
13
- export declare class ChoicePrompt {
14
- /**
15
- * Show choice menu to user and return selected option
16
- *
17
- * @param message - Question to ask user
18
- * @param options - List of options (each has id and label)
19
- * @returns Selected option object
20
- */
21
- prompt(message: string, options: Array<{
22
- id: string;
23
- label: string;
24
- }>): Promise<{
25
- id: string;
26
- label: string;
27
- }>;
28
- }
29
- /**
30
- * Text Prompt
31
- *
32
- * Asks user to type text input.
33
- * User can type anything and press Enter.
34
- *
35
- * Example:
36
- * Enter version number: 1.0.0
37
- */
38
- export declare class TextPrompt {
39
- /**
40
- * Ask user for text input
41
- *
42
- * @param message - Question to ask user
43
- * @param defaultValue - Optional default value (shown in brackets)
44
- * @returns User's input text
45
- */
46
- prompt(message: string, defaultValue?: string): Promise<string>;
47
- }
48
- //# sourceMappingURL=prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,qBAAa,YAAY;IACvB;;;;;;OAMG;IACG,MAAM,CACV,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,GAC5C,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAsB1C;AAED;;;;;;;;GAQG;AACH,qBAAa,UAAU;IACrB;;;;;;OAMG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAatE"}
@@ -1,75 +0,0 @@
1
- import chalk from 'chalk';
2
- import inquirer from 'inquirer';
3
- /**
4
- * Choice Prompt
5
- *
6
- * Shows user a selection menu with multiple options.
7
- * User can select one option using arrow keys and Enter.
8
- *
9
- * Example:
10
- * Choose environment:
11
- * > Development
12
- * Staging
13
- * Production
14
- */
15
- export class ChoicePrompt {
16
- /**
17
- * Show choice menu to user and return selected option
18
- *
19
- * @param message - Question to ask user
20
- * @param options - List of options (each has id and label)
21
- * @returns Selected option object
22
- */
23
- async prompt(message, options) {
24
- // Use inquirer to show interactive menu
25
- const { choice } = await inquirer.prompt([
26
- {
27
- type: 'list',
28
- name: 'choice',
29
- message: chalk.cyan(message),
30
- // Convert our options format to inquirer format
31
- choices: options.map((opt) => ({
32
- name: opt.label, // What user sees
33
- value: opt.id, // What we get back
34
- })),
35
- },
36
- ]);
37
- // Find the full option object by id
38
- const selected = options.find((opt) => opt.id === choice);
39
- if (!selected) {
40
- throw new Error(`Invalid choice: ${choice}`);
41
- }
42
- return selected;
43
- }
44
- }
45
- /**
46
- * Text Prompt
47
- *
48
- * Asks user to type text input.
49
- * User can type anything and press Enter.
50
- *
51
- * Example:
52
- * Enter version number: 1.0.0
53
- */
54
- export class TextPrompt {
55
- /**
56
- * Ask user for text input
57
- *
58
- * @param message - Question to ask user
59
- * @param defaultValue - Optional default value (shown in brackets)
60
- * @returns User's input text
61
- */
62
- async prompt(message, defaultValue) {
63
- // Use inquirer to show text input field
64
- const { value } = await inquirer.prompt([
65
- {
66
- type: 'input',
67
- name: 'value',
68
- message: chalk.cyan(message),
69
- default: defaultValue, // Shown as [defaultValue] if provided
70
- },
71
- ]);
72
- return value;
73
- }
74
- }
75
- //# sourceMappingURL=prompts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/cli/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,YAAY;IACvB;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CACV,OAAe,EACf,OAA6C;QAE7C,wCAAwC;QACxC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;YACvC;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC5B,gDAAgD;gBAChD,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBAC7B,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,iBAAiB;oBAClC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,mBAAmB;iBACnC,CAAC,CAAC;aACJ;SACF,CAAC,CAAC;QAEH,oCAAoC;QACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,UAAU;IACrB;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,YAAqB;QACjD,wCAAwC;QACxC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC;YACtC;gBACE,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,OAAO;gBACb,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC5B,OAAO,EAAE,YAAY,EAAE,sCAAsC;aAC9D;SACF,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
package/dist/cli/ui.d.ts DELETED
@@ -1,39 +0,0 @@
1
- /**
2
- * UI Utilities
3
- * Common UI components for CLI output (boxes, dividers, etc.)
4
- */
5
- export interface BoxOptions {
6
- title?: string;
7
- borderColor?: 'cyan' | 'green' | 'yellow' | 'red' | 'blue';
8
- isNested?: boolean;
9
- }
10
- /**
11
- * Create step header box
12
- */
13
- export declare function createStepHeaderBox(content: string, lineNumber?: number, fileName?: string, options?: BoxOptions): string;
14
- /**
15
- * Create step completion message (no box, just colored text)
16
- */
17
- export declare function createStepFooterMessage(success: boolean, _isNested?: boolean): string;
18
- /**
19
- * Create error box
20
- */
21
- export declare function createErrorBox(error: string): string;
22
- /**
23
- * Create parallel execution header box
24
- */
25
- export declare function createParallelHeaderBox(branchCount: number): string;
26
- /**
27
- * Create parallel execution footer message (no box, just colored text)
28
- */
29
- export declare function createParallelFooterMessage(allSucceeded: boolean): string;
30
- /**
31
- * Step divider line (deprecated - no longer used)
32
- * @deprecated Dividers are no longer displayed
33
- */
34
- export declare function createDivider(): string;
35
- /**
36
- * Format nested output line
37
- */
38
- export declare function formatNestedLine(line: string, isNested?: boolean): string;
39
- //# sourceMappingURL=ui.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/cli/ui.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,GAAE,UAAe,GACvB,MAAM,CAuBR;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,GAAE,OAAe,GAAG,MAAM,CAG5F;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOpD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAOnE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAKzE;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,OAAe,GAAG,MAAM,CAGhF"}
package/dist/cli/ui.js DELETED
@@ -1,84 +0,0 @@
1
- /**
2
- * UI Utilities
3
- * Common UI components for CLI output (boxes, dividers, etc.)
4
- */
5
- import boxen from 'boxen';
6
- import chalk from 'chalk';
7
- /**
8
- * Create step header box
9
- */
10
- export function createStepHeaderBox(content, lineNumber, fileName, options = {}) {
11
- const { borderColor = 'cyan', isNested = false } = options;
12
- // Create title with line number and file name
13
- let title;
14
- if (lineNumber !== undefined) {
15
- if (fileName) {
16
- title = `line ${lineNumber} in ${fileName}`;
17
- }
18
- else {
19
- title = `line ${lineNumber}`;
20
- }
21
- }
22
- // Add indentation when nested
23
- const displayContent = isNested ? `│ ${content}` : `> ${content}`;
24
- return boxen(displayContent, {
25
- title: title,
26
- borderStyle: 'round',
27
- padding: { top: 0, bottom: 0, left: 1, right: 1 },
28
- margin: { top: 0, bottom: 0 },
29
- borderColor: borderColor,
30
- });
31
- }
32
- /**
33
- * Create step completion message (no box, just colored text)
34
- */
35
- export function createStepFooterMessage(success, _isNested = false) {
36
- const statusText = success ? '✓ Completed' : '✗ Failed';
37
- return success ? chalk.green(statusText) : chalk.red(statusText);
38
- }
39
- /**
40
- * Create error box
41
- */
42
- export function createErrorBox(error) {
43
- return boxen(`✗ ${error}`, {
44
- borderStyle: 'round',
45
- padding: { top: 0, bottom: 0, left: 1, right: 1 },
46
- margin: { top: 0, bottom: 0 },
47
- borderColor: 'red',
48
- });
49
- }
50
- /**
51
- * Create parallel execution header box
52
- */
53
- export function createParallelHeaderBox(branchCount) {
54
- return boxen(`> Starting parallel execution (${branchCount} branches)`, {
55
- borderStyle: 'round',
56
- padding: { top: 0, bottom: 0, left: 1, right: 1 },
57
- margin: { top: 0, bottom: 0 },
58
- borderColor: 'yellow',
59
- });
60
- }
61
- /**
62
- * Create parallel execution footer message (no box, just colored text)
63
- */
64
- export function createParallelFooterMessage(allSucceeded) {
65
- const statusText = allSucceeded
66
- ? '✓ All parallel branches completed'
67
- : '✗ Some parallel branches failed';
68
- return allSucceeded ? chalk.green(statusText) : chalk.red(statusText);
69
- }
70
- /**
71
- * Step divider line (deprecated - no longer used)
72
- * @deprecated Dividers are no longer displayed
73
- */
74
- export function createDivider() {
75
- return '';
76
- }
77
- /**
78
- * Format nested output line
79
- */
80
- export function formatNestedLine(line, isNested = false) {
81
- const prefix = isNested ? '| │ ' : '│ ';
82
- return `${prefix}${line}`;
83
- }
84
- //# sourceMappingURL=ui.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/cli/ui.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAe,EACf,UAAmB,EACnB,QAAiB,EACjB,UAAsB,EAAE;IAExB,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAE3D,8CAA8C;IAC9C,IAAI,KAAyB,CAAC;IAC9B,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,QAAQ,EAAE,CAAC;YACb,KAAK,GAAG,QAAQ,UAAU,OAAO,QAAQ,EAAE,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,QAAQ,UAAU,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,8BAA8B;IAC9B,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;IAElE,OAAO,KAAK,CAAC,cAAc,EAAE;QAC3B,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;QACjD,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G,YAAY;QAC7B,CAAC,CAAC,mCAAmC;QACrC,CAAC,CAAC,iCAAiC,CAAC;IACtC,OAAO,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,WAAoB,KAAK;IACtE,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,OAAO,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC;AAC5B,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=actual-execution.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actual-execution.test.d.ts","sourceRoot":"","sources":["../../../src/core/__tests__/actual-execution.test.ts"],"names":[],"mappings":""}