feat(cp-gql-mock-server): simulate loading times

This commit is contained in:
Sérgio Ramos 2017-08-02 13:57:00 +01:00
parent 18c94f7f60
commit 5cbdb23e3f
41 changed files with 12500 additions and 7200 deletions

View File

@ -43,31 +43,31 @@
"apr-series": "^1.0.5",
"apr-sort-by": "^1.0.5",
"babel-eslint": "^7.2.3",
"chalk": "^1.1.3",
"chalk": "^2.1.0",
"checksum": "^0.1.1",
"conventional-changelog-angular": "^1.3.3",
"conventional-changelog-cli": "^1.3.1",
"conventional-changelog-lint": "^1.1.9",
"conventional-changelog-lint-config-angular": "^0.4.1",
"conventional-changelog-angular": "^1.5.0",
"conventional-changelog-cli": "^1.3.3",
"conventional-changelog-lint": "^2.1.1",
"conventional-changelog-lint-config-angular": "^1.0.0",
"conventional-changelog-lint-config-lerna-scopes": "^1.0.0",
"cross-env": "^5.0.1",
"cross-env": "^5.0.5",
"dotenv": "^4.0.0",
"eslint": "^3.19.0",
"eslint-config-prettier": "^2.2.0",
"eslint-config-react-app": "^1.0.4",
"eslint": "^4.5.0",
"eslint-config-prettier": "^2.3.0",
"eslint-config-react-app": "^2.0.0",
"eslint-config-xo-space": "^0.16.0",
"eslint-plugin-flowtype": "^2.34.0",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-flowtype": "^2.35.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.2.0",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-react": "^7.3.0",
"eslint-tap": "^2.0.1",
"execa": "^0.7.0",
"execa": "^0.8.0",
"figures": "^2.0.0",
"force-array": "^3.1.0",
"husky": "^0.13.4",
"inquirer": "^3.1.0",
"lerna": "^2.0.0",
"husky": "^0.14.3",
"inquirer": "^3.2.3",
"lerna": "^2.1.2",
"lerna-wizard": "ramitos/lerna-wizard#7bcdc11",
"license-to-fail": "^2.2.0",
"lodash.flatten": "^4.4.0",
@ -75,11 +75,11 @@
"lodash.isstring": "^4.0.1",
"lodash.uniq": "^4.5.0",
"lodash.uniqby": "^4.7.0",
"prettier": "1.6.0",
"prettier": "1.6.1",
"quality-docs": "^3.3.0",
"read-pkg": "^2.0.0",
"redrun": "^5.9.15",
"semver": "^5.3.0",
"redrun": "^5.9.17",
"semver": "^5.4.1",
"staged-git-files": "0.0.4",
"yargs": "^8.0.2"
},

View File

@ -17,9 +17,9 @@
"bunyan": "^1.8.12",
"dotenv": "^4.0.0",
"express": "^4.15.4",
"express-graphql": "^0.6.7",
"express-graphql": "^0.6.11",
"got": "^7.1.0",
"graphql": "^0.11.1",
"graphql": "^0.11.2",
"smartdc-auth": "^2.5.5",
"triton": "^5.3.1"
},

View File

@ -67,16 +67,16 @@
"apr-for-each": "^1.0.6",
"apr-main": "^1.0.7",
"babel-plugin-inline-react-svg": "^0.4.0",
"babel-plugin-styled-components": "^1.1.7",
"babel-plugin-styled-components": "^1.2.0",
"babel-preset-joyent-portal": "^2.0.0",
"cross-env": "^5.0.5",
"eslint": "^4.5.0",
"eslint-config-joyent-portal": "2.0.0",
"eslint-config-joyent-portal": "3.0.0",
"jest": "^20.0.4",
"jest-alias-preprocessor": "^1.1.1",
"jest-cli": "^20.0.4",
"jest-diff": "^20.0.3",
"jest-junit": "^2.1.0",
"jest-junit": "^3.0.0",
"jest-matcher-utils": "^20.0.3",
"jest-snapshot": "^20.0.3",
"jest-styled-components": "^4.4.1",
@ -85,7 +85,7 @@
"mz": "^2.6.0",
"react-scripts": "^1.0.12",
"react-test-renderer": "^15.6.1",
"redrun": "^5.9.16",
"redrun": "^5.9.17",
"stylelint": "^8.0.0",
"stylelint-config-primer": "^2.0.1",
"stylelint-config-standard": "^17.0.0",

View File

@ -8,15 +8,18 @@
"scripts": {
"lint": "eslint . --fix",
"lint-ci": "eslint . --format junit --output-file $CIRCLE_TEST_REPORTS/lint/cp-gql-mock-server.xml",
"test": "nyc --reporter=lcov --reporter=text ava --verbose",
"test-ci": "echo 0 `# nyc --report-dir=$CIRCLE_ARTIFACTS/cp-gql-mock-server --reporter=lcov --reporter=text ava --tap | tap-xunit > $CIRCLE_TEST_REPORTS/test/cp-gql-mock-server.xml`",
"test": "NODE_ENV=test nyc --reporter=lcov --reporter=text ava --verbose",
"test-ci": "NODE_ENV=test nyc --report-dir=$CIRCLE_ARTIFACTS/cp-gql-mock-server --reporter=lcov --reporter=text ava --verbose --tap | tap-xunit > $CIRCLE_TEST_REPORTS/test/cp-gql-mock-server.xml",
"start": "node src/index.js",
"dev": "PORT=3000 nodemon src/index.js",
"prepublish": "echo 0"
},
"dependencies": {
"apr-map": "^1.0.5",
"build-array": "^1.0.0",
"camel-case": "^3.0.0",
"crocket": "^0.9.11",
"deep-object-diff": "^1.0.4",
"force-array": "^3.1.0",
"good": "^7.3.0",
"good-console": "^6.4.0",
@ -24,25 +27,23 @@
"graphi": "^3.0.0",
"hapi": "^16.5.2",
"hasha": "^3.0.0",
"joi": "^10.6.0",
"joyent-cp-gql-schema": "^1.7.0",
"js-yaml": "^3.9.1",
"lodash.find": "^4.6.0",
"lodash.findindex": "^4.6.0",
"lodash.flatten": "^4.4.0",
"lodash.random": "^3.2.0",
"lodash.uniq": "^4.5.0",
"param-case": "^2.1.1",
"uuid": "^3.1.0"
"param-case": "^2.1.1"
},
"devDependencies": {
"apollo-client": "^1.9.1",
"apollo-client": "^1.9.2",
"ava": "^0.22.0",
"delay": "^2.0.0",
"eslint": "^4.5.0",
"eslint-config-joyent-portal": "3.0.0",
"execa": "^0.8.0",
"lodash.sortby": "^4.7.0",
"mz": "^2.6.0",
"node-fetch": "^1.7.2",
"nodemon": "^1.11.0",
"nyc": "^11.1.0",
"tap-xunit": "^1.7.0"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,13 @@ mutation createDeploymentGroup($name: String!) {
id
name
slug
status
services {
id
hash
name
slug
status
instances {
id
name

View File

@ -1,5 +1,14 @@
mutation deleteDeploymentGroup($id: ID!) {
deleteDeploymentGroup(id: $id) {
id
status
services {
slug
status
instances {
name
status
}
}
}
}

View File

@ -1,5 +1,6 @@
mutation deleteServices($ids: [ID]!) {
deleteServices(ids: $ids) {
id
status
}
}

View File

@ -0,0 +1,17 @@
query DeploymentGroups($id: ID!) {
deploymentGroup(id: $id) {
id
slug
status
services {
id
slug
status
instances {
id
name
status
}
}
}
}

View File

@ -3,6 +3,7 @@ query DeploymentGroups($slug: String!) {
id
name
slug
status
services {
id
name
@ -20,6 +21,7 @@ query DeploymentGroups($slug: String!) {
instances {
id
name
status
}
}
}

View File

@ -1,27 +1,17 @@
query {
deploymentGroups {
id
name
slug
status
services {
id
name
status
slug
status
instances {
id
name
status
}
branches {
id
name
slug
instances {
id
name
}
}
}
}
}

View File

@ -5,6 +5,7 @@ query DeploymentGroups($slug: String!) {
id
name
slug
status
services {
id
name
@ -22,6 +23,7 @@ query DeploymentGroups($slug: String!) {
instances {
id
name
status
}
}
}

View File

@ -4,6 +4,7 @@ query {
deploymentGroups {
id
slug
status
}
}
}

View File

@ -0,0 +1,7 @@
query Instance($id: ID!) {
instance(id: $id) {
id
name
status
}
}

View File

@ -1,6 +1,7 @@
query DeploymentGroups($iName: String!) {
query Instances($iName: String!) {
instances(name: $iName) {
id
name
status
}
}

View File

@ -2,5 +2,6 @@ query {
instances {
id
name
status
}
}

View File

@ -1,4 +1,4 @@
query DeploymentGroups(
query Instances(
$dgSlug: String!
$sSlug: String!
$iName: String!
@ -10,13 +10,16 @@ query DeploymentGroups(
id
name
slug
status
services(slug: $sSlug) {
id
name
slug
status
instances(name: $iName) {
id
name
status
}
branches {
name
@ -24,6 +27,7 @@ query DeploymentGroups(
instances(name: $biName) {
id
name
status
}
}
}

View File

@ -3,15 +3,16 @@ query {
id
deploymentGroups {
id
name
slug
status
services {
id
name
slug
status
instances {
id
name
status
}
branches {
id
@ -20,6 +21,7 @@ query {
instances {
id
name
status
}
}
}

View File

@ -1,5 +1,6 @@
mutation restartServices($ids: [ID]!) {
restartServices(ids: $ids) {
id
status
}
}

View File

@ -0,0 +1,12 @@
query Service($id: ID!) {
service(id: $id) {
id
slug
status
instances {
id
name
status
}
}
}

View File

@ -1,12 +1,12 @@
query DeploymentGroups($sSlug: String!) {
query Services($sSlug: String!) {
services(slug: $sSlug) {
id
name
slug
branches {
status
instances {
id
name
slug
status
}
}
}

View File

@ -1,12 +1,12 @@
query {
services {
id
name
slug
branches {
status
instances {
id
name
slug
status
}
}
}

View File

@ -1,18 +1,14 @@
query DeploymentGroups($dgSlug: String!, $sSlug: String!) {
query Services($dgSlug: String!, $sSlug: String!) {
portal {
id
deploymentGroups(slug: $dgSlug) {
id
name
slug
status
services(slug: $sSlug) {
id
name
slug
branches {
name
slug
}
status
}
}
}

View File

@ -3,16 +3,20 @@ query {
id
deploymentGroups {
id
name
slug
status
services {
id
name
slug
status
branches {
id
name
slug
instances {
id
name
status
}
}
}
}

View File

@ -1,5 +1,6 @@
mutation startServices($ids: [ID]!) {
startServices(ids: $ids) {
id
status
}
}

View File

@ -1,5 +1,6 @@
mutation stopServices($ids: [ID]!) {
stopServices(ids: $ids) {
id
status
}
}

View File

@ -25,7 +25,7 @@ type DeploymentGroup {
id: ID!
name: String!
slug: String!
services(name: String, slug: String, parentId: ID): [Service]
services(name: String, slug: String): [Service]
version: Version
history: [Version]
imported: Boolean
@ -125,7 +125,7 @@ type Service {
slug: String!
instances(name: String, machineId: ID, status: InstanceStatus): [Instance]!
connections: [String] # list of serviceIds
branches: [Service]
branches(name: String, slug: String): [Service]
config: ServiceConfig
status: ServiceStatus
}

View File

@ -19,6 +19,6 @@
"eslint": "^4.5.0",
"eslint-config-joyent-portal": "3.0.0",
"js-yaml": "^3.9.1",
"lab": "^14.2.1"
"lab": "^14.2.2"
}
}

View File

@ -17,7 +17,7 @@
"eslint-config-prettier": "^2.3.0",
"eslint-config-react-app": "^2.0.0",
"eslint-config-xo-space": "^0.16.0",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-flowtype": "^2.35.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.2.0",
@ -29,7 +29,7 @@
"eslint-config-prettier": "^2.3.0",
"eslint-config-react-app": "^2.0.0",
"eslint-config-xo-space": "^0.16.0",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-flowtype": "^2.35.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.2.0",

View File

@ -33,7 +33,7 @@
"jest": "^20.0.4",
"react": "^15.6.1",
"react-test-renderer": "^15.6.1",
"redrun": "^5.9.16"
"redrun": "^5.9.17"
},
"peerDependencies": {
"react": "*"

View File

@ -33,7 +33,7 @@
"remcalc": "^1.0.8"
},
"devDependencies": {
"babel-plugin-styled-components": "^1.1.7",
"babel-plugin-styled-components": "^1.2.0",
"babel-preset-react-app": "^3.0.2",
"bup": "^1.0.9",
"chalk": "^2.1.0",
@ -41,14 +41,14 @@
"eslint-config-joyent-portal": "3.0.0",
"jest": "^20.0.4",
"jest-diff": "^20.0.3",
"jest-junit": "^2.1.0",
"jest-junit": "^3.0.0",
"jest-matcher-utils": "^20.0.3",
"jest-snapshot": "^20.0.3",
"jest-styled-components": "^4.4.1",
"react": "^15.6.1",
"react-scripts": "^1.0.12",
"react-test-renderer": "^15.6.1",
"redrun": "^5.9.16",
"redrun": "^5.9.17",
"strip-ansi": "^4.0.0",
"styled-components": "^2.1.2",
"stylelint": "^8.0.0",

View File

@ -10,7 +10,6 @@ const Util = require('util');
// 3rd party modules
const Boom = require('boom');
const CIDRMatcher = require('cidr-matcher');
const DockerClient = require('docker-compose-client');
const Dockerode = require('dockerode');
const ForceArray = require('force-array');

View File

@ -27,14 +27,14 @@
"good-console": "^6.4.0",
"good-squeeze": "^5.0.2",
"hapi": "^16.5.2",
"lab": "^14.2.1",
"lab": "^14.2.2",
"lodash.findindex": "^4.6.0",
"wreck": "^12.2.3"
"wreck": "^12.4.0"
},
"dependencies": {
"boom": "^5.2.0",
"cidr-matcher": "^1.0.5",
"docker-compose-client": "^1.0.8",
"docker-compose-client": "^1.0.9",
"dockerode": "^2.5.0",
"force-array": "^3.1.0",
"graphi": "^3.0.0",

View File

@ -45,7 +45,7 @@
"eslint": "^4.5.0",
"eslint-config-joyent-portal": "3.0.0",
"nyc": "^11.1.0",
"redrun": "^5.9.16",
"redrun": "^5.9.17",
"tap-xunit": "^1.7.0"
},
"nyc": {

View File

@ -35,7 +35,7 @@
"has-own-prop": "^1.0.0",
"lodash.isnull": "^3.0.0",
"lodash.isundefined": "^3.0.1",
"yaml-ast-parser": "0.0.33"
"yaml-ast-parser": "0.0.34"
},
"devDependencies": {
"ava": "^0.22.0",
@ -47,7 +47,7 @@
"eslint": "^4.5.0",
"eslint-config-joyent-portal": "3.0.0",
"nyc": "^11.1.0",
"redrun": "^5.9.16",
"redrun": "^5.9.17",
"tap-xunit": "^1.7.0"
},
"nyc": {

View File

@ -40,7 +40,7 @@
"eslint-config-joyent-portal": "3.0.0",
"nyc": "^11.1.0",
"react": "^15.6.1",
"redrun": "^5.9.16",
"redrun": "^5.9.17",
"styled-components": "^2.1.2",
"tap-xunit": "^1.7.0"
},

View File

@ -31,7 +31,7 @@
"babel-generator": "^6.26.0",
"babel-helpers": "^6.24.1",
"babel-plugin-inline-react-svg": "^0.4.0",
"babel-plugin-styled-components": "^1.1.7",
"babel-plugin-styled-components": "^1.2.0",
"babel-preset-joyent-portal": "^2.0.0",
"babel-template": "^6.26.0",
"camel-case": "^3.0.0",
@ -44,11 +44,11 @@
"lodash.isequalwith": "^4.4.0",
"lodash.isstring": "^4.0.1",
"normalized-styled-components": "^1.0.9",
"polished": "^1.6.1",
"polished": "^1.7.0",
"prop-types": "^15.5.10",
"react-broadcast": "^0.1.2",
"react-styled-flexboxgrid": "^2.0.3",
"redrun": "^5.9.16",
"redrun": "^5.9.17",
"reduce-css-calc": "^2.0.5",
"remcalc": "^1.0.8",
"rnd-id": "^1.0.8",
@ -59,7 +59,7 @@
"devDependencies": {
"csso": "^3.1.1",
"eslint": "^4.5.0",
"eslint-config-joyent-portal": "2.0.0",
"eslint-config-joyent-portal": "3.0.0",
"jest": "^20.0.4",
"jest-diff": "^20.0.3",
"jest-matcher-utils": "^20.0.3",

803
yarn.lock

File diff suppressed because it is too large Load Diff