chore: combine data/watch into api module
This commit is contained in:
parent
48549e5d38
commit
40f666adc2
@ -22,8 +22,6 @@
|
|||||||
"joyent-cp-gql-schema": "^1.0.4",
|
"joyent-cp-gql-schema": "^1.0.4",
|
||||||
"piloted": "^3.1.1",
|
"piloted": "^3.1.1",
|
||||||
"portal-api": "^1.1.0",
|
"portal-api": "^1.1.0",
|
||||||
"portal-data": "^1.1.0",
|
|
||||||
"portal-watch": "^1.0.0",
|
|
||||||
"toppsy": "^1.1.0"
|
"toppsy": "^1.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ const Dockerode = require('dockerode');
|
|||||||
const Hoek = require('hoek');
|
const Hoek = require('hoek');
|
||||||
const ParamCase = require('param-case');
|
const ParamCase = require('param-case');
|
||||||
const Penseur = require('penseur');
|
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 UniqBy = require('lodash.uniqby');
|
||||||
const Uuid = require('uuid/v4');
|
const Uuid = require('uuid/v4');
|
||||||
const VAsync = require('vasync');
|
const VAsync = require('vasync');
|
@ -3,10 +3,10 @@
|
|||||||
const Schema = require('joyent-cp-gql-schema');
|
const Schema = require('joyent-cp-gql-schema');
|
||||||
const Graphi = require('graphi');
|
const Graphi = require('graphi');
|
||||||
const Piloted = require('piloted');
|
const Piloted = require('piloted');
|
||||||
const PortalData = require('portal-data');
|
const Data = require('./data');
|
||||||
const PortalWatch = require('portal-watch');
|
|
||||||
const Pack = require('../package.json');
|
const Pack = require('../package.json');
|
||||||
const Resolvers = require('./resolvers');
|
const Resolvers = require('./resolvers');
|
||||||
|
const Watch = require('./watch');
|
||||||
|
|
||||||
|
|
||||||
const internals = {};
|
const internals = {};
|
||||||
@ -18,8 +18,8 @@ module.exports = function (server, options, next) {
|
|||||||
options.data.dockerComposeHost = `tcp://${docker.address}:${docker.port}`;
|
options.data.dockerComposeHost = `tcp://${docker.address}:${docker.port}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = new PortalData(options.data);
|
const data = new Data(options.data);
|
||||||
const watcher = new PortalWatch(Object.assign(options.watch, {
|
const watcher = new Watch(Object.assign(options.watch, {
|
||||||
data
|
data
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -18,7 +18,11 @@
|
|||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"belly-button": "^3.1.0",
|
"belly-button": "^3.1.0",
|
||||||
|
"brule": "^2.0.0",
|
||||||
"code": "^4.1.0",
|
"code": "^4.1.0",
|
||||||
|
"good": "^7.2.0",
|
||||||
|
"good-console": "^6.4.0",
|
||||||
|
"good-squeeze": "^5.0.2",
|
||||||
"hapi": "^16.4.3",
|
"hapi": "^16.4.3",
|
||||||
"hapi-swagger": "^7.7.0",
|
"hapi-swagger": "^7.7.0",
|
||||||
"inert": "^4.2.0",
|
"inert": "^4.2.0",
|
||||||
@ -27,17 +31,21 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"boom": "^5.1.0",
|
"boom": "^5.1.0",
|
||||||
"brule": "^2.0.0",
|
"docker-compose-client": "^1.0.8",
|
||||||
"good": "^7.2.0",
|
"dockerode": "^2.5.0",
|
||||||
"good-console": "^6.4.0",
|
|
||||||
"good-squeeze": "^5.0.2",
|
|
||||||
"graphi": "^2.2.1",
|
"graphi": "^2.2.1",
|
||||||
"hoek": "^4.1.1",
|
"hoek": "^4.1.1",
|
||||||
"joi": "^10.6.0",
|
|
||||||
"joyent-cp-gql-schema": "^1.0.4",
|
"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",
|
"piloted": "^3.1.1",
|
||||||
"portal-data": "^1.1.0",
|
|
||||||
"portal-watch": "^1.0.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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ const Fs = require('fs');
|
|||||||
const Path = require('path');
|
const Path = require('path');
|
||||||
const Code = require('code');
|
const Code = require('code');
|
||||||
const Lab = require('lab');
|
const Lab = require('lab');
|
||||||
const PortalData = require('../');
|
const PortalData = require('../../lib/data');
|
||||||
|
|
||||||
|
|
||||||
const lab = exports.lab = Lab.script();
|
const lab = exports.lab = Lab.script();
|
@ -3,7 +3,7 @@
|
|||||||
const Code = require('code');
|
const Code = require('code');
|
||||||
const Hapi = require('hapi');
|
const Hapi = require('hapi');
|
||||||
const Lab = require('lab');
|
const Lab = require('lab');
|
||||||
const PortalData = require('portal-data');
|
const PortalData = require('../lib/data');
|
||||||
const PortalApi = require('../');
|
const PortalApi = require('../');
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const Lab = require('lab');
|
const Lab = require('lab');
|
||||||
const PortalWatch = require('../');
|
const PortalWatch = require('../../lib/watch');
|
||||||
|
|
||||||
|
|
||||||
const lab = exports.lab = Lab.script();
|
const lab = exports.lab = Lab.script();
|
2396
packages/portal-api/yarn.lock
Normal file
2396
packages/portal-api/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
3
packages/portal-data/.gitignore
vendored
3
packages/portal-data/.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
node_modules
|
|
||||||
.DS_Store
|
|
||||||
npm-debug.log
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||||||
# portal-data
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
3
packages/portal-watch/.gitignore
vendored
3
packages/portal-watch/.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
node_modules
|
|
||||||
.DS_Store
|
|
||||||
npm-debug.log
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user