chore: combine data/watch into api module

This commit is contained in:
geek 2017-06-28 12:33:34 -05:00 committed by Sérgio Ramos
parent 48549e5d38
commit 40f666adc2
18 changed files with 2545 additions and 5377 deletions

View File

@ -22,8 +22,6 @@
"joyent-cp-gql-schema": "^1.0.4",
"piloted": "^3.1.1",
"portal-api": "^1.1.0",
"portal-data": "^1.1.0",
"portal-watch": "^1.0.0",
"toppsy": "^1.1.0"
}
}

View File

@ -12,7 +12,7 @@ const Dockerode = require('dockerode');
const Hoek = require('hoek');
const ParamCase = require('param-case');
const Penseur = require('penseur');
const { DEPLOYMENT_GROUP, SERVICE, HASH } = require('portal-watch');
const { DEPLOYMENT_GROUP, SERVICE, HASH } = require('../watch');
const UniqBy = require('lodash.uniqby');
const Uuid = require('uuid/v4');
const VAsync = require('vasync');

View File

@ -3,10 +3,10 @@
const Schema = require('joyent-cp-gql-schema');
const Graphi = require('graphi');
const Piloted = require('piloted');
const PortalData = require('portal-data');
const PortalWatch = require('portal-watch');
const Data = require('./data');
const Pack = require('../package.json');
const Resolvers = require('./resolvers');
const Watch = require('./watch');
const internals = {};
@ -18,8 +18,8 @@ module.exports = function (server, options, next) {
options.data.dockerComposeHost = `tcp://${docker.address}:${docker.port}`;
}
const data = new PortalData(options.data);
const watcher = new PortalWatch(Object.assign(options.watch, {
const data = new Data(options.data);
const watcher = new Watch(Object.assign(options.watch, {
data
}));

View File

@ -18,7 +18,11 @@
"license": "MPL-2.0",
"devDependencies": {
"belly-button": "^3.1.0",
"brule": "^2.0.0",
"code": "^4.1.0",
"good": "^7.2.0",
"good-console": "^6.4.0",
"good-squeeze": "^5.0.2",
"hapi": "^16.4.3",
"hapi-swagger": "^7.7.0",
"inert": "^4.2.0",
@ -27,17 +31,21 @@
},
"dependencies": {
"boom": "^5.1.0",
"brule": "^2.0.0",
"good": "^7.2.0",
"good-console": "^6.4.0",
"good-squeeze": "^5.0.2",
"docker-compose-client": "^1.0.8",
"dockerode": "^2.5.0",
"graphi": "^2.2.1",
"hoek": "^4.1.1",
"joi": "^10.6.0",
"joyent-cp-gql-schema": "^1.0.4",
"lodash.uniqby": "^4.7.0",
"param-case": "^2.1.1",
"penseur": "^7.12.3",
"piloted": "^3.1.1",
"portal-data": "^1.1.0",
"portal-watch": "^1.0.0",
"toppsy": "^1.1.0"
"throat": "^4.0.0",
"toppsy": "^1.1.0",
"triton-watch": "^1.1.0",
"uuid": "^3.1.0",
"vasync": "^1.6.4",
"yamljs": "^0.2.10"
}
}

View File

@ -4,7 +4,7 @@ const Fs = require('fs');
const Path = require('path');
const Code = require('code');
const Lab = require('lab');
const PortalData = require('../');
const PortalData = require('../../lib/data');
const lab = exports.lab = Lab.script();

View File

@ -3,7 +3,7 @@
const Code = require('code');
const Hapi = require('hapi');
const Lab = require('lab');
const PortalData = require('portal-data');
const PortalData = require('../lib/data');
const PortalApi = require('../');

View File

@ -1,7 +1,7 @@
'use strict';
const Lab = require('lab');
const PortalWatch = require('../');
const PortalWatch = require('../../lib/watch');
const lab = exports.lab = Lab.script();

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
node_modules
.DS_Store
npm-debug.log

View File

@ -1,42 +0,0 @@
# test directories
__tests__
test
tests
powered-test
# asset directories
docs
doc
website
images
assets
# examples
example
examples
# code coverage directories
coverage
.nyc_output
# build scripts
Makefile
Gulpfile.js
Gruntfile.js
# configs
.tern-project
.gitattributes
.editorconfig
.*ignore
.eslintrc
.jshintrc
.flowconfig
.documentup.json
.yarn-metadata.json
.*.yml
*.yml
# misc
*.gz
*.md

View File

@ -1 +0,0 @@
# portal-data

View File

@ -1,35 +0,0 @@
{
"name": "portal-data",
"version": "1.2.0",
"description": "portal data layer",
"main": "lib",
"scripts": {
"rethinkdb-up": "docker run -d -p 8080:8080 -p 28015:28015 -p 29015:29015 --name rethinkdb rethinkdb",
"rethinkdb-down": "docker rm -f rethinkdb",
"bootstrap": "node ./bootstrap-data",
"lint": "belly-button --fix",
"lint-ci": "belly-button",
"test": "lab -c",
"test-ci": "echo 0 `# lab -c -r console -o stdout -r tap -o $CIRCLE_TEST_REPORTS/test/portal-data.xml`"
},
"keywords": [],
"author": "wyatt",
"license": "MPL-2.0",
"dependencies": {
"docker-compose-client": "^1.0.8",
"dockerode": "^2.5.0",
"hoek": "^4.1.1",
"param-case": "^2.1.1",
"penseur": "^7.12.3",
"lodash.uniqby": "^4.7.0",
"portal-watch": "^1.0.0",
"uuid": "^3.1.0",
"vasync": "^1.6.4",
"yamljs": "^0.2.10"
},
"devDependencies": {
"belly-button": "^3.1.0",
"code": "^4.1.0",
"lab": "^14.0.1"
}
}

View File

@ -1,3 +0,0 @@
node_modules
.DS_Store
npm-debug.log

View File

@ -1,22 +0,0 @@
{
"name": "portal-watch",
"version": "1.0.0",
"license": "MPL-2.0",
"description": "resolver of triton change events",
"repository": "github:yldio/joyent-portal",
"main": "lib",
"scripts": {
"lint": "belly-button --fix",
"lint-ci": "belly-button",
"test": "lab -c --ignore debug",
"test-ci": "echo 0 `# lab -c -r console -o stdout -r tap -o $CIRCLE_TEST_REPORTS/test/portal-watch.xml`"
},
"dependencies": {
"throat": "^4.0.0",
"triton-watch": "^1.1.0"
},
"devDependencies": {
"belly-button": "^3.1.0",
"lab": "^14.0.1"
}
}

5380
yarn.lock

File diff suppressed because it is too large Load Diff