cuelang.org/go@v0.10.1/tools/flow/testdata/template.txtar (about) 1 #InferTasks: true 2 -- in.cue -- 3 import "tool/exec" 4 5 foo: { 6 $id: "tool/http.Do" 7 8 method: "GET" 9 url: string 10 11 request: body: *bytes | string 12 } 13 14 // vendorgithubschema is expected to be run within the cuelang.org/go 15 // cue.mod directory 16 root: { 17 get: foo & { 18 request: body: "" 19 url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 20 } 21 convert: exec.Run & { 22 stdin: get.response.body 23 cmd: "go run cuelang.org/go/cmd/cue import -f -p json -l #Workflow: jsonschema: - --outfile pkg/github.com/SchemaStore/schemastore/src/schemas/json/github-workflow.cue" 24 } 25 } 26 -- out/run/errors -- 27 -- out/run/t0 -- 28 graph TD 29 t0("root.get [Ready]") 30 t1("root.convert [Waiting]") 31 t1-->t0 32 33 -- out/run/t1 -- 34 graph TD 35 t0("root.get [Terminated]") 36 t1("root.convert [Ready]") 37 t1-->t0 38 39 -- out/run-v3/t1/value -- 40 { 41 $id: "tool/http.Do" 42 method: "GET" 43 stdout: "foo" 44 request: { 45 body: "" 46 } 47 url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 48 } 49 -- out/run-v3/t2/value -- 50 { 51 $id: "tool/exec.Run" 52 stdin: GET.response.body & (*null | string | bytes) 53 cmd: "go run cuelang.org/go/cmd/cue import -f -p json -l #Workflow: jsonschema: - --outfile pkg/github.com/SchemaStore/schemastore/src/schemas/json/github-workflow.cue" 54 env: {} | [] 55 stdout: "foo" 56 stderr: null 57 success: bool 58 mustSucceed: true 59 60 //cue:path: root.get 61 let GET = { 62 $id: "tool/http.Do" 63 method: "GET" 64 url: string 65 request: { 66 body: *bytes | string 67 } 68 } & { 69 request: { 70 body: "" 71 } 72 stdout: "foo" 73 url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 74 } 75 } 76 -- diff/-out/run-v3/t1/value<==>+out/run/t1/value -- 77 diff old new 78 --- old 79 +++ new 80 @@ -2,8 +2,8 @@ 81 $id: "tool/http.Do" 82 method: "GET" 83 stdout: "foo" 84 - url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 85 request: { 86 body: "" 87 } 88 + url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 89 } 90 -- diff/-out/run-v3/t2/value<==>+out/run/t2/value -- 91 diff old new 92 --- old 93 +++ new 94 @@ -1,10 +1,10 @@ 95 { 96 - $id: "tool/exec.Run" 97 - cmd: "go run cuelang.org/go/cmd/cue import -f -p json -l #Workflow: jsonschema: - --outfile pkg/github.com/SchemaStore/schemastore/src/schemas/json/github-workflow.cue" 98 + $id: "tool/exec.Run" 99 + stdin: GET.response.body & (*null | string | bytes) 100 + cmd: "go run cuelang.org/go/cmd/cue import -f -p json -l #Workflow: jsonschema: - --outfile pkg/github.com/SchemaStore/schemastore/src/schemas/json/github-workflow.cue" 101 env: {} | [] 102 stdout: "foo" 103 stderr: null 104 - stdin: (*null | string | bytes) & GET.response.body 105 success: bool 106 mustSucceed: true 107 108 -- diff/value/p3 -- 109 Reordering. 110 -- out/run/t1/value -- 111 { 112 $id: "tool/http.Do" 113 method: "GET" 114 stdout: "foo" 115 url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 116 request: { 117 body: "" 118 } 119 } 120 -- out/run/t1/stats -- 121 Leaks: 0 122 Freed: 47 123 Reused: 40 124 Allocs: 7 125 Retain: 0 126 127 Unifications: 26 128 Conjuncts: 70 129 Disjuncts: 47 130 -- out/run/t2 -- 131 graph TD 132 t0("root.get [Terminated]") 133 t1("root.convert [Terminated]") 134 t1-->t0 135 136 -- out/run/t2/value -- 137 { 138 $id: "tool/exec.Run" 139 cmd: "go run cuelang.org/go/cmd/cue import -f -p json -l #Workflow: jsonschema: - --outfile pkg/github.com/SchemaStore/schemastore/src/schemas/json/github-workflow.cue" 140 env: {} | [] 141 stdout: "foo" 142 stderr: null 143 stdin: (*null | string | bytes) & GET.response.body 144 success: bool 145 mustSucceed: true 146 147 //cue:path: root.get 148 let GET = { 149 $id: "tool/http.Do" 150 method: "GET" 151 url: string 152 request: { 153 body: *bytes | string 154 } 155 } & { 156 request: { 157 body: "" 158 } 159 stdout: "foo" 160 url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 161 } 162 } 163 -- out/run/t2/stats -- 164 Leaks: 0 165 Freed: 47 166 Reused: 47 167 Allocs: 0 168 Retain: 0 169 170 Unifications: 26 171 Conjuncts: 74 172 Disjuncts: 47 173 -- out/run/stats/totals -- 174 Leaks: 0 175 Freed: 94 176 Reused: 87 177 Allocs: 7 178 Retain: 0 179 180 Unifications: 52 181 Conjuncts: 144 182 Disjuncts: 94 183 -- out/run/t3 -- 184 graph TD 185 t0("root.get [Terminated]") 186 t0-->t2 187 t1("root.convert [Terminated]") 188 t1-->t0 189 t2("foo [Terminated]") 190 191 -- out/run/t3/value -- 192 { 193 $id: "tool/exec.Run" 194 cmd: "go run cuelang.org/go/cmd/cue import -f -p json -l #Workflow: jsonschema: - --outfile pkg/github.com/SchemaStore/schemastore/src/schemas/json/github-workflow.cue" 195 env: {} 196 stdout: "foo" 197 stderr: null 198 stdin: (*null | string | bytes) & get.response.body 199 success: bool 200 }