From ed2db1a1ebf83b25ddb0e2c2b94f94fa87f0d6e3 Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Sun, 19 Aug 2018 01:48:02 -0700 Subject: [PATCH] go vet - docker changes - makefile --- .dockerignore | 24 +- .gitignore | 8 +- Dockerfile | 18 +- Makefile | 40 +- cmd/Dockerfile | 27 -- cmd/cli.go | 14 +- cmd/main_test.go | 42 +- core/configs.go | 4 +- core/database.go | 4 +- core/services.go | 16 +- dev/Dockerfile-base | 5 + .dev/Dockerfile => dev/Dockerfile-dev | 2 + dev/Dockerfile-test | 41 ++ {.dev => dev}/test/cypress.json | 0 .../test/cypress/fixtures/example.json | 0 .../test/cypress/integration/0_setup.js | 0 .../test/cypress/integration/assets.js | 0 .../test/cypress/integration/dashboard.js | 0 .../test/cypress/integration/services.js | 0 .../test/cypress/integration/settings.js | 0 .../test/cypress/integration/users.js | 0 {.dev => dev}/test/cypress/plugins/index.js | 0 .../test/cypress/support/commands.js | 0 {.dev => dev}/test/cypress/support/index.js | 0 {.dev => dev}/test/package-lock.json | 448 +++++++++--------- {.dev => dev}/test/package.json | 0 {.dev => dev}/test/release.sh | 0 {.dev => dev}/test/test.sh | 0 handlers/setup.go | 33 +- source/js/charts.js | 4 +- source/source.go | 1 - types/service.go | 2 - 32 files changed, 381 insertions(+), 352 deletions(-) delete mode 100644 cmd/Dockerfile create mode 100644 dev/Dockerfile-base rename .dev/Dockerfile => dev/Dockerfile-dev (94%) create mode 100644 dev/Dockerfile-test rename {.dev => dev}/test/cypress.json (100%) rename {.dev => dev}/test/cypress/fixtures/example.json (100%) rename {.dev => dev}/test/cypress/integration/0_setup.js (100%) rename {.dev => dev}/test/cypress/integration/assets.js (100%) rename {.dev => dev}/test/cypress/integration/dashboard.js (100%) rename {.dev => dev}/test/cypress/integration/services.js (100%) rename {.dev => dev}/test/cypress/integration/settings.js (100%) rename {.dev => dev}/test/cypress/integration/users.js (100%) rename {.dev => dev}/test/cypress/plugins/index.js (100%) rename {.dev => dev}/test/cypress/support/commands.js (100%) rename {.dev => dev}/test/cypress/support/index.js (100%) rename {.dev => dev}/test/package-lock.json (87%) rename {.dev => dev}/test/package.json (100%) rename {.dev => dev}/test/release.sh (100%) rename {.dev => dev}/test/test.sh (100%) diff --git a/.dockerignore b/.dockerignore index c81b057b..7000e54f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,15 +1,11 @@ -** +.git +.idea +*.log +build +source/rice-box.go +.env +.DS_Store +*/**/node_modules +vendor -!/source -!/types -!/utils -!/plugin -!/notifiers -!/handlers -!/core -!/cmd -!/Makefile -!/README.md -!/LICENSE -!/Gopkg.lock -!/Gopkg.toml \ No newline at end of file +!build/alpine-linux-amd64 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 92403bf7..59109277 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,8 @@ assets *.log .env logs -.dev/test/node_modules -.dev/test/cypress/videos -.dev/test/cypress/screenshots -.dev/test/app +dev/test/node_modules +dev/test/cypress/videos +dev/test/cypress/screenshots +dev/test/app source/rice-box.go \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ede80775..22ec8b2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,11 @@ -FROM alpine:latest +FROM hunterlong/statup:base MAINTAINER "Hunter Long (https://github.com/hunterlong)" # Locked version of Statup for 'latest' Docker tag -ENV VERSION=v0.45 - -RUN apk --no-cache add libstdc++ ca-certificates -RUN wget -q https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \ - tar -xvzf statup-linux-alpine.tar.gz && \ - chmod +x statup && \ - mv statup /usr/local/bin/statup - -# sass Binary built for alpine linux -RUN wget -q https://assets.statup.io/sass && \ - chmod +x sass && \ - mv sass /usr/local/bin/sass - ENV IS_DOCKER=true -ENV SASS=/usr/local/bin/sass ENV STATUP_DIR=/app WORKDIR /app VOLUME /app EXPOSE 8080 -ENTRYPOINT statup \ No newline at end of file +CMD ["statup"] \ No newline at end of file diff --git a/Makefile b/Makefile index a30b3ec8..20a58d17 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ GOBUILD=$(GOCMD) build GOTEST=$(GOCMD) test GOGET=$(GOCMD) get GOINSTALL=$(GOCMD) install -XGO=GOPATH=$(GOPATH) $(GOPATH)/bin/xgo -go 1.10.x --dest=build +XGO=GOPATH=$(GOPATH) xgo -go 1.10.x --dest=build BUILDVERSION=-ldflags "-X main.VERSION=$(VERSION) -X main.COMMIT=$(TRAVIS_COMMIT)" RICE=$(GOPATH)/bin/rice PATH:=/usr/local/bin:$(GOPATH)/bin:$(PATH) @@ -67,19 +67,35 @@ docker: docker build -t hunterlong/statup:latest . docker-run: docker - docker run -t -p 8080:8080 hunterlong/statup:latest + docker run -it -p 8080:8080 hunterlong/statup:latest docker-dev: clean - docker build -t hunterlong/statup:dev -f .dev/Dockerfile . + docker build -t hunterlong/statup:dev -f dev/Dockerfile-dev . -docker-push-dev: docker-dev +docker-push-dev: docker-base docker-dev docker-test docker push hunterlong/statup:dev + docker push hunterlong/statup:base + docker push hunterlong/statup:test docker-run-dev: docker-dev docker run -t -p 8080:8080 hunterlong/statup:dev -docker-test: docker-dev - docker run -t -p 8080:8080 -e STATUP_DIR='/go/src/github.com/hunterlong/statup' --entrypoint "go test -v -p=1 $(BUILDVERSION) ./..." hunterlong/statup:dev +docker-test: docker-dev clean + docker build -t hunterlong/statup:test -f dev/Dockerfile-test . + +docker-run-test: docker-test + docker run -t -p 8080:8080 --entrypoint "go test -v -p=1 $(BUILDVERSION) ./..." hunterlong/statup:test + +docker-base: clean + wget -q https://assets.statup.io/sass && chmod +x sass + $(XGO) --targets=linux/amd64 -ldflags="-X main.VERSION=$(VERSION) -X main.COMMIT=$(TRAVIS_COMMIT) -linkmode external -extldflags -static" -out alpine ./cmd + docker build -t hunterlong/statup:base -f dev/Dockerfile-base . + +docker-build-base: + docker build -t hunterlong/statup:base -f dev/Dockerfile-base . + +docker-base-run: clean + docker run -t -p 8080:8080 hunterlong/statup:base databases: docker run --name statup_postgres -p 5432:5432 -e POSTGRES_PASSWORD=password123 -e POSTGRES_USER=root -e POSTGRES_DB=root -d postgres @@ -87,7 +103,7 @@ databases: sleep 30 dep: - dep ensure + dep ensure -vendor-only dev-deps: dep $(GOGET) github.com/stretchr/testify/assert @@ -115,7 +131,7 @@ clean: rm -rf source/{logs,assets,plugins,statup.db,config.yml,.sass-cache} rm -rf types/{logs,assets,plugins,statup.db,config.yml,.sass-cache} rm -rf utils/{logs,assets,plugins,statup.db,config.yml,.sass-cache} - rm -rf .dev/test/cypress/videos + rm -rf dev/test/cypress/videos rm -rf .sass-cache rm -f coverage.out rm -f coverage.json @@ -151,12 +167,16 @@ publish-homebrew: curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $(TRAVIS_API)" -d $(PUBLISH_BODY) https://api.travis-ci.com/repo/hunterlong%2Fhomebrew-statup/requests cypress-install: - cd .dev/test && npm install + cd /test && npm install cypress-test: clean cypress-install - cd .dev/test && npm test + cd dev/test && npm test travis-build: curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $(TRAVIS_API)" -d $(TRAVIS_BUILD_CMD) https://api.travis-ci.com/repo/hunterlong%2Fstatup/requests +xgo-install: clean + go get github.com/karalabe/xgo + docker pull karalabe/xgo-latest + .PHONY: build build-all build-alpine test-all test \ No newline at end of file diff --git a/cmd/Dockerfile b/cmd/Dockerfile deleted file mode 100644 index a7cc49c5..00000000 --- a/cmd/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -FROM alpine:latest -MAINTAINER 'Hunter Long (https://github.com/hunterlong)' -# Statup 'dev' image that will download the latest version of Statup from github - -RUN apk --no-cache add libstdc++ ca-certificates curl grep sed - -RUN export VERSION=$(curl --silent "https://api.github.com/repos/hunterlong/statup/releases/latest" \ - | grep '"tag_name":' \ - | sed -E 's/.*"([^"]+)".*/\1/'); \ - wget -q https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz; - -RUN tar -xvzf statup-linux-alpine.tar.gz && \ - chmod +x statup && \ - mv statup /usr/local/bin/statup - -RUN statup version - -RUN wget -q https://assets.statup.io/sass && \ - chmod +x sass && \ - mv sass /usr/local/bin/sass - -ENV IS_DOCKER=true - -WORKDIR /app -VOLUME /app -EXPOSE 8080 -ENTRYPOINT statup \ No newline at end of file diff --git a/cmd/cli.go b/cmd/cli.go index 191a3e4d..f44d7cb9 100644 --- a/cmd/cli.go +++ b/cmd/cli.go @@ -319,15 +319,13 @@ func CheckGithubUpdates() (GithubResponse, error) { response, err := http.Get("https://api.github.com/repos/hunterlong/statup/releases/latest") if err != nil { return GithubResponse{}, err - } else { - defer response.Body.Close() - contents, err := ioutil.ReadAll(response.Body) - if err != nil { - return GithubResponse{}, err - } - err = json.Unmarshal(contents, &gitResp) - return gitResp, err } + defer response.Body.Close() + contents, err := ioutil.ReadAll(response.Body) + if err != nil { + return GithubResponse{}, err + } + err = json.Unmarshal(contents, &gitResp) return gitResp, err } diff --git a/cmd/main_test.go b/cmd/main_test.go index 437952d2..048bcd7a 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -198,22 +198,32 @@ func RunMakeDatabaseConfig(t *testing.T, db string) { if db == "mysql" { port = 3306 } - config := &core.DbConfig{ - db, - os.Getenv("DB_HOST"), - os.Getenv("DB_USER"), - os.Getenv("DB_PASS"), - os.Getenv("DB_DATABASE"), - port, - "Testing " + db, - "This is a test of Statup.io!", - "", - "admin", - "admin", - "", - nil, - dir, - } + + //Project string `yaml:"-"` + //Description string `yaml:"-"` + //Domain string `yaml:"-"` + //Username string `yaml:"-"` + //Password string `yaml:"-"` + //Email string `yaml:"-"` + //Error error `yaml:"-"` + //Location string `yaml:"location"` + + config := &core.DbConfig{DbConfig: &types.DbConfig{ + DbConn: db, + DbHost: os.Getenv("DB_HOST"), + DbUser: os.Getenv("DB_USER"), + DbPass: os.Getenv("DB_PASS"), + DbData: os.Getenv("DB_DATABASE"), + DbPort: port, + Project: "Testing " + db, + Description: "This is a test of Statup.io!", + Domain: "", + Username: "admin", + Password: "admin", + Email: "", + Error: nil, + Location: dir, + }} err := config.Save() assert.Nil(t, err) diff --git a/core/configs.go b/core/configs.go index 463d589f..7f162859 100644 --- a/core/configs.go +++ b/core/configs.go @@ -74,7 +74,7 @@ func LoadUsingEnv() (*types.Config, error) { CoreApp.UseCdn = true } - dbConfig := &DbConfig{ + dbConfig := &DbConfig{DbConfig: &types.DbConfig{ DbConn: os.Getenv("DB_CONN"), DbHost: os.Getenv("DB_HOST"), DbUser: os.Getenv("DB_USER"), @@ -87,7 +87,7 @@ func LoadUsingEnv() (*types.Config, error) { Username: "admin", Password: "admin", Email: "info@localhost.com", - } + }} err := DbConnection(dbConfig.DbConn, true, ".") if err != nil { diff --git a/core/database.go b/core/database.go index e9cc2f0b..68789c92 100644 --- a/core/database.go +++ b/core/database.go @@ -39,7 +39,9 @@ var ( currentMigration int64 ) -type DbConfig types.DbConfig +type DbConfig struct { + *types.DbConfig +} func DbConnection(dbType string, retry bool, location string) error { var err error diff --git a/core/services.go b/core/services.go index dc35f0e7..fbbcea96 100644 --- a/core/services.go +++ b/core/services.go @@ -111,21 +111,19 @@ func NewService(s *types.Service) *Service { func (s *Service) SmallText() string { last := s.LimitedFailures() hits, _ := s.LimitedHits() - if !s.Online { - if len(last) > 0 { - lastFailure := MakeFailure(last[0].ToFailure()) - return fmt.Sprintf("%v on %v", lastFailure.ParseError(), last[0].ToFailure().CreatedAt.Format("Monday 3:04PM, Jan _2 2006")) - } else { - return fmt.Sprintf("%v is currently offline", s.Name) - } - } else { + if s.Online { if len(last) == 0 { return fmt.Sprintf("Online since %v", s.CreatedAt.Format("Monday 3:04PM, Jan _2 2006")) } else { return fmt.Sprintf("Online, last failure was %v", hits[0].CreatedAt.Format("Monday 3:04PM, Jan _2 2006")) } } - return fmt.Sprintf("No Failures in the last 24 hours! %v", hits[0]) + if len(last) > 0 { + lastFailure := MakeFailure(last[0].ToFailure()) + return fmt.Sprintf("%v on %v", lastFailure.ParseError(), last[0].ToFailure().CreatedAt.Format("Monday 3:04PM, Jan _2 2006")) + } else { + return fmt.Sprintf("%v is currently offline", s.Name) + } } func GroupDataBy(column string, id int64, tm time.Time, increment string) string { diff --git a/dev/Dockerfile-base b/dev/Dockerfile-base new file mode 100644 index 00000000..e0b8d6d3 --- /dev/null +++ b/dev/Dockerfile-base @@ -0,0 +1,5 @@ +FROM scratch +MAINTAINER "Hunter Long (https://github.com/hunterlong)" +WORKDIR /app +ADD sass /usr/local/bin/ +ADD ./build/alpine-linux-amd64 /usr/local/bin/statup \ No newline at end of file diff --git a/.dev/Dockerfile b/dev/Dockerfile-dev similarity index 94% rename from .dev/Dockerfile rename to dev/Dockerfile-dev index 440a46c3..d17d756a 100644 --- a/.dev/Dockerfile +++ b/dev/Dockerfile-dev @@ -17,5 +17,7 @@ ENV VERSION=$(VERSION) ENV IS_DOCKER=true RUN make dev-deps +RUN make install + EXPOSE 8080 ENTRYPOINT make run \ No newline at end of file diff --git a/dev/Dockerfile-test b/dev/Dockerfile-test new file mode 100644 index 00000000..251db5a4 --- /dev/null +++ b/dev/Dockerfile-test @@ -0,0 +1,41 @@ +FROM hunterlong/statup:dev +MAINTAINER "Hunter Long (https://github.com/hunterlong)" +# Statup 'test' image for running Statup golang tests and crypress UI tests + +RUN apk add --update nodejs nodejs-npm + +USER root + +RUN node --version +RUN echo "force new chrome here" + +# install Chromebrowser +RUN \ + wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ + echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \ + apt-get update && \ + apt-get install -y dbus-x11 google-chrome-stable && \ + rm -rf /var/lib/apt/lists/* + +# "fake" dbus address to prevent errors +# https://github.com/SeleniumHQ/docker-selenium/issues/87 +ENV DBUS_SESSION_BUS_ADDRESS=/dev/null + +# Add zip utility - it comes in very handy +RUN apt-get update && apt-get install -y zip + +# versions of local tools +RUN node -v +RUN npm -v +RUN yarn -v +RUN google-chrome --version +RUN zip --version +RUN git --version + +# a few environment variables to make NPM installs easier +# good colors for most applications +ENV TERM xterm +# avoid million NPM install messages +ENV npm_config_loglevel warn +# allow installing when the main user is root +ENV npm_config_unsafe_perm true \ No newline at end of file diff --git a/.dev/test/cypress.json b/dev/test/cypress.json similarity index 100% rename from .dev/test/cypress.json rename to dev/test/cypress.json diff --git a/.dev/test/cypress/fixtures/example.json b/dev/test/cypress/fixtures/example.json similarity index 100% rename from .dev/test/cypress/fixtures/example.json rename to dev/test/cypress/fixtures/example.json diff --git a/.dev/test/cypress/integration/0_setup.js b/dev/test/cypress/integration/0_setup.js similarity index 100% rename from .dev/test/cypress/integration/0_setup.js rename to dev/test/cypress/integration/0_setup.js diff --git a/.dev/test/cypress/integration/assets.js b/dev/test/cypress/integration/assets.js similarity index 100% rename from .dev/test/cypress/integration/assets.js rename to dev/test/cypress/integration/assets.js diff --git a/.dev/test/cypress/integration/dashboard.js b/dev/test/cypress/integration/dashboard.js similarity index 100% rename from .dev/test/cypress/integration/dashboard.js rename to dev/test/cypress/integration/dashboard.js diff --git a/.dev/test/cypress/integration/services.js b/dev/test/cypress/integration/services.js similarity index 100% rename from .dev/test/cypress/integration/services.js rename to dev/test/cypress/integration/services.js diff --git a/.dev/test/cypress/integration/settings.js b/dev/test/cypress/integration/settings.js similarity index 100% rename from .dev/test/cypress/integration/settings.js rename to dev/test/cypress/integration/settings.js diff --git a/.dev/test/cypress/integration/users.js b/dev/test/cypress/integration/users.js similarity index 100% rename from .dev/test/cypress/integration/users.js rename to dev/test/cypress/integration/users.js diff --git a/.dev/test/cypress/plugins/index.js b/dev/test/cypress/plugins/index.js similarity index 100% rename from .dev/test/cypress/plugins/index.js rename to dev/test/cypress/plugins/index.js diff --git a/.dev/test/cypress/support/commands.js b/dev/test/cypress/support/commands.js similarity index 100% rename from .dev/test/cypress/support/commands.js rename to dev/test/cypress/support/commands.js diff --git a/.dev/test/cypress/support/index.js b/dev/test/cypress/support/index.js similarity index 100% rename from .dev/test/cypress/support/index.js rename to dev/test/cypress/support/index.js diff --git a/.dev/test/package-lock.json b/dev/test/package-lock.json similarity index 87% rename from .dev/test/package-lock.json rename to dev/test/package-lock.json index c94ba2c0..b628efc2 100644 --- a/.dev/test/package-lock.json +++ b/dev/test/package-lock.json @@ -9,10 +9,10 @@ "resolved": "https://registry.npmjs.org/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", "integrity": "sha1-p3SS9LEdzHxEajSz4ochr9M8ZCo=", "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.29.0", + "figures": "1.7.0" }, "dependencies": { "chalk": { @@ -20,11 +20,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "supports-color": { @@ -39,8 +39,8 @@ "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.3.tgz", "integrity": "sha512-yYrK+/bgL3hwoRHMZG4r5fyLniCy1pXex5fimtewAY6vE/jsVs8Q37UsEO03tFlcmiLnQ3rBNMaZBYTi/+C1cw==", "requires": { - "debug": "^3.1.0", - "lodash.once": "^4.1.1" + "debug": "3.1.0", + "lodash.once": "4.1.1" } }, "@types/blob-util": { @@ -63,8 +63,8 @@ "resolved": "https://registry.npmjs.org/@types/chai-jquery/-/chai-jquery-1.1.35.tgz", "integrity": "sha512-7aIt9QMRdxuagLLI48dPz96YJdhu64p6FCa6n4qkGN5DQLHnrIjZpD9bXCvV2G0NwgZ1FAmfP214dxc5zNCfgQ==", "requires": { - "@types/chai": "*", - "@types/jquery": "*" + "@types/chai": "4.0.8", + "@types/jquery": "3.2.16" } }, "@types/jquery": { @@ -97,8 +97,8 @@ "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-2.7.29.tgz", "integrity": "sha512-EkI/ZvJT4hglWo7Ipf9SX+J+R9htNOMjW8xiOhce7+0csqvgoF5IXqY5Ae1GqRgNtWCuaywR5HjVa1snkTqpOw==", "requires": { - "@types/chai": "*", - "@types/sinon": "*" + "@types/chai": "4.0.8", + "@types/sinon": "4.0.0" } }, "ajv": { @@ -106,10 +106,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "ansi-escapes": { @@ -132,7 +132,7 @@ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "requires": { - "safer-buffer": "~2.1.0" + "safer-buffer": "2.1.2" } }, "assert-plus": { @@ -145,7 +145,7 @@ "resolved": "https://registry.npmjs.org/async/-/async-2.4.0.tgz", "integrity": "sha1-SZAgDxjqW4N8LMT4wDGmmFw4VhE=", "requires": { - "lodash": "^4.14.0" + "lodash": "4.17.10" } }, "asynckit": { @@ -168,8 +168,8 @@ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" + "core-js": "2.5.7", + "regenerator-runtime": "0.11.1" } }, "balanced-match": { @@ -183,7 +183,7 @@ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "tweetnacl": "0.14.5" } }, "bluebird": { @@ -196,7 +196,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -210,7 +210,7 @@ "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-1.3.0.tgz", "integrity": "sha512-O1ji32oyON9laVPJL1IZ5bmwd2cB46VfpxkDequezH+15FDzzVddEyrGEeX4WusDSqKxdyFdDQDEG1yo1GoWkg==", "requires": { - "os-homedir": "^1.0.1" + "os-homedir": "1.0.2" } }, "caseless": { @@ -223,9 +223,9 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "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.4.0" }, "dependencies": { "ansi-styles": { @@ -233,7 +233,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { - "color-convert": "^1.9.0" + "color-convert": "1.9.2" } }, "supports-color": { @@ -241,7 +241,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "requires": { - "has-flag": "^3.0.0" + "has-flag": "3.0.0" } } } @@ -261,7 +261,7 @@ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "requires": { - "restore-cursor": "^1.0.1" + "restore-cursor": "1.0.1" } }, "cli-spinners": { @@ -275,7 +275,7 @@ "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", "requires": { "slice-ansi": "0.0.4", - "string-width": "^1.0.1" + "string-width": "1.0.2" } }, "co": { @@ -306,7 +306,7 @@ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "~1.0.0" + "delayed-stream": "1.0.0" } }, "commander": { @@ -319,7 +319,7 @@ "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.4.0.tgz", "integrity": "sha1-EYe+Tz1M8MBCfUP3Tu8fc1AWFMA=", "requires": { - "babel-runtime": "^6.18.0" + "babel-runtime": "6.26.0" } }, "concat-map": { @@ -332,9 +332,9 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "inherits": "2.0.3", + "readable-stream": "2.3.6", + "typedarray": "0.0.6" } }, "core-js": { @@ -352,11 +352,11 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "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.4", + "path-key": "2.0.1", + "semver": "5.5.0", + "shebang-command": "1.2.0", + "which": "1.3.1" } }, "cypress": { @@ -411,7 +411,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "date-fns": { @@ -444,8 +444,8 @@ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "optional": true, "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "jsbn": "0.1.1", + "safer-buffer": "2.1.2" } }, "elegant-spinner": { @@ -464,13 +464,13 @@ "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", "dev": true, "requires": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", + "duplexer": "0.1.1", + "from": "0.1.7", + "map-stream": "0.1.0", "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" + "split": "0.3.3", + "stream-combiner": "0.0.4", + "through": "2.3.8" } }, "execa": { @@ -478,13 +478,13 @@ "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.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" + "cross-spawn": "6.0.5", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" } }, "executable": { @@ -492,7 +492,7 @@ "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "requires": { - "pify": "^2.2.0" + "pify": "2.3.0" } }, "exit-hook": { @@ -529,7 +529,7 @@ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", "requires": { - "fd-slicer": "~1.0.1" + "fd-slicer": "1.0.1" } } } @@ -554,7 +554,7 @@ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", "requires": { - "pend": "~1.2.0" + "pend": "1.2.0" } }, "figures": { @@ -562,8 +562,8 @@ "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" } }, "forever-agent": { @@ -576,9 +576,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "^0.4.0", + "asynckit": "0.4.0", "combined-stream": "1.0.6", - "mime-types": "^2.1.12" + "mime-types": "2.1.19" } }, "from": { @@ -592,9 +592,9 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.1.tgz", "integrity": "sha1-f8DGyJV/mD9X8waiTlud3Y0N2IA=", "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^3.0.0", - "universalify": "^0.1.0" + "graceful-fs": "4.1.11", + "jsonfile": "3.0.1", + "universalify": "0.1.2" } }, "fs.realpath": { @@ -620,7 +620,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "glob": { @@ -628,12 +628,12 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "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" + "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" } }, "global-dirs": { @@ -641,7 +641,7 @@ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", "requires": { - "ini": "^1.3.4" + "ini": "1.3.5" } }, "graceful-fs": { @@ -659,8 +659,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { - "ajv": "^5.1.0", - "har-schema": "^2.0.0" + "ajv": "5.5.2", + "har-schema": "2.0.0" } }, "has-ansi": { @@ -668,7 +668,7 @@ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "2.1.1" } }, "has-flag": { @@ -687,9 +687,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.2" } }, "indent-string": { @@ -697,7 +697,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "requires": { - "repeating": "^2.0.0" + "repeating": "2.0.1" } }, "inflight": { @@ -705,8 +705,8 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -724,7 +724,7 @@ "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", "requires": { - "ci-info": "^1.0.0" + "ci-info": "1.3.1" } }, "is-finite": { @@ -732,7 +732,7 @@ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "requires": { - "number-is-nan": "^1.0.0" + "number-is-nan": "1.0.1" } }, "is-fullwidth-code-point": { @@ -740,7 +740,7 @@ "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-installed-globally": { @@ -748,8 +748,8 @@ "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" } }, "is-path-inside": { @@ -757,7 +757,7 @@ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "1.0.2" } }, "is-promise": { @@ -808,11 +808,11 @@ "integrity": "sha1-M4WseQGSEwy+Iw6ALsAskhW7/to=", "dev": true, "requires": { - "hoek": "4.x.x", - "isemail": "2.x.x", - "items": "2.x.x", - "moment": "2.x.x", - "topo": "2.x.x" + "hoek": "4.2.1", + "isemail": "2.2.1", + "items": "2.1.1", + "moment": "2.22.2", + "topo": "2.0.2" } }, "jsbn": { @@ -841,7 +841,7 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", "requires": { - "graceful-fs": "^4.1.6" + "graceful-fs": "4.1.11" } }, "jsprim": { @@ -865,22 +865,22 @@ "resolved": "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz", "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=", "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "figures": "^1.7.0", - "indent-string": "^2.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.2.0", - "listr-verbose-renderer": "^0.4.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "ora": "^0.2.3", - "p-map": "^1.1.1", - "rxjs": "^5.0.0-beta.11", - "stream-to-observable": "^0.1.0", - "strip-ansi": "^3.0.1" + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "figures": "1.7.0", + "indent-string": "2.1.0", + "is-promise": "2.1.0", + "is-stream": "1.1.0", + "listr-silent-renderer": "1.1.1", + "listr-update-renderer": "0.2.0", + "listr-verbose-renderer": "0.4.1", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "ora": "0.2.3", + "p-map": "1.2.0", + "rxjs": "5.5.11", + "stream-to-observable": "0.1.0", + "strip-ansi": "3.0.1" }, "dependencies": { "chalk": { @@ -888,11 +888,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "log-symbols": { @@ -900,7 +900,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "requires": { - "chalk": "^1.0.0" + "chalk": "1.1.3" } }, "supports-color": { @@ -920,14 +920,14 @@ "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz", "integrity": "sha1-yoDhd5tOcCZoB+ju0a1qvjmFUPk=", "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "elegant-spinner": "1.0.1", + "figures": "1.7.0", + "indent-string": "3.2.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "strip-ansi": "3.0.1" }, "dependencies": { "chalk": { @@ -935,11 +935,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "indent-string": { @@ -952,7 +952,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", "requires": { - "chalk": "^1.0.0" + "chalk": "1.1.3" } }, "supports-color": { @@ -967,10 +967,10 @@ "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.29.0", + "figures": "1.7.0" }, "dependencies": { "chalk": { @@ -978,11 +978,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "supports-color": { @@ -1007,7 +1007,7 @@ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", "requires": { - "chalk": "^2.0.1" + "chalk": "2.4.1" } }, "log-update": { @@ -1015,8 +1015,8 @@ "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" + "ansi-escapes": "1.4.0", + "cli-cursor": "1.0.2" } }, "map-stream": { @@ -1035,7 +1035,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", "requires": { - "mime-db": "~1.35.0" + "mime-db": "1.35.0" } }, "minimatch": { @@ -1043,7 +1043,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -1087,7 +1087,7 @@ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "requires": { - "path-key": "^2.0.0" + "path-key": "2.0.1" } }, "number-is-nan": { @@ -1110,7 +1110,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "onetime": { @@ -1123,10 +1123,10 @@ "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", "requires": { - "chalk": "^1.1.1", - "cli-cursor": "^1.0.2", - "cli-spinners": "^0.1.2", - "object-assign": "^4.0.1" + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-spinners": "0.1.2", + "object-assign": "4.1.1" }, "dependencies": { "chalk": { @@ -1134,11 +1134,11 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" } }, "supports-color": { @@ -1189,7 +1189,7 @@ "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "dev": true, "requires": { - "through": "~2.3" + "through": "2.3.8" } }, "pend": { @@ -1223,7 +1223,7 @@ "integrity": "sha1-tCGyQUDWID8e08dplrRCewjowBQ=", "dev": true, "requires": { - "event-stream": "~3.3.0" + "event-stream": "3.3.4" } }, "punycode": { @@ -1251,13 +1251,13 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "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.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "regenerator-runtime": { @@ -1270,7 +1270,7 @@ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { - "is-finite": "^1.0.0" + "is-finite": "1.0.2" } }, "request": { @@ -1278,26 +1278,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", - "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", - "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" + "aws-sign2": "0.7.0", + "aws4": "1.8.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.2", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.19", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.2", + "safe-buffer": "5.1.2", + "tough-cookie": "2.3.4", + "tunnel-agent": "0.6.0", + "uuid": "3.3.2" } }, "request-progress": { @@ -1305,7 +1305,7 @@ "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-0.3.1.tgz", "integrity": "sha1-ByHBBdipasayzossia4tXs/Pazo=", "requires": { - "throttleit": "~0.0.2" + "throttleit": "0.0.2" } }, "restore-cursor": { @@ -1313,8 +1313,8 @@ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" + "exit-hook": "1.1.1", + "onetime": "1.1.0" } }, "rx": { @@ -1351,7 +1351,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "1.0.0" } }, "shebang-regex": { @@ -1375,7 +1375,7 @@ "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=", "dev": true, "requires": { - "through": "2" + "through": "2.3.8" } }, "sshpk": { @@ -1383,15 +1383,15 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" + "asn1": "0.2.4", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.2", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.2", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "safer-buffer": "2.1.2", + "tweetnacl": "0.14.5" } }, "start-server-and-test": { @@ -1423,7 +1423,7 @@ "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=", "dev": true, "requires": { - "duplexer": "~0.1.1" + "duplexer": "0.1.1" } }, "stream-to-observable": { @@ -1436,9 +1436,9 @@ "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_decoder": { @@ -1446,7 +1446,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } }, "strip-ansi": { @@ -1454,7 +1454,7 @@ "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": { @@ -1467,7 +1467,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", "requires": { - "has-flag": "^2.0.0" + "has-flag": "2.0.0" }, "dependencies": { "has-flag": { @@ -1498,7 +1498,7 @@ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", "requires": { - "os-tmpdir": "~1.0.1" + "os-tmpdir": "1.0.2" } }, "topo": { @@ -1507,7 +1507,7 @@ "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=", "dev": true, "requires": { - "hoek": "4.x.x" + "hoek": "4.2.1" } }, "tough-cookie": { @@ -1515,7 +1515,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "requires": { - "punycode": "^1.4.1" + "punycode": "1.4.1" } }, "tunnel-agent": { @@ -1523,7 +1523,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "tweetnacl": { @@ -1573,9 +1573,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "^1.0.0", + "assert-plus": "1.0.0", "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "extsprintf": "1.3.0" } }, "wait-on": { @@ -1584,11 +1584,11 @@ "integrity": "sha512-hDwJ674+7dfiiK/cxtYCwPxlnjXDjto/pCz1PF02sXUhqCqCWsgvxZln0699PReWqXXgkxqkF6DDo5Rj9sjNvw==", "dev": true, "requires": { - "core-js": "^2.4.1", - "joi": "^9.2.0", - "minimist": "^1.2.0", - "request": "^2.78.0", - "rx": "^4.1.0" + "core-js": "2.5.7", + "joi": "9.2.0", + "minimist": "1.2.0", + "request": "2.87.0", + "rx": "4.1.0" } }, "which": { @@ -1596,7 +1596,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "requires": { - "isexe": "^2.0.0" + "isexe": "2.0.0" } }, "wrappy": { @@ -1609,8 +1609,8 @@ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.8.0.tgz", "integrity": "sha1-eUUK/yKyqcWkHvVOAtuQfM+/nuI=", "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.0.1" + "buffer-crc32": "0.2.13", + "fd-slicer": "1.0.1" } } } diff --git a/.dev/test/package.json b/dev/test/package.json similarity index 100% rename from .dev/test/package.json rename to dev/test/package.json diff --git a/.dev/test/release.sh b/dev/test/release.sh similarity index 100% rename from .dev/test/release.sh rename to dev/test/release.sh diff --git a/.dev/test/test.sh b/dev/test/test.sh similarity index 100% rename from .dev/test/test.sh rename to dev/test/test.sh diff --git a/handlers/setup.go b/handlers/setup.go index 19bb620b..4746e3e9 100644 --- a/handlers/setup.go +++ b/handlers/setup.go @@ -74,22 +74,23 @@ func ProcessSetupHandler(w http.ResponseWriter, r *http.Request) { domain := r.PostForm.Get("domain") email := r.PostForm.Get("email") - config := &core.DbConfig{ - dbConn, - dbHost, - dbUser, - dbPass, - dbDatabase, - dbPort, - project, - description, - domain, - username, - password, - email, - nil, - ".", - } + config := &core.DbConfig{DbConfig: &types.DbConfig{ + DbConn: dbConn, + DbHost: dbHost, + DbUser: dbUser, + DbPass: dbPass, + DbData: dbDatabase, + DbPort: dbPort, + Project: project, + Description: description, + Domain: domain, + Username: username, + Password: password, + Email: email, + Error: nil, + Location: ".", + }} + err := config.Save() if err != nil { utils.Log(4, err) diff --git a/source/js/charts.js b/source/js/charts.js index 65794b60..07ac03ff 100644 --- a/source/js/charts.js +++ b/source/js/charts.js @@ -1,6 +1,6 @@ -{{ range . }}{{$s := .}}{{ if .AvgTime }}var ctx_{{$s.Id}}=document.getElementById("service_{{$s.Id}}").getContext('2d');var chartdata=new Chart(ctx_{{$s.Id}},{type:'line',data:{datasets:[{label:'Response Time (Milliseconds)',data:{{safe .GraphData}},backgroundColor:['rgba(47, 206, 30, 0.92)'],borderColor:['rgb(47, 171, 34)'],borderWidth:1}]},options:{maintainAspectRatio:!1,scaleShowValues:!0,layout:{padding:{left:0,right:0,top:0,bottom:-10}},hover:{animationDuration:0,},responsiveAnimationDuration:0,animation:{duration:3500,onComplete:function(){var chartInstance=this.chart,ctx=chartInstance.ctx;var controller=this.chart.controller;var xAxis=controller.scales['x-axis-0'];var yAxis=controller.scales['y-axis-0'];ctx.font=Chart.helpers.fontString(Chart.defaults.global.defaultFontSize,Chart.defaults.global.defaultFontStyle,Chart.defaults.global.defaultFontFamily);ctx.textAlign='center';ctx.textBaseline='bottom';var numTicks=xAxis.ticks.length;var yOffsetStart=xAxis.width/numTicks;var halfBarWidth=(xAxis.width/(numTicks*2));xAxis.ticks.forEach(function(value,index){var xOffset=20;var yOffset=(yOffsetStart*index)+halfBarWidth;ctx.fillStyle='#e2e2e2';ctx.fillText(value,yOffset,xOffset)});this.data.datasets.forEach(function(dataset,i){var meta=chartInstance.controller.getDatasetMeta(i);var hxH=0;var hyH=0;var hxL=0;var hyL=0;var highestNum=0;var lowestnum=999999999999;meta.data.forEach(function(bar,index){var data=dataset.data[index];if(lowestnum>data.y){lowestnum=data.y;hxL=bar._model.x;hyL=bar._model.y} +{{ range . }}{{ if .AvgTime }}var ctx_{{.Id}}=document.getElementById("service_{{.Id}}").getContext('2d');var chartdata=new Chart(ctx_{{.Id}},{type:'line',data:{datasets:[{label:'Response Time (Milliseconds)',data:{{safe .GraphData}},backgroundColor:['rgba(47, 206, 30, 0.92)'],borderColor:['rgb(47, 171, 34)'],borderWidth:1}]},options:{maintainAspectRatio:!1,scaleShowValues:!0,layout:{padding:{left:0,right:0,top:0,bottom:-10}},hover:{animationDuration:0,},responsiveAnimationDuration:0,animation:{duration:3500,onComplete:function(){var chartInstance=this.chart,ctx=chartInstance.ctx;var controller=this.chart.controller;var xAxis=controller.scales['x-axis-0'];var yAxis=controller.scales['y-axis-0'];ctx.font=Chart.helpers.fontString(Chart.defaults.global.defaultFontSize,Chart.defaults.global.defaultFontStyle,Chart.defaults.global.defaultFontFamily);ctx.textAlign='center';ctx.textBaseline='bottom';var numTicks=xAxis.ticks.length;var yOffsetStart=xAxis.width/numTicks;var halfBarWidth=(xAxis.width/(numTicks*2));xAxis.ticks.forEach(function(value,index){var xOffset=20;var yOffset=(yOffsetStart*index)+halfBarWidth;ctx.fillStyle='#e2e2e2';ctx.fillText(value,yOffset,xOffset)});this.data.datasets.forEach(function(dataset,i){var meta=chartInstance.controller.getDatasetMeta(i);var hxH=0;var hyH=0;var hxL=0;var hyL=0;var highestNum=0;var lowestnum=999999999999;meta.data.forEach(function(bar,index){var data=dataset.data[index];if(lowestnum>data.y){lowestnum=data.y;hxL=bar._model.x;hyL=bar._model.y} if(data.y>highestNum){highestNum=data.y;hxH=bar._model.x;hyH=bar._model.y}});if(hxH>=820){hxH=820}else if(50>=hxH){hxH=50} if(hxL>=820){hxL=820}else if(70>=hxL){hxL=70} - ctx.fillStyle='#ffa7a2';ctx.fillText(highestNum+"ms",hxH-40,hyH+15);ctx.fillStyle='#45d642';ctx.fillText(lowestnum+"ms",hxL,hyL+10);console.log("done service_id_{{$s.Id}}")})}},legend:{display:!1},tooltips:{"enabled":!1},scales:{yAxes:[{display:!1,ticks:{fontSize:20,display:!1,beginAtZero:!1},gridLines:{display:!1}}],xAxes:[{type:'time',distribution:'series',autoSkip:!1,gridLines:{display:!1},ticks:{stepSize:1,min:0,fontColor:"white",fontSize:20,display:!1,}}]},elements:{point:{radius:0}}}}) + ctx.fillStyle='#ffa7a2';ctx.fillText(highestNum+"ms",hxH-40,hyH+15);ctx.fillStyle='#45d642';ctx.fillText(lowestnum+"ms",hxL,hyL+10);console.log("done service_id_{{.Id}}")})}},legend:{display:!1},tooltips:{"enabled":!1},scales:{yAxes:[{display:!1,ticks:{fontSize:20,display:!1,beginAtZero:!1},gridLines:{display:!1}}],xAxes:[{type:'time',distribution:'series',autoSkip:!1,gridLines:{display:!1},ticks:{stepSize:1,min:0,fontColor:"white",fontSize:20,display:!1,}}]},elements:{point:{radius:0}}}}) {{ end }} {{ end }} \ No newline at end of file diff --git a/source/source.go b/source/source.go index d8b6092c..290e823e 100644 --- a/source/source.go +++ b/source/source.go @@ -216,5 +216,4 @@ func copyAndCapture(w io.Writer, r io.Reader) ([]byte, error) { return out, err } } - return nil, nil } diff --git a/types/service.go b/types/service.go index a09d6cf4..e49eca19 100644 --- a/types/service.go +++ b/types/service.go @@ -38,7 +38,6 @@ type Service struct { Online24Hours float32 `json:"24_hours_online"` AvgResponse string `json:"avg_response"` TotalUptime string `json:"uptime"` - OrderId int64 `json:"order_id"` Failures []*Failure `json:"failures"` Checkins []*Checkin `json:"checkins"` Running chan bool `json:"-"` @@ -70,5 +69,4 @@ func (s *Service) IsRunning() bool { default: return true } - return false }