diff options
| author | 2023-04-28 01:36:55 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:36:55 +0800 | |
| commit | fc8c5fdce62fb229202659408798a7b6c98f6e8b (patch) | |
| tree | 7554f80e50de4af6fd255afa7c21bcdd58a7af34 /cli/internal/nodes/packagetask.go | |
| parent | dd84b9d64fb98746a230cd24233ff50a562c39c9 (diff) | |
| download | HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.tar.gz HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.zip | |
Diffstat (limited to 'cli/internal/nodes/packagetask.go')
| -rw-r--r-- | cli/internal/nodes/packagetask.go | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/cli/internal/nodes/packagetask.go b/cli/internal/nodes/packagetask.go deleted file mode 100644 index e2dcb27..0000000 --- a/cli/internal/nodes/packagetask.go +++ /dev/null @@ -1,45 +0,0 @@ -// Package nodes defines the nodes that are present in the execution graph used by turbo. -package nodes - -import ( - "fmt" - - "github.com/vercel/turbo/cli/internal/fs" - "github.com/vercel/turbo/cli/internal/util" -) - -// PackageTask represents running a particular task in a particular package -type PackageTask struct { - TaskID string - Task string - PackageName string - Pkg *fs.PackageJSON - EnvMode util.EnvMode - TaskDefinition *fs.TaskDefinition - Dir string - Command string - Outputs []string - ExcludedOutputs []string - LogFile string - Hash string -} - -// OutputPrefix returns the prefix to be used for logging and ui for this task -func (pt *PackageTask) OutputPrefix(isSinglePackage bool) string { - if isSinglePackage { - return pt.Task - } - return fmt.Sprintf("%v:%v", pt.PackageName, pt.Task) -} - -// HashableOutputs returns the package-relative globs for files to be considered outputs -// of this task -func (pt *PackageTask) HashableOutputs() fs.TaskOutputs { - inclusionOutputs := []string{fmt.Sprintf(".turbo/turbo-%v.log", pt.Task)} - inclusionOutputs = append(inclusionOutputs, pt.TaskDefinition.Outputs.Inclusions...) - - return fs.TaskOutputs{ - Inclusions: inclusionOutputs, - Exclusions: pt.TaskDefinition.Outputs.Exclusions, - } -} |
