#InferTasks: true
-- in.cue --
import "tool/exec"

foo: {
	$id: "tool/http.Do"

	method: "GET"
	url:    string

	request: body: *bytes | string
}

// vendorgithubschema is expected to be run within the cuelang.org/go
// cue.mod directory
root: {
	get: foo & {
		request: body: ""
		url: "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json"
	}
	convert: exec.Run & {
		stdin: get.response.body
		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"
	}
}
-- out/run/errors --
-- out/run/t0 --
graph TD
  t0("root.get [Ready]")
  t1("root.convert [Waiting]")
  t1-->t0

-- out/run/t1 --
graph TD
  t0("root.get [Terminated]")
  t1("root.convert [Ready]")
  t1-->t0

-- out/run/t1/value --
{
	$id:    "tool/http.Do"
	method: "GET"
	request: {
		body: ""
	}
	url:    "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json"
	stdout: "foo"
}
-- out/run/t1/stats --
Leaks:  0
Freed:  50
Reused: 43
Allocs: 7
Retain: 0

Unifications: 27
Conjuncts:    75
Disjuncts:    50
-- out/run/t2 --
graph TD
  t0("root.get [Terminated]")
  t1("root.convert [Terminated]")
  t1-->t0

-- out/run/t2/value --
{
	$id: "tool/exec.Run"
	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"
	env: {} | []
	stderr:      null
	stdin:       GET.response.body & (*null | string | bytes)
	stdout:      "foo"
	success:     bool
	mustSucceed: true

	//cue:path: root.get
	let GET = {
		$id:    "tool/http.Do"
		method: "GET"
		url:    string
		request: {
			body: *bytes | string
		}
	} & {
		request: {
			body: ""
		}
		stdout: "foo"
		url:    "https://raw.githubusercontent.com/SchemaStore/schemastore/f7a0789ccb3bd74a720ddbd6691d60fd9e2d8b7a/src/schemas/json/github-workflow.json"
	}
}
-- out/run/t2/stats --
Leaks:  0
Freed:  50
Reused: 50
Allocs: 0
Retain: 0

Unifications: 27
Conjuncts:    80
Disjuncts:    50
-- out/run/stats/totals --
Leaks:  0
Freed:  100
Reused: 93
Allocs: 7
Retain: 0

Unifications: 54
Conjuncts:    155
Disjuncts:    100
-- out/run/t3 --
graph TD
  t0("root.get [Terminated]")
  t0-->t2
  t1("root.convert [Terminated]")
  t1-->t0
  t2("foo [Terminated]")

-- out/run/t3/value --
{
	$id: "tool/exec.Run"
	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"
	env: {}
	stdout:  "foo"
	stderr:  null
	stdin:   (*null | string | bytes) & get.response.body
	success: bool
}
