@outputai/cli 0.1.13-next.68a23a3.0 → 0.1.13-next.7f744d4.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/dist/api/generated/api.d.ts +0 -2
- package/dist/assets/docker/docker-compose-dev.yml +1 -1
- package/dist/commands/workflow/list.d.ts +0 -1
- package/dist/commands/workflow/list.js +6 -12
- package/dist/commands/workflow/list.spec.js +0 -21
- package/dist/generated/framework_version.json +1 -1
- package/package.json +4 -4
|
@@ -17,8 +17,7 @@ export function parseWorkflowForDisplay(workflow) {
|
|
|
17
17
|
description: parsed.description || 'No description',
|
|
18
18
|
inputs: formatParameters(parsed.inputs),
|
|
19
19
|
outputs: formatParameters(parsed.outputs),
|
|
20
|
-
scenarios: scenarioNames.length > 0 ? scenarioNames.join(', ') : 'none'
|
|
21
|
-
aliases: workflow.aliases?.length ? workflow.aliases.join(', ') : 'none'
|
|
20
|
+
scenarios: scenarioNames.length > 0 ? scenarioNames.join(', ') : 'none'
|
|
22
21
|
};
|
|
23
22
|
}
|
|
24
23
|
function caseInsensitiveIncludes(str, filter) {
|
|
@@ -27,10 +26,7 @@ function caseInsensitiveIncludes(str, filter) {
|
|
|
27
26
|
function matchName(filterString) {
|
|
28
27
|
return workflow => {
|
|
29
28
|
const name = workflow.name || '';
|
|
30
|
-
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
return (workflow.aliases ?? []).some(alias => caseInsensitiveIncludes(alias, filterString));
|
|
29
|
+
return caseInsensitiveIncludes(name, filterString);
|
|
34
30
|
};
|
|
35
31
|
}
|
|
36
32
|
function sortWorkflowsByName(workflows) {
|
|
@@ -42,8 +38,8 @@ function sortWorkflowsByName(workflows) {
|
|
|
42
38
|
}
|
|
43
39
|
function createWorkflowTable(workflows, detailed) {
|
|
44
40
|
const table = new Table({
|
|
45
|
-
head: ['Name', 'Description', '
|
|
46
|
-
colWidths: detailed ? [
|
|
41
|
+
head: ['Name', 'Description', 'Inputs', 'Outputs', 'Scenarios'],
|
|
42
|
+
colWidths: detailed ? [30, 42, 42, 42, 60] : [24, 30, 24, 24, 48],
|
|
47
43
|
wordWrap: true,
|
|
48
44
|
style: {
|
|
49
45
|
head: ['cyan']
|
|
@@ -53,14 +49,13 @@ function createWorkflowTable(workflows, detailed) {
|
|
|
53
49
|
sortedWorkflows.forEach(workflow => {
|
|
54
50
|
const display = parseWorkflowForDisplay(workflow);
|
|
55
51
|
if (detailed) {
|
|
56
|
-
const aliases = workflow.aliases?.length ? workflow.aliases.join('\n') : 'none';
|
|
57
52
|
const inputs = display.inputs.split(', ').join('\n');
|
|
58
53
|
const outputs = display.outputs.split(', ').join('\n');
|
|
59
54
|
const scenarios = display.scenarios.split(', ').join('\n');
|
|
60
|
-
table.push([display.name, display.description,
|
|
55
|
+
table.push([display.name, display.description, inputs, outputs, scenarios]);
|
|
61
56
|
}
|
|
62
57
|
else {
|
|
63
|
-
table.push([display.name, display.description, display.
|
|
58
|
+
table.push([display.name, display.description, display.inputs, display.outputs, display.scenarios]);
|
|
64
59
|
}
|
|
65
60
|
});
|
|
66
61
|
return table.toString();
|
|
@@ -77,7 +72,6 @@ function formatWorkflowsAsJson(workflows) {
|
|
|
77
72
|
return {
|
|
78
73
|
name: display.name,
|
|
79
74
|
description: display.description,
|
|
80
|
-
aliases: w.aliases ?? [],
|
|
81
75
|
inputs: display.inputs.split(', '),
|
|
82
76
|
outputs: display.outputs.split(', '),
|
|
83
77
|
scenarios: display.scenarios === 'none' ? [] : display.scenarios.split(', '),
|
|
@@ -64,27 +64,6 @@ describe('workflow list parsing', () => {
|
|
|
64
64
|
expect(parsed.inputs).toBe('none');
|
|
65
65
|
expect(parsed.outputs).toBe('none');
|
|
66
66
|
expect(parsed.scenarios).toBe('none');
|
|
67
|
-
expect(parsed.aliases).toBe('none');
|
|
68
|
-
});
|
|
69
|
-
it('should include aliases when present', async () => {
|
|
70
|
-
const { parseWorkflowForDisplay } = await import('./list.js');
|
|
71
|
-
const mockWorkflow = {
|
|
72
|
-
name: 'aliased-workflow',
|
|
73
|
-
description: 'Has aliases',
|
|
74
|
-
aliases: ['old_name', 'legacy_name']
|
|
75
|
-
};
|
|
76
|
-
const parsed = parseWorkflowForDisplay(mockWorkflow);
|
|
77
|
-
expect(parsed.aliases).toBe('old_name, legacy_name');
|
|
78
|
-
});
|
|
79
|
-
it('should show none when aliases array is empty', async () => {
|
|
80
|
-
const { parseWorkflowForDisplay } = await import('./list.js');
|
|
81
|
-
const mockWorkflow = {
|
|
82
|
-
name: 'no-aliases',
|
|
83
|
-
description: 'Empty aliases',
|
|
84
|
-
aliases: []
|
|
85
|
-
};
|
|
86
|
-
const parsed = parseWorkflowForDisplay(mockWorkflow);
|
|
87
|
-
expect(parsed.aliases).toBe('none');
|
|
88
67
|
});
|
|
89
68
|
it('should include scenario names when scenarios exist', async () => {
|
|
90
69
|
mockListScenarios.mockReturnValueOnce(['basic', 'advanced', 'stress_test']);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outputai/cli",
|
|
3
|
-
"version": "0.1.13-next.
|
|
3
|
+
"version": "0.1.13-next.7f744d4.0",
|
|
4
4
|
"description": "CLI for Output.ai workflow generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"react": "19.2.4",
|
|
36
36
|
"semver": "7.7.4",
|
|
37
37
|
"yaml": "^2.8.3",
|
|
38
|
-
"@outputai/credentials": "0.1.13-next.
|
|
39
|
-
"@outputai/
|
|
40
|
-
"@outputai/
|
|
38
|
+
"@outputai/credentials": "0.1.13-next.7f744d4.0",
|
|
39
|
+
"@outputai/evals": "0.1.13-next.7f744d4.0",
|
|
40
|
+
"@outputai/llm": "0.1.13-next.7f744d4.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/cli-progress": "3.11.6",
|