@runtypelabs/react-flow 0.3.16 → 0.3.18
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +31 -0
- package/dist/index.js +5 -6
- package/dist/index.mjs +5 -6
- package/example/CHANGELOG.md +24 -0
- package/example/package.json +1 -1
- package/package.json +2 -2
- package/src/hooks/useRuntypeFlow.ts +12 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @runtypelabs/react-flow@0.3.
|
|
2
|
+
> @runtypelabs/react-flow@0.3.18 build /home/runner/_work/core/core/packages/react-flow
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[32m105.
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
15
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m101.
|
|
16
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m105.55 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 197ms
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m101.50 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 196ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @runtypelabs/react-flow
|
|
2
2
|
|
|
3
|
+
## 0.3.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 89b107f: feat(sdk): alias Flow/FlowStep/Tool from the OpenAPI spec; fix flow + tool response-schema drift
|
|
8
|
+
|
|
9
|
+
Continues the OpenAPI codegen swap (after #3645/#3665). Three coupled changes that all touch `entities.ts` + the regenerated spec + SDK `types.ts`:
|
|
10
|
+
- **Flow phantom fix (API spec accuracy):** the flow `GET`/`LIST`/`POST` response schemas advertised a `status` field the handlers stopped returning (removed in #3404), and the shared detail schema carried a `draftVersionId` that only the `PUT` handler returns. Removed `status` everywhere and split a dedicated `UpdatedFlowResponseSchema` (`FlowDetailSchema.extend({ draftVersionId })`) for the update route so `GET`/`POST` no longer promise it.
|
|
11
|
+
- **Tool schema split:** `GET /v1/tools/{id}` never attaches `validation` (only create/update/convert do, when custom-tool code produces warnings). Split `ToolDetailSchema` (base, GET) from `ToolWithValidationSchema` (create/update/convert).
|
|
12
|
+
- **SDK aliases:** `Flow`, `FlowStep`, and `Tool` are now `paths[...]`-derived from the generated spec instead of hand-written interfaces. Added a `FlowListItem` alias for the lighter `GET /v1/flows` list item and retyped `flows.list()` to `PaginationResponse<FlowListItem>` (it was incorrectly typed as the detail shape). `FlowListItem` is named to avoid colliding with the flow-execution `FlowSummary` already exported by `flow-builder.ts`.
|
|
13
|
+
|
|
14
|
+
This is a **major** bump for `@runtypelabs/sdk` because the generated shapes are looser/more accurate than the old interfaces: the GET flow detail no longer carries `status`/`description`, flow steps have optional `name`/`order`/`enabled`/`config`, the tool GET shape drops `validation`, and tool `config`/`parametersSchema` are typed as the JSONB records the API actually returns. Dashboard and CLI consumers are updated in lockstep.
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [c3536a2]
|
|
17
|
+
- Updated dependencies [8fefe6f]
|
|
18
|
+
- Updated dependencies [a0b30f3]
|
|
19
|
+
- Updated dependencies [aa97266]
|
|
20
|
+
- Updated dependencies [42979fc]
|
|
21
|
+
- Updated dependencies [55d5817]
|
|
22
|
+
- Updated dependencies [89b107f]
|
|
23
|
+
- Updated dependencies [e1a4368]
|
|
24
|
+
- Updated dependencies [af80a8a]
|
|
25
|
+
- @runtypelabs/sdk@4.0.0
|
|
26
|
+
|
|
27
|
+
## 0.3.17
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [53bfe49]
|
|
32
|
+
- @runtypelabs/sdk@3.0.0
|
|
33
|
+
|
|
3
34
|
## 0.3.16
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -664,10 +664,10 @@ function useRuntypeFlow(options) {
|
|
|
664
664
|
const steps = Array.isArray(flow.flowSteps) ? flow.flowSteps.map((s) => ({
|
|
665
665
|
id: s.id,
|
|
666
666
|
type: s.type,
|
|
667
|
-
name: s.name,
|
|
668
|
-
order: s.order,
|
|
669
|
-
enabled: s.enabled,
|
|
670
|
-
config: s.config
|
|
667
|
+
name: s.name ?? "",
|
|
668
|
+
order: s.order ?? 0,
|
|
669
|
+
enabled: s.enabled ?? true,
|
|
670
|
+
config: s.config ?? {}
|
|
671
671
|
})) : [];
|
|
672
672
|
let newNodes = flowStepsToNodes(steps, {
|
|
673
673
|
onChange: handleStepChange,
|
|
@@ -680,7 +680,7 @@ function useRuntypeFlow(options) {
|
|
|
680
680
|
const newEdges = createEdgesFromNodes(newNodes);
|
|
681
681
|
setFlowId(id);
|
|
682
682
|
setFlowName(flow.name || "");
|
|
683
|
-
setFlowDescription(
|
|
683
|
+
setFlowDescription("");
|
|
684
684
|
setNodes(newNodes);
|
|
685
685
|
setEdges(newEdges);
|
|
686
686
|
setHasUnsavedChanges(false);
|
|
@@ -704,7 +704,6 @@ function useRuntypeFlow(options) {
|
|
|
704
704
|
const steps = nodesToFlowSteps(nodes);
|
|
705
705
|
await client.flows.update(flowId, {
|
|
706
706
|
name: flowName,
|
|
707
|
-
description: flowDescription,
|
|
708
707
|
flowSteps: steps.map((step) => ({
|
|
709
708
|
type: step.type,
|
|
710
709
|
name: step.name,
|
package/dist/index.mjs
CHANGED
|
@@ -662,10 +662,10 @@ function useRuntypeFlow(options) {
|
|
|
662
662
|
const steps = Array.isArray(flow.flowSteps) ? flow.flowSteps.map((s) => ({
|
|
663
663
|
id: s.id,
|
|
664
664
|
type: s.type,
|
|
665
|
-
name: s.name,
|
|
666
|
-
order: s.order,
|
|
667
|
-
enabled: s.enabled,
|
|
668
|
-
config: s.config
|
|
665
|
+
name: s.name ?? "",
|
|
666
|
+
order: s.order ?? 0,
|
|
667
|
+
enabled: s.enabled ?? true,
|
|
668
|
+
config: s.config ?? {}
|
|
669
669
|
})) : [];
|
|
670
670
|
let newNodes = flowStepsToNodes(steps, {
|
|
671
671
|
onChange: handleStepChange,
|
|
@@ -678,7 +678,7 @@ function useRuntypeFlow(options) {
|
|
|
678
678
|
const newEdges = createEdgesFromNodes(newNodes);
|
|
679
679
|
setFlowId(id);
|
|
680
680
|
setFlowName(flow.name || "");
|
|
681
|
-
setFlowDescription(
|
|
681
|
+
setFlowDescription("");
|
|
682
682
|
setNodes(newNodes);
|
|
683
683
|
setEdges(newEdges);
|
|
684
684
|
setHasUnsavedChanges(false);
|
|
@@ -702,7 +702,6 @@ function useRuntypeFlow(options) {
|
|
|
702
702
|
const steps = nodesToFlowSteps(nodes);
|
|
703
703
|
await client.flows.update(flowId, {
|
|
704
704
|
name: flowName,
|
|
705
|
-
description: flowDescription,
|
|
706
705
|
flowSteps: steps.map((step) => ({
|
|
707
706
|
type: step.type,
|
|
708
707
|
name: step.name,
|
package/example/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @runtypelabs/react-flow-example
|
|
2
2
|
|
|
3
|
+
## 0.0.66
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [c3536a2]
|
|
8
|
+
- Updated dependencies [8fefe6f]
|
|
9
|
+
- Updated dependencies [a0b30f3]
|
|
10
|
+
- Updated dependencies [aa97266]
|
|
11
|
+
- Updated dependencies [42979fc]
|
|
12
|
+
- Updated dependencies [55d5817]
|
|
13
|
+
- Updated dependencies [89b107f]
|
|
14
|
+
- Updated dependencies [e1a4368]
|
|
15
|
+
- Updated dependencies [af80a8a]
|
|
16
|
+
- @runtypelabs/sdk@4.0.0
|
|
17
|
+
- @runtypelabs/react-flow@0.3.18
|
|
18
|
+
|
|
19
|
+
## 0.0.65
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [53bfe49]
|
|
24
|
+
- @runtypelabs/sdk@3.0.0
|
|
25
|
+
- @runtypelabs/react-flow@0.3.17
|
|
26
|
+
|
|
3
27
|
## 0.0.64
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/example/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/react-flow",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"description": "React Flow adapter for building visual flow editors with Runtype",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"*.css"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@runtypelabs/sdk": "
|
|
19
|
+
"@runtypelabs/sdk": "4.0.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@xyflow/react": "^12.0.0",
|
|
@@ -138,10 +138,10 @@ export function useRuntypeFlow(options: UseRuntypeFlowOptions): UseRuntypeFlowRe
|
|
|
138
138
|
? flow.flowSteps.map((s) => ({
|
|
139
139
|
id: s.id,
|
|
140
140
|
type: s.type as FlowStep['type'],
|
|
141
|
-
name: s.name,
|
|
142
|
-
order: s.order,
|
|
143
|
-
enabled: s.enabled,
|
|
144
|
-
config: s.config as FlowStep['config'],
|
|
141
|
+
name: s.name ?? '',
|
|
142
|
+
order: s.order ?? 0,
|
|
143
|
+
enabled: s.enabled ?? true,
|
|
144
|
+
config: (s.config ?? {}) as FlowStep['config'],
|
|
145
145
|
}))
|
|
146
146
|
: []
|
|
147
147
|
|
|
@@ -161,7 +161,9 @@ export function useRuntypeFlow(options: UseRuntypeFlowOptions): UseRuntypeFlowRe
|
|
|
161
161
|
|
|
162
162
|
setFlowId(id)
|
|
163
163
|
setFlowName(flow.name || '')
|
|
164
|
-
|
|
164
|
+
// The flow GET response carries no `description` (the handler never
|
|
165
|
+
// selects it), so there is nothing to load into the editor here.
|
|
166
|
+
setFlowDescription('')
|
|
165
167
|
setNodes(newNodes)
|
|
166
168
|
setEdges(newEdges)
|
|
167
169
|
setHasUnsavedChanges(false)
|
|
@@ -192,10 +194,13 @@ export function useRuntypeFlow(options: UseRuntypeFlowOptions): UseRuntypeFlowRe
|
|
|
192
194
|
try {
|
|
193
195
|
const steps = nodesToFlowSteps(nodes)
|
|
194
196
|
|
|
195
|
-
// Update flow with metadata and steps in one atomic operation
|
|
197
|
+
// Update flow with metadata and steps in one atomic operation.
|
|
198
|
+
// `description` is intentionally omitted: the flow update endpoint does
|
|
199
|
+
// not persist it (the GET response carries no description either), so
|
|
200
|
+
// sending the local value here would be a no-op at best and could
|
|
201
|
+
// overwrite a description with an empty string if the schema ever changes.
|
|
196
202
|
await client.flows.update(flowId, {
|
|
197
203
|
name: flowName,
|
|
198
|
-
description: flowDescription,
|
|
199
204
|
flowSteps: steps.map((step) => ({
|
|
200
205
|
type: step.type as NonNullable<CreateFlowRequest['flowSteps']>[number]['type'],
|
|
201
206
|
name: step.name,
|