diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..ffd31da2 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + env: { + browser: true, + commonjs: true, + es6: true, + mocha: true + }, + extends: [ + 'standard' + ], + globals: { + Atomics: 'readonly', + SharedArrayBuffer: 'readonly' + }, + parserOptions: { + ecmaVersion: 2018 + }, + rules: {} +} diff --git a/CHANGELOG.md b/CHANGELOG.md index fa083176..c804ce89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # [Monax Hoard](https://github.com/monax/hoard) Changelog -## [Unreleased] +## [7.0.0] - 2019-12-02 +This release makes some changes to the Hoard protobuf and service that are backwards compatible for clients - Hoard v6 clients should work with Hoard v7 but hoard-js v7 will not work entirely correctly with Hoard v6 due to removal of oneof. + +### Changed +- [API] Drop use of oneof in protobuf files - allow singleton fields to be sent with streamable fields +- [API] Enforce that we only receive exactly one salt and grant spec in streams and that they come first +- [NODEJS] Expose streaming promise client-side API to take advantage of streaming rather than loading entire file into buffer + +### Fixed +- Ignoring Spec if Salt present in single message ## [6.0.0] - 2019-10-11 @@ -136,7 +145,7 @@ This is the first Hoard open source release and includes: - Hoar-Daemon hoard - Hoar-Control hoarctl CLI -[Unreleased]: https://github.com/monax/hoard/compare/v6.0.0...HEAD +[7.0.0]: https://github.com/monax/hoard/compare/v6.0.0...v7.0.0 [6.0.0]: https://github.com/monax/hoard/compare/v5.1.0...v6.0.0 [5.1.0]: https://github.com/monax/hoard/compare/v5.0.1...v5.1.0 [5.0.1]: https://github.com/monax/hoard/compare/v5.0.0...v5.0.1 diff --git a/Dockerfile b/Dockerfile index e59c3265..91c7a49d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.12.1-alpine3.9 as builder MAINTAINER Monax -RUN apk add --update --no-cache git +RUN apk add --update --no-cache make git bash ARG REPO=$GOPATH/src/github.com/monax/hoard COPY . $REPO @@ -10,8 +10,7 @@ WORKDIR $REPO ENV GO111MODULE=on # Build purely static binaries -RUN go build --ldflags '-extldflags "-static"' -o bin/hoard ./cmd/hoard -RUN go build --ldflags '-extldflags "-static"' -o bin/hoarctl ./cmd/hoarctl +RUN make build # This will be our base container image FROM alpine:3.9 diff --git a/Makefile b/Makefile index 0456a0ea..9e261512 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,10 @@ export GO111MODULE := on +# Gets implicit default GOPATH if not set +GOPATH?=$(shell go env GOPATH) +BIN_PATH?=${GOPATH}/bin + SHELL := /bin/bash REPO := $(shell pwd) GOFILES := $(shell find . -name '*.pb.go' -prune -o -not -path './vendor/*' -type f -name '*.go' -print) @@ -29,6 +33,8 @@ PROTO_FILES = $(shell find . -path ./hoard-js -prune -o -path ./node_modules -pr PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES)) PROTO_GO_FILES_REAL = $(shell find . -type f -name '*.pb.go' -print) +GO_BUILD_ARGS = -ldflags "-extldflags '-static' -X $(shell go list)/project.commit=$(shell cat commit_hash.txt) -X $(shell go list)/project.date=$(shell date '+%Y-%m-%d')" + export DOCKER_HUB := quay.io export DOCKER_REPO := $(DOCKER_HUB)/monax/hoard export BUILD_IMAGE := $(DOCKER_REPO):build @@ -72,7 +78,7 @@ commit_hash: .PHONY: protobuf protobuf: $(PROTO_GO_FILES) - rsync -r .gopath/github.com/monax/hoard/v6/ ./ + rsync -r .gopath/github.com/monax/hoard/v7/ ./ rm -rf .gopath .PHONY: clean_protobuf @@ -85,18 +91,19 @@ protobuf_deps: ## build the hoard binary .PHONY: build_hoard -build_hoard: - @go build -o bin/hoard ./cmd/hoard +build_hoard: commit_hash + go build $(GO_BUILD_ARGS) -o bin/hoard ./cmd/hoard ## build the hoard binary .PHONY: build_hoarctl -build_hoarctl: - @go build -o bin/hoarctl ./cmd/hoarctl +build_hoarctl: commit_hash + go build $(GO_BUILD_ARGS) -o bin/hoarctl ./cmd/hoarctl .PHONY: install -install: - @go install ./cmd/hoard - @go install ./cmd/hoarctl +install: build_hoarctl build_hoard + mkdir -p ${BIN_PATH} + install -T ${REPO}/bin/hoarctl ${BIN_PATH}/hoarctl + install -T ${REPO}/bin/hoard ${BIN_PATH}/hoard ## build all targets in github.com/monax/hoard .PHONY: build diff --git a/NOTES.md b/NOTES.md index 1bf9c7a5..886ca431 100644 --- a/NOTES.md +++ b/NOTES.md @@ -1,3 +1,10 @@ -### Added -- Document streaming service +This release makes some changes to the Hoard protobuf and service that are backwards compatible for clients - Hoard v6 clients should work with Hoard v7 but hoard-js v7 will not work entirely correctly with Hoard v6 due to removal of oneof. + +### Changed +- [API] Drop use of oneof in protobuf files - allow singleton fields to be sent with streamable fields +- [API] Enforce that we only receive exactly one salt and grant spec in streams and that they come first +- [NODEJS] Expose streaming promise client-side API to take advantage of streaming rather than loading entire file into buffer + +### Fixed +- Ignoring Spec if Salt present in single message diff --git a/api/api.pb.go b/api/api.pb.go index 7410c4db..ec05f402 100644 --- a/api/api.pb.go +++ b/api/api.pb.go @@ -7,10 +7,10 @@ import ( context "context" fmt "fmt" proto "github.com/gogo/protobuf/proto" - grant "github.com/monax/hoard/v6/grant" - meta "github.com/monax/hoard/v6/meta" - reference "github.com/monax/hoard/v6/reference" - stores "github.com/monax/hoard/v6/stores" + grant "github.com/monax/hoard/v7/grant" + meta "github.com/monax/hoard/v7/meta" + reference "github.com/monax/hoard/v7/reference" + stores "github.com/monax/hoard/v7/stores" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -26,7 +26,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type GrantAndGrantSpec struct { Grant *grant.Grant `protobuf:"bytes,1,opt,name=Grant,proto3" json:"Grant,omitempty"` @@ -76,13 +76,12 @@ func (m *GrantAndGrantSpec) GetGrantSpec() *grant.Spec { } type PlaintextAndGrantSpec struct { - // Types that are valid to be assigned to Input: - // *PlaintextAndGrantSpec_Plaintext - // *PlaintextAndGrantSpec_GrantSpec - Input isPlaintextAndGrantSpec_Input `protobuf_oneof:"input"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Plaintext *Plaintext `protobuf:"bytes,1,opt,name=Plaintext,proto3" json:"Plaintext,omitempty"` + // The type of grant to output + GrantSpec *grant.Spec `protobuf:"bytes,2,opt,name=GrantSpec,proto3" json:"GrantSpec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PlaintextAndGrantSpec) Reset() { *m = PlaintextAndGrantSpec{} } @@ -109,57 +108,26 @@ func (m *PlaintextAndGrantSpec) XXX_DiscardUnknown() { var xxx_messageInfo_PlaintextAndGrantSpec proto.InternalMessageInfo -type isPlaintextAndGrantSpec_Input interface { - isPlaintextAndGrantSpec_Input() -} - -type PlaintextAndGrantSpec_Plaintext struct { - Plaintext *Plaintext `protobuf:"bytes,1,opt,name=Plaintext,proto3,oneof"` -} -type PlaintextAndGrantSpec_GrantSpec struct { - GrantSpec *grant.Spec `protobuf:"bytes,2,opt,name=GrantSpec,proto3,oneof"` -} - -func (*PlaintextAndGrantSpec_Plaintext) isPlaintextAndGrantSpec_Input() {} -func (*PlaintextAndGrantSpec_GrantSpec) isPlaintextAndGrantSpec_Input() {} - -func (m *PlaintextAndGrantSpec) GetInput() isPlaintextAndGrantSpec_Input { - if m != nil { - return m.Input - } - return nil -} - func (m *PlaintextAndGrantSpec) GetPlaintext() *Plaintext { - if x, ok := m.GetInput().(*PlaintextAndGrantSpec_Plaintext); ok { - return x.Plaintext + if m != nil { + return m.Plaintext } return nil } func (m *PlaintextAndGrantSpec) GetGrantSpec() *grant.Spec { - if x, ok := m.GetInput().(*PlaintextAndGrantSpec_GrantSpec); ok { - return x.GrantSpec + if m != nil { + return m.GrantSpec } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PlaintextAndGrantSpec) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PlaintextAndGrantSpec_Plaintext)(nil), - (*PlaintextAndGrantSpec_GrantSpec)(nil), - } -} - type PlaintextAndMeta struct { - // Types that are valid to be assigned to Input: - // *PlaintextAndMeta_Meta - // *PlaintextAndMeta_Plaintext - Input isPlaintextAndMeta_Input `protobuf_oneof:"input"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Meta *meta.Meta `protobuf:"bytes,1,opt,name=Meta,proto3" json:"Meta,omitempty"` + Plaintext *Plaintext `protobuf:"bytes,2,opt,name=Plaintext,proto3" json:"Plaintext,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PlaintextAndMeta) Reset() { *m = PlaintextAndMeta{} } @@ -186,57 +154,26 @@ func (m *PlaintextAndMeta) XXX_DiscardUnknown() { var xxx_messageInfo_PlaintextAndMeta proto.InternalMessageInfo -type isPlaintextAndMeta_Input interface { - isPlaintextAndMeta_Input() -} - -type PlaintextAndMeta_Meta struct { - Meta *meta.Meta `protobuf:"bytes,1,opt,name=Meta,proto3,oneof"` -} -type PlaintextAndMeta_Plaintext struct { - Plaintext *Plaintext `protobuf:"bytes,2,opt,name=Plaintext,proto3,oneof"` -} - -func (*PlaintextAndMeta_Meta) isPlaintextAndMeta_Input() {} -func (*PlaintextAndMeta_Plaintext) isPlaintextAndMeta_Input() {} - -func (m *PlaintextAndMeta) GetInput() isPlaintextAndMeta_Input { - if m != nil { - return m.Input - } - return nil -} - func (m *PlaintextAndMeta) GetMeta() *meta.Meta { - if x, ok := m.GetInput().(*PlaintextAndMeta_Meta); ok { - return x.Meta + if m != nil { + return m.Meta } return nil } func (m *PlaintextAndMeta) GetPlaintext() *Plaintext { - if x, ok := m.GetInput().(*PlaintextAndMeta_Plaintext); ok { - return x.Plaintext + if m != nil { + return m.Plaintext } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PlaintextAndMeta) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PlaintextAndMeta_Meta)(nil), - (*PlaintextAndMeta_Plaintext)(nil), - } -} - type PlaintextAndGrantSpecAndMeta struct { - // Types that are valid to be assigned to Input: - // *PlaintextAndGrantSpecAndMeta_Meta - // *PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec - Input isPlaintextAndGrantSpecAndMeta_Input `protobuf_oneof:"input"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Meta *meta.Meta `protobuf:"bytes,1,opt,name=Meta,proto3" json:"Meta,omitempty"` + PlaintextAndGrantSpec *PlaintextAndGrantSpec `protobuf:"bytes,2,opt,name=PlaintextAndGrantSpec,proto3" json:"PlaintextAndGrantSpec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PlaintextAndGrantSpecAndMeta) Reset() { *m = PlaintextAndGrantSpecAndMeta{} } @@ -263,49 +200,20 @@ func (m *PlaintextAndGrantSpecAndMeta) XXX_DiscardUnknown() { var xxx_messageInfo_PlaintextAndGrantSpecAndMeta proto.InternalMessageInfo -type isPlaintextAndGrantSpecAndMeta_Input interface { - isPlaintextAndGrantSpecAndMeta_Input() -} - -type PlaintextAndGrantSpecAndMeta_Meta struct { - Meta *meta.Meta `protobuf:"bytes,1,opt,name=Meta,proto3,oneof"` -} -type PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec struct { - PlaintextAndGrantSpec *PlaintextAndGrantSpec `protobuf:"bytes,2,opt,name=PlaintextAndGrantSpec,proto3,oneof"` -} - -func (*PlaintextAndGrantSpecAndMeta_Meta) isPlaintextAndGrantSpecAndMeta_Input() {} -func (*PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec) isPlaintextAndGrantSpecAndMeta_Input() {} - -func (m *PlaintextAndGrantSpecAndMeta) GetInput() isPlaintextAndGrantSpecAndMeta_Input { - if m != nil { - return m.Input - } - return nil -} - func (m *PlaintextAndGrantSpecAndMeta) GetMeta() *meta.Meta { - if x, ok := m.GetInput().(*PlaintextAndGrantSpecAndMeta_Meta); ok { - return x.Meta + if m != nil { + return m.Meta } return nil } func (m *PlaintextAndGrantSpecAndMeta) GetPlaintextAndGrantSpec() *PlaintextAndGrantSpec { - if x, ok := m.GetInput().(*PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec); ok { - return x.PlaintextAndGrantSpec + if m != nil { + return m.PlaintextAndGrantSpec } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*PlaintextAndGrantSpecAndMeta) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*PlaintextAndGrantSpecAndMeta_Meta)(nil), - (*PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec)(nil), - } -} - type ReferenceAndGrantSpec struct { Reference *reference.Ref `protobuf:"bytes,1,opt,name=Reference,proto3" json:"Reference,omitempty"` // The type of grant to output @@ -354,13 +262,11 @@ func (m *ReferenceAndGrantSpec) GetGrantSpec() *grant.Spec { } type Plaintext struct { - // Types that are valid to be assigned to Input: - // *Plaintext_Data - // *Plaintext_Salt - Input isPlaintext_Input `protobuf_oneof:"input"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` + Salt []byte `protobuf:"bytes,2,opt,name=Salt,proto3" json:"Salt,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Plaintext) Reset() { *m = Plaintext{} } @@ -387,49 +293,20 @@ func (m *Plaintext) XXX_DiscardUnknown() { var xxx_messageInfo_Plaintext proto.InternalMessageInfo -type isPlaintext_Input interface { - isPlaintext_Input() -} - -type Plaintext_Data struct { - Data []byte `protobuf:"bytes,1,opt,name=Data,proto3,oneof"` -} -type Plaintext_Salt struct { - Salt []byte `protobuf:"bytes,2,opt,name=Salt,proto3,oneof"` -} - -func (*Plaintext_Data) isPlaintext_Input() {} -func (*Plaintext_Salt) isPlaintext_Input() {} - -func (m *Plaintext) GetInput() isPlaintext_Input { - if m != nil { - return m.Input - } - return nil -} - func (m *Plaintext) GetData() []byte { - if x, ok := m.GetInput().(*Plaintext_Data); ok { - return x.Data + if m != nil { + return m.Data } return nil } func (m *Plaintext) GetSalt() []byte { - if x, ok := m.GetInput().(*Plaintext_Salt); ok { - return x.Salt + if m != nil { + return m.Salt } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Plaintext) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Plaintext_Data)(nil), - (*Plaintext_Salt)(nil), - } -} - type Ciphertext struct { EncryptedData []byte `protobuf:"bytes,1,opt,name=EncryptedData,proto3" json:"EncryptedData,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -567,49 +444,47 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdf, 0x6f, 0xd3, 0x30, - 0x10, 0xae, 0xb7, 0xac, 0xa5, 0xb7, 0xc2, 0x86, 0xc5, 0xa6, 0x29, 0x80, 0x18, 0x61, 0xda, 0xca, - 0x0f, 0xa5, 0x55, 0x27, 0x10, 0x2f, 0x48, 0x6c, 0x2b, 0xda, 0x78, 0x40, 0xaa, 0x5c, 0xed, 0x05, - 0x89, 0x07, 0xaf, 0xf1, 0xd6, 0x48, 0xa9, 0x13, 0x25, 0x0e, 0x1b, 0x0f, 0x20, 0xfe, 0x11, 0x1e, - 0x78, 0xe4, 0xbf, 0x44, 0x76, 0xdc, 0x24, 0x4e, 0xba, 0xc1, 0x9e, 0x6a, 0xdf, 0x7d, 0x77, 0xf7, - 0xdd, 0x7d, 0xe7, 0x06, 0xda, 0x34, 0xf2, 0xdd, 0x28, 0x0e, 0x45, 0x88, 0x97, 0x69, 0xe4, 0xdb, - 0xab, 0x17, 0x31, 0xe5, 0x22, 0xb3, 0xd8, 0x30, 0x63, 0x82, 0xea, 0xf3, 0x5a, 0xcc, 0xce, 0x59, - 0xcc, 0xf8, 0x84, 0x69, 0x43, 0x27, 0x11, 0x61, 0xcc, 0x92, 0xec, 0xe6, 0x9c, 0xc1, 0xfd, 0x63, - 0x19, 0x79, 0xc0, 0x3d, 0xf5, 0x3b, 0x8e, 0xd8, 0x04, 0x3b, 0xb0, 0xa2, 0x2e, 0x5b, 0x68, 0x1b, - 0x75, 0x57, 0x07, 0x1d, 0x37, 0x4b, 0xae, 0x6c, 0x24, 0x73, 0xe1, 0xe7, 0xd0, 0xce, 0x03, 0xb6, - 0x96, 0x14, 0x6e, 0x55, 0xe3, 0xa4, 0x89, 0x14, 0x5e, 0xe7, 0x3b, 0x6c, 0x8c, 0x02, 0xea, 0x73, - 0xc1, 0xae, 0xcc, 0x3a, 0x2e, 0xb4, 0x73, 0x87, 0xae, 0x75, 0xcf, 0x95, 0x8d, 0xe5, 0xd6, 0x93, - 0x06, 0x29, 0x20, 0xf8, 0xe5, 0xcd, 0x35, 0x25, 0x38, 0xf7, 0x1f, 0xb6, 0x60, 0xc5, 0xe7, 0x51, - 0x2a, 0x9c, 0x19, 0xac, 0x97, 0xcb, 0x7f, 0x62, 0x82, 0xe2, 0x6d, 0xb0, 0xe4, 0xaf, 0x2e, 0x0a, - 0xae, 0x1a, 0x98, 0xb4, 0x9c, 0x34, 0x88, 0xf2, 0x98, 0xdc, 0x96, 0xfe, 0xc9, 0xad, 0x28, 0xf7, - 0x0b, 0xc1, 0xa3, 0x85, 0xed, 0xfe, 0x7f, 0x6d, 0x72, 0xcd, 0xc0, 0x34, 0x0f, 0xdb, 0xe4, 0x51, - 0x46, 0x9c, 0x34, 0xc8, 0xe2, 0xd0, 0x82, 0x5f, 0x04, 0x1b, 0x64, 0xbe, 0x12, 0x86, 0x1a, 0xaf, - 0xa0, 0x9d, 0x3b, 0x72, 0x35, 0x8a, 0xed, 0x21, 0xec, 0x9c, 0x14, 0x80, 0xdb, 0xe8, 0xff, 0xbe, - 0x34, 0x4a, 0xfc, 0x00, 0xac, 0x21, 0xd5, 0xdd, 0x77, 0x64, 0xc7, 0xf2, 0x26, 0xad, 0x63, 0x1a, - 0x64, 0x83, 0x56, 0x56, 0x79, 0x2b, 0x38, 0x0f, 0x00, 0x8e, 0xfc, 0x68, 0xca, 0x62, 0x95, 0x62, - 0x07, 0xee, 0x7e, 0xe0, 0x93, 0xf8, 0x5b, 0x24, 0x98, 0x57, 0xe4, 0x22, 0xa6, 0xd1, 0xb9, 0x84, - 0xcd, 0x72, 0x9f, 0xa5, 0xf8, 0xdb, 0x35, 0xda, 0x2b, 0xd7, 0xd6, 0x9d, 0xae, 0x29, 0x05, 0x0a, - 0x33, 0x29, 0x41, 0x9c, 0x67, 0xd0, 0x3a, 0xf0, 0xbc, 0x98, 0x25, 0x09, 0xde, 0xca, 0x8f, 0x9a, - 0xe3, 0xfc, 0x3a, 0xf8, 0xbd, 0xa4, 0xdf, 0x18, 0xee, 0x83, 0x35, 0x66, 0x34, 0xc0, 0x99, 0xaa, - 0x0b, 0xa5, 0xb1, 0x8d, 0x17, 0x88, 0x77, 0xa1, 0x79, 0xca, 0x13, 0x19, 0x63, 0xd8, 0xed, 0x4a, - 0x13, 0xd8, 0x85, 0x26, 0x61, 0x0a, 0xb7, 0xa9, 0x72, 0xd7, 0x1e, 0x7a, 0x25, 0xef, 0x6b, 0x68, - 0x8d, 0x52, 0x51, 0x22, 0xb3, 0x70, 0x93, 0xcc, 0xa0, 0x2e, 0x92, 0xaf, 0x32, 0xa3, 0x73, 0xcc, - 0x44, 0x8d, 0x91, 0x91, 0xa6, 0x8f, 0xf0, 0x0b, 0xe8, 0x64, 0xe0, 0x21, 0x0b, 0x98, 0x60, 0x15, - 0x7c, 0x47, 0xe1, 0xe7, 0x33, 0xfa, 0x02, 0xed, 0xa3, 0x80, 0xd1, 0x4c, 0xb4, 0x3d, 0x58, 0x1e, - 0xa5, 0x02, 0x57, 0x32, 0x56, 0x7b, 0xee, 0x22, 0x09, 0x94, 0x44, 0x2a, 0x8e, 0x3a, 0x95, 0xc1, - 0x4f, 0x04, 0xa0, 0x57, 0xc6, 0x0f, 0x39, 0x7e, 0x0b, 0x2d, 0x7d, 0xab, 0x15, 0x79, 0x58, 0x93, - 0xa6, 0x90, 0xbb, 0x8b, 0x64, 0xe4, 0x90, 0x65, 0x91, 0x37, 0x21, 0x17, 0x50, 0xf8, 0x83, 0xa0, - 0x35, 0x16, 0x61, 0x4c, 0x2f, 0x18, 0xde, 0x03, 0x6b, 0x94, 0x26, 0x53, 0x5c, 0xdd, 0x2d, 0x73, - 0x28, 0xaa, 0x41, 0x6b, 0x94, 0x06, 0x52, 0xfc, 0x92, 0xdd, 0xae, 0x86, 0xf5, 0x11, 0xde, 0x05, - 0x6b, 0x2c, 0xa8, 0xa8, 0x00, 0xd7, 0x5d, 0xfd, 0x01, 0x90, 0xbe, 0x8f, 0xfc, 0x3c, 0xc4, 0x3b, - 0xd0, 0xcc, 0xd5, 0x28, 0x23, 0x4d, 0x35, 0x7e, 0xc0, 0x9d, 0x61, 0x38, 0x49, 0x67, 0x8c, 0x0b, - 0xbc, 0x2f, 0xcf, 0x97, 0x3c, 0x08, 0xa9, 0x57, 0x51, 0x70, 0xa3, 0xb6, 0x38, 0xf2, 0x1f, 0xcd, - 0x69, 0xf4, 0x11, 0x7e, 0x07, 0xcd, 0xd3, 0x48, 0x85, 0x3c, 0xbd, 0x7e, 0xbb, 0x74, 0x80, 0xb9, - 0x64, 0x4e, 0xa3, 0x8b, 0x0e, 0x9f, 0x7c, 0x7e, 0x7c, 0xe1, 0x8b, 0x69, 0x7a, 0xe6, 0x4e, 0xc2, - 0x59, 0x6f, 0x16, 0x72, 0x7a, 0xd5, 0x9b, 0x86, 0x34, 0xf6, 0x7a, 0x5f, 0xdf, 0xf4, 0x68, 0xe4, - 0x9f, 0x35, 0xd5, 0x17, 0x6d, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0x00, 0x39, 0x64, - 0x1b, 0x07, 0x00, 0x00, + // 631 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5d, 0x6f, 0xd3, 0x30, + 0x14, 0x9d, 0xbb, 0xd0, 0xd2, 0xdb, 0xc0, 0x86, 0xa5, 0x4d, 0x55, 0xf8, 0x0e, 0xd3, 0x56, 0x3e, + 0x94, 0x56, 0xad, 0x40, 0xbc, 0xf0, 0x30, 0x56, 0x34, 0xf1, 0x80, 0x14, 0xb9, 0xda, 0x0b, 0x12, + 0x12, 0x6e, 0xe3, 0xb6, 0x91, 0xd2, 0x24, 0x4a, 0x1c, 0x36, 0x5e, 0x10, 0x3f, 0x81, 0xbf, 0xc0, + 0x23, 0xff, 0x12, 0xd9, 0x71, 0xf3, 0xd9, 0xc1, 0xfa, 0x54, 0xfb, 0xf8, 0x1c, 0xdf, 0x7b, 0xcf, + 0xbd, 0x4e, 0xa1, 0x4d, 0x43, 0xd7, 0x0a, 0xa3, 0x80, 0x07, 0x78, 0x97, 0x86, 0xae, 0xd1, 0x59, + 0x44, 0xd4, 0xe7, 0x29, 0x62, 0xc0, 0x8a, 0x71, 0xaa, 0xd6, 0x7b, 0x11, 0x9b, 0xb3, 0x88, 0xf9, + 0x33, 0xa6, 0x00, 0x3d, 0xe6, 0x41, 0xc4, 0xe2, 0x74, 0x67, 0x4e, 0xe1, 0xde, 0xb9, 0x50, 0x9e, + 0xfa, 0x8e, 0xfc, 0x9d, 0x84, 0x6c, 0x86, 0x4d, 0xb8, 0x25, 0x37, 0x5d, 0xf4, 0x04, 0xf5, 0x3a, + 0x43, 0xdd, 0x4a, 0x2f, 0x97, 0x18, 0x49, 0x8f, 0xf0, 0x73, 0x68, 0x67, 0x82, 0x6e, 0x43, 0xf2, + 0x3a, 0x8a, 0x27, 0x20, 0x92, 0x9f, 0x9a, 0x21, 0x1c, 0xd8, 0x1e, 0x75, 0x7d, 0xce, 0xae, 0xca, + 0x71, 0x5e, 0x41, 0x3b, 0x3b, 0x50, 0xb1, 0xee, 0x5a, 0xa2, 0xb0, 0x0c, 0x25, 0x39, 0x61, 0x9b, + 0x88, 0x5f, 0x61, 0xbf, 0x18, 0xf1, 0x13, 0xe3, 0x14, 0x3f, 0x02, 0x4d, 0xfc, 0xaa, 0x38, 0x60, + 0x49, 0x8f, 0x04, 0x42, 0x24, 0x5e, 0x4e, 0xa6, 0xf1, 0x9f, 0x64, 0xcc, 0x5f, 0x08, 0x1e, 0x6c, + 0x2c, 0xea, 0xa6, 0xe1, 0xec, 0x6b, 0x4c, 0x51, 0xa1, 0x8d, 0x72, 0xe8, 0x22, 0x83, 0x6c, 0x16, + 0x0a, 0x9b, 0xc9, 0xba, 0xd7, 0x55, 0x9b, 0xb3, 0x83, 0xcc, 0xe6, 0x7c, 0x2c, 0x08, 0x9b, 0x93, + 0x9c, 0xb0, 0x8d, 0xcd, 0xa3, 0x82, 0x65, 0x18, 0x83, 0x36, 0xa6, 0xaa, 0x60, 0x9d, 0xc8, 0xb5, + 0xc0, 0x26, 0xd4, 0x4b, 0xed, 0xd4, 0x89, 0x5c, 0x9b, 0x43, 0x80, 0x33, 0x37, 0x5c, 0xb2, 0x48, + 0xaa, 0x8e, 0xe0, 0xce, 0x07, 0x7f, 0x16, 0x7d, 0x0f, 0x39, 0x73, 0x0a, 0xf2, 0x32, 0x68, 0x5e, + 0xc2, 0x61, 0xb1, 0xb4, 0x82, 0x7e, 0xbb, 0xda, 0xfa, 0xc5, 0xd8, 0xaa, 0xb8, 0x3d, 0xe9, 0x74, + 0x0e, 0x93, 0x02, 0xc5, 0x7c, 0x06, 0xad, 0x53, 0xc7, 0x89, 0x58, 0x1c, 0xe3, 0x6e, 0xb6, 0x54, + 0x39, 0xae, 0xb7, 0xc3, 0xdf, 0x0d, 0xf5, 0x5e, 0xf0, 0x00, 0xb4, 0x09, 0xa3, 0x1e, 0x4e, 0xbb, + 0xb7, 0xb1, 0x1b, 0x46, 0xe9, 0x35, 0xe1, 0x63, 0x68, 0x5e, 0xf8, 0xb1, 0xd0, 0x94, 0x70, 0xa3, + 0x52, 0x04, 0xb6, 0xa0, 0x49, 0x98, 0xe4, 0x1d, 0xca, 0xbb, 0x6b, 0x8f, 0xb6, 0x72, 0xef, 0x6b, + 0x68, 0xd9, 0x09, 0x2f, 0x24, 0xb3, 0x71, 0x66, 0xca, 0xa2, 0x1e, 0xc2, 0x2f, 0xa1, 0x9d, 0xa6, + 0x73, 0xce, 0x78, 0x2d, 0xa3, 0xd2, 0x35, 0x03, 0x84, 0x5f, 0x80, 0x9e, 0x92, 0xc7, 0xcc, 0x63, + 0x9c, 0x55, 0xf8, 0xba, 0xe4, 0xaf, 0x3d, 0xfa, 0x02, 0xed, 0x33, 0x8f, 0xd1, 0xb4, 0x69, 0x27, + 0xb0, 0x6b, 0x27, 0x1c, 0x57, 0x6e, 0xac, 0xd6, 0xdc, 0x43, 0x82, 0x28, 0x12, 0xa9, 0x1c, 0xd4, + 0x53, 0x19, 0xfe, 0x44, 0x00, 0x6a, 0x64, 0xdc, 0xc0, 0xc7, 0x6f, 0xa1, 0xa5, 0x76, 0xb5, 0x20, + 0xf7, 0x6b, 0xad, 0xc9, 0xdb, 0xdd, 0x43, 0x42, 0x39, 0x66, 0xa9, 0xf2, 0x5f, 0xcc, 0x0d, 0x29, + 0xfc, 0x41, 0xd0, 0x9a, 0xf0, 0x20, 0xa2, 0x0b, 0x86, 0x4f, 0x40, 0xb3, 0x93, 0x78, 0x89, 0xab, + 0xb3, 0x55, 0x36, 0x45, 0x16, 0xa8, 0xd9, 0x89, 0x27, 0x9a, 0x5f, 0xc0, 0x8d, 0xaa, 0x6c, 0x80, + 0xf0, 0x31, 0x68, 0x13, 0x4e, 0x79, 0x85, 0xb8, 0x6f, 0xa9, 0x8f, 0xb9, 0x38, 0xfb, 0xe8, 0xcf, + 0x03, 0x7c, 0x04, 0xcd, 0xac, 0x1b, 0x45, 0x66, 0xb9, 0x1b, 0x3f, 0xe0, 0xf6, 0x38, 0x98, 0x25, + 0x2b, 0xe6, 0x73, 0x3c, 0x12, 0xeb, 0x4b, 0xdf, 0x0b, 0xa8, 0x53, 0xe9, 0xe0, 0x41, 0x6d, 0x70, + 0xc4, 0x97, 0xcb, 0xdc, 0x19, 0x20, 0xfc, 0x0e, 0x9a, 0x17, 0xa1, 0x94, 0x3c, 0xbd, 0x7e, 0xba, + 0x94, 0xa0, 0x3c, 0x64, 0xe6, 0x4e, 0x0f, 0xbd, 0x7f, 0xfc, 0xf9, 0xe1, 0xc2, 0xe5, 0xcb, 0x64, + 0x6a, 0xcd, 0x82, 0x55, 0x7f, 0x15, 0xf8, 0xf4, 0xaa, 0xbf, 0x0c, 0x68, 0xe4, 0xf4, 0xbf, 0xbd, + 0xe9, 0xd3, 0xd0, 0x9d, 0x36, 0xe5, 0xbf, 0xd3, 0xe8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, + 0xb9, 0xe4, 0x03, 0xe7, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/cmd/hoarctl/documents.go b/cmd/hoarctl/documents.go index 641d247e..d15b085e 100644 --- a/cmd/hoarctl/documents.go +++ b/cmd/hoarctl/documents.go @@ -6,9 +6,9 @@ import ( "os" cli "github.com/jawher/mow.cli" - "github.com/monax/hoard/v6" - "github.com/monax/hoard/v6/grant" - "github.com/monax/hoard/v6/meta" + "github.com/monax/hoard/v7" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/meta" "github.com/h2non/filetype" ) @@ -39,7 +39,7 @@ func (client *Client) Upload(cmd *cli.Cmd) { } spec := &grant.Spec{Plaintext: &grant.PlaintextSpec{}} - err = hoard.SendDocumentAndGrant(upload, &meta.Document{ + err = hoard.SendDocumentAndGrantSpec(upload, &meta.Document{ Meta: &meta.Meta{ Name: file.Name(), MimeType: kind.MIME.Type, @@ -50,12 +50,12 @@ func (client *Client) Upload(cmd *cli.Cmd) { fatalf("Error sending data: %v", err) } - grant, err := upload.CloseAndRecv() + grt, err := upload.CloseAndRecv() if err != nil { fatalf("Error closing client: %v", err) } - fmt.Printf("%s\n", jsonString(grant)) + fmt.Printf("%s\n", jsonString(grt)) } } @@ -83,7 +83,7 @@ func (client *Client) getFile() *meta.Document { fatalf("Error starting client: %v", err) } - doc, _, err := hoard.ReceiveDocument(download) + doc, err := hoard.ReceiveDocument(download) if err != nil { fatalf("Error sending data: %v", err) } diff --git a/cmd/hoarctl/encryption.go b/cmd/hoarctl/encryption.go index 531691a2..fa5fe2f9 100644 --- a/cmd/hoarctl/encryption.go +++ b/cmd/hoarctl/encryption.go @@ -6,9 +6,9 @@ import ( "os" cli "github.com/jawher/mow.cli" - "github.com/monax/hoard/v6" - "github.com/monax/hoard/v6/api" - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7" + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/reference" ) // Decrypt does what it says on the tin @@ -32,12 +32,12 @@ func (client *Client) Decrypt(cmd *cli.Cmd) { fatalf("Error starting client: %v", err) } - data, _, err := hoard.ReceivePlaintext(dec) + plaintext, err := hoard.ReceivePlaintext(dec) if err != nil { fatalf("Error receiving data: %v", err) } - os.Stdout.Write(data) + os.Stdout.Write(plaintext.Data) } } diff --git a/cmd/hoarctl/grants.go b/cmd/hoarctl/grants.go index 888b7621..39284edf 100644 --- a/cmd/hoarctl/grants.go +++ b/cmd/hoarctl/grants.go @@ -6,9 +6,9 @@ import ( "os" cli "github.com/jawher/mow.cli" - "github.com/monax/hoard/v6" - "github.com/monax/hoard/v6/api" - "github.com/monax/hoard/v6/grant" + "github.com/monax/hoard/v7" + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/grant" ) // PutSeal encrypts and stores data then prints a grant @@ -20,9 +20,9 @@ func (client *Client) PutSeal(cmd *cli.Cmd) { cmd.Action = func() { validateChunkSize(*chunk) - spec := grant.Spec{Plaintext: &grant.PlaintextSpec{}} + spec := &grant.Spec{Plaintext: &grant.PlaintextSpec{}} if *key != "" { - spec = grant.Spec{ + spec = &grant.Spec{ Plaintext: nil, Symmetric: &grant.SymmetricSpec{PublicID: *key}, } @@ -34,17 +34,23 @@ func (client *Client) PutSeal(cmd *cli.Cmd) { fatalf("Error starting client: %v", err) } - err = hoard.SendPlaintextAndGrantSpec(seal, &spec, data, parseSalt(salt), *chunk) + err = hoard.SendPlaintextAndGrantSpec(seal, &api.PlaintextAndGrantSpec{ + Plaintext: &api.Plaintext{ + Data: data, + Salt: parseSalt(salt), + }, + GrantSpec: spec, + }, *chunk) if err != nil { fatalf("Error sending data: %v", err) } - grant, err := seal.CloseAndRecv() + grt, err := seal.CloseAndRecv() if err != nil { fatalf("Error closing client: %v", err) } - fmt.Printf("%s\n", jsonString(grant)) + fmt.Printf("%s\n", jsonString(grt)) } } @@ -127,12 +133,12 @@ func (client *Client) UnsealGet(cmd *cli.Cmd) { fatalf("Error starting client: %v", err) } - data, _, err := hoard.ReceivePlaintext(unseal) + plaintext, err := hoard.ReceivePlaintext(unseal) if err != nil { fatalf("Error receiving data: %v", err) } - os.Stdout.Write(data) + os.Stdout.Write(plaintext.Data) } } diff --git a/cmd/hoarctl/main.go b/cmd/hoarctl/main.go index aa7a0992..07bc993b 100644 --- a/cmd/hoarctl/main.go +++ b/cmd/hoarctl/main.go @@ -1,6 +1,7 @@ package main import ( + "context" "encoding/base64" "encoding/json" "fmt" @@ -8,16 +9,15 @@ import ( "io/ioutil" "net" "os" - "time" - "github.com/monax/hoard/v6/api" + "github.com/monax/hoard/v7/api" cli "github.com/jawher/mow.cli" - "github.com/monax/hoard/v6/cmd" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/grant" - "github.com/monax/hoard/v6/reference" - "github.com/monax/hoard/v6/server" + "github.com/monax/hoard/v7/cmd" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/reference" + "github.com/monax/hoard/v7/server" "google.golang.org/grpc" ) @@ -63,7 +63,7 @@ func main() { conn, err = grpc.Dial(*dialURL, grpc.WithInsecure(), // We have to bugger around with this so we can dial an arbitrary net.Conn - grpc.WithDialer(func(string, time.Duration) (net.Conn, error) { + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return net.Dial(netProtocol, localAddress) })) if err != nil { diff --git a/cmd/hoarctl/store.go b/cmd/hoarctl/store.go index 43fb2480..7c698b44 100644 --- a/cmd/hoarctl/store.go +++ b/cmd/hoarctl/store.go @@ -6,9 +6,9 @@ import ( "os" cli "github.com/jawher/mow.cli" - "github.com/monax/hoard/v6" - "github.com/monax/hoard/v6/api" - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7" + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/reference" ) // Cat retrieves encrypted data from store @@ -57,11 +57,11 @@ func (client *Client) Get(cmd *cli.Cmd) { fatalf("Error starting client: %v", err) } - data, _, err := hoard.ReceivePlaintext(get) + plaintext, err := hoard.ReceivePlaintext(get) if err != nil { fatalf("Error retrieving data: %v", err) } - os.Stdout.Write(data) + os.Stdout.Write(plaintext.Data) } } diff --git a/cmd/hoard/main.go b/cmd/hoard/main.go index efc69980..117fd170 100644 --- a/cmd/hoard/main.go +++ b/cmd/hoard/main.go @@ -11,9 +11,9 @@ import ( "github.com/cep21/xdgbasedir" "github.com/go-kit/kit/log" cli "github.com/jawher/mow.cli" - "github.com/monax/hoard/v6/cmd" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/server" + "github.com/monax/hoard/v7/cmd" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/server" ) func main() { @@ -65,10 +65,8 @@ func main() { } symmetricProvider := config.NewSymmetricProvider(conf.Secrets) openPGPConf := config.NewOpenPGPSecret(conf.Secrets) - sm := config.SecretsManager{Provider: symmetricProvider, OpenPGP: openPGPConf} - cs := conf.Storage.ChunkSize - - serv := server.New(conf.ListenAddress, store, sm, cs, logger) + secretsManager := config.SecretsManager{Provider: symmetricProvider, OpenPGP: openPGPConf} + serv := server.New(conf.ListenAddress, store, secretsManager, conf.ChunkSize, logger) // Catch interrupt etc signalCh := make(chan os.Signal, 1) signal.Notify(signalCh, os.Interrupt, os.Kill, syscall.SIGTERM) @@ -80,7 +78,7 @@ func main() { os.Exit(0) }(signalCh) - printf("Starting hoard daemon on %s with %s...", conf.ListenAddress, + printf("Starting hoard daemon on %s with chunk size %d on %s...", conf.ListenAddress, conf.ChunkSize, store.Name()) err = serv.Serve() if err != nil { @@ -109,19 +107,24 @@ func main() { initOpt := configCmd.BoolOpt("i init", false, "Write file to "+ "XDG standard location") + chunkSizeOpt := configCmd.IntOpt("c chunk-size", config.DefaultChunkSize, + "number of bytes on which to split plaintext/ciphertext across message boundaries when streaming") + secretsOpt := configCmd.StringsOpt("s secret", nil, "Pairs of PublicID and Passphrase to use as symmetric secrets in config") arg := configCmd.StringArg("CONFIG", "", fmt.Sprintf("Storage type to generate, one of: %s", strings.Join(configTypes(), ", "))) - configCmd.Spec = "[--json | --yaml] | (([--output=] | [--init]) [--force]) CONFIG [--secret=...]" + configCmd.Spec = "[--json | --yaml] | (([--output=] | [--init]) [--force]) CONFIG " + + "[--secret=...] [--chunk-size=]" configCmd.Action = func() { - store, err := config.GetDefaultStorage(*arg) + store, err := config.GetDefaultStorage(config.StorageType(*arg)) if err != nil { fatalf("Error fetching default config for %v: %v", arg, err) } conf.Storage = store + conf.ChunkSize = *chunkSizeOpt if len(*secretsOpt) > 0 { conf.Secrets = &config.Secrets{ Symmetric: make([]config.SymmetricSecret, len(*secretsOpt)), diff --git a/cmd/hoard/stores.go b/cmd/hoard/stores.go index f11e29cb..d92ed290 100644 --- a/cmd/hoard/stores.go +++ b/cmd/hoard/stores.go @@ -5,10 +5,10 @@ import ( "fmt" "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/stores" - "github.com/monax/hoard/v6/stores/cloud" - "github.com/monax/hoard/v6/stores/ipfs" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/stores" + "github.com/monax/hoard/v7/stores/cloud" + "github.com/monax/hoard/v7/stores/ipfs" ) func StoreFromStorageConfig(storageConfig *config.Storage, logger log.Logger) (stores.NamedStore, error) { diff --git a/cmd/version.go b/cmd/version.go index e0663e33..138156bd 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -4,7 +4,7 @@ import ( "fmt" cli "github.com/jawher/mow.cli" - "github.com/monax/hoard/v6/project" + "github.com/monax/hoard/v7/project" ) func AddVersionCommand(cmd *cli.Cli) { diff --git a/config/cloud.go b/config/cloud.go index 77a3e04d..fb3f69fc 100644 --- a/config/cloud.go +++ b/config/cloud.go @@ -1,36 +1,18 @@ package config -import ( - "fmt" -) - type Cloud struct { Bucket string Prefix string Region string } -func NewCloud(encoding, cloud, bucket, prefix, region string) (*Storage, error) { - return &Storage{ - StorageType: StorageType(cloud), - AddressEncoding: encoding, - Cloud: &Cloud{ - Bucket: bucket, - Prefix: prefix, - Region: region, - }, - }, nil -} - -func DefaultCloud(cloud string) *Storage { - conf, err := NewCloud(DefaultAddressEncodingName, - cloud, - "hoard", - "store", - "uk", - ) - if err != nil { - panic(fmt.Errorf("could not generate example config: %s", err)) +func NewDefaultCloud(cloud StorageType) *Storage { + conf := NewDefaultStorage() + conf.StorageType = cloud + conf.Cloud = &Cloud{ + Bucket: "hoard", + Prefix: "store", + Region: "uk", } return conf } diff --git a/config/cloud_test.go b/config/cloud_test.go index c019ee7a..913a1c09 100644 --- a/config/cloud_test.go +++ b/config/cloud_test.go @@ -3,7 +3,7 @@ package config import "testing" func TestDefaultCloudConfig(t *testing.T) { - assertStorageConfigSerialisation(t, DefaultCloud("aws")) - assertStorageConfigSerialisation(t, DefaultCloud("azure")) - assertStorageConfigSerialisation(t, DefaultCloud("gcp")) + assertStorageConfigSerialisation(t, NewDefaultCloud("aws")) + assertStorageConfigSerialisation(t, NewDefaultCloud("azure")) + assertStorageConfigSerialisation(t, NewDefaultCloud("gcp")) } diff --git a/config/config.go b/config/config.go index 38544e32..31e5d0a1 100644 --- a/config/config.go +++ b/config/config.go @@ -11,19 +11,23 @@ import ( const DefaultListenAddress = "tcp://:53431" -var DefaultHoardConfig = NewHoardConfig(DefaultListenAddress, - DefaultStorage, DefaultLogging) +const DefaultChunkSize = 1 << 16 // 64 Kb + +var DefaultHoardConfig = NewHoardConfig(DefaultListenAddress, DefaultChunkSize, NewDefaultStorage(), DefaultLogging) type HoardConfig struct { ListenAddress string - Storage *Storage - Logging *Logging - Secrets *Secrets + // Chunk size for data upload / download + ChunkSize int + Storage *Storage + Logging *Logging + Secrets *Secrets } -func NewHoardConfig(listenAddress string, storageConfig *Storage, loggingConfig *Logging) *HoardConfig { +func NewHoardConfig(listenAddress string, chunkSize int, storageConfig *Storage, loggingConfig *Logging) *HoardConfig { return &HoardConfig{ ListenAddress: listenAddress, + ChunkSize: chunkSize, Storage: storageConfig, Logging: loggingConfig, } diff --git a/config/filesystem.go b/config/filesystem.go index 769382ab..31b63d6c 100644 --- a/config/filesystem.go +++ b/config/filesystem.go @@ -4,7 +4,7 @@ import ( "fmt" "path" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7/stores" "github.com/cep21/xdgbasedir" ) @@ -14,16 +14,16 @@ type FileSystemConfig struct { } func NewFileSystemConfig(addressEncoding, rootDirectory string) *Storage { - return &Storage{ - StorageType: Filesystem, - AddressEncoding: addressEncoding, - FileSystemConfig: &FileSystemConfig{ - RootDirectory: rootDirectory, - }, + conf := NewDefaultStorage() + conf.StorageType = Filesystem + conf.AddressEncoding = addressEncoding + conf.FileSystemConfig = &FileSystemConfig{ + RootDirectory: rootDirectory, } + return conf } -func DefaultFileSystemConfig() *Storage { +func NewDefaultFileSystemConfig() *Storage { dataDir, err := xdgbasedir.DataHomeDirectory() if err != nil { panic(fmt.Errorf("could not get XDG data dir: %s", err)) diff --git a/config/filesystem_test.go b/config/filesystem_test.go index f8751ba1..fd0ee33c 100644 --- a/config/filesystem_test.go +++ b/config/filesystem_test.go @@ -3,5 +3,5 @@ package config import "testing" func TestDefaultFileSystemConfig(t *testing.T) { - assertStorageConfigSerialisation(t, DefaultFileSystemConfig()) + assertStorageConfigSerialisation(t, NewDefaultFileSystemConfig()) } diff --git a/config/ipfs.go b/config/ipfs.go index 80959d8d..93981b97 100644 --- a/config/ipfs.go +++ b/config/ipfs.go @@ -5,16 +5,16 @@ type IPFSConfig struct { } func NewIPFSConfig(addressEncoding, host string) *Storage { - return &Storage{ - StorageType: IPFS, - AddressEncoding: addressEncoding, - IPFSConfig: &IPFSConfig{ - RemoteAPI: host, - }, + conf := NewDefaultStorage() + conf.StorageType = IPFS + conf.AddressEncoding = addressEncoding + conf.IPFSConfig = &IPFSConfig{ + RemoteAPI: host, } + return conf } -func DefaultIPFSConfig() *Storage { +func NewDefaultIPFSConfig() *Storage { return NewIPFSConfig(DefaultAddressEncodingName, "http://:5001", ) diff --git a/config/ipfs_test.go b/config/ipfs_test.go index 16106eea..22e811fc 100644 --- a/config/ipfs_test.go +++ b/config/ipfs_test.go @@ -3,5 +3,5 @@ package config import "testing" func TestDefaultIPFSConfig(t *testing.T) { - assertStorageConfigSerialisation(t, DefaultIPFSConfig()) + assertStorageConfigSerialisation(t, NewDefaultIPFSConfig()) } diff --git a/config/logging.go b/config/logging.go index fcd14841..306b259b 100644 --- a/config/logging.go +++ b/config/logging.go @@ -7,8 +7,8 @@ import ( "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/term" - "github.com/monax/hoard/v6/logging/loggers" - "github.com/monax/hoard/v6/logging/structure" + "github.com/monax/hoard/v7/logging/loggers" + "github.com/monax/hoard/v7/logging/structure" ) type LoggingType string diff --git a/config/logging_test.go b/config/logging_test.go index cc1ebefc..0f1882c5 100644 --- a/config/logging_test.go +++ b/config/logging_test.go @@ -5,7 +5,7 @@ import ( "bytes" - "github.com/monax/hoard/v6/logging/structure" + "github.com/monax/hoard/v7/logging/structure" "github.com/stretchr/testify/assert" ) diff --git a/config/memory.go b/config/memory.go index e6929585..c9b80746 100644 --- a/config/memory.go +++ b/config/memory.go @@ -1,9 +1,7 @@ package config -func NewMemory(addressEncoding string) *Storage { - return NewStorage(Memory, addressEncoding) -} - -func DefaultMemory() *Storage { - return NewMemory(DefaultAddressEncodingName) +func NewDefaultMemory() *Storage { + conf := NewDefaultStorage() + conf.StorageType = Memory + return conf } diff --git a/config/memory_test.go b/config/memory_test.go index 732386c9..fb345d07 100644 --- a/config/memory_test.go +++ b/config/memory_test.go @@ -3,5 +3,5 @@ package config import "testing" func TestDefaultMemoryConfig(t *testing.T) { - assertStorageConfigSerialisation(t, DefaultMemory()) + assertStorageConfigSerialisation(t, NewDefaultMemory()) } diff --git a/config/source_test.go b/config/source_test.go index d6f5da16..12e5db38 100644 --- a/config/source_test.go +++ b/config/source_test.go @@ -53,7 +53,8 @@ func TestCascade(t *testing.T) { assert.Equal(t, fileConfig, conf.TOMLString()) // Env set so caught by environment source - envConfig := NewHoardConfig("unix:///tmp/hoard.sock'", DefaultCloud("aws"), DefaultLogging) + envConfig := NewHoardConfig("unix:///tmp/hoard.sock'", DefaultChunkSize, NewDefaultCloud("aws"), + DefaultLogging) os.Setenv(DefaultJSONConfigEnvironmentVariable, envConfig.JSONString()) conf, err = Cascade(os.Stderr, true, Environment(DefaultJSONConfigEnvironmentVariable), diff --git a/config/storage.go b/config/storage.go index 037d30d1..09cfb2b5 100644 --- a/config/storage.go +++ b/config/storage.go @@ -3,7 +3,7 @@ package config import ( "fmt" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7/stores" "bytes" @@ -12,7 +12,9 @@ import ( const DefaultAddressEncodingName = stores.Base64EncodingName -var DefaultStorage = NewMemory(DefaultAddressEncodingName) +func NewDefaultStorage() *Storage { + return NewStorage(Memory, DefaultAddressEncodingName) +} type StorageType string @@ -32,8 +34,6 @@ type Storage struct { StorageType StorageType // Address encoding name AddressEncoding string - // Chunk size for data upload / download - ChunkSize int // Embedding a pointer to each type of config struct allows us to access the // relevant one, while at the same time those that are left as nil will be // omitted from being serialised. @@ -46,7 +46,6 @@ func NewStorage(storageType StorageType, addressEncoding string) *Storage { return &Storage{ StorageType: storageType, AddressEncoding: addressEncoding, - ChunkSize: 64 * 1024, // 64 Kb } } @@ -61,22 +60,22 @@ func GetStorageTypes() []StorageType { } } -func GetDefaultStorage(c string) (*Storage, error) { - switch StorageType(c) { +func GetDefaultStorage(storageType StorageType) (*Storage, error) { + switch storageType { case Memory, Unspecified: - return DefaultMemory(), nil + return NewDefaultMemory(), nil case Filesystem: - return DefaultFileSystemConfig(), nil + return NewDefaultFileSystemConfig(), nil case IPFS: - return DefaultIPFSConfig(), nil + return NewDefaultIPFSConfig(), nil case AWS: - return DefaultCloud(c), nil + return NewDefaultCloud(storageType), nil case Azure: - return DefaultCloud(c), nil + return NewDefaultCloud(storageType), nil case GCP: - return DefaultCloud(c), nil + return NewDefaultCloud(storageType), nil default: - return nil, fmt.Errorf("did not recognise storage type '%s'", c) + return nil, fmt.Errorf("did not recognise storage type '%s'", storageType) } } diff --git a/document.go b/document.go index 06f5e503..96806397 100644 --- a/document.go +++ b/document.go @@ -7,12 +7,12 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - "github.com/monax/hoard/v6/grant" - "github.com/monax/hoard/v6/meta" + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/meta" ) -// This is an extension to the hoard interface to allow -// stateful retrieval of document objects +// Document extensions to hoard providing conventions for storing documents with their metadata // GetDocument retrieves a document from hoard and parses // it into a document struct. @@ -43,18 +43,21 @@ func GetDocument(gs GrantService, grant *grant.Grant) (*meta.Document, []byte, e // // This function puts and seals the document into hoard's store // and returns back the grant which is given from hoard. -func PostDocument(gs GrantService, document *meta.Document, spec *grant.Spec, salt []byte) (*grant.Grant, error) { - out, err := proto.Marshal(document) +func PutDocument(gs GrantService, pgsm *api.PlaintextAndGrantSpecAndMeta) (*grant.Grant, error) { + out, err := proto.Marshal(&meta.Document{ + Meta: pgsm.Meta, + Data: pgsm.PlaintextAndGrantSpec.Plaintext.Data, + }) if err != nil { return nil, err } - ref, err := gs.Put(out, salt) + ref, err := gs.Put(out, pgsm.PlaintextAndGrantSpec.Plaintext.Salt) if err != nil { return nil, err } - return gs.Seal(ref, spec) + return gs.Seal(ref, pgsm.PlaintextAndGrantSpec.GrantSpec) } // parseIntoDocument converts a hoard inode object into a parsed document @@ -78,6 +81,7 @@ type legacyDocumentMeta struct { AssemblyType string } +// TODO: [Silas] query Casey on the plan implied by the below... // legacyParseIntoDocument is a dead simple function which receives // a raw hoard inode and parses that into the structs which can be // leveraged within hoard. This only remains for very old documents diff --git a/document_service.go b/document_service.go deleted file mode 100644 index 477f6783..00000000 --- a/document_service.go +++ /dev/null @@ -1,221 +0,0 @@ -package hoard - -import ( - "io" - - "github.com/monax/hoard/v6/api" - "github.com/monax/hoard/v6/grant" - "github.com/monax/hoard/v6/meta" -) - -func (service *hoardService) Download(grt *grant.Grant, srv api.Document_DownloadServer) error { - doc, salt, err := GetDocument(service.gs, grt) - if err != nil { - return err - } - - return SendDocument(srv, doc, salt, service.cs) -} - -func (service *hoardService) Upload(srv api.Document_UploadServer) error { - doc, spec, salt, err := ReceiveDocumentAndGrant(srv) - if err != nil { - return err - } - - grt, err := PostDocument(service.gs, doc, spec, salt) - if err != nil { - return err - } - - return srv.SendAndClose(grt) -} - -type DocumentSender interface { - Send(*api.PlaintextAndMeta) error -} - -func SendDocument(srv DocumentSender, doc *meta.Document, salt []byte, cs int) error { - out := new(api.PlaintextAndMeta) - out.Input = &api.PlaintextAndMeta_Meta{Meta: doc.Meta} - if err := srv.Send(out); err != nil { - return err - } - - out.Input = &api.PlaintextAndMeta_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Salt{ - Salt: salt, - }, - }, - } - if err := srv.Send(out); err != nil { - return err - } - - data := doc.GetData() - for i := 0; i < len(data); i += cs { - if i+cs > len(data) { - out.Input = &api.PlaintextAndMeta_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Data{ - Data: data[i:len(data)], - }, - }, - } - } else { - out.Input = &api.PlaintextAndMeta_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Data{ - Data: data[i : i+cs], - }, - }, - } - } - if err := srv.Send(out); err != nil { - return err - } - } - - return nil -} - -type DocumentAndGrantSender interface { - Send(*api.PlaintextAndGrantSpecAndMeta) error -} - -func SendDocumentAndGrant(srv DocumentAndGrantSender, doc *meta.Document, salt []byte, spec *grant.Spec, cs int) error { - out := new(api.PlaintextAndGrantSpecAndMeta) - out.Input = &api.PlaintextAndGrantSpecAndMeta_Meta{Meta: doc.Meta} - if err := srv.Send(out); err != nil { - return err - } - - out.Input = &api.PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec{ - PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{ - Input: &api.PlaintextAndGrantSpec_GrantSpec{ - GrantSpec: spec, - }, - }, - } - if err := srv.Send(out); err != nil { - return err - } - - out.Input = &api.PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec{ - PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{ - Input: &api.PlaintextAndGrantSpec_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Salt{ - Salt: salt, - }, - }, - }, - }, - } - if err := srv.Send(out); err != nil { - return err - } - - data := doc.GetData() - for i := 0; i < len(data); i += cs { - if i+cs > len(data) { - out.Input = &api.PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec{ - PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{ - Input: &api.PlaintextAndGrantSpec_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Data{ - Data: data[i:len(data)], - }, - }, - }, - }, - } - } else { - out.Input = &api.PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec{ - PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{ - Input: &api.PlaintextAndGrantSpec_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Data{ - Data: data[i : i+cs], - }, - }, - }, - }, - } - } - if err := srv.Send(out); err != nil { - return err - } - } - - return nil -} - -type DocumentAndGrantReceiver interface { - Recv() (*api.PlaintextAndGrantSpecAndMeta, error) -} - -func ReceiveDocumentAndGrant(srv DocumentAndGrantReceiver) (*meta.Document, *grant.Spec, []byte, error) { - doc := new(meta.Document) - spec := new(grant.Spec) - var salt []byte - for { - d, err := srv.Recv() - if err != nil { - if err == io.EOF { - return doc, spec, salt, nil - } - - return nil, nil, nil, err - } - - switch x := d.GetInput().(type) { - case *api.PlaintextAndGrantSpecAndMeta_Meta: - doc.Meta = x.Meta - case *api.PlaintextAndGrantSpecAndMeta_PlaintextAndGrantSpec: - switch y := x.PlaintextAndGrantSpec.GetInput().(type) { - case *api.PlaintextAndGrantSpec_GrantSpec: - spec = y.GrantSpec - case *api.PlaintextAndGrantSpec_Plaintext: - switch z := y.Plaintext.GetInput().(type) { - case *api.Plaintext_Salt: - salt = z.Salt - case *api.Plaintext_Data: - doc.Data = append(doc.Data, z.Data...) - } - } - } - } -} - -type DocumentReceiver interface { - Recv() (*api.PlaintextAndMeta, error) -} - -func ReceiveDocument(srv DocumentReceiver) (*meta.Document, []byte, error) { - doc := new(meta.Document) - var salt []byte - for { - d, err := srv.Recv() - if err != nil { - if err == io.EOF { - return doc, salt, nil - } - - return nil, nil, err - } - - switch x := d.GetInput().(type) { - case *api.PlaintextAndMeta_Meta: - doc.Meta = x.Meta - case *api.PlaintextAndMeta_Plaintext: - switch y := x.Plaintext.GetInput().(type) { - case *api.Plaintext_Salt: - salt = y.Salt - case *api.Plaintext_Data: - doc.Data = append(doc.Data, y.Data...) - } - } - } -} diff --git a/document_test.go b/document_test.go index a67d5baa..fcd64b8a 100644 --- a/document_test.go +++ b/document_test.go @@ -3,8 +3,8 @@ package hoard import ( "testing" - "github.com/monax/hoard/v6/meta" - "github.com/monax/hoard/v6/test/helpers" + "github.com/monax/hoard/v7/meta" + "github.com/monax/hoard/v7/test/helpers" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/require" @@ -52,7 +52,8 @@ func TestImproperlyDecoding(t *testing.T) { require.Error(t, err) } -// DO NOT REMOVE THIS... +// TODO: Remove this when... +// [Casey] We can remove that fallback if we ensure that every hoard object conforms to the new encoding system rather than the old. func TestProperlyDecodingLegacy(t *testing.T) { docRaw, err := helpers.ReadFixture("rawObject.buffer") require.NoError(t, err) @@ -68,7 +69,8 @@ func TestProperlyDecodingLegacy(t *testing.T) { require.NotEqual(t, 0, len(doc.Data)) } -// DO NOT REMOVE THIS... +// TODO: Remove this when... +// [Casey] We can remove that fallback if we ensure that every hoard object conforms to the new encoding system rather than the old. func TestProperlyDecodingLegacyWithFallThru(t *testing.T) { docRaw, err := helpers.ReadFixture("rawObject.buffer") require.NoError(t, err) diff --git a/go.mod b/go.mod index 49886ccd..06a9b581 100644 --- a/go.mod +++ b/go.mod @@ -1,33 +1,29 @@ -module github.com/monax/hoard/v6 +module github.com/monax/hoard/v7 go 1.13 -replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 - require ( - cloud.google.com/go v0.37.0 - github.com/Azure/azure-storage-blob-go v0.6.0 + cloud.google.com/go v0.39.0 + github.com/Azure/azure-storage-blob-go v0.8.0 github.com/BurntSushi/toml v0.3.1 - github.com/OneOfOne/xxhash v1.2.5 - github.com/aws/aws-sdk-go v1.19.35 + github.com/OneOfOne/xxhash v1.2.6 + github.com/aws/aws-sdk-go v1.25.43 github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 github.com/eapache/channels v1.1.0 + github.com/eapache/queue v1.1.0 // indirect github.com/go-kit/kit v0.9.0 + github.com/go-logfmt/logfmt v0.4.0 // indirect github.com/go-stack/stack v1.8.0 - github.com/gogo/protobuf v1.3.0 + github.com/gogo/protobuf v1.3.1 github.com/golang/protobuf v1.3.2 github.com/h2non/filetype v1.0.10 github.com/jawher/mow.cli v1.1.0 - github.com/monax/hoard/v5 v5.1.0 // indirect github.com/monax/relic v2.0.0+incompatible github.com/stretchr/testify v1.4.0 - gocloud.dev v0.13.0 - golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc - golang.org/x/net v0.0.0-20191009170851-d66e71096ffb // indirect - golang.org/x/oauth2 v0.0.0-20190517181255-950ef44c6e07 - golang.org/x/sys v0.0.0-20191009170203-06d7bd2c5f4f // indirect - google.golang.org/api v0.2.0 - google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect - google.golang.org/grpc v1.24.0 - gopkg.in/yaml.v2 v2.2.4 + gocloud.dev v0.18.0 + golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c + golang.org/x/oauth2 v0.0.0-20191122200657-5d9234df094c + google.golang.org/api v0.6.0 + google.golang.org/grpc v1.25.1 + gopkg.in/yaml.v2 v2.2.7 ) diff --git a/go.sum b/go.sum index 980824b7..e1289a66 100644 --- a/go.sum +++ b/go.sum @@ -1,678 +1,248 @@ -cloud.google.com/go v0.23.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.0 h1:69FNAINiZfsEuwH3fKq8QrAAnHz+2m4XL4kVYi5BX0Q= -cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.39.0 h1:UgQP9na6OTfp4dsAiz/eFpFA1C6tPdH5wiRdi19tuMw= +cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= -contrib.go.opencensus.io/exporter/ocagent v0.4.2/go.mod h1:YuG83h+XWwqWjvCqn7vK4KSyLKhThY3+gNGQ37iS2V0= -contrib.go.opencensus.io/exporter/stackdriver v0.9.1/go.mod h1:hNe5qQofPbg6bLQY5wHCvQ7o+2E5P8PkegEuQ+MyRw0= -contrib.go.opencensus.io/integrations/ocsql v0.1.3/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -github.com/Azure/azure-amqp-common-go v1.1.3/go.mod h1:FhZtXirFANw40UXI2ntweO+VOkfaw8s6vZxUiRhLYW8= -github.com/Azure/azure-amqp-common-go v1.1.4/go.mod h1:FhZtXirFANw40UXI2ntweO+VOkfaw8s6vZxUiRhLYW8= -github.com/Azure/azure-pipeline-go v0.1.8 h1:KmVRa8oFMaargVesEuuEoiLCQ4zCCwQ8QX/xg++KS20= -github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= -github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v26.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-service-bus-go v0.2.0/go.mod h1:auph+otjChRM1T34fA7a3JDAcUeMEPZXs3F21VHJwqI= -github.com/Azure/azure-storage-blob-go v0.0.0-20190104215108-45d0c5e3638e/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= -github.com/Azure/azure-storage-blob-go v0.6.0 h1:SEATKb3LIHcaSIX+E6/K4kJpwfuozFEsmt5rS56N6CE= -github.com/Azure/azure-storage-blob-go v0.6.0/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v11.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.1.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.3.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +contrib.go.opencensus.io/exporter/ocagent v0.5.0 h1:TKXjQSRS0/cCDrP7KvkgU6SmILtF/yV2TOs/02K/WZQ= +contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= +contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= +contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= +contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= +github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= +github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v30.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbIe3AcV9WZbAdpkoXOa0= +github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o= +github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= +github.com/Azure/go-autorest v12.0.0+incompatible h1:N+VqClcomLGD/sHb3smbSYYtNMgKpVV3Cd5r5i8z6bQ= +github.com/Azure/go-autorest v12.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20181215173202-6f1ecdcf9588/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= -github.com/Jeffail/gabs v1.1.1/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= -github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/RoaringBitmap/roaring v0.4.16/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= -github.com/SAP/go-hdb v0.13.1/go.mod h1:etBT+FAi1t5k3K3tf5vQTnosgYmhDkRi8jEnQqCnxF0= -github.com/SAP/go-hdb v0.13.2/go.mod h1:etBT+FAi1t5k3K3tf5vQTnosgYmhDkRi8jEnQqCnxF0= -github.com/SermoDigital/jose v0.9.1/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= -github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= -github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190122153857-e0ace9b64d22/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/arrow/go/arrow v0.0.0-20181031164735-a56c009257a7/go.mod h1:GjvccvtI06FGFvRU1In/maF7tKp3h7GBV9Sexo5rNPM= -github.com/apache/arrow/go/arrow v0.0.0-20181217213538-e9ed591db9cb/go.mod h1:GjvccvtI06FGFvRU1In/maF7tKp3h7GBV9Sexo5rNPM= -github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apex/log v1.1.0/go.mod h1:yA770aXIDQrhVOIGurT/pVdfCpSq1GQV/auzMN5fzvY= -github.com/araddon/gou v0.0.0-20190110011759-c797efecbb61/go.mod h1:ikc1XA58M+Rx7SEbf0bLJCfBkwayZ8T5jBo5FXK8Uz8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190605020000-c4ba1fdf4d36/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= +github.com/OneOfOne/xxhash v1.2.6 h1:U68crOE3y3MPttCMQGywZOLrTeF5HHJ3/vDBCJn9/bA= +github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.15.31/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.15.59/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= -github.com/aws/aws-sdk-go v1.15.64/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= -github.com/aws/aws-sdk-go v1.16.23/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.19.35 h1:3uW3mnR0knAcrSSP3CptG1oeoQfDy3c9qL1UqHsH/Ec= -github.com/aws/aws-sdk-go v1.19.35/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= -github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/bouk/httprouter v0.0.0-20160817010721-ee8b3818a7f5/go.mod h1:CDReaxg1cmLrtcasZy43l4EYPAknXLiQSrb7tLw5zXM= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/briankassouf/jose v0.9.1/go.mod h1:HQhVmdUf7dBNwIIdBTivnCDxcf6IZY3/zrb+uKSJz6Y= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= -github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e/go.mod h1:9IOqJGCPMSc6E5ydlp5NIonxObaeu/Iub/X03EKPVYo= -github.com/cenkalti/backoff v2.0.0+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/census-instrumentation/opencensus-proto v0.1.0-0.20181214143942-ba49f56771b8/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.1.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/centrify/cloud-golang-sdk v0.0.0-20180119173102-7c97cc6fde16/go.mod h1:C0rtzmGXgN78pYR0tGJFhtHgkbAs0lIbHwkB81VxDQE= +github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.43 h1:R5YqHQFIulYVfgRySz9hvBRTWBjudISa+r0C8XQ1ufg= +github.com/aws/aws-sdk-go v1.25.43/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9 h1:Iy/9yf1PnKnwH8V0phEnqKE6aSIaqIZ+yn4PQgHF84E= github.com/cep21/xdgbasedir v0.0.0-20170329171747-21470bfc93b9/go.mod h1:6R3C29d3JonDKVjnlzFv5BGL/bfZP+0I7rKHKwiqKP8= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/chrismalek/oktasdk-go v0.0.0-20181212195951-3430665dfaa0/go.mod h1:5d8DqS60xkj9k3aXfL3+mXBH0DPYO0FQjcKosxl+b/Q= -github.com/circonus-labs/circonus-gometrics v2.2.5+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/continuity v0.0.0-20181027224239-bea7585dbfac/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.11+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.0.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/dancannon/gorethink v4.0.0+incompatible/go.mod h1:BLvkat9KmZc1efyYwhz3WnybhRZtgF1K929FD8z1avU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= -github.com/denisenkom/go-mssqldb v0.0.0-20190121005146-b04fd42d9952/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= +github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= +github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.0.0-20180422163414-57142e89befe/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/duosecurity/duo_api_golang v0.0.0-20181024123116-92fea9203dbc/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo= -github.com/duosecurity/duo_api_golang v0.0.0-20190107154727-539434bf0d45/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k= github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= -github.com/emirpasic/gods v1.9.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fullsailor/pkcs7 v0.0.0-20180613152042-8306686428a5/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4/go.mod h1:GeIq9qoE43YdGnDXURnmKTnGg15pQz4mYkXSTChbneI= -github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92/go.mod h1:w9RqFVO2BM3xwWEcAB8Fwp0OviTBBEiRmSBDfbXnd3w= -github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= -github.com/getkin/kin-openapi v0.1.0/go.mod h1:+0ZtELZf+SlWH8ZdA/IeFb3L/PKOKJx8eGxAlUZ/sOU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-ldap/ldap v2.5.1+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= -github.com/go-ldap/ldap v3.0.0+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= -github.com/go-logfmt/logfmt v0.3.0 h1:8HUsc87TaSWLKwrnumgC8/YconD2fJQsRJAsWaPg2ic= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stomp/stomp v2.0.2+incompatible/go.mod h1:VqCtqNZv1226A1/79yh+rMiFUcfY3R109np+7ke4n0c= -github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/gocql/gocql v0.0.0-20181117210152-33c0e89ca93a/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= -github.com/gocql/gocql v0.0.0-20190122205811-30de9a1866a8/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.0 h1:G8O7TerXerS4F6sx9OV7/nRfJdnXgHZu/S/7F2SN+UE= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021/go.mod h1:xEhNfoBDX1hzLm2Nf80qUvZ2sVwoMZ8d6IE2SrsQfh4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-replayers/grpcreplay v0.1.0 h1:eNb1y9rZFmY4ax45uEEECSa8fsxGRU+8Bil52ASAwic= +github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= +github.com/google/go-replayers/httpreplay v0.1.0 h1:AX7FUb4BjrrzNvblr/OlgwrmFiep6soj5K2QSDW7BGk= +github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible h1:xmapqc1AyLoB+ddYT6r04bD9lIjlOqGaREovi0SzFaE= +github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/subcommands v0.0.0-20181012225330-46f0354f6315/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.0 h1:Jf4mxPC/ziBnoPIdpQdPJ9OeiomAUHLvxmPRSPH9m4s= -github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/wire v0.2.1 h1:TYj4Z2qjqxa2ufb34UJqVeO9aznL+i0fLO6TqThKZ7Y= -github.com/google/wire v0.2.1/go.mod h1:ptBl5bWD3nzmJHVNwYHV3v4wdtKzBMlU2YbtKQCG9GI= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/wire v0.3.0 h1:imGQZGEVEHpje5056+K+cgdO72p0LQv2xIIFXNGUf60= +github.com/google/wire v0.3.0/go.mod h1:i1DMg/Lu8Sz5yYl25iOdmc5CT5qusaa+zmRWs16741s= github.com/googleapis/gax-go v2.0.2+incompatible h1:silFMLAnr330+NRuag/VjIGF7TLp/LBrV2CJKFLWEww= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3 h1:siORttZ36U2R/WjiJuDz8znElWBiAlO9rVt+mqJt0Cc= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/goreleaser/goreleaser v0.94.0/go.mod h1:OjbYR2NhOI6AEUWCowMSBzo9nP1aRif3sYtx+rhp+Zo= -github.com/goreleaser/nfpm v0.9.7/go.mod h1:F2yzin6cBAL9gb+mSiReuXdsfTrOQwDMsuSpULof+y4= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.2 h1:S+ef0492XaIknb8LMjcwgW2i3cNTzDYMmDrOThOJNWc= +github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/h2non/filetype v1.0.10 h1:z+SJfnL6thYJ9kAST+6nPRXp1lMxnOVbMZHNYHMar0s= github.com/h2non/filetype v1.0.10/go.mod h1:isekKqOuhMj+s/7r3rIeTErIRy4Rub5uBWHfvMusLMU= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hashicorp/consul v1.4.0/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-gcp-common v0.0.0-20180425173946-763e39302965/go.mod h1:LNbios2fdMAuLA1dsYUvUcoCYIfywcCEK8/ooaWjoOA= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= -github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.0.0-20190109152822-4783caec6f2e/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-memdb v0.0.0-20181108192425-032f93b25bec/go.mod h1:kbfItVoBJwCfKXDXN4YoAXjxcFVZ7MRrJzyTX6H4giE= -github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v0.0.0-20181030172320-54b6ff97d818/go.mod h1:Ft7ju2vWzhO0ETMKUVo12XmXmII6eSUS4rsPTkY/siA= -github.com/hashicorp/go-plugin v0.0.0-20181212150838-f444068e8f5a/go.mod h1:Ft7ju2vWzhO0ETMKUVo12XmXmII6eSUS4rsPTkY/siA= -github.com/hashicorp/go-retryablehttp v0.5.0/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90/go.mod h1:o4zcYY1e0GEZI6eSEr+43QDYmuGglw1qSO6qdHUHCgg= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.1/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= -github.com/hashicorp/nomad v0.8.7/go.mod h1:WRaKjdO1G2iqi86TvTjIYtKTyxg4pl7NLr9InxtWaI0= -github.com/hashicorp/raft v1.0.0/go.mod h1:DVSAWItjLjTOkVbSpWQ0j0kUADIvDaCtBxIcbNAQLkI= -github.com/hashicorp/serf v0.8.1/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/vault v0.11.5/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= -github.com/hashicorp/vault v1.0.2/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= -github.com/hashicorp/vault-plugin-auth-alicloud v0.0.0-20181109180636-f278a59ca3e8/go.mod h1:o3i5QQWgV5+SYouIn++L9D0kbhLYB3FjxNRHNf6KS+Q= -github.com/hashicorp/vault-plugin-auth-azure v0.0.0-20181207232528-4c0b46069a22/go.mod h1:f+VmjSQIxxO+YTeO3FbPWRPCPbd3f3lwpP6jaO/YduQ= -github.com/hashicorp/vault-plugin-auth-centrify v0.0.0-20180816201131-66b0a34a58bf/go.mod h1:IIz+CMBKBEFyjeBeFUlpoUuMOyFb7mybOUNP6GX1xuk= -github.com/hashicorp/vault-plugin-auth-gcp v0.0.0-20181210200133-4d63bbfe6fcf/go.mod h1:E/E+5CuQCjOn/YGCmZ/tA7GwLey/lN1PwwJOOa9Iqy0= -github.com/hashicorp/vault-plugin-auth-jwt v0.0.0-20190117220024-3e8048f1026f/go.mod h1:j6Xmkj3dzuC63mivquwVVTlxjwDndwNxi4cJUku40J8= -github.com/hashicorp/vault-plugin-auth-kubernetes v0.0.0-20181130162533-091d9e5d5fab/go.mod h1:PqRUU5TaQ6FwVTsHPLrJs1F+T5IjbSzlfTy9cTyGeHM= -github.com/hashicorp/vault-plugin-secrets-ad v0.0.0-20181109182834-540c0b6f1f11/go.mod h1:4vRQzvp3JI+g4oUqzcklIEj2UKyhQnpIo+BDbh2uzYM= -github.com/hashicorp/vault-plugin-secrets-alicloud v0.0.0-20181109181453-2aee79cc5cbf/go.mod h1:rl8WzY7++fZMLXd6Z/k/o9wUmMbOqpTLhbtKs1loMU0= -github.com/hashicorp/vault-plugin-secrets-azure v0.0.0-20181207232500-0087bdef705a/go.mod h1:/DhLpYuRP2o00gkj6S0Gy7NvKk5AaAtP6p3f+OmxDUI= -github.com/hashicorp/vault-plugin-secrets-gcp v0.0.0-20180921173200-d6445459e80c/go.mod h1:IV2OZZZ9FCtSYeKDLsnO5JipMdjwachVISz9pNuQjhs= -github.com/hashicorp/vault-plugin-secrets-gcpkms v0.0.0-20190116164938-d6b25b0b4a39/go.mod h1:2n62quNV4DvfMY5Lxx82NJmx+9pYtv4RltLIFKxEO4E= -github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20181106190520-2236f141171e/go.mod h1:VJHHT2SC1tAPrfENQeBhLlb5FbZoKZM+oC/ROmEftz0= -github.com/hashicorp/vault-plugin-secrets-kv v0.0.0-20190115203747-edbfe287c5d9/go.mod h1:VJHHT2SC1tAPrfENQeBhLlb5FbZoKZM+oC/ROmEftz0= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.13.0/go.mod h1:81jeDcHVn1rN5uj9aQ81S72Q8ol8If7N0zM0G8TnxTE= -github.com/influxdata/influxdb v1.7.3/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxql v0.0.0-20180925231337-1cbfca8e56b6/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/platform v0.0.0-20190117200541-d500d3cf5589/go.mod h1:YVhys+JOY4wmXtJvdtkzLhS2K/r/px/vPc+EAddK+pg= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/jawher/mow.cli v1.1.0 h1:NdtHXRc0CwZQ507wMvQ/IS+Q3W3x2fycn973/b8Zuk8= github.com/jawher/mow.cli v1.1.0/go.mod h1:aNaQlc7ozF3vw6IJ2dHjp2ZFiA4ozMIYY6PyuRJwlUg= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jeffchao/backoff v0.0.0-20140404060208-9d7fd7aa17f2/go.mod h1:xkfESuHriIekR+4RoV+fu91j/CfnYM29Zi2tMFw5iD4= -github.com/jefferai/jsonx v0.0.0-20160721235117-9cc31c3135ee/go.mod h1:N0t2vlmpe8nyZB5ouIbJQPDSR+mH6oe7xHB9VZHSUzM= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jsternberg/zap-logfmt v1.2.0/go.mod h1:kz+1CUmCutPWABnNkOu9hOHKdT2q3TDYCcsFy9hpqb0= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kevinburke/go-bindata v3.11.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= -github.com/kevinburke/ssh_config v0.0.0-20180830205328-81db2a75821e/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/keybase/go-crypto v0.0.0-20181031135447-f919bfda4fc1/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= -github.com/keybase/go-crypto v0.0.0-20181127160227-255a5089e85a/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattbaird/elastigo v0.0.0-20170123220020-2fe47fd29e4b/go.mod h1:5MWrJXKRQyhQdUCF+vu6U5c4nQpg70vW3eHaU0/AYbU= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/mattn/go-zglob v0.0.0-20171230104132-4959821b4817/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= -github.com/mattn/go-zglob v0.0.0-20180803001819-2ea3427bfa53/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/michaelklishin/rabbit-hole v1.4.0/go.mod h1:vvI1uOitYZi0O5HEGXhaWC1XT80Gy+HvFheJ+5Krlhk= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/miekg/dns v1.1.1/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149 h1:HfxbT6/JcvIljmERptWhwa8XzP7H3T+Z2N26gTsaDaA= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mna/pigeon v1.0.1-0.20180808201053-bb0192cfc2ae/go.mod h1:Iym28+kJVnC1hfQvv5MUtI6AiFFzvQjHcvI4RFTG/04= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/monax/hoard v3.0.1+incompatible h1:Mfxm/5Kvu3pp2J0WyEm70pP+TwXJC6fTd3vMbFqd33Y= -github.com/monax/hoard/v5 v5.1.0 h1:SzkSYf0Zf1CGERxVHsEUa25iN4YMhAHp/Sh7mHq14BQ= -github.com/monax/hoard/v5 v5.1.0/go.mod h1:lPidYV9XyGvpiRzLZg4YmB0/hOUqdcYkbiNkG2sgytw= github.com/monax/relic v2.0.0+incompatible h1:5q+fw8Y7UJJuOBzGV5bZNlBk9k9ii6fzmdpwXsZKMdg= github.com/monax/relic v2.0.0+incompatible/go.mod h1:ZJcXg8m9tYkd2h6VeEZruhRUQPklFKbzFaTxyXrXxVk= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/gnatsd v1.3.0/go.mod h1:nqco77VO78hLCJpIcVfygDP2rPGfsEHkGTUk94uh5DQ= -github.com/nats-io/gnatsd v1.4.1/go.mod h1:nqco77VO78hLCJpIcVfygDP2rPGfsEHkGTUk94uh5DQ= -github.com/nats-io/go-nats v1.6.0/go.mod h1:+t7RHT5ApZebkrQdnn6AhQJmhJJiKAvJUio1PiiCtj0= -github.com/nats-io/go-nats v1.7.2/go.mod h1:+t7RHT5ApZebkrQdnn6AhQJmhJJiKAvJUio1PiiCtj0= -github.com/nats-io/go-nats-streaming v0.4.0/go.mod h1:gfq4R3c9sKAINOpelo0gn/b9QDMBZnmrttcsNF+lqyo= -github.com/nats-io/nats-streaming-server v0.11.2/go.mod h1:RyqtDJZvMZO66YmyjIYdIvS69zu/wDAkyNWa8PIUa5c= -github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= -github.com/nats-io/nuid v1.0.0/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/ory-am/common v0.4.0/go.mod h1:oCYGuwwM8FyYMKqh9vrhBaeUoyz/edx0bgJN6uS6/+k= -github.com/ory/dockertest v3.3.2+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/otp v1.1.0/go.mod h1:Zad1CMQfSQZI5KLpahDiSUX4tMMREnXw98IvL1nhgMk= -github.com/prometheus/client_golang v0.0.0-20171201122222-661e31bf844d/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= -github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= -github.com/streadway/amqp v0.0.0-20181205114330-a314942b2fd9/go.mod h1:1WNBiOZtZQLpVAyu0iTduoJL9hEsMloAK5XWrtW0xdY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/tcnksm/go-input v0.0.0-20180404061846-548a7d7a8ee8/go.mod h1:IlWNj9v/13q7xFbaK4mbyzMNwrZLaWSHx/aibKIZuIg= -github.com/testcontainers/testcontainer-go v0.0.0-20181115231424-8e868ca12c0f/go.mod h1:SrG3IY071gtmZJjGbKO+POJ57a/MMESerYNWt6ZRtKs= -github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tylerb/graceful v1.2.15/go.mod h1:LPYTbOYmUTdabwRt0TGhLllQ0MUNbs0Y5q1WXJOI9II= -github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go/codec v0.0.0-20181012064053-8333dd449516/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xanzy/ssh-agent v0.2.0/go.mod h1:0NyE30eGUDliuLEHJgYte/zncp2zdTStcOnWhgSqHD8= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -go.etcd.io/etcd v3.3.11+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= -go.mongodb.org/mongo-driver v1.0.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= -go.opencensus.io v0.19.2 h1:ZZpq6xI6kv/LuE/5s5UQvBU5vMjvRnPb8PvJrIntAnc= -go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -gocloud.dev v0.13.0 h1:q3j7dq8MH48LxQ5tu1e05eqTtjthFXRN7TB5/VIObtc= -gocloud.dev v0.13.0/go.mod h1:WbTmzqihM0aICJgj1Z702dckfPW1XcCV6RQnoi3OpQA= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= -golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +gocloud.dev v0.18.0 h1:HX6uFZYZs9tUP87jzoWgB8dl4ihsRpiAsBDKTthiApY= +gocloud.dev v0.18.0/go.mod h1:lhLOb91+9tKB8RnNlsx+weJGEd0AHM94huK1bmrhPwM= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc h1:c0o/qxkaO2LF5t6fQrT4b5hzyggAkLLlCUjqfRxd8Q4= -golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20181112044915-a3060d491354/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c h1:/nJuwDLoL/zrqY6gf57vxC+Pi+pZ8bfhpPkicO5H7W4= +golang.org/x/crypto v0.0.0-20191122220453-ac88ee75c92c/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191009170851-d66e71096ffb h1:TR699M2v0qoKTOHxeLgp6zPqaQNs74f01a/ob9W0qko= -golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20180603041954-1e0a3fa8ba9a/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b h1:lkjdUzSyJ5P1+eal9fxXX9Xg2BTfswsonKUse48C0uE= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190517181255-950ef44c6e07 h1:XC1K3wNjuz44KaI+cj85C9TW85w/46RH7J+DTXNH5Wk= -golang.org/x/oauth2 v0.0.0-20190517181255-950ef44c6e07/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191122200657-5d9234df094c h1:HjRaKPaiWks0f5tA6ELVF7ZfqSppfPwOEEAvsrKUTO4= +golang.org/x/oauth2 v0.0.0-20191122200657-5d9234df094c/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180828065106-d99a578cf41b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180903190138-2b024373dcd9/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181030150119-7e31e0c00fa0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190402142545-baf5eb976a8c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191009170203-06d7bd2c5f4f h1:hjzMYz/7Ea1mNKfOnFOfktR0mlA5jqhvywClCMHM/qw= -golang.org/x/sys v0.0.0-20191009170203-06d7bd2c5f4f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190620070143-6f217b454f45 h1:Dl2hc890lrizvUppGbRWhnIh2f8jOTCQpY5IKWRS0oM= +golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221154417-3ad2d988d5e2/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20190129162528-20feca13ea86 h1:kMgZCSynBSIN3PHpvuFeMExQwPWtUZ/xfnt2Yr2cp20= -golang.org/x/xerrors v0.0.0-20190129162528-20feca13ea86/go.mod h1:/lyp46tcDBI65C0XC8F4d0/XVb7MT7RScVRech7dX/4= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -google.golang.org/api v0.0.0-20180603000442-8e296ef26005/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181021000519-a2651947f503/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/api v0.2.0 h1:B5VXkdjt7K2Gm6fGBC9C9a1OAKJDT95cTqwet+2zib0= -google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= -google.golang.org/appengine v1.0.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.6.0 h1:2tJEkRfnZL5g1GeBUlITh/rqT5HG3sFcoVCUUxmgJ2g= +google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180601223552-81158efcc9f2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190916214212-f660b8655731/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= -google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.15.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/asn1-ber.v1 v1.0.0-20170511165959-379148ca0225/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= -gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fatih/pool.v2 v2.0.0/go.mod h1:8xVGeu1/2jr2wm5V9SPuMht2H5AEmf5aFMGSQixtjTY= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gorethink/gorethink.v4 v4.1.0/go.mod h1:M7JgwrUAmshJ3iUbEK0Pt049MPyPK+CYDGGaEjdZb/c= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/ory-am/dockertest.v2 v2.2.3/go.mod h1:kDHEsan1UcKFYH1c28sDmqnmeqIpB4Nj682gSNhYDYM= -gopkg.in/pipe.v2 v2.0.0-20140414041502-3c2ca4d52544/go.mod h1:UhTeH/yXCK/KY7TX24mqPkaQ7gZeqmWd/8SSS8B3aHw= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5/go.mod h1:hiOFpYm0ZJbusNj2ywpbrXowU3G8U6GIQzqn2mw1UIE= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/src-d/go-billy.v4 v4.2.1/go.mod h1:tm33zBoOwxjYHZIE+OV8bxTWFMJLrconzFMd38aARFk= -gopkg.in/src-d/go-git-fixtures.v3 v3.1.1/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= -gopkg.in/src-d/go-git.v4 v4.8.1/go.mod h1:Vtut8izDyrM8BUVQnzJ+YvmNcem2J89EmfZYCkLokZk= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20181108184350-ae8f1f9103cc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.0.0-20181221193117-173ce66c1e39/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= -k8s.io/apimachinery v0.0.0-20190119020841-d41becfba9ee/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -layeh.com/radius v0.0.0-20190118135028-0f678f039617/go.mod h1:fywZKyu//X7iRzaxLgPWsvc0L26IUpVvE/aeIL2JtIQ= -pack.ag/amqp v0.8.0/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= -pack.ag/amqp v0.10.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= +pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= diff --git a/grant/grant.go b/grant/grant.go index efacb4da..17617aaa 100644 --- a/grant/grant.go +++ b/grant/grant.go @@ -3,8 +3,8 @@ package grant import ( "fmt" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/reference" ) // Seal this reference into a Grant as specified by Spec diff --git a/grant/grant.pb.go b/grant/grant.pb.go index d5544915..d072a78c 100644 --- a/grant/grant.pb.go +++ b/grant/grant.pb.go @@ -18,7 +18,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Grant struct { // The grantSpec provides sufficient information to decrypt the reference diff --git a/grant/grant_test.go b/grant/grant_test.go index 206c4e63..4552c8de 100644 --- a/grant/grant_test.go +++ b/grant/grant_test.go @@ -4,8 +4,8 @@ import ( "io/ioutil" "testing" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/reference" "github.com/stretchr/testify/assert" ) diff --git a/grant/openpgp.go b/grant/openpgp.go index 43738db3..0cdb82d1 100644 --- a/grant/openpgp.go +++ b/grant/openpgp.go @@ -5,13 +5,13 @@ import ( "fmt" "strconv" - "github.com/monax/hoard/v6/config" + "github.com/monax/hoard/v7/config" "bytes" "io" "io/ioutil" - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7/reference" "golang.org/x/crypto/openpgp" "golang.org/x/crypto/openpgp/armor" ) diff --git a/grant/openpgp_test.go b/grant/openpgp_test.go index 96c9cc04..c07fd80e 100644 --- a/grant/openpgp_test.go +++ b/grant/openpgp_test.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "testing" - "github.com/monax/hoard/v6/config" + "github.com/monax/hoard/v7/config" "github.com/stretchr/testify/assert" ) diff --git a/grant/plaintext.go b/grant/plaintext.go index e9337760..19a154eb 100644 --- a/grant/plaintext.go +++ b/grant/plaintext.go @@ -1,7 +1,7 @@ package grant import ( - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7/reference" ) // PlaintextGrant returns an encoded reference diff --git a/grant/symmetric.go b/grant/symmetric.go index 45c20d0f..9baf6f9c 100644 --- a/grant/symmetric.go +++ b/grant/symmetric.go @@ -4,8 +4,8 @@ import ( "crypto/rand" "fmt" - "github.com/monax/hoard/v6/encryption" - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7/encryption" + "github.com/monax/hoard/v7/reference" "golang.org/x/crypto/scrypt" ) diff --git a/grant/symmetric_test.go b/grant/symmetric_test.go index 3d062d87..cf6e24af 100644 --- a/grant/symmetric_test.go +++ b/grant/symmetric_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/monax/hoard/v6/reference" + "github.com/monax/hoard/v7/reference" ) func TestSymmetricGrant(t *testing.T) { diff --git a/hoard-js/examples.js b/hoard-js/examples.js index 404530fe..ed4be96e 100644 --- a/hoard-js/examples.js +++ b/hoard-js/examples.js @@ -3,11 +3,11 @@ // and and abstracts away the loading of the protobuf file. You may prefer // to copy in the code and the hoard.proto file in order to communicate with // the Hoard daemon. -let Hoard = require('./index.js'); +const { Client, base64ify, read, write } = require('./index.js') // This is the default tcp socket that hoard runs on, just run `bin/hoard` // after running `make build` in the main hoard repo. -let hoard = new Hoard.Client('localhost:53431'); +const hoard = new Client('localhost:53431') // All input and outputs to the API methods are JSON objects representing the // message type with the parameters contained within. This corresponds to the @@ -16,105 +16,113 @@ let hoard = new Hoard.Client('localhost:53431'); // Below is an example of running through a series of hoard calls wrapped in promises. // By wrapping this in an async function we can use await/async try/catch syntactic sugar around const example = async function (plaintextIn) { - try { - var plaintext, ref, grant; - - // Both the address and secret key are a deterministic function of the - // data and the salt (the plaintext). You need the salt and secret key - // to decrypt (or get). - // Put the plaintext in storage - ref = await hoard.put(plaintextIn); - // (Base64 should be standard text representation for address, secretKey, and salt) - console.log(hoard.base64ify(ref)); - // We can get the plaintext back by `get`ing the grant - plaintext = await hoard.get(ref); - console.log('Plaintext (Reference): ' + plaintext.Data.toString()); - - // This time we'll just encrypt and ask for the result rather than storing it - let refAndCiphertext = await hoard.encrypt(plaintext); - // We get a 'hypothetical' reference (since it is not stored) and the ciphertext itself - console.log(hoard.base64ify(refAndCiphertext)); - - // decrypt is our inverse - plaintext = await hoard.decrypt(refAndCiphertext); - console.log('Plaintext (Decrypted): ' + plaintext.Data.toString()); - - // Put it back to get a reference - ref = await hoard.put(plaintext); - // We can ask for file information (we could have just provided the grant here, but address is all that is needed) - let statInfo = await hoard.stat({Address: ref.Address}); - console.log(statInfo); - // Note that all arguments take an object, representing the message, so 'address' is {address: address} - // pull interacts with underlying storage directly so fetches ciphertext - let ciphertext = await hoard.pull({Address: statInfo.Address}); - console.log(ciphertext); - let address = await hoard.push(ciphertext); - console.log(address); - - // A plaintext grant allows us to reference the reference without - // encryption for ease of later retrieval - let plaintextAndGrantSpec = { - Plaintext: plaintextIn, - GrantSpec: { - Plaintext: {} - } - }; - - grant = await hoard.putseal(plaintextAndGrantSpec); - console.log(hoard.base64ify(grant)); - - // We can get the plaintext back by `unsealget`ing the grant - plaintext = await hoard.unsealget(grant); - console.log('Plaintext (Grant): ' + plaintext.Data.toString()); - - // A symmetric grant allows us to encrypt the reference - // through secrets configured on the hoard daemon - plaintextAndGrantSpec = { - Plaintext: plaintextIn, - GrantSpec: { - Symmetric: { - PublicID: Buffer.from('test', 'utf8') - } - } - }; - - grant = await hoard.putseal(plaintextAndGrantSpec); - - // Convert to string and back again - grant = JSON.stringify(hoard.base64ify(grant)); - console.log(grant); - grant = JSON.parse(grant); - console.log(grant); - - plaintext = await hoard.unsealget(grant); - console.log('Plaintext (Grant): ' + plaintext.Data.toString()); - - let addr = await hoard.unsealdelete(grant) - console.log('Deleted address: ' + addr.Address.toString('hex')) - - plaintextAndGrantSpecAndMeta = { - Meta: { - Name: "test" - }, - PlaintextAndGrantSpec: { - Plaintext: plaintextIn, - GrantSpec: { - Plaintext: {} - } - } - }; - - grant = await hoard.upload(plaintextAndGrantSpecAndMeta); - console.log(grant); - - plaintextAndMeta = await hoard.download(grant); - console.log(plaintextAndMeta); + try { + let plaintext = {} + let ref + let grant + + // Both the address and secret key are a deterministic function of the + // data and the salt (the plaintext). You need the salt and secret key + // to decrypt (or get). + // Put the plaintext in storage + let stream = await hoard.put() + stream.write(plaintextIn) + ref = await stream.close() + // (Base64 should be standard text representation for address, secretKey, and salt) + console.log(base64ify(ref)) + // We can get the plaintext back by `get`ing the grant + stream = hoard.get(ref) + stream.on('data', pt => Object.assign(plaintext, pt)) + await stream.wait() + console.log('Plaintext (Reference): ' + plaintext.Data.toString()) + + // This time we'll just encrypt and ask for the result rather than storing it + stream = hoard.encrypt() + stream.write(plaintext) + const refAndCiphertext = await stream.close() + // We get a 'hypothetical' reference (since it is not stored) and the ciphertext itself + console.log(base64ify(refAndCiphertext)) + // decrypt is our inverse + // We can also use the readAll helper that by default will use the first object as accumulator + plaintext = await read(hoard.decrypt(refAndCiphertext), Object.assign) + console.log('Plaintext (Decrypted): ' + plaintext.Data.toString()) + + // Put it back to get a reference + // we can use writeAll to write a number of component objects (or just one) to a stream then close + ref = await write(hoard.put(), plaintext) + // We can ask for file information (we could have just provided the grant here, but address is all that is needed) + const statInfo = await hoard.stat({ Address: ref.Address }) + console.log(statInfo) + // Note that all arguments take an object, representing the message, so 'address' is {address: address} + // pull interacts with underlying storage directly so fetches ciphertext + const ciphertext = await read(hoard.pull({ Address: statInfo.Address }), Object.assign) + console.log(ciphertext) + const address = await write(hoard.push(), ciphertext) + console.log(address) + + // A plaintext grant allows us to reference the reference without + // encryption for ease of later retrieval + let plaintextAndGrantSpec = { + Plaintext: plaintextIn, + GrantSpec: { + Plaintext: {} + } } - catch (err) { - console.log(err); - process.exit(1); + + grant = await write(hoard.putSeal(), plaintextAndGrantSpec) + console.log(base64ify(grant)) + + // We can get the plaintext back by `unsealget`ing the grant + plaintext = await read(hoard.unsealGet(grant), Object.assign) + console.log('Plaintext (Grant): ' + plaintext.Data.toString()) + + // A symmetric grant allows us to encrypt the reference + // through secrets configured on the hoard daemon + plaintextAndGrantSpec = { + Plaintext: plaintextIn, + GrantSpec: { + Symmetric: { + PublicID: Buffer.from('testing-id', 'utf8') + } + } + } + + grant = await write(hoard.putSeal(), plaintextAndGrantSpec) + + // Convert to string and back again + grant = JSON.stringify(base64ify(grant)) + console.log(grant) + grant = JSON.parse(grant) + console.log(grant) + + plaintext = await read(hoard.unsealGet(grant), Object.assign) + console.log('Plaintext (Grant): ' + plaintext.Data.toString()) + + const addr = await hoard.unsealDelete(grant) + console.log('Deleted address: ' + addr.Address.toString('hex')) + + const plaintextAndGrantSpecAndMeta = { + Meta: { + Name: 'test' + }, + PlaintextAndGrantSpec: { + Plaintext: plaintextIn, + GrantSpec: { + Plaintext: {} + } + } } -}; + + grant = await write(hoard.upload(), plaintextAndGrantSpecAndMeta) + console.log(grant) + + const plaintextAndMeta = await read(hoard.download(grant), Object.assign) + console.log(plaintextAndMeta) + } catch (err) { + console.log(err) + process.exit(1) + } +} exports.example = example diff --git a/hoard-js/index.js b/hoard-js/index.js index c722a7c9..819c88d1 100644 --- a/hoard-js/index.js +++ b/hoard-js/index.js @@ -1,324 +1,325 @@ 'use strict' const path = require('path') +const { Transform } = require('stream') -const LOCAL_PATH = path.join(__dirname, './protobuf'); -const PROTO_PATH = path.join(__dirname, '../protobuf'); -const PROTO_FILE = 'api.proto'; +const LOCAL_PATH = path.join(__dirname, './protobuf') +const PROTO_PATH = path.join(__dirname, '../protobuf') +const PROTO_FILE = 'api.proto' -const protoLoader = require('@grpc/proto-loader'); +const DEFAULT_CHUNK_SIZE = 2 ** 16 + +const protoLoader = require('@grpc/proto-loader') const grpc = require('grpc') const options = { - keepCase: true, - longs: String, - enums: String, - defaults: true, - oneofs: true, - includeDirs: [ - LOCAL_PATH, PROTO_PATH - ] + keepCase: true, + longs: String, + enums: String, + defaults: true, + oneofs: true, + includeDirs: [ + LOCAL_PATH, PROTO_PATH + ] } -const packageDefinition = protoLoader.loadSync(PROTO_FILE, options); - -const HoardClient = function () {}; - -// HoardClient uses dynamic types and mapping -const HoardClientDynamic = function (address) { - const hoard_proto = grpc.loadPackageDefinition(packageDefinition).api; - this.cleartextClient = new hoard_proto.Cleartext(address, - grpc.credentials.createInsecure()); - this.encryptionClient = new hoard_proto.Encryption(address, - grpc.credentials.createInsecure()); - this.storageClient = new hoard_proto.Storage(address, - grpc.credentials.createInsecure()); - this.grantClient = new hoard_proto.Grant(address, - grpc.credentials.createInsecure()); - this.documentClient = new hoard_proto.Document(address, - grpc.credentials.createInsecure()); - this.chunkSize = 64 * 1024; -}; - -HoardClient.prototype.get = function (reference) { - const client = this.cleartextClient; - return new Promise(function (resolve, reject) { - const call = client.get(reference); - getPlaintext(call, resolve, reject); - }); -}; - -HoardClient.prototype.put = function (plaintext) { - const client = this.cleartextClient; - const size = this.chunkSize; - return new Promise(function (resolve, reject) { - const call = client.put(function(error, reference) { - if (error) { - reject(error); - } else { - resolve(reference); - } - }); - putPlaintext(call, plaintext, size); - call.end(); - }); -}; - -HoardClient.prototype.unsealget = function (grant) { - const client = this.grantClient; - return new Promise(function (resolve, reject) { - const call = client.unsealGet(grant); - getPlaintext(call, resolve, reject); - }); -}; - -HoardClient.prototype.unsealdelete = function (grant) { - const client = this.grantClient; - return new Promise(function (resolve, reject) { - client.unsealDelete(grant, function (err, address) { - if (err) { - reject(err); - } else { - resolve(address); - } - }); - }); -}; - -HoardClient.prototype.putseal = function (plaintextAndGrantSpec) { - const client = this.grantClient; - const size = this.chunkSize; - return new Promise(function (resolve, reject) { - const call = client.putSeal(function(error, grant) { - if (error) { - reject(error); - } else { - resolve(grant); - } - }); - - const spec = plaintextAndGrantSpec.GrantSpec; - const salt = plaintextAndGrantSpec.Plaintext.Salt; - const data = plaintextAndGrantSpec.Plaintext.Data; - - call.write({GrantSpec: spec}); - call.write({Plaintext: {Salt: salt}}); - for (var i=0; idata.length) { - call.write({Plaintext: {Data: data.slice(i, data.length)}}); - } else { - call.write({Plaintext: {Data: data.slice(i, i+size)}}); - } - } - call.end(); - }); -}; - -HoardClient.prototype.encrypt = function (plaintext) { - const client = this.encryptionClient; - const size = this.chunkSize; - return new Promise(function (resolve, reject) { - const call = client.encrypt(function(error, referenceAndCiphertext) { - if (error) { - reject(error); - } else { - resolve(referenceAndCiphertext); - } - }); - putPlaintext(call, plaintext, size); - call.end(); - }); -}; - -HoardClient.prototype.decrypt = function (referenceAndCiphertext) { - const client = this.encryptionClient; - return new Promise(function (resolve, reject) { - const call = client.decrypt(referenceAndCiphertext); - getPlaintext(call, resolve, reject); - }); -}; - -HoardClient.prototype.push = function (ciphertext) { - const client = this.storageClient; - const size = this.chunkSize; - return new Promise(function (resolve, reject) { - const call = client.push(function(error, address) { - if (error) { - reject(error); - } else { - resolve(address); - } - }); - const data = ciphertext.EncryptedData; - for (var i=0; idata.length) { - call.write({EncryptedData: data.slice(i, data.length)}); - } else { - call.write({EncryptedData: data.slice(i, i+size)}); - } - } - call.end(); - }); -}; - -HoardClient.prototype.pull = function (address) { - const client = this.storageClient; - return new Promise(function (resolve, reject) { - const call = client.pull(address); - - var ciphertext = {EncryptedData: Buffer.alloc(0)}; - call.on('data', function(data) { - ciphertext.EncryptedData = Buffer.concat([ciphertext.EncryptedData, data.EncryptedData]); - }); - - call.on('error', function(e) { - reject(e); - }); - - call.on('end', function() { - resolve(ciphertext); - }); - }); -}; - -HoardClient.prototype.delete = function (address) { - const client = this.storageClient; - return new Promise(function (resolve, reject) { - client.delete(address, function (err, address) { - if (err) { - reject(err); - } else { - resolve(address); - } - }); - }); -}; - -HoardClient.prototype.stat = function (address) { - const client = this.storageClient; - return new Promise(function (resolve, reject) { - client.stat(address, function (err, statInfo) { - if (err) { - reject(err); - } else { - resolve(statInfo); - } - }); - }); -}; - -HoardClient.prototype.upload = function (plaintextAndGrantSpecAndMeta) { - const client = this.documentClient; - const size = this.chunkSize; - return new Promise(function (resolve, reject) { - const call = client.upload(function(error, grant) { - if (error) { - reject(error); - } else { - resolve(grant); - } - }); - - const meta = plaintextAndGrantSpecAndMeta.Meta; - const document = plaintextAndGrantSpecAndMeta.PlaintextAndGrantSpec; - const spec = document.GrantSpec; - const data = document.Plaintext.Data; - const salt = document.Plaintext.Salt; - - call.write({Meta: meta}); - call.write({PlaintextAndGrantSpec: {GrantSpec: spec}}); - call.write({PlaintextAndGrantSpec: {Plaintext: {Salt: salt}}}); - for (var i=0; idata.length) { - call.write({PlaintextAndGrantSpec: {Plaintext: {Data: data.slice(i, data.length)}}}); - } else { - call.write({PlaintextAndGrantSpec: {Plaintext: {Data: data.slice(i, i+size)}}}); - } +function isIterable (obj) { + return typeof Object(obj)[Symbol.iterator] === 'function' +} + +const packageDefinition = protoLoader.loadSync(PROTO_FILE, options) + +function Client (hoardURL) { + if (!hoardURL) { + throw new Error('Hoard Client requires the hoardURL be passed to the constructor') + } + const self = this + const api = grpc.loadPackageDefinition(packageDefinition).api + + function lowerCamel (str) { + return str.charAt(0).toLowerCase() + str.slice(1) + } + + // Promisifies GRPC methods - should work with unary calls and client-side, server-side, and bidirectional streams + function promisify (serviceClient, methodName) { + const method = serviceClient[methodName].bind(serviceClient) + const { requestStream, responseStream } = serviceClient.$method_definitions[methodName] + + return (...args) => { + // Capture streamOrValue from inside promise + let streamOrValue + + const promise = new Promise((resolve, reject) => { + // Call the GRPC method + streamOrValue = method(...[...args, (error, value) => error ? reject(error) : resolve(value)]) + streamOrValue.on('error', err => err.code === grpc.status.CANCELLED ? resolve(err) : reject(err)) + streamOrValue.on('close', () => resolve()) + streamOrValue.on('end', () => resolve()) + }) + + if (!requestStream && !responseStream) { + // method is unary + // Caller just needs to wait until their callback will not longer be called + return promise + } + + // requestStream === true => method is client-side or bi-directional streaming... + // Override end function to return the result promise after calling original end + streamOrValue.close = (...endArgs) => { + // Server-side stream + if (requestStream) { + streamOrValue.end(...endArgs) } - call.end(); - }); -}; - -HoardClient.prototype.download = function (grant) { - const client = this.documentClient; - return new Promise(function (resolve, reject) { - const call = client.download(grant); - - var plaintextAndMeta = { - Meta: {}, - Plaintext: { - Salt: Buffer.alloc(0), - Data: Buffer.alloc(0), - } - }; - - call.on('data', function(data) { - if (data.input == 'Meta') { - plaintextAndMeta.Meta = data.Meta; - } else if (data.input == 'Plaintext') { - if (data.Plaintext.input == 'Salt') { - plaintextAndMeta.Plaintext.Salt = Buffer.concat([plaintextAndMeta.Plaintext.Salt, data.Plaintext.Salt]); - } else if (data.Plaintext.input == 'Data') { - plaintextAndMeta.Plaintext.Data = Buffer.concat([plaintextAndMeta.Plaintext.Data, data.Plaintext.Data]); - } - } - }); - - call.on('error', function(e) { - reject(e); - }); - - call.on('end', function() { - resolve(plaintextAndMeta); - }); - }); -}; - - -// Walk over the given object and base64 encode any buffers -HoardClient.prototype.base64ify = function (obj) { - let newObj = {}; - for (let key of Object.keys(obj)) { - let value = obj[key]; - if (value instanceof Buffer) { - newObj[key] = value.toString(`base64`) - } else { - newObj[key] = value + // client-side stream + if (responseStream) { + streamOrValue.cancel() } + return promise + } + + streamOrValue.wait = () => promise + // Maintain consistent promise return + return streamOrValue } - return newObj; -}; - -function putPlaintext(call, plaintext, size) { - call.write({Salt: plaintext.Salt}) - const data = plaintext.Data; - for (var i=0; idata.length) { - call.write({Data: data.slice(i, data.length)}); - } else { - call.write({Data: data.slice(i, i+size)}); - } + } + + // GRPC service definitions to include on Hoard client + const ServiceClients = [ + api.Cleartext, + api.Encryption, + api.Storage, + api.Grant, + api.Document + ] + // Smoosh all the methods from different services together + for (const ServiceClient of ServiceClients) { + const client = new ServiceClient(hoardURL, grpc.credentials.createInsecure()) + + for (const methodName of Object.keys(client.$method_definitions)) { + // Create an async version of each function and add it to the mono client + self[lowerCamel(methodName)] = promisify(client, methodName) } + } } -function getPlaintext(call, resolve, reject) { - var plaintext = {Data: Buffer.alloc(0), Salt: Buffer.alloc(0)}; - call.on('data', function(data) { - if (data.input == 'Salt') { - plaintext.Salt = Buffer.concat([plaintext.Salt, data.Salt]); - } else if (data.input == 'Data') { - plaintext.Data = Buffer.concat([plaintext.Data, data.Data]); - } - }); +function Plaintext (data, salt) { + const newBuffer = d => d ? Buffer.from(d) : Buffer.alloc(0) + const msg = { + Data: newBuffer(data), + Salt: newBuffer(salt) + } + + // Generate chunks of Plaintext suitable for streaming + msg.chunks = function * (chunkSize = DEFAULT_CHUNK_SIZE) { + let data = Buffer.from(msg.Data) + yield { Salt: msg.Salt } + while (data.length > 0) { + yield { Data: data.slice(0, chunkSize) } + data = data.slice(chunkSize) + } + } - call.on('error', function(e) { - reject(e); - }); + return msg +} - call.on('end', function() { - resolve(plaintext); - }); +Plaintext.reduce = function (acc, val) { + return { + Salt: acc.Salt.length ? acc.Salt : val.Salt, + Data: Buffer.concat([acc.Data, val.Data]) + } } -HoardClientDynamic.prototype = Object.create(HoardClient.prototype); -module.exports.Client = HoardClientDynamic; +function PlaintextAndGrantSpec (spec, data, salt) { + const msg = { + Plaintext: Plaintext(data, salt), + GrantSpec: spec + } + + msg.chunks = function * (chunkSize = DEFAULT_CHUNK_SIZE) { + yield { GrantSpec: msg.GrantSpec } + for (const pt of msg.Plaintext.chunks(chunkSize)) { + yield { Plaintext: pt } + } + } + + return msg +} + +PlaintextAndGrantSpec.reduce = function (acc, val) { + return { + Plaintext: acc.Plaintext.merge(val.Plaintext), + GrantSpec: acc.GrantSpec || val.GrantSpec + } +} + +// Converts an object mode stream to a byte mode stream selecting a single buffer from the source using dataSelector +// and buffering bytes in chunks of at chunkSize +const BufferTransform = (bufferFromInput = msg => msg.Data, bufferToOutput = buf => buf, + chunkSize = DEFAULT_CHUNK_SIZE, transformOptions = {}) => { + let buffer = Buffer.alloc(0) + + const push = (transform, buffer) => { + if (!transform._readableState.ended) { + transform.push(bufferToOutput(buffer)) + } + } + + const transform = new Transform({ + autoDestroy: true, + transform (msg, encoding, callback) { + buffer = Buffer.concat([buffer, bufferFromInput(msg)]) + if (buffer.length > chunkSize) { + push(this, buffer.slice(0, chunkSize)) + buffer = buffer.slice(chunkSize) + } + callback() + }, + + flush (callback) { + push(this, buffer) + callback() + }, + ...transformOptions + }) + + transform.on('unpipe', src => { + // Make sure we cancel any GRPC stream + if (typeof src.cancel === 'function') { + src.cancel() + } + }) + return transform +} + +const BytesToObjects = (bufferToObject = buf => Plaintext(buf), chunkSize = DEFAULT_CHUNK_SIZE) => + BufferTransform(msg => msg, bufferToObject, chunkSize, + { readableObjectMode: true, writableObjectMode: false }) + +// Converts an object mode stream to a byte mode stream selecting a single buffer from the source using dataSelector +// and buffering bytes in chunks of at chunkSize +const ObjectsToBytes = (bufferSelector = msg => msg.Data, chunkSize = DEFAULT_CHUNK_SIZE) => + BufferTransform(bufferSelector, msg => msg, chunkSize, + { readableObjectMode: false, writableObjectMode: true }) + +async function write (stream, messages) { + if (isIterable(messages)) { + for (const msg of messages) { + stream.write(msg) + } + } else { + stream.write(messages) + } + return stream.close() +} + +// Read takes a server streaming function and calls it with the args provided having extracted the reducer and optional +// initial accumulator from the final one or two arguments. The reducer must be supplied. If the final argument is +// a function it is used as the reducer otherwie the final argument is taken to be the initial accumulator value. +// The reducer is a function (acc, val, returnNow) => newAcc where returnNow constructs an early-exiting termination +// value when called like (acc, val, returnNow) => returnNow(newAcc) which causes the read fucntion to return with +// newAcc and cancel() (if available - i.e. GRPC stream) or destroy() the stream. +async function read (stream, ...args) { + if (args.length < 1) { + throw new Error('reduce expects at least one reducer function argument') + } + let accumulator + let reducer = args.pop() + + // Try last argument as reducer + if (typeof reducer !== 'function') { + if (args.length < 1) { + throw new Error(`reduce expects at least one callback argument but last argument is ${JSON.stringify(reducer)}`) + } + // assume last argument is in fact the initial accumulator value + accumulator = reducer + reducer = args.pop() + // penultimate argument must now be the reducer + if (typeof reducer !== 'function') { + throw new Error(`reduce expects a reducer function but penultimate argument is ${JSON.stringify(reducer)}`) + } + } + + // Provide function that performs early exit + const returnNow = ret => { + // Cancel the stream but defer until next tick to avoid write after end from upstream + process.nextTick(() => { + if (typeof stream.cancel === 'function') { + stream.cancel() + } else { + stream.destroy() + } + }) + // Scheduling variation in event loops means that we may receive messages after cancel, so prevent them from + // having any effect by making reducer the identity function + reducer = acc => acc + // Return the wrapped value as the final return value of the reducer + return ret + } + + return new Promise((resolve, reject) => { + stream.on('data', data => { + if (accumulator === undefined) { + accumulator = data + } else { + accumulator = reducer(accumulator, data, returnNow) + } + }) + // Allow us (the client) to cancel mid-stream without throwing + stream.on('error', err => err.code === grpc.status.CANCELLED ? resolve(accumulator) : reject(err)) + stream.on('close', () => resolve(accumulator)) + stream.on('end', () => resolve(accumulator)) + }) +} + +function reduceLengthPrefixed (byteLength) { + let length = 0 + return (buffer, data, returnNow) => { + // Grow the buffer + buffer = Buffer.concat([buffer, data]) + // First try to read the length prefix + if (length === 0) { + if (buffer.length >= byteLength) { + length = buffer.readUIntBE(0, byteLength) + buffer = buffer.slice(byteLength) + } + } + if (length > 0 && buffer.length >= length) { + // If we have read the length prefix and it is contained within + // our current buffer then we are done + return returnNow(buffer.slice(0, length)) + } + // Keep growing the buffer until it contains sufficient data + return buffer + } +} + +// Reads from the provided byteStream until a varint length-prefixed prefix of the stream can be returned. +// The stream will be destroyed once the prefix has been read so will not be totally consumed +async function readLengthPrefixed (byteStream, byteLength) { + return read(byteStream, reduceLengthPrefixed(byteLength), Buffer.alloc(0)) +} + +function base64ify (obj) { + const newObj = {} + for (const key of Object.keys(obj)) { + const value = obj[key] + if (value instanceof Buffer) { + newObj[key] = value.toString('base64') + } else { + newObj[key] = value + } + } + return newObj +} + +module.exports = { + Client, + ObjectsToBytes, + BytesToObjects, + read, + write, + readLengthPrefixed, + base64ify, + Plaintext, + PlaintextAndGrantSpec +} diff --git a/hoard-js/test/examples.js b/hoard-js/test/examples.js index 76c1fe1e..99d254f2 100644 --- a/hoard-js/test/examples.js +++ b/hoard-js/test/examples.js @@ -1,20 +1,20 @@ -const example = require("../examples") +const example = require('../examples') describe('Examples should run', function () { - it('buffer based plaintext', async function () { - let plaintext = { - Data: Buffer.from('some stuff', 'utf8'), - Salt: Buffer.from('foo', 'ascii') - }; - let result = await example.example(plaintext) - console.log(result) - }); - it('base64 based plaintext', async function () { - let plaintext = { - Data: Buffer.from('some stuff', 'utf8').toString('base64'), - Salt: Buffer.from('foo', 'ascii').toString('base64') - }; - let result = await example.example(plaintext) - console.log(result) - }); -}); \ No newline at end of file + it('buffer based plaintext', async function () { + const plaintext = { + Data: Buffer.from('some stuff', 'utf8'), + Salt: Buffer.from('foo', 'ascii') + } + const result = await example.example(plaintext) + console.log(result) + }) + it('base64 based plaintext', async function () { + const plaintext = { + Data: Buffer.from('some stuff', 'utf8').toString('base64'), + Salt: Buffer.from('foo', 'ascii').toString('base64') + } + const result = await example.example(plaintext) + console.log(result) + }) +}) diff --git a/hoard-js/test/fixtures.js b/hoard-js/test/fixtures.js new file mode 100644 index 00000000..79ccf872 --- /dev/null +++ b/hoard-js/test/fixtures.js @@ -0,0 +1,34 @@ +/* eslint-disable no-tabs */ +const LONG_TEXT = `La testimonianza degli scrittori arabi al par che de’ diplomi cristiani + /della Sicilia intorno Giorgio di Antiochia, conferma l’autorità civile + delli ammiragli, che che si pensi de’ miei supposti su l’origine sua. + Questa particolarità del diritto pubblico siciliano alla quale si è + badato assai poco fin qui, ci aiuta a comprendere le vicissitudini + dello Stato sotto i due Guglielmi, assai meglio che non faremmo col + mero ordinamento dei sette grandi ufizii della Corona,[48] supponendo + col Gregorio, che fosse stato fin da’ tempi di re Ruggiero qual si + ritrae negli ultimi di Guglielmo il Buono, e che l’autorità di quegli + ufizii si fosse estesa a tutti i sudditi, cristiani o musulmani. Erano + gli elementi dell’azienda musulmana che tornavano a galla quando + fu ristorata l’antica capitale. E dico delle istituzioni ed anco + degli uomini. Guerrieri che avessero seguito in Terraferma il primo + conte, uomini di mare, giuristi, segretarii, mercatanti, pedagoghi, + camerieri; qual più qual meno caritatevoli, dissoluti e picchiapetto; + bilingui e trilingui, barcheggianti tra due o tre religioni, versati + nella letteratura arabica e nella scienza greca, dilettanti dell’arte + bizantina e delle forme che prese in Siria, in Egitto o in Spagna: tali + mi sembrano que’ Musulmani e Greci di Sicilia che la novella corte + attirava, senza volerlo, nel castel di sopra di Palermo, insieme co’ + Levantini della tempra di Giorgio e coi prelati, i chierici e i nobili + d’Italia e di Francia. Que’ costumi dissonanti s’armonizzaron pure un + gran pezzo e produssero, nel corso del duodecimo secolo, due grandi +Statisti: orfani entrambi, maturati precocemente tra le agitazioni + della corte di Palermo, somiglianti anco l’uno all’altro per tempra e + cultura dell’intelletto, legislatori, buon massai, vaghi d’ogni scienza + e filosofi più che cristiani: Ruggiero primo re e Federigo secondo + imperatore; i due sultani battezzati di Sicilia, a’ quali l’Italia dee + non piccola parte dell’incivilimento suo.` + +module.exports = { + LONG_TEXT +} diff --git a/hoard-js/test/grants.js b/hoard-js/test/grants.js index d7ca1c2a..126277d7 100644 --- a/hoard-js/test/grants.js +++ b/hoard-js/test/grants.js @@ -1,43 +1,79 @@ -const Hoard = require('../index.js'); -const assert = require('assert'); +const { Readable } = require('stream') +const Hoard = require('../index.js') +const assert = require('assert') +const fixtures = require('./fixtures') describe('Should be able to store plaintext under symmetric grant', function () { - it('valid secret id', async function () { - let text = 'some stuff' - let salt = 'salty' - let plaintextAndGrantSpec = { - Plaintext: { - Data: Buffer.from(text, 'utf8').toString('base64'), - Salt: Buffer.from(salt, 'utf8').toString('base64') - }, - GrantSpec: { - Symmetric: { - PublicID: "test" - } - } - } - let hoard = new Hoard.Client('localhost:53431'); - let grant = await hoard.putseal(plaintextAndGrantSpec) - let decrypted = await hoard.unsealget(grant) - assert.strictEqual(decrypted.Data.toString('utf8'), text) - assert.strictEqual(decrypted.Salt.toString('utf8'), salt) - }); - - it('invalid secret id', async function () { - let text = 'some stuff' - let plaintextAndGrantSpec = { - Plaintext: { - Data: Buffer.from(text, 'utf8').toString('base64'), - Salt: Buffer.from('foo', 'ascii').toString('base64') - }, - GrantSpec: { - Symmetric: { - PublicID: "bad-public-ID" - } - } - } - let hoard = new Hoard.Client('localhost:53431'); - assert.rejects(() => hoard.putseal(plaintextAndGrantSpec), Error, - "should fail when PublicID id not known to Hoard"); - }); -}); + const hoard = new Hoard.Client('localhost:53431') + + it('valid secret id', async function () { + const text = 'some stuff' + const salt = 'salty' + const spec = { Symmetric: { PublicID: 'testing-id' } } + + const plaintextAndGrantSpec = Hoard.PlaintextAndGrantSpec(spec, text, salt) + const grant = await Hoard.write(hoard.putSeal(), plaintextAndGrantSpec) + const decrypted = await Hoard.read(hoard.unsealGet(grant), Hoard.Plaintext.reduce) + assert.strictEqual(decrypted.Data.toString('utf8'), text) + assert.strictEqual(decrypted.Salt.toString('utf8'), salt) + }) + + it('rejects invalid secret id', async function () { + const text = 'some stuff' + const spec = { Symmetric: { PublicID: 'bad-public-ID' } } + const plaintextAndGrantSpec = Hoard.PlaintextAndGrantSpec(spec, text, 'foo') + // NOTE: we have no assert.rejects in node 9.7.1 which we currently need to support + Hoard.write(hoard.putSeal, plaintextAndGrantSpec) + .then(() => assert.fail('should fail when PublicID id not known to Hoard')) + .catch(() => {}) // good + }) + + it('writes and reads stream', async () => { + const veryLongText = fixtures.LONG_TEXT.repeat(200) + const spec = { Symmetric: { PublicID: 'testing-id' } } + const grt = await Hoard.write(hoard.putSeal(), Hoard.PlaintextAndGrantSpec(spec, veryLongText).chunks(100)) + const pt = await Hoard.read(hoard.unsealGet(grt), Hoard.Plaintext.reduce) + assert.strictEqual(pt.Data.toString(), veryLongText) + }).timeout(5000) + + it('can stop reading a stream early', async () => { + const veryLongText = fixtures.LONG_TEXT.repeat(1000) + const spec = { Symmetric: { PublicID: 'testing-id' } } + const grt = await Hoard.write(hoard.putSeal(), Hoard.PlaintextAndGrantSpec(spec, veryLongText, 'salt').chunks()) + + const firstN = 14 + const pts = await Hoard.read(hoard.unsealGet(grt), (acc, val, returnNow) => + (acc.length < firstN) ? [...acc, val] : returnNow(acc) + , []) + assert.strictEqual(pts.length, firstN) + }) + + it('transforms bytes', async () => { + const veryLongText = fixtures.LONG_TEXT.repeat(100) + const spec = { Symmetric: { PublicID: 'testing-id' } } + const grt = await Hoard.write(hoard.putSeal(), Hoard.PlaintextAndGrantSpec(spec, veryLongText).chunks(100)) + const stream = hoard.unsealGet(grt) + const ts = stream.pipe(Hoard.ObjectsToBytes()) + + const bytesToRead = 100 + let bs + ts.on('readable', () => { + bs = ts.read(bytesToRead) + stream.close() + }) + await stream.wait() + assert.strictEqual(bs.length, bytesToRead) + }) + + it('can read length prefixed value', async () => { + // 5 is the single-byte length prefix, [1,2,3,4,5] should be value extracted + const vals = [5, 1, 2, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 7, 8, 8, 6, 4, 4] + const stream = new Readable({ objectMode: true }) + vals.map(v => ({ Data: Buffer.from([v]) })).forEach(v => stream.push(v)) + stream.push(null) + const plaintextStream = stream.pipe(Hoard.ObjectsToBytes(msg => msg.Data, 2)) + const bs = await Hoard.readLengthPrefixed(plaintextStream, 1) + const expected = Buffer.from(vals.slice(1, vals[0] + 1)) + assert(bs.equals(expected), `readLengthPrefixed should read ${expected} but got ${bs}`) + }) +}) diff --git a/hoard.go b/hoard.go index dec05090..a35be3f2 100644 --- a/hoard.go +++ b/hoard.go @@ -4,11 +4,11 @@ import ( "crypto/sha256" "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/encryption" - "github.com/monax/hoard/v6/grant" - "github.com/monax/hoard/v6/reference" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/encryption" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/reference" + "github.com/monax/hoard/v7/stores" ) type EncryptionService interface { diff --git a/hoard_service.go b/hoard_service.go deleted file mode 100644 index 168869a1..00000000 --- a/hoard_service.go +++ /dev/null @@ -1,344 +0,0 @@ -package hoard - -import ( - "context" - "io" - - "github.com/monax/hoard/v6/api" - "github.com/monax/hoard/v6/grant" - "github.com/monax/hoard/v6/reference" - "github.com/monax/hoard/v6/stores" -) - -// Here we implement the GRPC Hoard service. It should mostly be plumbing to -// a DeterministicEncryptedStore (for which hoard.hoard is the canonical example) -// and also to Grants. -type hoardService struct { - gs GrantService - cs int -} - -func NewHoardServer(gs GrantService, chunkSize int) *hoardService { - return &hoardService{ - gs: gs, - cs: chunkSize, - } -} - -func (service *hoardService) Get(ref *reference.Ref, srv api.Cleartext_GetServer) error { - data, err := service.gs.Get(ref) - if err != nil { - return err - } - - return SendPlaintext(srv, data, ref.Salt, service.cs) -} - -func (service *hoardService) Put(srv api.Cleartext_PutServer) error { - data, salt, err := ReceivePlaintext(srv) - if err != nil { - return err - } - ref, err := service.gs.Put(data, salt) - if err != nil { - return err - } - return srv.SendAndClose(ref) -} - -func (service *hoardService) Encrypt(srv api.Encryption_EncryptServer) error { - data, salt, err := ReceivePlaintext(srv) - if err != nil { - return err - } - - ref, encryptedData, err := service.gs.Encrypt(data, salt) - if err != nil { - return err - } - - return srv.SendAndClose(&api.ReferenceAndCiphertext{ - Reference: ref, - Ciphertext: &api.Ciphertext{ - EncryptedData: encryptedData, - }, - }) -} - -func (service *hoardService) Decrypt(refAndCiphertext *api.ReferenceAndCiphertext, srv api.Encryption_DecryptServer) error { - data, err := service.gs.Decrypt(refAndCiphertext.Reference, refAndCiphertext.Ciphertext.EncryptedData) - if err != nil { - return err - } - - return SendPlaintext(srv, data, refAndCiphertext.Reference.GetSalt(), service.cs) -} - -// StorageServer -func (service *hoardService) Push(srv api.Storage_PushServer) error { - data, err := ReceiveCiphertext(srv) - if err != nil { - return err - } - - address, err := service.gs.Store().Put(data) - if err != nil { - return err - } - - return srv.SendAndClose(&api.Address{ - Address: address, - }) -} - -func (service *hoardService) Pull(address *api.Address, srv api.Storage_PullServer) error { - // Get from the underlying store - data, err := service.gs.Store().Get(address.Address) - if err != nil { - return err - } - - return SendCiphertext(srv, data, service.cs) - -} - -func (service *hoardService) Delete(ctx context.Context, addr *api.Address) (*api.Address, error) { - return addr, service.gs.Store().Delete(addr.Address) -} - -func (service *hoardService) Stat(ctx context.Context, address *api.Address) (*stores.StatInfo, error) { - statInfo, err := service.gs.Store().Stat(address.Address) - if err != nil { - return nil, err - } - // For the master API we provide the address and the canonical - // location in a StatInfo message - statInfo.Address = address.Address - statInfo.Location = service.gs.Store().Location(address.Address) - return statInfo, nil -} - -// GrantServer - -func (service *hoardService) Seal(ctx context.Context, arg *api.ReferenceAndGrantSpec) (*grant.Grant, error) { - return service.gs.Seal(arg.Reference, arg.GrantSpec) -} - -func (service *hoardService) Unseal(ctx context.Context, grt *grant.Grant) (*reference.Ref, error) { - return service.gs.Unseal(grt) -} - -func (service *hoardService) Reseal(ctx context.Context, arg *api.GrantAndGrantSpec) (*grant.Grant, error) { - ref, err := service.gs.Unseal(arg.Grant) - if err != nil { - return nil, err - } - return service.gs.Seal(ref, arg.GrantSpec) -} - -func (service *hoardService) PutSeal(srv api.Grant_PutSealServer) error { - data, salt, spec, err := ReceivePlaintextAndGrantSpec(srv) - if err != nil { - return err - } - - ref, err := service.gs.Put(data, salt) - if err != nil { - return err - } - - grant, err := service.gs.Seal(ref, spec) - if err != nil { - return err - } - - return srv.SendAndClose(grant) -} - -func (service *hoardService) UnsealGet(grt *grant.Grant, srv api.Grant_UnsealGetServer) error { - ref, err := service.gs.Unseal(grt) - if err != nil { - return err - } - - data, err := service.gs.Get(ref) - if err != nil { - return err - } - - return SendPlaintext(srv, data, ref.Salt, service.cs) -} - -func (service *hoardService) UnsealDelete(ctx context.Context, grt *grant.Grant) (*api.Address, error) { - ref, err := service.gs.Unseal(grt) - if err != nil { - return nil, err - } - return service.Delete(ctx, &api.Address{Address: ref.Address}) -} - -type PlaintextReceiver interface { - Recv() (*api.Plaintext, error) -} - -func ReceivePlaintext(srv PlaintextReceiver) ([]byte, []byte, error) { - var data, salt []byte - for { - c, err := srv.Recv() - if err != nil { - if err == io.EOF { - return data, salt, nil - } - - return nil, nil, err - } - - switch x := c.GetInput().(type) { - case *api.Plaintext_Salt: - salt = x.Salt - case *api.Plaintext_Data: - data = append(data, x.Data...) - } - } -} - -type PlaintextSender interface { - Send(*api.Plaintext) error -} - -func SendPlaintext(srv PlaintextSender, data, salt []byte, cs int) error { - out := new(api.Plaintext) - out.Input = &api.Plaintext_Salt{Salt: salt} - err := srv.Send(out) - if err != nil { - return err - } - - for i := 0; i < len(data); i += cs { - if i+cs > len(data) { - out.Input = &api.Plaintext_Data{Data: data[i:len(data)]} - } else { - out.Input = &api.Plaintext_Data{Data: data[i : i+cs]} - } - if err := srv.Send(out); err != nil { - return err - } - } - - return nil -} - -type CiphertextReceiver interface { - Recv() (*api.Ciphertext, error) -} - -func ReceiveCiphertext(srv CiphertextReceiver) ([]byte, error) { - var data []byte - for { - c, err := srv.Recv() - if err != nil { - if err == io.EOF { - return data, nil - } - - return nil, err - } - - data = append(data, c.EncryptedData...) - } -} - -type CiphertextSender interface { - Send(*api.Ciphertext) error -} - -func SendCiphertext(srv CiphertextSender, data []byte, cs int) error { - out := new(api.Ciphertext) - for i := 0; i < len(data); i += cs { - if i+cs > len(data) { - out.EncryptedData = data[i:len(data)] - } else { - out.EncryptedData = data[i : i+cs] - } - if err := srv.Send(out); err != nil { - return err - } - } - - return nil -} - -type PlaintextAndGrantSpecReceiver interface { - Recv() (*api.PlaintextAndGrantSpec, error) -} - -func ReceivePlaintextAndGrantSpec(srv PlaintextAndGrantSpecReceiver) ([]byte, []byte, *grant.Spec, error) { - spec := new(grant.Spec) - var data, salt []byte - for { - g, err := srv.Recv() - if err != nil { - if err == io.EOF { - return data, salt, spec, nil - } - - return nil, nil, nil, err - } - - switch x := g.GetInput().(type) { - case *api.PlaintextAndGrantSpec_Plaintext: - switch y := x.Plaintext.GetInput().(type) { - case *api.Plaintext_Salt: - salt = y.Salt - case *api.Plaintext_Data: - data = append(data, y.Data...) - } - case *api.PlaintextAndGrantSpec_GrantSpec: - spec = x.GrantSpec - } - } -} - -type PlaintextAndGrantSpecSender interface { - Send(*api.PlaintextAndGrantSpec) error -} - -func SendPlaintextAndGrantSpec(srv PlaintextAndGrantSpecSender, spec *grant.Spec, data, salt []byte, cs int) error { - out := new(api.PlaintextAndGrantSpec) - out.Input = &api.PlaintextAndGrantSpec_GrantSpec{GrantSpec: spec} - if err := srv.Send(out); err != nil { - return err - } - - if len(salt) > 0 { - out.Input = &api.PlaintextAndGrantSpec_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Salt{Salt: salt}, - }, - } - if err := srv.Send(out); err != nil { - return err - } - } - - for i := 0; i < len(data); i += cs { - if i+cs > len(data) { - out.Input = &api.PlaintextAndGrantSpec_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Data{Data: data[i:len(data)]}, - }, - } - } else { - out.Input = &api.PlaintextAndGrantSpec_Plaintext{ - Plaintext: &api.Plaintext{ - Input: &api.Plaintext_Data{Data: data[i : i+cs]}, - }, - } - } - if err := srv.Send(out); err != nil { - return err - } - } - - return nil -} diff --git a/hoard_test.go b/hoard_test.go index 17514323..11f49375 100644 --- a/hoard_test.go +++ b/hoard_test.go @@ -4,9 +4,9 @@ import ( "testing" "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/reference" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/reference" + "github.com/monax/hoard/v7/stores" "github.com/stretchr/testify/assert" ) diff --git a/logging/convention.go b/logging/convention.go index 09dc3ecc..b3fa9820 100644 --- a/logging/convention.go +++ b/logging/convention.go @@ -18,7 +18,7 @@ import ( "fmt" "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6/logging/structure" + "github.com/monax/hoard/v7/logging/structure" ) func InfoLogger(logger log.Logger) log.Logger { diff --git a/logging/loggers/vector_valued_logger.go b/logging/loggers/vector_valued_logger.go index 8e82f7ea..ed3cb320 100644 --- a/logging/loggers/vector_valued_logger.go +++ b/logging/loggers/vector_valued_logger.go @@ -16,7 +16,7 @@ package loggers import ( "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6/logging/structure" + "github.com/monax/hoard/v7/logging/structure" ) // Treat duplicate key-values as consecutive entries in a vector-valued lookup diff --git a/logging/metadata.go b/logging/metadata.go index cf9c5eaf..4819f17d 100644 --- a/logging/metadata.go +++ b/logging/metadata.go @@ -19,7 +19,7 @@ import ( "github.com/go-kit/kit/log" "github.com/go-stack/stack" - "github.com/monax/hoard/v6/logging/structure" + "github.com/monax/hoard/v7/logging/structure" ) const ( diff --git a/meta/meta.pb.go b/meta/meta.pb.go index cb68191e..11cc15eb 100644 --- a/meta/meta.pb.go +++ b/meta/meta.pb.go @@ -18,7 +18,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Meta struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` diff --git a/package-lock.json b/package-lock.json index e20d97e1..542c10b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3,13 +3,33 @@ "requires": true, "lockfileVersion": 1, "dependencies": { + "@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "requires": { + "@babel/highlight": "7.5.0" + } + }, + "@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "requires": { + "chalk": "2.4.2", + "esutils": "2.0.3", + "js-tokens": "4.0.0" + } + }, "@grpc/proto-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.1.tgz", - "integrity": "sha512-3y0FhacYAwWvyXshH18eDkUI40wT/uGio7MAegzY8lO5+wVsc19+1A7T0pPptae4kl7bdITL+0cHpnAPmryBjQ==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.3.tgz", + "integrity": "sha512-8qvUtGg77G2ZT2HqdqYoM/OY97gQd/0crSG34xNmZ4ZOsv3aQT/FQV9QfZPazTGna6MIoyUd+u6AxsoZjJ/VMQ==", "requires": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" + "lodash.camelcase": "4.3.0", + "protobufjs": "6.8.8" } }, "@protobufjs/aspromise": { @@ -37,8 +57,8 @@ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/inquire": "1.1.0" } }, "@protobufjs/float": { @@ -66,15 +86,48 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, + "@types/bytebuffer": { + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", + "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", + "requires": { + "@types/long": "4.0.0", + "@types/node": "10.17.6" + } + }, "@types/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, "@types/node": { - "version": "10.14.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.14.tgz", - "integrity": "sha512-xXD08vZsvpv4xptQXj1+ky22f7ZoKu5ZNI/4l+/BXG3X+XaeZsmaFbbTKuhSE3NjjvRuZFxFf9sQBMXIcZNFMQ==" + "version": "10.17.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.6.tgz", + "integrity": "sha512-0a2X6cgN3RdPBL2MIlR6Lt0KlM7fOFsutuXcdglcOq6WvLnYXgPQSh0Mx6tO1KCAE8MxbHSOSTWDoUxRq+l3DA==" + }, + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "dev": true + }, + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "2.0.1", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" + } }, "ansi-colors": { "version": "3.2.3", @@ -82,6 +135,15 @@ "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", "dev": true }, + "ansi-escapes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", + "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "dev": true, + "requires": { + "type-fest": "0.8.1" + } + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -93,7 +155,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.3" } }, "argparse": { @@ -102,7 +164,17 @@ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "sprintf-js": "1.0.3" + } + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true, + "requires": { + "define-properties": "1.1.3", + "es-abstract": "1.16.2" } }, "ascli": { @@ -110,21 +182,29 @@ "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" + "colour": "0.7.1", + "optjs": "3.2.2" } }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -139,7 +219,7 @@ "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", "requires": { - "long": "~3" + "long": "3.2.0" }, "dependencies": { "long": { @@ -149,6 +229,12 @@ } } }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "camelcase": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", @@ -160,9 +246,9 @@ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.5.0" }, "dependencies": { "supports-color": { @@ -171,19 +257,40 @@ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "3.1.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" } }, "code-point-at": { @@ -214,7 +321,14 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true }, "cross-spawn": { "version": "6.0.5", @@ -222,11 +336,11 @@ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "nice-try": "1.0.5", + "path-key": "2.0.1", + "semver": "5.7.1", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "debug": { @@ -235,7 +349,7 @@ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.1" } }, "decamelize": { @@ -243,13 +357,19 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "object-keys": "1.1.1" } }, "diff": { @@ -258,44 +378,57 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "2.0.3" + } + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "once": "^1.4.0" + "is-arrayish": "0.2.1" } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.2.tgz", + "integrity": "sha512-jYo/J8XU2emLXl3OLwfwtuFfuF2w6DYPs+xy9ZfVyPkDcrauu6LYrw/q2TyCtrbc/KUdCiC5e9UajRhgNkVopA==", "dev": true, "requires": { - "es-to-primitive": "^1.2.0", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "is-callable": "^1.1.4", - "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "es-to-primitive": "1.2.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "has-symbols": "1.0.1", + "is-callable": "1.1.4", + "is-regex": "1.0.4", + "object-inspect": "1.7.0", + "object-keys": "1.1.1", + "string.prototype.trimleft": "2.1.0", + "string.prototype.trimright": "2.1.0" } }, "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "is-callable": "1.1.4", + "is-date-object": "1.0.1", + "is-symbol": "1.0.3" } }, "escape-string-regexp": { @@ -304,25 +437,370 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.7.1.tgz", + "integrity": "sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==", + "dev": true, + "requires": { + "@babel/code-frame": "7.5.5", + "ajv": "6.10.2", + "chalk": "2.4.2", + "cross-spawn": "6.0.5", + "debug": "4.1.1", + "doctrine": "3.0.0", + "eslint-scope": "5.0.0", + "eslint-utils": "1.4.3", + "eslint-visitor-keys": "1.1.0", + "espree": "6.1.2", + "esquery": "1.0.1", + "esutils": "2.0.3", + "file-entry-cache": "5.0.1", + "functional-red-black-tree": "1.0.1", + "glob-parent": "5.1.0", + "globals": "12.3.0", + "ignore": "4.0.6", + "import-fresh": "3.2.1", + "imurmurhash": "0.1.4", + "inquirer": "7.0.0", + "is-glob": "4.0.1", + "js-yaml": "3.13.1", + "json-stable-stringify-without-jsonify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.15", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.3", + "progress": "2.0.3", + "regexpp": "2.0.1", + "semver": "6.3.0", + "strip-ansi": "5.2.0", + "strip-json-comments": "3.0.1", + "table": "5.4.6", + "text-table": "0.2.0", + "v8-compile-cache": "2.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "2.1.1" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "4.1.0" + } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + } + } + }, + "eslint-config-standard": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz", + "integrity": "sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "dev": true, + "requires": { + "debug": "2.6.9", + "resolve": "1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", + "dev": true, + "requires": { + "debug": "2.6.9", + "pkg-dir": "2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-es": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz", + "integrity": "sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==", + "dev": true, + "requires": { + "eslint-utils": "1.4.3", + "regexpp": "3.0.0" + }, + "dependencies": { + "regexpp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "dev": true + } + } + }, + "eslint-plugin-import": { + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", + "dev": true, + "requires": { + "array-includes": "3.0.3", + "contains-path": "0.1.0", + "debug": "2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "0.3.2", + "eslint-module-utils": "2.4.1", + "has": "1.0.3", + "minimatch": "3.0.4", + "object.values": "1.1.0", + "read-pkg-up": "2.0.0", + "resolve": "1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "2.0.3", + "isarray": "1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz", + "integrity": "sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==", + "dev": true, + "requires": { + "eslint-plugin-es": "2.0.0", + "eslint-utils": "1.4.3", + "ignore": "5.1.4", + "minimatch": "3.0.4", + "resolve": "1.13.1", + "semver": "6.3.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", + "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", + "dev": true + }, + "eslint-plugin-standard": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", + "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", + "dev": true + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.3.0" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz", + "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==", + "dev": true, + "requires": { + "acorn": "7.1.0", + "acorn-jsx": "5.1.0", + "eslint-visitor-keys": "1.1.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "4.3.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "4.3.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "0.7.0", + "iconv-lite": "0.4.24", + "tmp": "0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", + "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "dev": true, + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "flat-cache": "2.0.1" } }, "find-up": { @@ -331,7 +809,7 @@ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "3.0.0" } }, "flat": { @@ -340,13 +818,31 @@ "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", "dev": true, "requires": { - "is-buffer": "~2.0.3" + "is-buffer": "2.0.4" } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "2.0.1", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "function-bind": { "version": "1.1.1", @@ -354,34 +850,56 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, "glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "4.0.1" + } + }, + "globals": { + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz", + "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==", + "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "type-fest": "0.8.1" } }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -389,15 +907,16 @@ "dev": true }, "grpc": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.22.2.tgz", - "integrity": "sha512-gaK59oAA5/mlOIn+hQO5JROPoAzsaGRpEMcrAayW5WGETS8QScpBoQ+XBxEWAAF0kbeGIELuGRCVEObKS1SLmw==", - "requires": { - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "node-pre-gyp": "^0.13.0", - "protobufjs": "^5.0.3" + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.2.tgz", + "integrity": "sha512-EG3WH6AWMVvAiV15d+lr+K77HJ/KV/3FvMpjKjulXHbTwgDZkhkcWbwhxFAoTdxTkQvy0WFcO3Nog50QBbHZWw==", + "requires": { + "@types/bytebuffer": "5.0.40", + "lodash.camelcase": "4.3.0", + "lodash.clone": "4.5.0", + "nan": "2.14.0", + "node-pre-gyp": "0.14.0", + "protobufjs": "5.0.3" }, "dependencies": { "abbrev": { @@ -416,8 +935,8 @@ "version": "1.1.5", "bundled": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "delegates": "1.0.0", + "readable-stream": "2.3.6" } }, "balanced-match": { @@ -428,12 +947,12 @@ "version": "1.1.11", "bundled": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, "chownr": { - "version": "1.1.1", + "version": "1.1.3", "bundled": true }, "code-point-at": { @@ -452,6 +971,13 @@ "version": "1.0.2", "bundled": true }, + "debug": { + "version": "3.2.6", + "bundled": true, + "requires": { + "ms": "2.1.2" + } + }, "deep-extend": { "version": "0.6.0", "bundled": true @@ -465,10 +991,10 @@ "bundled": true }, "fs-minipass": { - "version": "1.2.6", + "version": "1.2.7", "bundled": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.9.0" } }, "fs.realpath": { @@ -479,14 +1005,26 @@ "version": "2.7.4", "bundled": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.3" + } + }, + "glob": { + "version": "7.1.4", + "bundled": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.4", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "has-unicode": { @@ -494,29 +1032,29 @@ "bundled": true }, "iconv-lite": { - "version": "0.4.23", + "version": "0.4.24", "bundled": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": "2.1.2" } }, "ignore-walk": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "requires": { - "minimatch": "^3.0.4" + "minimatch": "3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true }, "ini": { @@ -527,7 +1065,7 @@ "version": "1.0.0", "bundled": true, "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "isarray": { @@ -538,7 +1076,7 @@ "version": "3.0.4", "bundled": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -546,18 +1084,18 @@ "bundled": true }, "minipass": { - "version": "2.3.5", + "version": "2.9.0", "bundled": true, "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "safe-buffer": "5.1.2", + "yallist": "3.1.1" } }, "minizlib": { - "version": "1.2.1", + "version": "1.3.3", "bundled": true, "requires": { - "minipass": "^2.2.1" + "minipass": "2.9.0" } }, "mkdirp": { @@ -573,50 +1111,41 @@ } } }, + "ms": { + "version": "2.1.2", + "bundled": true + }, "needle": { "version": "2.4.0", "bundled": true, "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "bundled": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true - } + "debug": "3.2.6", + "iconv-lite": "0.4.24", + "sax": "1.2.4" } }, "node-pre-gyp": { - "version": "0.13.0", + "version": "0.14.0", "bundled": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.4.0", + "nopt": "4.0.1", + "npm-packlist": "1.4.6", + "npmlog": "4.1.2", + "rc": "1.2.8", + "rimraf": "2.7.1", + "semver": "5.7.1", + "tar": "4.4.13" } }, "nopt": { "version": "4.0.1", "bundled": true, "requires": { - "abbrev": "1", - "osenv": "^0.1.4" + "abbrev": "1.1.1", + "osenv": "0.1.5" } }, "npm-bundled": { @@ -624,21 +1153,21 @@ "bundled": true }, "npm-packlist": { - "version": "1.4.1", + "version": "1.4.6", "bundled": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "ignore-walk": "3.0.3", + "npm-bundled": "1.0.6" } }, "npmlog": { "version": "4.1.2", "bundled": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "are-we-there-yet": "1.1.5", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" } }, "number-is-nan": { @@ -653,7 +1182,7 @@ "version": "1.4.0", "bundled": true, "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "os-homedir": { @@ -668,8 +1197,8 @@ "version": "0.1.5", "bundled": true, "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" } }, "path-is-absolute": { @@ -685,54 +1214,40 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" + "ascli": "1.0.1", + "bytebuffer": "5.0.1", + "glob": "7.1.4", + "yargs": "3.32.0" } }, "rc": { "version": "1.2.8", "bundled": true, "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "deep-extend": "0.6.0", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" } }, "readable-stream": { "version": "2.3.6", "bundled": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.4", + "isarray": "1.0.0", + "process-nextick-args": "2.0.1", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "rimraf": { - "version": "2.6.3", + "version": "2.7.1", "bundled": true, "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.4", - "bundled": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } + "glob": "7.1.4" } }, "safe-buffer": { @@ -748,7 +1263,7 @@ "bundled": true }, "semver": { - "version": "5.7.0", + "version": "5.7.1", "bundled": true }, "set-blocking": { @@ -756,30 +1271,30 @@ "bundled": true }, "signal-exit": { - "version": "3.0.1", + "version": "3.0.2", "bundled": true }, "string-width": { "version": "1.0.2", "bundled": true, "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" } }, "string_decoder": { "version": "1.1.1", "bundled": true, "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "strip-json-comments": { @@ -787,16 +1302,16 @@ "bundled": true }, "tar": { - "version": "4.4.10", + "version": "4.4.13", "bundled": true, "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.5", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" + "chownr": "1.1.3", + "fs-minipass": "1.2.7", + "minipass": "2.9.0", + "minizlib": "1.3.3", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.1.1" } }, "util-deprecate": { @@ -807,7 +1322,7 @@ "version": "1.1.3", "bundled": true, "requires": { - "string-width": "^1.0.2 || 2" + "string-width": "1.0.2" } }, "wrappy": { @@ -815,7 +1330,7 @@ "bundled": true }, "yallist": { - "version": "3.0.3", + "version": "3.1.1", "bundled": true } } @@ -826,7 +1341,7 @@ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "^1.1.1" + "function-bind": "1.1.1" } }, "has-flag": { @@ -836,9 +1351,9 @@ "dev": true }, "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "dev": true }, "he": { @@ -847,29 +1362,154 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "1.0.1", + "resolve-from": "4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inquirer": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.0.tgz", + "integrity": "sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ==", + "dev": true, + "requires": { + "ansi-escapes": "4.3.0", + "chalk": "2.4.2", + "cli-cursor": "3.1.0", + "cli-width": "2.2.0", + "external-editor": "3.1.0", + "figures": "3.1.0", + "lodash": "4.17.15", + "mute-stream": "0.0.8", + "run-async": "2.3.0", + "rxjs": "6.5.3", + "string-width": "4.2.0", + "strip-ansi": "5.2.0", + "through": "2.3.8" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "8.0.0", + "is-fullwidth-code-point": "3.0.0", + "strip-ansi": "6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "5.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + } + } }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", "dev": true }, "is-callable": { @@ -884,60 +1524,121 @@ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "2.1.1" } }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { - "has": "^1.0.1" + "has": "1.0.3" } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "has-symbols": "^1.0.0" + "has-symbols": "1.0.1" } }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "1.0.10", + "esprima": "4.0.1" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "1.0.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "4.2.3", + "parse-json": "2.2.0", + "pify": "2.3.0", + "strip-bom": "3.0.0" } }, "locate-path": { @@ -946,8 +1647,8 @@ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "3.0.0", + "path-exists": "3.0.0" } }, "lodash": { @@ -972,7 +1673,7 @@ "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "dev": true, "requires": { - "chalk": "^2.0.1" + "chalk": "2.4.2" } }, "long": { @@ -980,26 +1681,6 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -1010,8 +1691,9 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -1030,9 +1712,9 @@ } }, "mocha": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", - "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.2.tgz", + "integrity": "sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -1055,107 +1737,63 @@ "supports-color": "6.0.0", "which": "1.3.1", "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" + "yargs": "13.3.0", + "yargs-parser": "13.1.1", + "yargs-unparser": "1.6.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - } + "string-width": "3.1.0", + "strip-ansi": "5.2.0", + "wrap-ansi": "5.1.0" } }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "emoji-regex": "7.0.3", + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "5.2.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "string-width": "3.1.0", + "strip-ansi": "5.2.0" } }, "y18n": { @@ -1165,22 +1803,21 @@ "dev": true }, "yargs": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", "dev": true, "requires": { - "cliui": "^4.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" + "cliui": "5.0.0", + "find-up": "3.0.0", + "get-caller-file": "2.0.5", + "require-directory": "2.1.1", + "require-main-filename": "2.0.0", + "set-blocking": "2.0.0", + "string-width": "3.1.0", + "which-module": "2.0.0", + "y18n": "4.0.0", + "yargs-parser": "13.1.1" } } } @@ -1191,11 +1828,23 @@ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -1208,17 +1857,20 @@ "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", "dev": true, "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" + "object.getownpropertydescriptors": "2.0.3", + "semver": "5.7.1" } }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { - "path-key": "^2.0.0" + "hosted-git-info": "2.8.5", + "resolve": "1.13.1", + "semver": "5.7.1", + "validate-npm-package-license": "3.0.4" } }, "number-is-nan": { @@ -1226,6 +1878,12 @@ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -1238,10 +1896,10 @@ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "define-properties": "1.1.3", + "function-bind": "1.1.1", + "has-symbols": "1.0.1", + "object-keys": "1.1.1" } }, "object.getownpropertydescriptors": { @@ -1250,16 +1908,52 @@ "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", "dev": true, "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" + "define-properties": "1.1.3", + "es-abstract": "1.16.2" + } + }, + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "dev": true, + "requires": { + "define-properties": "1.1.3", + "es-abstract": "1.16.2", + "function-bind": "1.1.1", + "has": "1.0.3" } }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, "requires": { - "wrappy": "1" + "mimic-fn": "2.1.0" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "word-wrap": "1.2.3" } }, "optjs": { @@ -1272,34 +1966,22 @@ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { - "lcid": "^1.0.0" + "lcid": "1.0.0" } }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "p-try": "^2.0.0" + "p-try": "2.2.0" } }, "p-locate": { @@ -1308,7 +1990,7 @@ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "2.2.1" } }, "p-try": { @@ -1317,6 +1999,24 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "3.1.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.2" + } + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -1326,7 +2026,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "2.0.1", @@ -1334,36 +2035,191 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "2.3.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.3.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "protobufjs": { "version": "6.8.8", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.8.8.tgz", "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "@protobufjs/aspromise": "1.1.2", + "@protobufjs/base64": "1.1.2", + "@protobufjs/codegen": "2.0.4", + "@protobufjs/eventemitter": "1.1.0", + "@protobufjs/fetch": "1.1.0", + "@protobufjs/float": "1.0.2", + "@protobufjs/inquire": "1.1.0", + "@protobufjs/path": "1.1.2", + "@protobufjs/pool": "1.1.0", + "@protobufjs/utf8": "1.1.0", + "@types/long": "4.0.0", + "@types/node": "10.17.6", + "long": "4.0.0" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "load-json-file": "2.0.0", + "normalize-package-data": "2.5.0", + "path-type": "2.0.0" } }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "read-pkg": "2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.3.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1376,10 +2232,68 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, + "resolve": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", + "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", + "dev": true, + "requires": { + "path-parse": "1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "5.1.0", + "signal-exit": "3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "2.1.0" + } + }, + "rxjs": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "dev": true, + "requires": { + "tslib": "1.10.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "set-blocking": { @@ -1394,7 +2308,7 @@ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -1409,6 +2323,57 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "astral-regex": "1.0.0", + "is-fullwidth-code-point": "2.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.5" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.2.0", + "spdx-license-ids": "3.0.5" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -1420,9 +2385,29 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string.prototype.trimleft": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", + "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", + "dev": true, + "requires": { + "define-properties": "1.1.3", + "function-bind": "1.1.1" + } + }, + "string.prototype.trimright": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", + "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", + "dev": true, + "requires": { + "define-properties": "1.1.3", + "function-bind": "1.1.1" } }, "strip-ansi": { @@ -1430,13 +2415,13 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, "strip-json-comments": { @@ -1451,7 +2436,120 @@ "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "6.10.2", + "lodash": "4.17.15", + "slice-ansi": "2.1.0", + "string-width": "3.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "7.0.3", + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "5.2.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "1.0.2" + } + }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "2.1.1" + } + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "3.1.0", + "spdx-expression-parse": "3.0.0" } }, "which": { @@ -1460,7 +2558,7 @@ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "which-module": { @@ -1475,7 +2573,7 @@ "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "requires": { - "string-width": "^1.0.2 || 2" + "string-width": "1.0.2" } }, "window-size": { @@ -1483,19 +2581,35 @@ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "string-width": "1.0.2", + "strip-ansi": "3.0.1" } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "0.5.1" + } }, "y18n": { "version": "3.2.1", @@ -1507,23 +2621,23 @@ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" } }, "yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "camelcase": "5.3.1", + "decamelize": "1.2.0" }, "dependencies": { "camelcase": { @@ -1535,130 +2649,92 @@ } }, "yargs-unparser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" + "flat": "4.1.0", + "lodash": "4.17.15", + "yargs": "13.3.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" + "string-width": "3.1.0", + "strip-ansi": "5.2.0", + "wrap-ansi": "5.1.0" } }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "invert-kv": "^2.0.0" + "emoji-regex": "7.0.3", + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "5.2.0" } }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" + "ansi-regex": "4.1.0" } }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "ansi-styles": "3.2.1", + "string-width": "3.1.0", + "strip-ansi": "5.2.0" } }, - "strip-ansi": { + "y18n": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true }, "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "cliui": "5.0.0", + "find-up": "3.0.0", + "get-caller-file": "2.0.5", + "require-directory": "2.1.1", + "require-main-filename": "2.0.0", + "set-blocking": "2.0.0", + "string-width": "3.1.0", + "which-module": "2.0.0", + "y18n": "4.0.0", + "yargs-parser": "13.1.1" } } } diff --git a/package.json b/package.json index 1bfb0448..d745dd20 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,11 @@ "url": "git+https://github.com/monax/hoard.git" }, "dependencies": { - "@grpc/proto-loader": "^0.5.1", - "grpc": "^1.22.2" + "@grpc/proto-loader": "^0.5.3", + "grpc": "^1.24.2" + }, + "mocha": { + "bail": true }, "files": [ "hoard-js/", @@ -33,6 +36,12 @@ }, "homepage": "https://github.com/monax/hoard#readme", "devDependencies": { - "mocha": "^6.2.0" + "eslint": "^6.7.1", + "eslint-config-standard": "^14.1.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-node": "^10.0.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.1", + "mocha": "^6.2.2" } } diff --git a/project/cmd/changelog/main.go b/project/cmd/changelog/main.go index 44b328c5..ad5f0c2f 100644 --- a/project/cmd/changelog/main.go +++ b/project/cmd/changelog/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/monax/hoard/v6/project" + "github.com/monax/hoard/v7/project" ) func main() { diff --git a/project/cmd/notes/main.go b/project/cmd/notes/main.go index 8f435ea9..a6103e5d 100644 --- a/project/cmd/notes/main.go +++ b/project/cmd/notes/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/monax/hoard/v6/project" + "github.com/monax/hoard/v7/project" ) func main() { diff --git a/project/cmd/version/main.go b/project/cmd/version/main.go index 6eb782c6..ef6a4aa5 100644 --- a/project/cmd/version/main.go +++ b/project/cmd/version/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/monax/hoard/v6/project" + "github.com/monax/hoard/v7/project" ) func main() { diff --git a/project/history.go b/project/history.go index 5d31bc1a..de52a146 100644 --- a/project/history.go +++ b/project/history.go @@ -30,8 +30,17 @@ func FullVersion() string { // release tagging script: ./scripts/tag_release.sh var History relic.ImmutableHistory = relic.NewHistory("Monax Hoard", "https://github.com/monax/hoard"). MustDeclareReleases( - "", - ``, + "7.0.0 - 2019-12-02", + `This release makes some changes to the Hoard protobuf and service that are backwards compatible for clients - Hoard v6 clients should work with Hoard v7 but hoard-js v7 will not work entirely correctly with Hoard v6 due to removal of oneof. + +### Changed +- [API] Drop use of oneof in protobuf files - allow singleton fields to be sent with streamable fields +- [API] Enforce that we only receive exactly one salt and grant spec in streams and that they come first +- [NODEJS] Expose streaming promise client-side API to take advantage of streaming rather than loading entire file into buffer + +### Fixed +- Ignoring Spec if Salt present in single message +`, "6.0.0 - 2019-10-11", `### Added - Document streaming service diff --git a/protobuf/api.proto b/protobuf/api.proto index ae5b17db..d3705db4 100644 --- a/protobuf/api.proto +++ b/protobuf/api.proto @@ -7,7 +7,7 @@ import "stores.proto"; package api; -option go_package = "github.com/monax/hoard/v6/api"; +option go_package = "github.com/monax/hoard/v7/api"; service Grant { // Seal a Reference to create a Grant @@ -70,10 +70,12 @@ service Storage { service Document { // GET a document from Hoard - rpc Download(grant.Grant) returns (stream PlaintextAndMeta) {} - + rpc Download (grant.Grant) returns (stream PlaintextAndMeta) { + } + // POST a document into Hoard - rpc Upload(stream PlaintextAndGrantSpecAndMeta) returns(grant.Grant) {} + rpc Upload (stream PlaintextAndGrantSpecAndMeta) returns (grant.Grant) { + } } message GrantAndGrantSpec { @@ -83,25 +85,19 @@ message GrantAndGrantSpec { } message PlaintextAndGrantSpec { - oneof input { - Plaintext Plaintext = 1; - // The type of grant to output - grant.Spec GrantSpec = 2; - } + Plaintext Plaintext = 1; + // The type of grant to output + grant.Spec GrantSpec = 2; } message PlaintextAndMeta { - oneof input { - meta.Meta Meta = 1; - Plaintext Plaintext = 2; - } + meta.Meta Meta = 1; + Plaintext Plaintext = 2; } message PlaintextAndGrantSpecAndMeta { - oneof input { - meta.Meta Meta = 1; - PlaintextAndGrantSpec PlaintextAndGrantSpec = 2; - } + meta.Meta Meta = 1; + PlaintextAndGrantSpec PlaintextAndGrantSpec = 2; } message ReferenceAndGrantSpec { @@ -111,10 +107,8 @@ message ReferenceAndGrantSpec { } message Plaintext { - oneof input { - bytes Data = 1; - bytes Salt = 2; - } + bytes Data = 1; + bytes Salt = 2; } message Ciphertext { @@ -128,4 +122,4 @@ message ReferenceAndCiphertext { message Address { bytes Address = 1; -} \ No newline at end of file +} diff --git a/protobuf/grant.proto b/protobuf/grant.proto index cbb26275..7d9a9413 100644 --- a/protobuf/grant.proto +++ b/protobuf/grant.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package grant; -option go_package = "github.com/monax/hoard/v6/grant"; +option go_package = "github.com/monax/hoard/v7/grant"; message Grant { // The grantSpec provides sufficient information to decrypt the reference diff --git a/protobuf/meta.proto b/protobuf/meta.proto index 5c142af0..900e3e01 100644 --- a/protobuf/meta.proto +++ b/protobuf/meta.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package meta; -option go_package = "github.com/monax/hoard/v6/meta"; +option go_package = "github.com/monax/hoard/v7/meta"; message Meta { string Name = 1; @@ -15,4 +15,4 @@ message Meta { message Document { Meta Meta = 1; bytes Data = 2; -} \ No newline at end of file +} diff --git a/protobuf/reference.proto b/protobuf/reference.proto index e78ea862..f01662a4 100644 --- a/protobuf/reference.proto +++ b/protobuf/reference.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package reference; -option go_package = "github.com/monax/hoard/v6/reference"; +option go_package = "github.com/monax/hoard/v7/reference"; message Ref { bytes Address = 1; diff --git a/protobuf/stores.proto b/protobuf/stores.proto index 2cbd82d2..c690d387 100644 --- a/protobuf/stores.proto +++ b/protobuf/stores.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package stores; -option go_package = "github.com/monax/hoard/v6/stores"; +option go_package = "github.com/monax/hoard/v7/stores"; message StatInfo { // The address will be the same as the one passed in but is repeated to diff --git a/reference/reference.pb.go b/reference/reference.pb.go index 7bbd89b5..9d314b86 100644 --- a/reference/reference.pb.go +++ b/reference/reference.pb.go @@ -18,7 +18,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Ref struct { Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"Address,omitempty"` diff --git a/scripts/test_js.sh b/scripts/test_js.sh index 2fb498ce..e59cd240 100755 --- a/scripts/test_js.sh +++ b/scripts/test_js.sh @@ -2,11 +2,11 @@ export PATH=$PATH:$(pwd)/bin -hoard config memory -s test:secret_pass | hoard -c- &> /dev/null & +hoard config memory -s testing-id:secret_pass | hoard -c- &> /dev/null & HID=$! function finish { kill -TERM $HID } trap finish EXIT -npm test \ No newline at end of file +npm test diff --git a/server/server.go b/server/server.go index 05853cf9..7a2dc0e0 100644 --- a/server/server.go +++ b/server/server.go @@ -7,12 +7,12 @@ import ( "strings" "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6" - "github.com/monax/hoard/v6/api" - "github.com/monax/hoard/v6/config" - "github.com/monax/hoard/v6/logging" - "github.com/monax/hoard/v6/logging/loggers" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7" + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/logging" + "github.com/monax/hoard/v7/logging/loggers" + "github.com/monax/hoard/v7/stores" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) @@ -57,12 +57,12 @@ func (serv *Server) Serve() error { logging.InfoMsg(serv.logger, "Initialising Hoard server", "store_name", serv.hoard.Name()) - hoardServer := hoard.NewHoardServer(serv.hoard, serv.chunk) - api.RegisterCleartextServer(serv.grpcServer, hoardServer) - api.RegisterEncryptionServer(serv.grpcServer, hoardServer) - api.RegisterStorageServer(serv.grpcServer, hoardServer) - api.RegisterGrantServer(serv.grpcServer, hoardServer) - api.RegisterDocumentServer(serv.grpcServer, hoardServer) + hoardService := hoard.NewService(serv.hoard, serv.chunk) + api.RegisterCleartextServer(serv.grpcServer, hoardService) + api.RegisterEncryptionServer(serv.grpcServer, hoardService) + api.RegisterStorageServer(serv.grpcServer, hoardService) + api.RegisterGrantServer(serv.grpcServer, hoardService) + api.RegisterDocumentServer(serv.grpcServer, hoardService) // Register reflection service on gRPC server. reflection.Register(serv.grpcServer) diff --git a/service.go b/service.go new file mode 100644 index 00000000..2c65e742 --- /dev/null +++ b/service.go @@ -0,0 +1,206 @@ +package hoard + +import ( + "context" + + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/reference" + "github.com/monax/hoard/v7/stores" +) + +// 1MiB +const MaxChunkSize = 1 << 20 + +// Here we implement the GRPC Hoard service. It should mostly be plumbing to +// a DeterministicEncryptedStore (for which hoard.hoard is the canonical example) +// and also to Grants. +type Service struct { + grantService GrantService + chunkSize int +} + +func NewService(grantService GrantService, chunkSize int) *Service { + if chunkSize == 0 { + chunkSize = MaxChunkSize + } + return &Service{ + grantService: grantService, + chunkSize: chunkSize, + } +} + +func (service *Service) Get(ref *reference.Ref, srv api.Cleartext_GetServer) error { + data, err := service.grantService.Get(ref) + if err != nil { + return err + } + + return SendPlaintext(srv, data, ref.Salt, service.chunkSize) +} + +func (service *Service) Put(srv api.Cleartext_PutServer) error { + plaintext, err := ReceivePlaintext(srv) + if err != nil { + return err + } + ref, err := service.grantService.Put(plaintext.Data, plaintext.Salt) + if err != nil { + return err + } + return srv.SendAndClose(ref) +} + +func (service *Service) Encrypt(srv api.Encryption_EncryptServer) error { + plaintext, err := ReceivePlaintext(srv) + if err != nil { + return err + } + + ref, encryptedData, err := service.grantService.Encrypt(plaintext.Data, plaintext.Salt) + if err != nil { + return err + } + + return srv.SendAndClose(&api.ReferenceAndCiphertext{ + Reference: ref, + Ciphertext: &api.Ciphertext{ + EncryptedData: encryptedData, + }, + }) +} + +func (service *Service) Decrypt(refAndCiphertext *api.ReferenceAndCiphertext, srv api.Encryption_DecryptServer) error { + data, err := service.grantService.Decrypt(refAndCiphertext.Reference, refAndCiphertext.Ciphertext.EncryptedData) + if err != nil { + return err + } + + return SendPlaintext(srv, data, refAndCiphertext.Reference.GetSalt(), service.chunkSize) +} + +// StorageServer +func (service *Service) Push(srv api.Storage_PushServer) error { + data, err := ReceiveCiphertext(srv) + if err != nil { + return err + } + + address, err := service.grantService.Store().Put(data) + if err != nil { + return err + } + + return srv.SendAndClose(&api.Address{ + Address: address, + }) +} + +func (service *Service) Pull(address *api.Address, srv api.Storage_PullServer) error { + // Get from the underlying store + data, err := service.grantService.Store().Get(address.Address) + if err != nil { + return err + } + + return SendCiphertext(srv, data, service.chunkSize) + +} + +func (service *Service) Delete(ctx context.Context, address *api.Address) (*api.Address, error) { + return address, service.grantService.Store().Delete(address.Address) +} + +func (service *Service) Stat(ctx context.Context, address *api.Address) (*stores.StatInfo, error) { + statInfo, err := service.grantService.Store().Stat(address.Address) + if err != nil { + return nil, err + } + // For the master API we provide the address and the canonical + // location in a StatInfo message + statInfo.Address = address.Address + statInfo.Location = service.grantService.Store().Location(address.Address) + return statInfo, nil +} + +// GrantServer + +func (service *Service) Seal(ctx context.Context, arg *api.ReferenceAndGrantSpec) (*grant.Grant, error) { + return service.grantService.Seal(arg.Reference, arg.GrantSpec) +} + +func (service *Service) Unseal(ctx context.Context, grt *grant.Grant) (*reference.Ref, error) { + return service.grantService.Unseal(grt) +} + +func (service *Service) Reseal(ctx context.Context, arg *api.GrantAndGrantSpec) (*grant.Grant, error) { + ref, err := service.grantService.Unseal(arg.Grant) + if err != nil { + return nil, err + } + return service.grantService.Seal(ref, arg.GrantSpec) +} + +func (service *Service) PutSeal(srv api.Grant_PutSealServer) error { + pgs, err := ReceivePlaintextAndGrantSpec(srv) + if err != nil { + return err + } + + ref, err := service.grantService.Put(pgs.Plaintext.Data, pgs.Plaintext.Salt) + if err != nil { + return err + } + + grt, err := service.grantService.Seal(ref, pgs.GrantSpec) + if err != nil { + return err + } + + return srv.SendAndClose(grt) +} + +func (service *Service) UnsealGet(grt *grant.Grant, srv api.Grant_UnsealGetServer) error { + ref, err := service.grantService.Unseal(grt) + if err != nil { + return err + } + + data, err := service.grantService.Get(ref) + if err != nil { + return err + } + + return SendPlaintext(srv, data, ref.Salt, service.chunkSize) +} + +func (service *Service) UnsealDelete(ctx context.Context, grt *grant.Grant) (*api.Address, error) { + ref, err := service.grantService.Unseal(grt) + if err != nil { + return nil, err + } + return service.Delete(ctx, &api.Address{Address: ref.Address}) +} + +func (service *Service) Download(grt *grant.Grant, srv api.Document_DownloadServer) error { + doc, salt, err := GetDocument(service.grantService, grt) + if err != nil { + return err + } + + return SendDocument(srv, doc, salt, service.chunkSize) +} + +func (service *Service) Upload(srv api.Document_UploadServer) error { + pgsm, err := ReceiveDocumentAndGrantSpec(srv) + if err != nil { + return err + } + + grt, err := PutDocument(service.grantService, pgsm) + if err != nil { + return err + } + + return srv.SendAndClose(grt) +} diff --git a/service_test.go b/service_test.go new file mode 100644 index 00000000..4ffac6e7 --- /dev/null +++ b/service_test.go @@ -0,0 +1,64 @@ +package hoard + +import ( + "context" + "testing" + + "github.com/go-kit/kit/log" + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/config" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/stores" + "github.com/monax/hoard/v7/test/helpers" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" +) + +func TestService(t *testing.T) { + chunkSize := 67 + secrets := config.SecretsManager{ + Provider: func(secretID string) ([]byte, error) { + return []byte(secretID + "shhhh"), nil + }, + } + hrd := NewHoard(stores.NewMemoryStore(), secrets, log.NewNopLogger()) + service := NewService(hrd, chunkSize) + ctx := context.Background() + err := helpers.RunWithTestServer(ctx, service, func(server *grpc.Server, conn *grpc.ClientConn) error { + + t.Run("Grants", func(t *testing.T) { + t.Run("Streaming", func(t *testing.T) { + data := []byte(helpers.LongText) + client := api.NewGrantClient(conn) + putStream, err := client.PutSeal(ctx) + require.NoError(t, err) + + publicID := "code1" + pgs := &api.PlaintextAndGrantSpec{ + Plaintext: &api.Plaintext{ + Data: data, + Salt: []byte("celery"), + }, + GrantSpec: &grant.Spec{ + Symmetric: &grant.SymmetricSpec{ + PublicID: publicID, + }, + }, + } + err = SendPlaintextAndGrantSpec(putStream, pgs, chunkSize) + require.NoError(t, err) + grt, err := putStream.CloseAndRecv() + require.NoError(t, err) + + getStream, err := client.UnsealGet(ctx, grt) + require.NoError(t, err) + plaintextOut, err := ReceivePlaintext(getStream) + require.NoError(t, err) + require.Equal(t, pgs.Plaintext, plaintextOut) + }) + }) + + return nil + }) + require.NoError(t, err) +} diff --git a/stores/cloud/cloud.go b/stores/cloud/cloud.go index 45023f3f..e005bbdb 100644 --- a/stores/cloud/cloud.go +++ b/stores/cloud/cloud.go @@ -8,15 +8,15 @@ import ( "os" "strings" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7/stores" "github.com/Azure/azure-storage-blob-go/azblob" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6/logging" - "github.com/monax/hoard/v6/logging/structure" + "github.com/monax/hoard/v7/logging" + "github.com/monax/hoard/v7/logging/structure" "gocloud.dev/blob" "gocloud.dev/blob/azureblob" "gocloud.dev/blob/gcsblob" @@ -33,6 +33,8 @@ const ( GCP Type = "gcp" ) +const GcloudServiceKeyEnvVar = "GCLOUD_SERVICE_KEY" + var _ stores.Store = (*cloudStore)(nil) type cloudStore struct { @@ -83,7 +85,7 @@ func NewStore(cloud Type, bucket, prefix, region string, addrenc stores.AddressE conn, err = azureblob.OpenBucket(ctx, p, accountName, bucket, nil) case GCP: - creds, err := google.CredentialsFromJSON(ctx, []byte(os.Getenv("GCLOUD_SERVICE_KEY")), "https://www.googleapis.com/auth/cloud-platform") + creds, err := google.CredentialsFromJSON(ctx, []byte(os.Getenv(GcloudServiceKeyEnvVar)), "https://www.googleapis.com/auth/cloud-platform") if err != nil { return nil, err } diff --git a/stores/cloud/cloud_test.go b/stores/cloud/cloud_test.go index 5d5a4df3..53e5cb14 100644 --- a/stores/cloud/cloud_test.go +++ b/stores/cloud/cloud_test.go @@ -5,6 +5,7 @@ package cloud import ( "context" "encoding/base32" + "fmt" "os" "testing" @@ -13,8 +14,9 @@ import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3manager" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7/stores" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "golang.org/x/oauth2/google" "google.golang.org/api/option" ) @@ -22,7 +24,8 @@ import ( func TestStoreGCS(t *testing.T) { bucket := "monax-hoard" prefix := "test-store" - deleteGCSPrefix(bucket, prefix) + err := deleteGCSPrefix(bucket, prefix) + require.NoError(t, err) store, err := NewStore(GCP, bucket, prefix, "", base32.StdEncoding, nil) assert.NoError(t, err) stores.RunTests(t, store) @@ -31,32 +34,34 @@ func TestStoreGCS(t *testing.T) { func TestStoreS3(t *testing.T) { bucket := "monax-hoard-test" prefix := "TestS3Store/" - deleteS3Prefix(bucket, prefix) + err := deleteS3Prefix(bucket, prefix) + require.NoError(t, err) store, err := NewStore(AWS, bucket, prefix, "", base32.StdEncoding, nil) assert.NoError(t, err) stores.RunTests(t, store) } -func deleteS3Prefix(bucket, prefix string) { +func deleteS3Prefix(bucket, prefix string) error { deleter := s3manager.NewBatchDelete(session.Must(session.New(aws.NewConfig()), nil)) - err := deleter.Delete(context.Background(), + return deleter.Delete(context.Background(), s3manager.NewDeleteListIterator(deleter.Client, &s3.ListObjectsInput{Bucket: &bucket, Prefix: &prefix})) - if err != nil { - panic(err) - } } -func deleteGCSPrefix(bucket, prefix string) { +func deleteGCSPrefix(bucket, prefix string) error { ctx := context.Background() - creds, err := google.CredentialsFromJSON(ctx, []byte(os.Getenv("GCLOUD_SERVICE_KEY")), "https://www.googleapis.com/auth/cloud-platform") + serviceKey := os.Getenv(GcloudServiceKeyEnvVar) + if len(serviceKey) == 0 { + return fmt.Errorf("environment variable %s not set", GcloudServiceKeyEnvVar) + } + creds, err := google.CredentialsFromJSON(ctx, []byte(serviceKey), "https://www.googleapis.com/auth/cloud-platform") if err != nil { - panic(err) + return fmt.Errorf("could not parse gcloud credentials: %v", err) } client, err := storage.NewClient(ctx, option.WithCredentials(creds)) if err != nil { - panic(err) + return err } defer client.Close() @@ -65,4 +70,5 @@ func deleteGCSPrefix(bucket, prefix string) { for obj, _ := objs.Next(); obj != nil; obj, _ = objs.Next() { bkt.Object(obj.Name).Delete(ctx) } + return nil } diff --git a/stores/ipfs/ipfs.go b/stores/ipfs/ipfs.go index 625fb218..e82db0b8 100644 --- a/stores/ipfs/ipfs.go +++ b/stores/ipfs/ipfs.go @@ -9,7 +9,7 @@ import ( "net/http" "strings" - "github.com/monax/hoard/v6/stores" + "github.com/monax/hoard/v7/stores" ) var _ stores.Store = (*ipfsStore)(nil) diff --git a/stores/logging_store.go b/stores/logging_store.go index 0a27afe5..7ea12056 100644 --- a/stores/logging_store.go +++ b/stores/logging_store.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/go-kit/kit/log" - "github.com/monax/hoard/v6/logging" + "github.com/monax/hoard/v7/logging" ) type loggingStore struct { diff --git a/stores/stores.pb.go b/stores/stores.pb.go index 2a676607..e7e55e86 100644 --- a/stores/stores.pb.go +++ b/stores/stores.pb.go @@ -18,7 +18,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type StatInfo struct { // The address will be the same as the one passed in but is repeated to diff --git a/stores/sync_store.go b/stores/sync_store.go index e7aa7e72..147c4e57 100644 --- a/stores/sync_store.go +++ b/stores/sync_store.go @@ -3,7 +3,7 @@ package stores import ( "fmt" - "github.com/monax/hoard/v6/sync" + "github.com/monax/hoard/v7/sync" ) // The number of mutexes that will be available for all possible addresses. diff --git a/streaming.go b/streaming.go new file mode 100644 index 00000000..967e8323 --- /dev/null +++ b/streaming.go @@ -0,0 +1,288 @@ +package hoard + +import ( + "fmt" + "io" + + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/meta" +) + +type PlaintextReceiver interface { + Recv() (*api.Plaintext, error) +} + +func ReceivePlaintext(srv PlaintextReceiver) (*api.Plaintext, error) { + accum := new(api.Plaintext) + for { + plaintext, err := srv.Recv() + if err != nil { + if err == io.EOF { + return accum, nil + } + + return nil, err + } + + err = consumePlaintext(accum, plaintext) + if err != nil { + return nil, err + } + } +} + +type PlaintextSender interface { + Send(*api.Plaintext) error +} + +func SendPlaintext(srv PlaintextSender, data, salt []byte, chunkSize int) error { + err := srv.Send(&api.Plaintext{Salt: salt}) + if err != nil { + return err + } + + return sendChunks(data, chunkSize, func(chunk []byte) error { + return srv.Send(&api.Plaintext{Data: chunk}) + }) +} + +type CiphertextReceiver interface { + Recv() (*api.Ciphertext, error) +} + +func ReceiveCiphertext(srv CiphertextReceiver) ([]byte, error) { + var data []byte + for { + c, err := srv.Recv() + if err != nil { + if err == io.EOF { + return data, nil + } + + return nil, err + } + + data = append(data, c.EncryptedData...) + } +} + +type CiphertextSender interface { + Send(*api.Ciphertext) error +} + +func SendCiphertext(srv CiphertextSender, data []byte, chunkSize int) error { + return sendChunks(data, chunkSize, func(chunk []byte) error { + return srv.Send(&api.Ciphertext{EncryptedData: chunk}) + }) +} + +type PlaintextAndGrantSpecReceiver interface { + Recv() (*api.PlaintextAndGrantSpec, error) +} + +// Receive chunks of plaintext and spec and aggregate into complete objects +func ReceivePlaintextAndGrantSpec(srv PlaintextAndGrantSpecReceiver) (*api.PlaintextAndGrantSpec, error) { + accum := &api.PlaintextAndGrantSpec{Plaintext: &api.Plaintext{}} + for { + g, err := srv.Recv() + if err != nil { + if err == io.EOF { + return accum, nil + } + return nil, err + } + + err = consumePlaintextAndGrantSpec(accum, g) + if err != nil { + return nil, err + } + } +} + +type PlaintextAndGrantSpecSender interface { + Send(*api.PlaintextAndGrantSpec) error +} + +// Send some plaintext and spec to a service in chunks +func SendPlaintextAndGrantSpec(srv PlaintextAndGrantSpecSender, pgs *api.PlaintextAndGrantSpec, chunkSize int) error { + err := srv.Send(&api.PlaintextAndGrantSpec{GrantSpec: pgs.GrantSpec}) + if err != nil { + return err + } + + if len(pgs.Plaintext.Salt) > 0 { + err = srv.Send(&api.PlaintextAndGrantSpec{Plaintext: &api.Plaintext{Salt: pgs.Plaintext.Salt}}) + if err != nil { + return err + } + } + + return sendChunks(pgs.Plaintext.Data, chunkSize, func(chunk []byte) error { + return srv.Send(&api.PlaintextAndGrantSpec{Plaintext: &api.Plaintext{Data: chunk}}) + }) +} + +type DocumentSender interface { + Send(*api.PlaintextAndMeta) error +} + +func SendDocument(srv DocumentSender, doc *meta.Document, salt []byte, chunkSize int) error { + err := srv.Send(&api.PlaintextAndMeta{Meta: doc.Meta}) + if err != nil { + return err + } + + err = srv.Send(&api.PlaintextAndMeta{Plaintext: &api.Plaintext{Salt: salt}}) + if err != nil { + return err + } + + return sendChunks(doc.Data, chunkSize, func(chunk []byte) error { + return srv.Send(&api.PlaintextAndMeta{Plaintext: &api.Plaintext{Data: chunk}}) + }) +} + +type DocumentAndGrantSender interface { + Send(*api.PlaintextAndGrantSpecAndMeta) error +} + +func SendDocumentAndGrantSpec(srv DocumentAndGrantSender, doc *meta.Document, salt []byte, spec *grant.Spec, chunkSize int) error { + err := srv.Send(&api.PlaintextAndGrantSpecAndMeta{Meta: doc.Meta}) + if err != nil { + return err + } + + err = srv.Send(&api.PlaintextAndGrantSpecAndMeta{ + PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{GrantSpec: spec}, + }) + if err != nil { + return err + } + + err = srv.Send(&api.PlaintextAndGrantSpecAndMeta{ + PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{Plaintext: &api.Plaintext{Salt: salt}}, + }) + if err != nil { + return err + } + + return sendChunks(doc.Data, chunkSize, func(chunk []byte) error { + return srv.Send(&api.PlaintextAndGrantSpecAndMeta{ + PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{Plaintext: &api.Plaintext{Data: chunk}}, + }) + }) +} + +type DocumentAndGrantReceiver interface { + Recv() (*api.PlaintextAndGrantSpecAndMeta, error) +} + +func ReceiveDocumentAndGrantSpec(srv DocumentAndGrantReceiver) (*api.PlaintextAndGrantSpecAndMeta, error) { + accum := &api.PlaintextAndGrantSpecAndMeta{ + PlaintextAndGrantSpec: &api.PlaintextAndGrantSpec{Plaintext: &api.Plaintext{}}, + } + for { + d, err := srv.Recv() + if err != nil { + if err == io.EOF { + return accum, nil + } + return nil, err + } + + // NOTE: for singular values we adopt the convention of accepting the first one + if d.Meta != nil { + if accum.Meta != nil { + return nil, fmt.Errorf("received multiple document meta but there can be at most one") + } + accum.Meta = d.Meta + } + + err = consumePlaintextAndGrantSpec(accum.PlaintextAndGrantSpec, d.PlaintextAndGrantSpec) + if err != nil { + return nil, err + } + } +} + +type DocumentReceiver interface { + Recv() (*api.PlaintextAndMeta, error) +} + +func ReceiveDocument(srv DocumentReceiver) (*meta.Document, error) { + accum := &api.PlaintextAndMeta{ + Plaintext: &api.Plaintext{}, + } + + for { + d, err := srv.Recv() + if err != nil { + if err == io.EOF { + return &meta.Document{Meta: accum.Meta, Data: accum.Plaintext.Data}, nil + } + + return nil, err + } + + if d.Meta != nil { + if accum.Meta != nil { + return nil, fmt.Errorf("received multiple document meta but there can be at most one") + } + accum.Meta = d.Meta + } + + err = consumePlaintext(accum.Plaintext, d.Plaintext) + if err != nil { + return nil, err + } + } +} + +func consumePlaintextAndGrantSpec(accum, chunk *api.PlaintextAndGrantSpec) error { + if chunk == nil { + return nil + } + if chunk.GrantSpec != nil { + if accum.GrantSpec != nil { + return fmt.Errorf("received multiple grant specs but there can be at most one") + } + if len(accum.Plaintext.Data) > 0 { + return fmt.Errorf("received grant spec after data but spec must come before all data chunks") + } + accum.GrantSpec = chunk.GrantSpec + } + return consumePlaintext(accum.Plaintext, chunk.Plaintext) +} + +func consumePlaintext(accum, chunk *api.Plaintext) error { + if chunk == nil { + return nil + } + if len(chunk.Salt) > 0 { + if len(accum.Salt) > 0 { + return fmt.Errorf("received multiple salts but there can be at most one") + } + if len(accum.Data) > 0 { + return fmt.Errorf("received salt after data but salt must come before all data chunks") + } + accum.Salt = chunk.Salt + } + accum.Data = append(accum.Data, chunk.Data...) + return nil +} + +func sendChunks(data []byte, chunkSize int, sender func(chunk []byte) error) error { + var err error + for i := 0; i < len(data); i += chunkSize { + if i+chunkSize > len(data) { + err = sender(data[i:]) + } else { + err = sender(data[i : i+chunkSize]) + } + if err != nil { + return err + } + } + return nil +} diff --git a/streaming_test.go b/streaming_test.go new file mode 100644 index 00000000..911152b6 --- /dev/null +++ b/streaming_test.go @@ -0,0 +1,77 @@ +package hoard + +import ( + "io" + "testing" + + "github.com/monax/hoard/v7/api" + "github.com/monax/hoard/v7/grant" + "github.com/monax/hoard/v7/meta" + "github.com/monax/hoard/v7/test/helpers" + "github.com/stretchr/testify/require" +) + +type duplexer struct { + plaintextGrantSpecs chan *api.PlaintextAndGrantSpecAndMeta + sent int + received int +} + +func newDuplexer() *duplexer { + return &duplexer{plaintextGrantSpecs: make(chan *api.PlaintextAndGrantSpecAndMeta, 100)} +} + +func (d *duplexer) Recv() (*api.PlaintextAndGrantSpecAndMeta, error) { + msg := <-d.plaintextGrantSpecs + if msg == nil { + return nil, io.EOF + } + d.received++ + return msg, nil +} + +func (d *duplexer) Send(msg *api.PlaintextAndGrantSpecAndMeta) error { + d.plaintextGrantSpecs <- msg + if msg != nil { + d.sent++ + } + return nil +} + +func (d *duplexer) Close() { + d.plaintextGrantSpecs <- nil +} + +func TestReceiveDocumentAndGrant(t *testing.T) { + d := newDuplexer() + spec := &grant.Spec{Plaintext: &grant.PlaintextSpec{}} + chunkSize := 100 + data := []byte(helpers.LongText) + salt := []byte("me hearties") + + doc := &meta.Document{ + Meta: &meta.Meta{ + Name: "Storia dei Musulmani di Sicilia ", + MimeType: "text/plain", + }, + Data: data, + } + + err := SendDocumentAndGrantSpec(d, doc, salt, spec, chunkSize) + require.NoError(t, err) + + // meta + spec + salt + data chunks + msgCount := 3 + (len(data)+chunkSize-1)/chunkSize + require.Equal(t, msgCount, d.sent) + // Signal EOF in duplexer + d.Close() + pgsm, err := ReceiveDocumentAndGrantSpec(d) + require.Equal(t, msgCount, d.received) + require.NoError(t, err) + require.Equal(t, doc, &meta.Document{ + Meta: pgsm.Meta, + Data: pgsm.PlaintextAndGrantSpec.Plaintext.Data, + }) + require.Equal(t, salt, pgsm.PlaintextAndGrantSpec.Plaintext.Salt) + require.Equal(t, spec, pgsm.PlaintextAndGrantSpec.GrantSpec) +} diff --git a/test/helpers/fixtures.go b/test/helpers/fixtures.go index 168e65c2..121c30b2 100644 --- a/test/helpers/fixtures.go +++ b/test/helpers/fixtures.go @@ -1,14 +1,9 @@ package helpers import ( - "github.com/monax/hoard/v6/meta" + "github.com/monax/hoard/v7/meta" ) -// ------------------------------------------------------- -// -// types -// -// ------------------------------------------------------- type TestDocData struct { Type string `json:"type"` RawData []byte `json:"data"` @@ -19,9 +14,32 @@ type DocumentTest struct { Data TestDocData `json:"data"` } -// ------------------------------------------------------- -// -// constants -// -// ------------------------------------------------------- -const FailureTemplate = `stuff {{ fail "You have failed" }} otherstuff` +const LongText = `La testimonianza degli scrittori arabi al par che de’ diplomi cristiani + /della Sicilia intorno Giorgio di Antiochia, conferma l’autorità civile + delli ammiragli, che che si pensi de’ miei supposti su l’origine sua. + Questa particolarità del diritto pubblico siciliano alla quale si è + badato assai poco fin qui, ci aiuta a comprendere le vicissitudini + dello Stato sotto i due Guglielmi, assai meglio che non faremmo col + mero ordinamento dei sette grandi ufizii della Corona,[48] supponendo + col Gregorio, che fosse stato fin da’ tempi di re Ruggiero qual si + ritrae negli ultimi di Guglielmo il Buono, e che l’autorità di quegli + ufizii si fosse estesa a tutti i sudditi, cristiani o musulmani. Erano + gli elementi dell’azienda musulmana che tornavano a galla quando + fu ristorata l’antica capitale. E dico delle istituzioni ed anco + degli uomini. Guerrieri che avessero seguito in Terraferma il primo + conte, uomini di mare, giuristi, segretarii, mercatanti, pedagoghi, + camerieri; qual più qual meno caritatevoli, dissoluti e picchiapetto; + bilingui e trilingui, barcheggianti tra due o tre religioni, versati + nella letteratura arabica e nella scienza greca, dilettanti dell’arte + bizantina e delle forme che prese in Siria, in Egitto o in Spagna: tali + mi sembrano que’ Musulmani e Greci di Sicilia che la novella corte + attirava, senza volerlo, nel castel di sopra di Palermo, insieme co’ + Levantini della tempra di Giorgio e coi prelati, i chierici e i nobili + d’Italia e di Francia. Que’ costumi dissonanti s’armonizzaron pure un + gran pezzo e produssero, nel corso del duodecimo secolo, due grandi +Statisti: orfani entrambi, maturati precocemente tra le agitazioni + della corte di Palermo, somiglianti anco l’uno all’altro per tempra e + cultura dell’intelletto, legislatori, buon massai, vaghi d’ogni scienza + e filosofi più che cristiani: Ruggiero primo re e Federigo secondo + imperatore; i due sultani battezzati di Sicilia, a’ quali l’Italia dee + non piccola parte dell’incivilimento suo.` diff --git a/test/helpers/functions.go b/test/helpers/functions.go index ae8c0481..f1d23de2 100644 --- a/test/helpers/functions.go +++ b/test/helpers/functions.go @@ -7,7 +7,7 @@ import ( "runtime" "testing" - "github.com/monax/hoard/v6/meta" + "github.com/monax/hoard/v7/meta" "github.com/stretchr/testify/require" ) diff --git a/test/helpers/server.go b/test/helpers/server.go new file mode 100644 index 00000000..a2ad8f1a --- /dev/null +++ b/test/helpers/server.go @@ -0,0 +1,64 @@ +package helpers + +import ( + "context" + "net" + + "github.com/monax/hoard/v7/api" + "google.golang.org/grpc" + "google.golang.org/grpc/test/bufconn" +) + +type service interface { + api.CleartextServer + api.EncryptionServer + api.StorageServer + api.GrantServer + api.DocumentServer +} + +// Provided with a HoardService executes runner in the context of a client-server connection over test buffer connection +// with all the hoard GRPC services registered on service +func RunWithTestServer(ctx context.Context, service service, + runner func(server *grpc.Server, conn *grpc.ClientConn) error) error { + + grpcServer := grpc.NewServer() + + api.RegisterCleartextServer(grpcServer, service) + api.RegisterEncryptionServer(grpcServer, service) + api.RegisterStorageServer(grpcServer, service) + api.RegisterGrantServer(grpcServer, service) + api.RegisterDocumentServer(grpcServer, service) + + const bufferSize = 1 << 20 + l := bufconn.Listen(bufferSize) + errCh := make(chan error) + go func() { + errCh <- grpcServer.Serve(l) + }() + + conn, err := grpc.DialContext(ctx, "", + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return l.Dial() }), + grpc.WithInsecure()) + if err != nil { + return err + } + defer conn.Close() + + // Do stuff while server runs + err = runner(grpcServer, conn) + if err != nil { + return err + } + + err = l.Close() + if err != nil { + return err + } + + err = <-errCh + if err != nil && err.Error() != "closed" { + return err + } + return nil +}