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/ffi | |
| parent | dd84b9d64fb98746a230cd24233ff50a562c39c9 (diff) | |
| download | HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.tar.gz HydroRoll-fc8c5fdce62fb229202659408798a7b6c98f6e8b.zip | |
Diffstat (limited to 'cli/internal/ffi')
| -rw-r--r-- | cli/internal/ffi/bindings.h | 21 | ||||
| -rw-r--r-- | cli/internal/ffi/ffi.go | 224 | ||||
| -rw-r--r-- | cli/internal/ffi/proto/messages.pb.go | 1380 |
3 files changed, 0 insertions, 1625 deletions
diff --git a/cli/internal/ffi/bindings.h b/cli/internal/ffi/bindings.h deleted file mode 100644 index c2bbcea..0000000 --- a/cli/internal/ffi/bindings.h +++ /dev/null @@ -1,21 +0,0 @@ -#include <stdarg.h> -#include <stdbool.h> -#include <stdint.h> -#include <stdlib.h> - -typedef struct Buffer { - uint32_t len; - uint8_t *data; -} Buffer; - -void free_buffer(struct Buffer buffer); - -struct Buffer get_turbo_data_dir(void); - -struct Buffer changed_files(struct Buffer buffer); - -struct Buffer previous_content(struct Buffer buffer); - -struct Buffer npm_transitive_closure(struct Buffer buf); - -struct Buffer npm_subgraph(struct Buffer buf); diff --git a/cli/internal/ffi/ffi.go b/cli/internal/ffi/ffi.go deleted file mode 100644 index 7ac15e4..0000000 --- a/cli/internal/ffi/ffi.go +++ /dev/null @@ -1,224 +0,0 @@ -package ffi - -// ffi -// -// Please read the notes about safety (marked with `SAFETY`) in both this file, -// and in turborepo-ffi/lib.rs before modifying this file. - -// #include "bindings.h" -// -// #cgo darwin,arm64 LDFLAGS: -L${SRCDIR} -lturborepo_ffi_darwin_arm64 -lz -liconv -// #cgo darwin,amd64 LDFLAGS: -L${SRCDIR} -lturborepo_ffi_darwin_amd64 -lz -liconv -// #cgo linux,arm64,staticbinary LDFLAGS: -L${SRCDIR} -lturborepo_ffi_linux_arm64 -lunwind -// #cgo linux,amd64,staticbinary LDFLAGS: -L${SRCDIR} -lturborepo_ffi_linux_amd64 -lunwind -// #cgo linux,arm64,!staticbinary LDFLAGS: -L${SRCDIR} -lturborepo_ffi_linux_arm64 -lz -// #cgo linux,amd64,!staticbinary LDFLAGS: -L${SRCDIR} -lturborepo_ffi_linux_amd64 -lz -// #cgo windows,amd64 LDFLAGS: -L${SRCDIR} -lturborepo_ffi_windows_amd64 -lole32 -lbcrypt -lws2_32 -luserenv -import "C" - -import ( - "errors" - "reflect" - "unsafe" - - ffi_proto "github.com/vercel/turbo/cli/internal/ffi/proto" - "google.golang.org/protobuf/proto" -) - -// Unmarshal consumes a buffer and parses it into a proto.Message -func Unmarshal[M proto.Message](b C.Buffer, c M) error { - bytes := toBytes(b) - if err := proto.Unmarshal(bytes, c); err != nil { - return err - } - - // free the buffer on the rust side - // - // SAFETY: do not use `C.free_buffer` to free a buffer that has been allocated - // on the go side. If you happen to accidentally use the wrong one, you can - // expect a segfault on some platforms. This is the only valid callsite. - C.free_buffer(b) - - return nil -} - -// Marshal consumes a proto.Message and returns a bufferfire -// -// NOTE: the buffer must be freed by calling `Free` on it -func Marshal[M proto.Message](c M) C.Buffer { - bytes, err := proto.Marshal(c) - if err != nil { - panic(err) - } - - return toBuffer(bytes) -} - -// Free frees a buffer that has been allocated *on the go side*. -// -// SAFETY: this is not the same as `C.free_buffer`, which frees a buffer that -// has been allocated *on the rust side*. If you happen to accidentally use -// the wrong one, you can expect a segfault on some platforms. -// -// EXAMPLE: it is recommended use this function via a `defer` statement, like so: -// -// reqBuf := Marshal(&req) -// defer reqBuf.Free() -func (c C.Buffer) Free() { - C.free(unsafe.Pointer(c.data)) -} - -// rather than use C.GoBytes, we use this function to avoid copying the bytes, -// since it is going to be immediately Unmarshalled into a proto.Message -// -// SAFETY: go slices contain a pointer to an underlying buffer with a length. -// if the buffer is known to the garbage collector, dropping the last slice will -// cause the memory to be freed. this memory is owned by the rust side (and is -// not known the garbage collector), so dropping the slice will do nothing -func toBytes(b C.Buffer) []byte { - var out []byte - - len := (uint32)(b.len) - - sh := (*reflect.SliceHeader)(unsafe.Pointer(&out)) - sh.Data = uintptr(unsafe.Pointer(b.data)) - sh.Len = int(len) - sh.Cap = int(len) - - return out -} - -func toBuffer(bytes []byte) C.Buffer { - b := C.Buffer{} - b.len = C.uint(len(bytes)) - b.data = (*C.uchar)(C.CBytes(bytes)) - return b -} - -// GetTurboDataDir returns the path to the Turbo data directory -func GetTurboDataDir() string { - buffer := C.get_turbo_data_dir() - resp := ffi_proto.TurboDataDirResp{} - if err := Unmarshal(buffer, resp.ProtoReflect().Interface()); err != nil { - panic(err) - } - return resp.Dir -} - -// Go convention is to use an empty string for an uninitialized or null-valued -// string. Rust convention is to use an Option<String> for the same purpose, which -// is encoded on the Go side as *string. This converts between the two. -func stringToRef(s string) *string { - if s == "" { - return nil - } - return &s -} - -// ChangedFiles returns the files changed in between two commits, the workdir and the index, and optionally untracked files -func ChangedFiles(gitRoot string, turboRoot string, fromCommit string, toCommit string) ([]string, error) { - fromCommitRef := stringToRef(fromCommit) - toCommitRef := stringToRef(toCommit) - - req := ffi_proto.ChangedFilesReq{ - GitRoot: gitRoot, - FromCommit: fromCommitRef, - ToCommit: toCommitRef, - TurboRoot: turboRoot, - } - - reqBuf := Marshal(&req) - defer reqBuf.Free() - - respBuf := C.changed_files(reqBuf) - - resp := ffi_proto.ChangedFilesResp{} - if err := Unmarshal(respBuf, resp.ProtoReflect().Interface()); err != nil { - panic(err) - } - if err := resp.GetError(); err != "" { - return nil, errors.New(err) - } - - return resp.GetFiles().GetFiles(), nil -} - -// PreviousContent returns the content of a file at a previous commit -func PreviousContent(gitRoot, fromCommit, filePath string) ([]byte, error) { - req := ffi_proto.PreviousContentReq{ - GitRoot: gitRoot, - FromCommit: fromCommit, - FilePath: filePath, - } - - reqBuf := Marshal(&req) - defer reqBuf.Free() - - respBuf := C.previous_content(reqBuf) - - resp := ffi_proto.PreviousContentResp{} - if err := Unmarshal(respBuf, resp.ProtoReflect().Interface()); err != nil { - panic(err) - } - content := resp.GetContent() - if err := resp.GetError(); err != "" { - return nil, errors.New(err) - } - - return []byte(content), nil -} - -// NpmTransitiveDeps returns the transitive external deps of a given package based on the deps and specifiers given -func NpmTransitiveDeps(content []byte, pkgDir string, unresolvedDeps map[string]string) ([]*ffi_proto.LockfilePackage, error) { - return transitiveDeps(npmTransitiveDeps, content, pkgDir, unresolvedDeps) -} - -func npmTransitiveDeps(buf C.Buffer) C.Buffer { - return C.npm_transitive_closure(buf) -} - -func transitiveDeps(cFunc func(C.Buffer) C.Buffer, content []byte, pkgDir string, unresolvedDeps map[string]string) ([]*ffi_proto.LockfilePackage, error) { - req := ffi_proto.TransitiveDepsRequest{ - Contents: content, - WorkspaceDir: pkgDir, - UnresolvedDeps: unresolvedDeps, - } - reqBuf := Marshal(&req) - resBuf := cFunc(reqBuf) - reqBuf.Free() - - resp := ffi_proto.TransitiveDepsResponse{} - if err := Unmarshal(resBuf, resp.ProtoReflect().Interface()); err != nil { - panic(err) - } - - if err := resp.GetError(); err != "" { - return nil, errors.New(err) - } - - list := resp.GetPackages() - return list.GetList(), nil -} - -// NpmSubgraph returns the contents of a npm lockfile subgraph -func NpmSubgraph(content []byte, workspaces []string, packages []string) ([]byte, error) { - req := ffi_proto.SubgraphRequest{ - Contents: content, - Workspaces: workspaces, - Packages: packages, - } - reqBuf := Marshal(&req) - resBuf := C.npm_subgraph(reqBuf) - reqBuf.Free() - - resp := ffi_proto.SubgraphResponse{} - if err := Unmarshal(resBuf, resp.ProtoReflect().Interface()); err != nil { - panic(err) - } - - if err := resp.GetError(); err != "" { - return nil, errors.New(err) - } - - return resp.GetContents(), nil -} diff --git a/cli/internal/ffi/proto/messages.pb.go b/cli/internal/ffi/proto/messages.pb.go deleted file mode 100644 index 22992d3..0000000 --- a/cli/internal/ffi/proto/messages.pb.go +++ /dev/null @@ -1,1380 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 -// source: turborepo-ffi/messages.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TurboDataDirResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dir string `protobuf:"bytes,1,opt,name=dir,proto3" json:"dir,omitempty"` -} - -func (x *TurboDataDirResp) Reset() { - *x = TurboDataDirResp{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TurboDataDirResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TurboDataDirResp) ProtoMessage() {} - -func (x *TurboDataDirResp) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TurboDataDirResp.ProtoReflect.Descriptor instead. -func (*TurboDataDirResp) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{0} -} - -func (x *TurboDataDirResp) GetDir() string { - if x != nil { - return x.Dir - } - return "" -} - -type GlobReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BasePath string `protobuf:"bytes,1,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` - IncludePatterns []string `protobuf:"bytes,2,rep,name=include_patterns,json=includePatterns,proto3" json:"include_patterns,omitempty"` - ExcludePatterns []string `protobuf:"bytes,3,rep,name=exclude_patterns,json=excludePatterns,proto3" json:"exclude_patterns,omitempty"` - FilesOnly bool `protobuf:"varint,4,opt,name=files_only,json=filesOnly,proto3" json:"files_only,omitempty"` // note that the default for a bool is false -} - -func (x *GlobReq) Reset() { - *x = GlobReq{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GlobReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GlobReq) ProtoMessage() {} - -func (x *GlobReq) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GlobReq.ProtoReflect.Descriptor instead. -func (*GlobReq) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{1} -} - -func (x *GlobReq) GetBasePath() string { - if x != nil { - return x.BasePath - } - return "" -} - -func (x *GlobReq) GetIncludePatterns() []string { - if x != nil { - return x.IncludePatterns - } - return nil -} - -func (x *GlobReq) GetExcludePatterns() []string { - if x != nil { - return x.ExcludePatterns - } - return nil -} - -func (x *GlobReq) GetFilesOnly() bool { - if x != nil { - return x.FilesOnly - } - return false -} - -type GlobResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *GlobResp_Files - // *GlobResp_Error - Response isGlobResp_Response `protobuf_oneof:"response"` -} - -func (x *GlobResp) Reset() { - *x = GlobResp{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GlobResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GlobResp) ProtoMessage() {} - -func (x *GlobResp) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GlobResp.ProtoReflect.Descriptor instead. -func (*GlobResp) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{2} -} - -func (m *GlobResp) GetResponse() isGlobResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *GlobResp) GetFiles() *GlobRespList { - if x, ok := x.GetResponse().(*GlobResp_Files); ok { - return x.Files - } - return nil -} - -func (x *GlobResp) GetError() string { - if x, ok := x.GetResponse().(*GlobResp_Error); ok { - return x.Error - } - return "" -} - -type isGlobResp_Response interface { - isGlobResp_Response() -} - -type GlobResp_Files struct { - Files *GlobRespList `protobuf:"bytes,1,opt,name=files,proto3,oneof"` -} - -type GlobResp_Error struct { - Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*GlobResp_Files) isGlobResp_Response() {} - -func (*GlobResp_Error) isGlobResp_Response() {} - -type GlobRespList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Files []string `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` -} - -func (x *GlobRespList) Reset() { - *x = GlobRespList{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GlobRespList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GlobRespList) ProtoMessage() {} - -func (x *GlobRespList) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GlobRespList.ProtoReflect.Descriptor instead. -func (*GlobRespList) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{3} -} - -func (x *GlobRespList) GetFiles() []string { - if x != nil { - return x.Files - } - return nil -} - -type ChangedFilesReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GitRoot string `protobuf:"bytes,1,opt,name=git_root,json=gitRoot,proto3" json:"git_root,omitempty"` - TurboRoot string `protobuf:"bytes,2,opt,name=turbo_root,json=turboRoot,proto3" json:"turbo_root,omitempty"` - FromCommit *string `protobuf:"bytes,3,opt,name=from_commit,json=fromCommit,proto3,oneof" json:"from_commit,omitempty"` - ToCommit *string `protobuf:"bytes,4,opt,name=to_commit,json=toCommit,proto3,oneof" json:"to_commit,omitempty"` -} - -func (x *ChangedFilesReq) Reset() { - *x = ChangedFilesReq{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangedFilesReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangedFilesReq) ProtoMessage() {} - -func (x *ChangedFilesReq) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangedFilesReq.ProtoReflect.Descriptor instead. -func (*ChangedFilesReq) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{4} -} - -func (x *ChangedFilesReq) GetGitRoot() string { - if x != nil { - return x.GitRoot - } - return "" -} - -func (x *ChangedFilesReq) GetTurboRoot() string { - if x != nil { - return x.TurboRoot - } - return "" -} - -func (x *ChangedFilesReq) GetFromCommit() string { - if x != nil && x.FromCommit != nil { - return *x.FromCommit - } - return "" -} - -func (x *ChangedFilesReq) GetToCommit() string { - if x != nil && x.ToCommit != nil { - return *x.ToCommit - } - return "" -} - -type ChangedFilesResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *ChangedFilesResp_Files - // *ChangedFilesResp_Error - Response isChangedFilesResp_Response `protobuf_oneof:"response"` -} - -func (x *ChangedFilesResp) Reset() { - *x = ChangedFilesResp{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangedFilesResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangedFilesResp) ProtoMessage() {} - -func (x *ChangedFilesResp) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangedFilesResp.ProtoReflect.Descriptor instead. -func (*ChangedFilesResp) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{5} -} - -func (m *ChangedFilesResp) GetResponse() isChangedFilesResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *ChangedFilesResp) GetFiles() *ChangedFilesList { - if x, ok := x.GetResponse().(*ChangedFilesResp_Files); ok { - return x.Files - } - return nil -} - -func (x *ChangedFilesResp) GetError() string { - if x, ok := x.GetResponse().(*ChangedFilesResp_Error); ok { - return x.Error - } - return "" -} - -type isChangedFilesResp_Response interface { - isChangedFilesResp_Response() -} - -type ChangedFilesResp_Files struct { - Files *ChangedFilesList `protobuf:"bytes,1,opt,name=files,proto3,oneof"` -} - -type ChangedFilesResp_Error struct { - Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*ChangedFilesResp_Files) isChangedFilesResp_Response() {} - -func (*ChangedFilesResp_Error) isChangedFilesResp_Response() {} - -type ChangedFilesList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Files []string `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` -} - -func (x *ChangedFilesList) Reset() { - *x = ChangedFilesList{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChangedFilesList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangedFilesList) ProtoMessage() {} - -func (x *ChangedFilesList) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangedFilesList.ProtoReflect.Descriptor instead. -func (*ChangedFilesList) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{6} -} - -func (x *ChangedFilesList) GetFiles() []string { - if x != nil { - return x.Files - } - return nil -} - -type PreviousContentReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GitRoot string `protobuf:"bytes,1,opt,name=git_root,json=gitRoot,proto3" json:"git_root,omitempty"` - FromCommit string `protobuf:"bytes,2,opt,name=from_commit,json=fromCommit,proto3" json:"from_commit,omitempty"` - FilePath string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` -} - -func (x *PreviousContentReq) Reset() { - *x = PreviousContentReq{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PreviousContentReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PreviousContentReq) ProtoMessage() {} - -func (x *PreviousContentReq) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PreviousContentReq.ProtoReflect.Descriptor instead. -func (*PreviousContentReq) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{7} -} - -func (x *PreviousContentReq) GetGitRoot() string { - if x != nil { - return x.GitRoot - } - return "" -} - -func (x *PreviousContentReq) GetFromCommit() string { - if x != nil { - return x.FromCommit - } - return "" -} - -func (x *PreviousContentReq) GetFilePath() string { - if x != nil { - return x.FilePath - } - return "" -} - -type PreviousContentResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *PreviousContentResp_Content - // *PreviousContentResp_Error - Response isPreviousContentResp_Response `protobuf_oneof:"response"` -} - -func (x *PreviousContentResp) Reset() { - *x = PreviousContentResp{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PreviousContentResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PreviousContentResp) ProtoMessage() {} - -func (x *PreviousContentResp) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PreviousContentResp.ProtoReflect.Descriptor instead. -func (*PreviousContentResp) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{8} -} - -func (m *PreviousContentResp) GetResponse() isPreviousContentResp_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *PreviousContentResp) GetContent() []byte { - if x, ok := x.GetResponse().(*PreviousContentResp_Content); ok { - return x.Content - } - return nil -} - -func (x *PreviousContentResp) GetError() string { - if x, ok := x.GetResponse().(*PreviousContentResp_Error); ok { - return x.Error - } - return "" -} - -type isPreviousContentResp_Response interface { - isPreviousContentResp_Response() -} - -type PreviousContentResp_Content struct { - Content []byte `protobuf:"bytes,1,opt,name=content,proto3,oneof"` -} - -type PreviousContentResp_Error struct { - Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*PreviousContentResp_Content) isPreviousContentResp_Response() {} - -func (*PreviousContentResp_Error) isPreviousContentResp_Response() {} - -type TransitiveDepsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` - WorkspaceDir string `protobuf:"bytes,2,opt,name=workspace_dir,json=workspaceDir,proto3" json:"workspace_dir,omitempty"` - UnresolvedDeps map[string]string `protobuf:"bytes,3,rep,name=unresolved_deps,json=unresolvedDeps,proto3" json:"unresolved_deps,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *TransitiveDepsRequest) Reset() { - *x = TransitiveDepsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransitiveDepsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransitiveDepsRequest) ProtoMessage() {} - -func (x *TransitiveDepsRequest) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransitiveDepsRequest.ProtoReflect.Descriptor instead. -func (*TransitiveDepsRequest) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{9} -} - -func (x *TransitiveDepsRequest) GetContents() []byte { - if x != nil { - return x.Contents - } - return nil -} - -func (x *TransitiveDepsRequest) GetWorkspaceDir() string { - if x != nil { - return x.WorkspaceDir - } - return "" -} - -func (x *TransitiveDepsRequest) GetUnresolvedDeps() map[string]string { - if x != nil { - return x.UnresolvedDeps - } - return nil -} - -type TransitiveDepsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *TransitiveDepsResponse_Packages - // *TransitiveDepsResponse_Error - Response isTransitiveDepsResponse_Response `protobuf_oneof:"response"` -} - -func (x *TransitiveDepsResponse) Reset() { - *x = TransitiveDepsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransitiveDepsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransitiveDepsResponse) ProtoMessage() {} - -func (x *TransitiveDepsResponse) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TransitiveDepsResponse.ProtoReflect.Descriptor instead. -func (*TransitiveDepsResponse) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{10} -} - -func (m *TransitiveDepsResponse) GetResponse() isTransitiveDepsResponse_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *TransitiveDepsResponse) GetPackages() *LockfilePackageList { - if x, ok := x.GetResponse().(*TransitiveDepsResponse_Packages); ok { - return x.Packages - } - return nil -} - -func (x *TransitiveDepsResponse) GetError() string { - if x, ok := x.GetResponse().(*TransitiveDepsResponse_Error); ok { - return x.Error - } - return "" -} - -type isTransitiveDepsResponse_Response interface { - isTransitiveDepsResponse_Response() -} - -type TransitiveDepsResponse_Packages struct { - Packages *LockfilePackageList `protobuf:"bytes,1,opt,name=packages,proto3,oneof"` -} - -type TransitiveDepsResponse_Error struct { - Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*TransitiveDepsResponse_Packages) isTransitiveDepsResponse_Response() {} - -func (*TransitiveDepsResponse_Error) isTransitiveDepsResponse_Response() {} - -type LockfilePackage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Found bool `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"` -} - -func (x *LockfilePackage) Reset() { - *x = LockfilePackage{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LockfilePackage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LockfilePackage) ProtoMessage() {} - -func (x *LockfilePackage) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LockfilePackage.ProtoReflect.Descriptor instead. -func (*LockfilePackage) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{11} -} - -func (x *LockfilePackage) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *LockfilePackage) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *LockfilePackage) GetFound() bool { - if x != nil { - return x.Found - } - return false -} - -type LockfilePackageList struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - List []*LockfilePackage `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` -} - -func (x *LockfilePackageList) Reset() { - *x = LockfilePackageList{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LockfilePackageList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LockfilePackageList) ProtoMessage() {} - -func (x *LockfilePackageList) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LockfilePackageList.ProtoReflect.Descriptor instead. -func (*LockfilePackageList) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{12} -} - -func (x *LockfilePackageList) GetList() []*LockfilePackage { - if x != nil { - return x.List - } - return nil -} - -type SubgraphRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` - Workspaces []string `protobuf:"bytes,2,rep,name=workspaces,proto3" json:"workspaces,omitempty"` - Packages []string `protobuf:"bytes,3,rep,name=packages,proto3" json:"packages,omitempty"` -} - -func (x *SubgraphRequest) Reset() { - *x = SubgraphRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubgraphRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubgraphRequest) ProtoMessage() {} - -func (x *SubgraphRequest) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubgraphRequest.ProtoReflect.Descriptor instead. -func (*SubgraphRequest) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{13} -} - -func (x *SubgraphRequest) GetContents() []byte { - if x != nil { - return x.Contents - } - return nil -} - -func (x *SubgraphRequest) GetWorkspaces() []string { - if x != nil { - return x.Workspaces - } - return nil -} - -func (x *SubgraphRequest) GetPackages() []string { - if x != nil { - return x.Packages - } - return nil -} - -type SubgraphResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Response: - // *SubgraphResponse_Contents - // *SubgraphResponse_Error - Response isSubgraphResponse_Response `protobuf_oneof:"response"` -} - -func (x *SubgraphResponse) Reset() { - *x = SubgraphResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_turborepo_ffi_messages_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubgraphResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubgraphResponse) ProtoMessage() {} - -func (x *SubgraphResponse) ProtoReflect() protoreflect.Message { - mi := &file_turborepo_ffi_messages_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubgraphResponse.ProtoReflect.Descriptor instead. -func (*SubgraphResponse) Descriptor() ([]byte, []int) { - return file_turborepo_ffi_messages_proto_rawDescGZIP(), []int{14} -} - -func (m *SubgraphResponse) GetResponse() isSubgraphResponse_Response { - if m != nil { - return m.Response - } - return nil -} - -func (x *SubgraphResponse) GetContents() []byte { - if x, ok := x.GetResponse().(*SubgraphResponse_Contents); ok { - return x.Contents - } - return nil -} - -func (x *SubgraphResponse) GetError() string { - if x, ok := x.GetResponse().(*SubgraphResponse_Error); ok { - return x.Error - } - return "" -} - -type isSubgraphResponse_Response interface { - isSubgraphResponse_Response() -} - -type SubgraphResponse_Contents struct { - Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3,oneof"` -} - -type SubgraphResponse_Error struct { - Error string `protobuf:"bytes,2,opt,name=error,proto3,oneof"` -} - -func (*SubgraphResponse_Contents) isSubgraphResponse_Response() {} - -func (*SubgraphResponse_Error) isSubgraphResponse_Response() {} - -var File_turborepo_ffi_messages_proto protoreflect.FileDescriptor - -var file_turborepo_ffi_messages_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x74, 0x75, 0x72, 0x62, 0x6f, 0x72, 0x65, 0x70, 0x6f, 0x2d, 0x66, 0x66, 0x69, 0x2f, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, - 0x0a, 0x10, 0x54, 0x75, 0x72, 0x62, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x64, 0x69, 0x72, 0x22, 0x9b, 0x01, 0x0a, 0x07, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, - 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x29, 0x0a, - 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x4f, 0x6e, - 0x6c, 0x79, 0x22, 0x55, 0x0a, 0x08, 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, - 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x47, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, - 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x47, 0x6c, 0x6f, - 0x62, 0x52, 0x65, 0x73, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, - 0xb1, 0x01, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x74, 0x75, 0x72, 0x62, 0x6f, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x74, 0x75, 0x72, 0x62, 0x6f, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x24, 0x0a, - 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x08, 0x74, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x69, 0x74, 0x22, 0x61, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x66, 0x69, 0x6c, - 0x65, 0x73, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x22, 0x6d, 0x0a, 0x12, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x69, 0x74, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x69, 0x74, 0x52, 0x6f, 0x6f, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, - 0x55, 0x0a, 0x13, 0x50, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x69, - 0x72, 0x12, 0x53, 0x0a, 0x0f, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x5f, - 0x64, 0x65, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x44, 0x65, 0x70, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x75, 0x6e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x64, 0x44, 0x65, 0x70, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x55, 0x6e, 0x72, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x64, 0x44, 0x65, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x70, 0x0a, 0x16, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x65, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, - 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x0f, 0x4c, - 0x6f, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, - 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x75, 0x6e, 0x64, - 0x22, 0x3b, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x65, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x69, 0x0a, - 0x0f, 0x53, 0x75, 0x62, 0x67, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0a, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x22, 0x54, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x08, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, - 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0b, - 0x5a, 0x09, 0x66, 0x66, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_turborepo_ffi_messages_proto_rawDescOnce sync.Once - file_turborepo_ffi_messages_proto_rawDescData = file_turborepo_ffi_messages_proto_rawDesc -) - -func file_turborepo_ffi_messages_proto_rawDescGZIP() []byte { - file_turborepo_ffi_messages_proto_rawDescOnce.Do(func() { - file_turborepo_ffi_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_turborepo_ffi_messages_proto_rawDescData) - }) - return file_turborepo_ffi_messages_proto_rawDescData -} - -var file_turborepo_ffi_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_turborepo_ffi_messages_proto_goTypes = []interface{}{ - (*TurboDataDirResp)(nil), // 0: TurboDataDirResp - (*GlobReq)(nil), // 1: GlobReq - (*GlobResp)(nil), // 2: GlobResp - (*GlobRespList)(nil), // 3: GlobRespList - (*ChangedFilesReq)(nil), // 4: ChangedFilesReq - (*ChangedFilesResp)(nil), // 5: ChangedFilesResp - (*ChangedFilesList)(nil), // 6: ChangedFilesList - (*PreviousContentReq)(nil), // 7: PreviousContentReq - (*PreviousContentResp)(nil), // 8: PreviousContentResp - (*TransitiveDepsRequest)(nil), // 9: TransitiveDepsRequest - (*TransitiveDepsResponse)(nil), // 10: TransitiveDepsResponse - (*LockfilePackage)(nil), // 11: LockfilePackage - (*LockfilePackageList)(nil), // 12: LockfilePackageList - (*SubgraphRequest)(nil), // 13: SubgraphRequest - (*SubgraphResponse)(nil), // 14: SubgraphResponse - nil, // 15: TransitiveDepsRequest.UnresolvedDepsEntry -} -var file_turborepo_ffi_messages_proto_depIdxs = []int32{ - 3, // 0: GlobResp.files:type_name -> GlobRespList - 6, // 1: ChangedFilesResp.files:type_name -> ChangedFilesList - 15, // 2: TransitiveDepsRequest.unresolved_deps:type_name -> TransitiveDepsRequest.UnresolvedDepsEntry - 12, // 3: TransitiveDepsResponse.packages:type_name -> LockfilePackageList - 11, // 4: LockfilePackageList.list:type_name -> LockfilePackage - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_turborepo_ffi_messages_proto_init() } -func file_turborepo_ffi_messages_proto_init() { - if File_turborepo_ffi_messages_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_turborepo_ffi_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TurboDataDirResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GlobReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GlobResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GlobRespList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangedFilesReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangedFilesResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangedFilesList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PreviousContentReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PreviousContentResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransitiveDepsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransitiveDepsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LockfilePackage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LockfilePackageList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubgraphRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_turborepo_ffi_messages_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubgraphResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_turborepo_ffi_messages_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*GlobResp_Files)(nil), - (*GlobResp_Error)(nil), - } - file_turborepo_ffi_messages_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_turborepo_ffi_messages_proto_msgTypes[5].OneofWrappers = []interface{}{ - (*ChangedFilesResp_Files)(nil), - (*ChangedFilesResp_Error)(nil), - } - file_turborepo_ffi_messages_proto_msgTypes[8].OneofWrappers = []interface{}{ - (*PreviousContentResp_Content)(nil), - (*PreviousContentResp_Error)(nil), - } - file_turborepo_ffi_messages_proto_msgTypes[10].OneofWrappers = []interface{}{ - (*TransitiveDepsResponse_Packages)(nil), - (*TransitiveDepsResponse_Error)(nil), - } - file_turborepo_ffi_messages_proto_msgTypes[14].OneofWrappers = []interface{}{ - (*SubgraphResponse_Contents)(nil), - (*SubgraphResponse_Error)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_turborepo_ffi_messages_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_turborepo_ffi_messages_proto_goTypes, - DependencyIndexes: file_turborepo_ffi_messages_proto_depIdxs, - MessageInfos: file_turborepo_ffi_messages_proto_msgTypes, - }.Build() - File_turborepo_ffi_messages_proto = out.File - file_turborepo_ffi_messages_proto_rawDesc = nil - file_turborepo_ffi_messages_proto_goTypes = nil - file_turborepo_ffi_messages_proto_depIdxs = nil -} |
