flowscale 1.1.0 → 1.3.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/.github/ISSUE_TEMPLATE/bug_report.yml +118 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +117 -0
- package/.github/ISSUE_TEMPLATE/question.yml +99 -0
- package/.github/pull_request_template.md +130 -0
- package/CHANGELOG.md +163 -0
- package/CLAUDE.md +2 -7
- package/CONTRIBUTING.md +205 -0
- package/LICENSE +29 -0
- package/Makefile +1 -10
- package/README.md +115 -134
- package/SECURITY.md +180 -0
- package/dist/index.d.ts +22 -29
- package/dist/index.js +615 -223
- package/dist/types.d.ts +55 -20
- package/examples/backend-proxy-example.js +1 -12
- package/package.json +13 -2
- package/examples/node-websocket-example.js +0 -173
- package/examples/websocket-example.html +0 -157
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
name: 🐛 Bug Report
|
|
2
|
+
description: Report a bug or unexpected behavior
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug", "triage"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to report a bug! Please fill out the information below to help us reproduce and fix the issue.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Bug Description
|
|
15
|
+
description: A clear and concise description of what the bug is.
|
|
16
|
+
placeholder: Describe the bug...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: reproduce
|
|
22
|
+
attributes:
|
|
23
|
+
label: Steps to Reproduce
|
|
24
|
+
description: Steps to reproduce the behavior
|
|
25
|
+
placeholder: |
|
|
26
|
+
1. Initialize SDK with...
|
|
27
|
+
2. Call method...
|
|
28
|
+
3. Observe error...
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: expected
|
|
34
|
+
attributes:
|
|
35
|
+
label: Expected Behavior
|
|
36
|
+
description: What should have happened?
|
|
37
|
+
placeholder: Expected behavior...
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: actual
|
|
43
|
+
attributes:
|
|
44
|
+
label: Actual Behavior
|
|
45
|
+
description: What actually happened?
|
|
46
|
+
placeholder: Actual behavior...
|
|
47
|
+
validations:
|
|
48
|
+
required: true
|
|
49
|
+
|
|
50
|
+
- type: dropdown
|
|
51
|
+
id: environment
|
|
52
|
+
attributes:
|
|
53
|
+
label: Environment
|
|
54
|
+
description: Where are you running the SDK?
|
|
55
|
+
options:
|
|
56
|
+
- Node.js
|
|
57
|
+
- Browser
|
|
58
|
+
- Both
|
|
59
|
+
validations:
|
|
60
|
+
required: true
|
|
61
|
+
|
|
62
|
+
- type: input
|
|
63
|
+
id: version
|
|
64
|
+
attributes:
|
|
65
|
+
label: SDK Version
|
|
66
|
+
description: Which version of the Flowscale SDK are you using?
|
|
67
|
+
placeholder: "1.1.0"
|
|
68
|
+
validations:
|
|
69
|
+
required: true
|
|
70
|
+
|
|
71
|
+
- type: input
|
|
72
|
+
id: node-version
|
|
73
|
+
attributes:
|
|
74
|
+
label: Node.js Version (if applicable)
|
|
75
|
+
description: Output of `node --version`
|
|
76
|
+
placeholder: "v18.17.0"
|
|
77
|
+
|
|
78
|
+
- type: textarea
|
|
79
|
+
id: code
|
|
80
|
+
attributes:
|
|
81
|
+
label: Code Sample
|
|
82
|
+
description: Minimal code sample that reproduces the issue
|
|
83
|
+
render: javascript
|
|
84
|
+
placeholder: |
|
|
85
|
+
const flowscale = new FlowscaleAPI({
|
|
86
|
+
apiKey: 'your-key',
|
|
87
|
+
baseUrl: 'your-url'
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// Code that causes the bug
|
|
91
|
+
|
|
92
|
+
- type: textarea
|
|
93
|
+
id: logs
|
|
94
|
+
attributes:
|
|
95
|
+
label: Error Logs
|
|
96
|
+
description: Any relevant error messages or logs
|
|
97
|
+
render: text
|
|
98
|
+
placeholder: Paste error logs here...
|
|
99
|
+
|
|
100
|
+
- type: textarea
|
|
101
|
+
id: additional
|
|
102
|
+
attributes:
|
|
103
|
+
label: Additional Context
|
|
104
|
+
description: Any other context about the problem
|
|
105
|
+
placeholder: Additional context...
|
|
106
|
+
|
|
107
|
+
- type: checkboxes
|
|
108
|
+
id: checklist
|
|
109
|
+
attributes:
|
|
110
|
+
label: Checklist
|
|
111
|
+
description: Please confirm the following
|
|
112
|
+
options:
|
|
113
|
+
- label: I have searched existing issues to avoid duplicates
|
|
114
|
+
required: true
|
|
115
|
+
- label: I have provided a minimal code sample
|
|
116
|
+
required: true
|
|
117
|
+
- label: I have included relevant error messages
|
|
118
|
+
required: true
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
name: ✨ Feature Request
|
|
2
|
+
description: Suggest a new feature or enhancement
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement", "triage"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for suggesting a new feature! Please provide as much detail as possible.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problem Statement
|
|
15
|
+
description: What problem does this feature solve?
|
|
16
|
+
placeholder: I'm frustrated when...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: solution
|
|
22
|
+
attributes:
|
|
23
|
+
label: Proposed Solution
|
|
24
|
+
description: What would you like to see added or changed?
|
|
25
|
+
placeholder: I would like to see...
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: dropdown
|
|
30
|
+
id: category
|
|
31
|
+
attributes:
|
|
32
|
+
label: Feature Category
|
|
33
|
+
description: What type of feature is this?
|
|
34
|
+
options:
|
|
35
|
+
- API Method
|
|
36
|
+
- Developer Experience
|
|
37
|
+
- Performance
|
|
38
|
+
- Security
|
|
39
|
+
- Documentation
|
|
40
|
+
- TypeScript Types
|
|
41
|
+
- WebSocket Support
|
|
42
|
+
- Error Handling
|
|
43
|
+
- Other
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
|
|
47
|
+
- type: textarea
|
|
48
|
+
id: use-case
|
|
49
|
+
attributes:
|
|
50
|
+
label: Use Case
|
|
51
|
+
description: Describe your specific use case for this feature
|
|
52
|
+
placeholder: I need this feature because...
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
|
|
56
|
+
- type: textarea
|
|
57
|
+
id: api-design
|
|
58
|
+
attributes:
|
|
59
|
+
label: Proposed API Design (if applicable)
|
|
60
|
+
description: How would you like the API to work?
|
|
61
|
+
render: javascript
|
|
62
|
+
placeholder: |
|
|
63
|
+
// Example API design
|
|
64
|
+
const result = await flowscale.newMethod({
|
|
65
|
+
param1: 'value1',
|
|
66
|
+
param2: 'value2'
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
- type: textarea
|
|
70
|
+
id: alternatives
|
|
71
|
+
attributes:
|
|
72
|
+
label: Alternatives Considered
|
|
73
|
+
description: What alternatives have you considered?
|
|
74
|
+
placeholder: I have considered...
|
|
75
|
+
|
|
76
|
+
- type: dropdown
|
|
77
|
+
id: priority
|
|
78
|
+
attributes:
|
|
79
|
+
label: Priority
|
|
80
|
+
description: How important is this feature to you?
|
|
81
|
+
options:
|
|
82
|
+
- Low - Nice to have
|
|
83
|
+
- Medium - Would improve my workflow
|
|
84
|
+
- High - Blocking my use case
|
|
85
|
+
- Critical - Can't use SDK without this
|
|
86
|
+
validations:
|
|
87
|
+
required: true
|
|
88
|
+
|
|
89
|
+
- type: checkboxes
|
|
90
|
+
id: implementation
|
|
91
|
+
attributes:
|
|
92
|
+
label: Implementation
|
|
93
|
+
description: Are you willing to help implement this feature?
|
|
94
|
+
options:
|
|
95
|
+
- label: I'm willing to submit a pull request for this feature
|
|
96
|
+
- label: I can help with testing
|
|
97
|
+
- label: I can help with documentation
|
|
98
|
+
|
|
99
|
+
- type: textarea
|
|
100
|
+
id: additional
|
|
101
|
+
attributes:
|
|
102
|
+
label: Additional Context
|
|
103
|
+
description: Any other context, screenshots, or examples
|
|
104
|
+
placeholder: Additional context...
|
|
105
|
+
|
|
106
|
+
- type: checkboxes
|
|
107
|
+
id: checklist
|
|
108
|
+
attributes:
|
|
109
|
+
label: Checklist
|
|
110
|
+
description: Please confirm the following
|
|
111
|
+
options:
|
|
112
|
+
- label: I have searched existing issues to avoid duplicates
|
|
113
|
+
required: true
|
|
114
|
+
- label: This feature would benefit the broader community
|
|
115
|
+
required: true
|
|
116
|
+
- label: I have provided a clear use case
|
|
117
|
+
required: true
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
name: ❓ Question
|
|
2
|
+
description: Ask a question about the SDK
|
|
3
|
+
title: "[Question]: "
|
|
4
|
+
labels: ["question", "triage"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Have a question about the Flowscale SDK? We're here to help!
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: question
|
|
13
|
+
attributes:
|
|
14
|
+
label: Question
|
|
15
|
+
description: What would you like to know?
|
|
16
|
+
placeholder: How do I...?
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: dropdown
|
|
21
|
+
id: category
|
|
22
|
+
attributes:
|
|
23
|
+
label: Question Category
|
|
24
|
+
description: What area is your question about?
|
|
25
|
+
options:
|
|
26
|
+
- Getting Started
|
|
27
|
+
- API Usage
|
|
28
|
+
- Authentication
|
|
29
|
+
- WebSocket
|
|
30
|
+
- Error Handling
|
|
31
|
+
- TypeScript
|
|
32
|
+
- Browser Usage
|
|
33
|
+
- Node.js Usage
|
|
34
|
+
- Security
|
|
35
|
+
- Performance
|
|
36
|
+
- Migration
|
|
37
|
+
- Other
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: context
|
|
43
|
+
attributes:
|
|
44
|
+
label: Context
|
|
45
|
+
description: What are you trying to accomplish?
|
|
46
|
+
placeholder: I'm trying to...
|
|
47
|
+
|
|
48
|
+
- type: textarea
|
|
49
|
+
id: attempted
|
|
50
|
+
attributes:
|
|
51
|
+
label: What Have You Tried?
|
|
52
|
+
description: What solutions have you already attempted?
|
|
53
|
+
placeholder: I have tried...
|
|
54
|
+
|
|
55
|
+
- type: textarea
|
|
56
|
+
id: code
|
|
57
|
+
attributes:
|
|
58
|
+
label: Code Sample (if applicable)
|
|
59
|
+
description: Share any relevant code
|
|
60
|
+
render: javascript
|
|
61
|
+
placeholder: |
|
|
62
|
+
const flowscale = new FlowscaleAPI({
|
|
63
|
+
// Your code here
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
- type: input
|
|
67
|
+
id: version
|
|
68
|
+
attributes:
|
|
69
|
+
label: SDK Version
|
|
70
|
+
description: Which version are you using?
|
|
71
|
+
placeholder: "1.1.0"
|
|
72
|
+
|
|
73
|
+
- type: dropdown
|
|
74
|
+
id: environment
|
|
75
|
+
attributes:
|
|
76
|
+
label: Environment
|
|
77
|
+
description: Where are you running the SDK?
|
|
78
|
+
options:
|
|
79
|
+
- Node.js
|
|
80
|
+
- Browser
|
|
81
|
+
- Both
|
|
82
|
+
- Not sure
|
|
83
|
+
|
|
84
|
+
- type: checkboxes
|
|
85
|
+
id: resources
|
|
86
|
+
attributes:
|
|
87
|
+
label: Documentation
|
|
88
|
+
description: Have you checked these resources?
|
|
89
|
+
options:
|
|
90
|
+
- label: I have read the README
|
|
91
|
+
- label: I have checked the examples
|
|
92
|
+
- label: I have searched existing issues
|
|
93
|
+
|
|
94
|
+
- type: textarea
|
|
95
|
+
id: additional
|
|
96
|
+
attributes:
|
|
97
|
+
label: Additional Context
|
|
98
|
+
description: Any other details that might help?
|
|
99
|
+
placeholder: Additional context...
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Pull Request
|
|
2
|
+
|
|
3
|
+
## 📝 Description
|
|
4
|
+
|
|
5
|
+
Brief description of what this PR does and why.
|
|
6
|
+
|
|
7
|
+
Fixes #(issue_number) <!-- Link to related issue -->
|
|
8
|
+
|
|
9
|
+
## 🔧 Type of Change
|
|
10
|
+
|
|
11
|
+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
|
|
12
|
+
- [ ] ✨ New feature (non-breaking change which adds functionality)
|
|
13
|
+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
14
|
+
- [ ] 📚 Documentation update
|
|
15
|
+
- [ ] 🔨 Refactoring (no functional changes)
|
|
16
|
+
- [ ] ⚡ Performance improvement
|
|
17
|
+
- [ ] 🧪 Test coverage improvement
|
|
18
|
+
|
|
19
|
+
## 🧪 Testing
|
|
20
|
+
|
|
21
|
+
Describe the tests you ran and how to reproduce them:
|
|
22
|
+
|
|
23
|
+
- [ ] Unit tests pass
|
|
24
|
+
- [ ] Integration tests pass
|
|
25
|
+
- [ ] Manual testing completed
|
|
26
|
+
- [ ] Browser testing (if applicable)
|
|
27
|
+
- [ ] Node.js testing (if applicable)
|
|
28
|
+
|
|
29
|
+
**Test Configuration:**
|
|
30
|
+
- Node.js version:
|
|
31
|
+
- Browser (if applicable):
|
|
32
|
+
- Operating System:
|
|
33
|
+
|
|
34
|
+
## 📋 Changes Made
|
|
35
|
+
|
|
36
|
+
List the main changes:
|
|
37
|
+
|
|
38
|
+
- Change 1
|
|
39
|
+
- Change 2
|
|
40
|
+
- Change 3
|
|
41
|
+
|
|
42
|
+
## 🔄 Breaking Changes
|
|
43
|
+
|
|
44
|
+
If this introduces breaking changes, describe:
|
|
45
|
+
|
|
46
|
+
1. **What breaks:**
|
|
47
|
+
2. **Migration path:**
|
|
48
|
+
3. **Deprecation timeline:**
|
|
49
|
+
|
|
50
|
+
## 📚 Documentation
|
|
51
|
+
|
|
52
|
+
- [ ] Documentation has been updated
|
|
53
|
+
- [ ] README updated (if needed)
|
|
54
|
+
- [ ] CHANGELOG.md updated
|
|
55
|
+
- [ ] Type definitions updated
|
|
56
|
+
- [ ] Examples updated (if needed)
|
|
57
|
+
|
|
58
|
+
## 🔍 Code Quality
|
|
59
|
+
|
|
60
|
+
- [ ] Code follows the project's coding standards
|
|
61
|
+
- [ ] Self-review of the code completed
|
|
62
|
+
- [ ] Code is commented where necessary
|
|
63
|
+
- [ ] No console logs or debugging code left
|
|
64
|
+
- [ ] Variables and functions have meaningful names
|
|
65
|
+
|
|
66
|
+
## ⚡ Performance
|
|
67
|
+
|
|
68
|
+
- [ ] No performance regressions introduced
|
|
69
|
+
- [ ] Performance improvements documented (if applicable)
|
|
70
|
+
|
|
71
|
+
## 🔒 Security
|
|
72
|
+
|
|
73
|
+
- [ ] No sensitive information exposed
|
|
74
|
+
- [ ] Input validation added where necessary
|
|
75
|
+
- [ ] Security implications considered
|
|
76
|
+
|
|
77
|
+
## 📱 Compatibility
|
|
78
|
+
|
|
79
|
+
- [ ] Backward compatibility maintained
|
|
80
|
+
- [ ] Forward compatibility considered
|
|
81
|
+
- [ ] Cross-platform compatibility verified
|
|
82
|
+
|
|
83
|
+
## 📦 Dependencies
|
|
84
|
+
|
|
85
|
+
- [ ] No unnecessary dependencies added
|
|
86
|
+
- [ ] Dependencies are up to date
|
|
87
|
+
- [ ] License compatibility checked
|
|
88
|
+
|
|
89
|
+
## 🎯 Review Focus
|
|
90
|
+
|
|
91
|
+
Please pay special attention to:
|
|
92
|
+
|
|
93
|
+
- Area 1 to review carefully
|
|
94
|
+
- Area 2 to review carefully
|
|
95
|
+
- Any specific concerns
|
|
96
|
+
|
|
97
|
+
## 📸 Screenshots (if applicable)
|
|
98
|
+
|
|
99
|
+
Add screenshots or GIFs to demonstrate changes:
|
|
100
|
+
|
|
101
|
+
## 🚀 Deployment
|
|
102
|
+
|
|
103
|
+
- [ ] Changes can be deployed safely
|
|
104
|
+
- [ ] Database migrations included (if applicable)
|
|
105
|
+
- [ ] Environment variables documented (if applicable)
|
|
106
|
+
|
|
107
|
+
## ✅ Final Checklist
|
|
108
|
+
|
|
109
|
+
- [ ] I have performed a self-review of my code
|
|
110
|
+
- [ ] I have commented my code where necessary
|
|
111
|
+
- [ ] I have made corresponding changes to the documentation
|
|
112
|
+
- [ ] My changes generate no new warnings
|
|
113
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
114
|
+
- [ ] New and existing unit tests pass locally with my changes
|
|
115
|
+
- [ ] Any dependent changes have been merged and published
|
|
116
|
+
|
|
117
|
+
## 🤝 Reviewer Guidelines
|
|
118
|
+
|
|
119
|
+
When reviewing this PR, please check:
|
|
120
|
+
|
|
121
|
+
- [ ] Code quality and style
|
|
122
|
+
- [ ] Test coverage
|
|
123
|
+
- [ ] Documentation completeness
|
|
124
|
+
- [ ] Breaking change handling
|
|
125
|
+
- [ ] Security implications
|
|
126
|
+
- [ ] Performance impact
|
|
127
|
+
|
|
128
|
+
## 💬 Additional Notes
|
|
129
|
+
|
|
130
|
+
Add any additional notes, concerns, or context here.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Flowscale JavaScript SDK will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### ✨ Added
|
|
11
|
+
- `executeWorkflowAsync` now supports an options object with `onIntermediateResponse` callback to emit intermediate polling updates.
|
|
12
|
+
- Added `subscribeRunEvents(runId, options)` to consume run events via SSE (`/api/v1/runs/{run_id}/events`).
|
|
13
|
+
|
|
14
|
+
### 🔄 Changed
|
|
15
|
+
- `executeWorkflowAsync` still accepts the legacy boolean as the 6th parameter for backward compatibility.
|
|
16
|
+
- `GetOutputResponse` and `RunDetail` types now include optional progress-related fields returned by the API.
|
|
17
|
+
- Removed WebSocket APIs from the JavaScript SDK (`connectWebSocket`, `disconnectWebSocket`, `sendWebSocketMessage`, `isWebSocketConnected`) and removed related examples.
|
|
18
|
+
|
|
19
|
+
## [1.1.0] - 2025-01-29
|
|
20
|
+
|
|
21
|
+
### 🎉 Major Features
|
|
22
|
+
- **Backward Compatibility**: Added smart detection for `executeWorkflowAsync` response format
|
|
23
|
+
- **Deprecation System**: Implemented comprehensive deprecation warnings with migration guidance
|
|
24
|
+
- **Enhanced Multi-Output Support**: Improved handling of workflows with multiple outputs
|
|
25
|
+
|
|
26
|
+
### ✨ Added
|
|
27
|
+
- New `returnAllOutputs` parameter in `executeWorkflowAsync` for explicit format control
|
|
28
|
+
- `LegacyGetOutputResponse` type with deprecation warnings in API responses
|
|
29
|
+
- `DeprecationWarning` interface for structured deprecation notices
|
|
30
|
+
- Method overloads for better TypeScript support
|
|
31
|
+
- Console warnings for deprecated usage patterns
|
|
32
|
+
- Migration guide in README with clear examples
|
|
33
|
+
|
|
34
|
+
### 🔄 Changed
|
|
35
|
+
- `executeWorkflowAsync` now auto-detects single vs multiple outputs
|
|
36
|
+
- Single output workflows return legacy format with deprecation notice
|
|
37
|
+
- Multiple output workflows return new array format
|
|
38
|
+
- Enhanced error messages with better context
|
|
39
|
+
|
|
40
|
+
### 🗓️ Deprecated
|
|
41
|
+
- Legacy single output format in `executeWorkflowAsync` (removal: September 1st, 2025)
|
|
42
|
+
- Will be completely removed in v2.0.0
|
|
43
|
+
|
|
44
|
+
### 📚 Documentation
|
|
45
|
+
- Updated README with migration guide
|
|
46
|
+
- Added backward compatibility examples
|
|
47
|
+
- Enhanced method documentation with deprecation notices
|
|
48
|
+
|
|
49
|
+
### 🔧 Technical
|
|
50
|
+
- Improved TypeScript type definitions
|
|
51
|
+
- Better error handling and validation
|
|
52
|
+
- Enhanced logging system
|
|
53
|
+
|
|
54
|
+
## [1.0.18-beta.2] - 2025-01-29
|
|
55
|
+
|
|
56
|
+
### 🚨 Breaking Changes
|
|
57
|
+
- `executeWorkflowAsync` response format changed to array (FIXED in v1.1.0)
|
|
58
|
+
|
|
59
|
+
### ✨ Added
|
|
60
|
+
- Multi-output support in `executeWorkflowAsync`
|
|
61
|
+
- `GetAllOutputsResponse` type for multiple outputs
|
|
62
|
+
- Enhanced polling logic for multiple outputs
|
|
63
|
+
|
|
64
|
+
### 🐛 Fixed
|
|
65
|
+
- Improved error handling in workflow execution
|
|
66
|
+
- Better timeout handling
|
|
67
|
+
|
|
68
|
+
### ⚠️ Issues
|
|
69
|
+
- **Backward compatibility broken** - users should upgrade to v1.1.0
|
|
70
|
+
|
|
71
|
+
## [1.0.17] - 2024-12-XX
|
|
72
|
+
|
|
73
|
+
### ✨ Added
|
|
74
|
+
- Enhanced security features
|
|
75
|
+
- Proxy mode support for secure frontend usage
|
|
76
|
+
- JWT authentication example
|
|
77
|
+
- Improved WebSocket handling
|
|
78
|
+
- Configurable logging levels
|
|
79
|
+
|
|
80
|
+
### 🔧 Changed
|
|
81
|
+
- Updated workflow execution error handling
|
|
82
|
+
- Enhanced response types
|
|
83
|
+
- Better input validation
|
|
84
|
+
|
|
85
|
+
### 🐛 Fixed
|
|
86
|
+
- WebSocket connection stability
|
|
87
|
+
- Error message clarity
|
|
88
|
+
- Authentication flow improvements
|
|
89
|
+
|
|
90
|
+
## [1.0.16] - 2024-11-XX
|
|
91
|
+
|
|
92
|
+
### ✨ Added
|
|
93
|
+
- WebSocket support for real-time updates
|
|
94
|
+
- Browser and Node.js environment detection
|
|
95
|
+
- Enhanced file upload handling
|
|
96
|
+
- Better retry logic for failed requests
|
|
97
|
+
|
|
98
|
+
### 🔧 Changed
|
|
99
|
+
- Improved API error handling
|
|
100
|
+
- Better timeout management
|
|
101
|
+
- Enhanced type definitions
|
|
102
|
+
|
|
103
|
+
## Previous Versions
|
|
104
|
+
|
|
105
|
+
### [1.0.15] and earlier
|
|
106
|
+
- Initial releases
|
|
107
|
+
- Basic API functionality
|
|
108
|
+
- Core workflow execution
|
|
109
|
+
- File upload support
|
|
110
|
+
- Authentication handling
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Migration Guides
|
|
115
|
+
|
|
116
|
+
### From 1.0.x to 1.1.0
|
|
117
|
+
|
|
118
|
+
**No breaking changes** - all existing code continues to work.
|
|
119
|
+
|
|
120
|
+
#### If you see deprecation warnings:
|
|
121
|
+
|
|
122
|
+
**Old code** (still works):
|
|
123
|
+
```javascript
|
|
124
|
+
const result = await flowscale.executeWorkflowAsync(workflowId, data);
|
|
125
|
+
console.log(result.data.download_url); // Single output
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**New code** (recommended):
|
|
129
|
+
```javascript
|
|
130
|
+
const result = await flowscale.executeWorkflowAsync(workflowId, data, groupId, 2000, 600000, true);
|
|
131
|
+
result.data.forEach(output => {
|
|
132
|
+
console.log(output.download_url); // Multiple outputs
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
#### Handling both formats:
|
|
137
|
+
```javascript
|
|
138
|
+
const result = await flowscale.executeWorkflowAsync(workflowId, data);
|
|
139
|
+
|
|
140
|
+
if (Array.isArray(result.data)) {
|
|
141
|
+
// New format - multiple outputs
|
|
142
|
+
result.data.forEach(output => console.log(output.download_url));
|
|
143
|
+
} else {
|
|
144
|
+
// Legacy format - single output
|
|
145
|
+
console.log(result.data.download_url);
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Future Migration (v2.0.0 - September 1st, 2025)
|
|
150
|
+
|
|
151
|
+
In v2.0.0, the legacy format will be completely removed:
|
|
152
|
+
- `executeWorkflowAsync` will always return array format
|
|
153
|
+
- `returnAllOutputs` parameter will be removed
|
|
154
|
+
- `LegacyGetOutputResponse` type will be removed
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Support
|
|
159
|
+
|
|
160
|
+
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/FlowScale-AI/flowscale-js-sdk/issues)
|
|
161
|
+
- 💬 **Discussions**: [GitHub Discussions](https://github.com/FlowScale-AI/flowscale-js-sdk/discussions)
|
|
162
|
+
- 🔒 **Security**: [Security Policy](SECURITY.md)
|
|
163
|
+
- 🤝 **Contributing**: [Contributing Guide](CONTRIBUTING.md)
|
package/CLAUDE.md
CHANGED
|
@@ -18,13 +18,11 @@ This is a TypeScript SDK for interacting with the Flowscale ComfyUI API. The cod
|
|
|
18
18
|
- **FlowscaleAPI Class** (`src/index.ts`): The main SDK class that provides all API methods
|
|
19
19
|
- Uses Axios for HTTP requests with built-in retry logic and timeout handling
|
|
20
20
|
- Supports both Node.js and browser environments with security warnings for browser usage
|
|
21
|
-
- Includes WebSocket support for real-time communication (browser only)
|
|
22
21
|
- Has configurable logging with different levels (debug, info, warn, error)
|
|
23
22
|
|
|
24
23
|
- **Type Definitions** (`src/types.ts`): Comprehensive TypeScript interfaces for:
|
|
25
24
|
- API responses (HealthCheckResponse, WorkflowResponse, etc.)
|
|
26
25
|
- Configuration options (FlowscaleConfig)
|
|
27
|
-
- WebSocket-related types (WebSocketOptions, WebSocketMessage)
|
|
28
26
|
|
|
29
27
|
### Key Features
|
|
30
28
|
|
|
@@ -33,8 +31,7 @@ This is a TypeScript SDK for interacting with the Flowscale ComfyUI API. The cod
|
|
|
33
31
|
3. **Input Validation**: Comprehensive validation for all required parameters with helpful error messages
|
|
34
32
|
4. **File Upload Support**: Handles FormData for file uploads in workflow execution
|
|
35
33
|
5. **Async Workflow Execution**: `executeWorkflowAsync` method polls for all outputs and waits for completion automatically
|
|
36
|
-
6. **
|
|
37
|
-
7. **Error Handling**: Consistent error handling with retry logic for timeouts and 504 errors
|
|
34
|
+
6. **Error Handling**: Consistent error handling with retry logic for timeouts and 504 errors
|
|
38
35
|
|
|
39
36
|
### API Methods Structure
|
|
40
37
|
|
|
@@ -52,7 +49,6 @@ The SDK requires:
|
|
|
52
49
|
- Optional: timeout, retry settings
|
|
53
50
|
- Optional: `proxyMode` - Enable secure frontend usage without exposing API key
|
|
54
51
|
- Optional: `customHeaders` - For JWT tokens, session cookies, etc.
|
|
55
|
-
- Optional: `WebSocketImpl` - For Node.js environments, pass the 'ws' WebSocket constructor to enable WebSocket functionality
|
|
56
52
|
|
|
57
53
|
### Build Configuration
|
|
58
54
|
|
|
@@ -64,10 +60,9 @@ The SDK requires:
|
|
|
64
60
|
## Important Notes
|
|
65
61
|
|
|
66
62
|
- No test framework is currently configured
|
|
67
|
-
- WebSocket functionality works in both browser and Node.js environments (Node.js requires passing `WebSocketImpl: require('ws')`)
|
|
68
63
|
- **Security**: Supports both direct API key usage and secure proxy mode for frontend applications
|
|
69
64
|
- **Proxy Mode**: Enables secure frontend usage by routing requests through a backend proxy that holds the API key
|
|
70
65
|
- All file uploads are handled through FormData with support for File/Blob objects
|
|
71
66
|
- The SDK has built-in retry logic for network timeouts and gateway errors
|
|
72
67
|
- Comprehensive input validation prevents common configuration errors
|
|
73
|
-
- Dynamic header management supports JWT token refresh and session management
|
|
68
|
+
- Dynamic header management supports JWT token refresh and session management
|