cuelang.org/go@v0.13.0/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/t1/value -- 40 { 41 $id: "tool/http.Do" 42 method: "GET" 43 request: { 44 body: "" 45 } 46 url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 47 stdout: "foo" 48 } 49 -- out/run/t1/stats -- 50 Leaks: 0 51 Freed: 50 52 Reused: 43 53 Allocs: 7 54 Retain: 0 55 56 Unifications: 27 57 Conjuncts: 75 58 Disjuncts: 50 59 -- out/run/t2 -- 60 graph TD 61 t0("root.get [Terminated]") 62 t1("root.convert [Terminated]") 63 t1-->t0 64 65 -- out/run/t2/value -- 66 { 67 $id: "tool/exec.Run" 68 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" 69 env: {} | [] 70 stderr: null 71 stdin: GET.response.body & (*null | string | bytes) 72 stdout: "foo" 73 success: bool 74 mustSucceed: true 75 76 //cue:path: root.get 77 let GET = { 78 $id: "tool/http.Do" 79 method: "GET" 80 url: string 81 request: { 82 body: *bytes | string 83 } 84 } & { 85 request: { 86 body: "" 87 } 88 stdout: "foo" 89 url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json" 90 } 91 } 92 -- out/run/t2/stats -- 93 Leaks: 0 94 Freed: 50 95 Reused: 50 96 Allocs: 0 97 Retain: 0 98 99 Unifications: 27 100 Conjuncts: 80 101 Disjuncts: 50 102 -- out/run/stats/totals -- 103 Leaks: 0 104 Freed: 100 105 Reused: 93 106 Allocs: 7 107 Retain: 0 108 109 Unifications: 54 110 Conjuncts: 155 111 Disjuncts: 100 112 -- out/run/t3 -- 113 graph TD 114 t0("root.get [Terminated]") 115 t0-->t2 116 t1("root.convert [Terminated]") 117 t1-->t0 118 t2("foo [Terminated]") 119 120 -- out/run/t3/value -- 121 { 122 $id: "tool/exec.Run" 123 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" 124 env: {} 125 stdout: "foo" 126 stderr: null 127 stdin: (*null | string | bytes) & get.response.body 128 success: bool 129 }