File tree 2 files changed +18
-1
lines changed
packages/wrangler/src/workflows/commands
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " wrangler " : patch
3
+ ---
4
+
5
+ Change trigger command to comply with the current workflows endpoint.
6
+
7
+ This also adds an id option to allow users to optionally customize the new instance id.
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ defineCommand({
24
24
type : "string" ,
25
25
default : "" ,
26
26
} ,
27
+ id : {
28
+ describe :
29
+ "Custom instance ID, if not provided it will default to a random UUIDv4" ,
30
+ type : "string" ,
31
+ default : undefined ,
32
+ } ,
27
33
} ,
28
34
positionalArgs : [ "name" , "params" ] ,
29
35
@@ -45,7 +51,11 @@ defineCommand({
45
51
`/accounts/${ accountId } /workflows/${ args . name } /instances` ,
46
52
{
47
53
method : "POST" ,
48
- body : args . params . length != 0 ? args . params : undefined ,
54
+ headers : { "Content-Type" : "application/json" } ,
55
+ body : JSON . stringify ( {
56
+ instance_id : args . id ,
57
+ params : args . params . length != 0 ? args . params : undefined ,
58
+ } ) ,
49
59
}
50
60
) ;
51
61
You can’t perform that action at this time.
0 commit comments