@splitmedialabs/devctl
Advanced tools
Comparing version 1.0.2 to 2.0.0
{ | ||
"name": "@splitmedialabs/devctl", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"author": "Makara Sok", | ||
"description": "Easily start developing in monorepos with docker-compose", | ||
@@ -15,20 +16,28 @@ "bin": { | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/SplitmediaLabsLimited/devctl.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/SplitmediaLabsLimited/devctl/issues" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"bluebird": "^3.5.4", | ||
"dockerode": "^2.5.8", | ||
"bluebird": "^3.7.1", | ||
"cosmiconfig": "^6.0.0", | ||
"dockerode": "^3.0.2", | ||
"get-port": "^5.0.0", | ||
"gluegun": "^3.2.3", | ||
"gluegun": "^4.1.2", | ||
"js-yaml": "^3.13.1", | ||
"lodash": "^4.17.11" | ||
"lodash": "^4.17.15" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "^10.0.1", | ||
"eslint": "^5.16.0", | ||
"eslint-config-prettier": "^4.3.0", | ||
"eslint-plugin-jest": "^22.6.4", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"jest": "^23.6.0", | ||
"prettier": "^1.12.1" | ||
"babel-eslint": "^10.0.3", | ||
"eslint": "^6.7.1", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-plugin-jest": "^23.0.5", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"jest": "^24.9.0", | ||
"prettier": "^1.19.1" | ||
} | ||
} |
@@ -27,2 +27,40 @@ const YAML = require('js-yaml'); | ||
async function askServices(project) { | ||
const allChoices = Object.values(project.services) | ||
.map(service => ({ | ||
name: service.name, | ||
message: service.name, | ||
hint: service.description, | ||
value: service.name, | ||
category: service.category, | ||
})) | ||
.sort(function(a, b) { | ||
const keyA = a.name.toLowerCase(); | ||
const keyB = b.name.toLowerCase(); | ||
if (keyA < keyB) return -1; | ||
if (keyA > keyB) return 1; | ||
return 0; | ||
}); | ||
const choices = allChoices.filter(c => c.category !== 'always'); | ||
const choicesArray = choices.map(c => c.value); | ||
const always = allChoices | ||
.filter(c => c.category === 'always') | ||
.map(c => c.value); | ||
const initial = get(project, 'current.services', []).filter(c => | ||
choicesArray.includes(c) | ||
); | ||
const { services } = await prompt.ask({ | ||
type: 'multiselect', | ||
name: 'services', | ||
message: 'Which services do you want to work on? (lol)', | ||
choices, | ||
initial, | ||
}); | ||
return { services: [...services, ...always] }; | ||
} | ||
async function saveCurrentConfig(path, config) { | ||
@@ -38,14 +76,3 @@ return filesystem.write(path, YAML.dump(config)); | ||
const { services } = await prompt.ask({ | ||
type: 'multiselect', | ||
name: 'services', | ||
message: 'Which services do you want to work on?', | ||
choices: Object.values(project.services).map(service => ({ | ||
name: service.name, | ||
message: service.name, | ||
hint: service.description, | ||
value: service.name, | ||
})), | ||
initial: get(project, 'current.services', []), | ||
}); | ||
const { services } = await askServices(project); | ||
@@ -52,0 +79,0 @@ const { environment } = await askEnvironment(project); |
@@ -1,2 +0,2 @@ | ||
const cosmic = require('cosmiconfig'); | ||
const { cosmiconfig } = require('cosmiconfig'); | ||
const { resolve, dirname } = require('path'); | ||
@@ -11,3 +11,3 @@ const get = require('lodash/get'); | ||
toolbox.getProjectConfig = async () => { | ||
const search = await cosmic('devctl', { | ||
const search = await cosmiconfig('devctl', { | ||
searchPlaces: [ | ||
@@ -14,0 +14,0 @@ '.devctl.json', |
@@ -23,3 +23,3 @@ const { filesystem, system, print } = require('gluegun'); | ||
return async ({ cmd, msg, options }) => { | ||
const command = `docker-compose -f ${compose} ${cmd}`; | ||
const command = `docker-compose -f "${compose}" ${cmd}`; | ||
@@ -26,0 +26,0 @@ if (async) { |
const Promise = require('bluebird'); | ||
const cosmic = require('cosmiconfig'); | ||
const { cosmiconfig } = require('cosmiconfig'); | ||
const { resolve } = require('path'); | ||
@@ -22,3 +22,3 @@ const get = require('lodash/get'); | ||
const search = await cosmic('devconfig', { | ||
const search = await cosmiconfig('devconfig', { | ||
searchPlaces: [ | ||
@@ -25,0 +25,0 @@ '.devconfig.yaml', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
33397
924
0
0
7
+ Addedcosmiconfig@^6.0.0
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@balena/dockerignore@1.0.2(transitive)
+ Added@types/parse-json@4.0.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedapisauce@2.1.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedbuildcheck@0.0.6(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedchalk@3.0.0(transitive)
+ Addedcli-cursor@3.1.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcosmiconfig@6.0.0(transitive)
+ Addedcpu-features@0.0.10(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddocker-modem@3.0.8(transitive)
+ Addeddockerode@3.3.5(transitive)
+ Addedenquirer@2.3.4(transitive)
+ Addedexeca@3.4.0(transitive)
+ Addedget-stream@5.2.0(transitive)
+ Addedgluegun@4.7.1(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedhuman-signals@1.1.1(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedis-interactive@1.0.0(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedlog-symbols@3.0.0(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addedmute-stream@0.0.8(transitive)
+ Addednan@2.22.0(transitive)
+ Addednpm-run-path@4.0.1(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedora@4.1.1(transitive)
+ Addedp-finally@2.0.1(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsemver@7.6.3(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedssh2@1.16.0(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedstrip-final-newline@2.0.0(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtar-fs@2.0.1(transitive)
+ Addedtar-stream@2.2.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedyaml@1.10.2(transitive)
+ Addedyargs-parser@16.1.0(transitive)
- RemovedJSONStream@1.3.2(transitive)
- Removedansi-regex@4.1.1(transitive)
- Removedapisauce@1.1.5(transitive)
- Removedbl@1.2.3(transitive)
- Removedbuffer-alloc@1.2.0(transitive)
- Removedbuffer-alloc-unsafe@1.1.0(transitive)
- Removedbuffer-fill@1.0.0(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcaller-callsite@2.0.0(transitive)
- Removedcaller-path@2.0.0(transitive)
- Removedcallsites@2.0.0(transitive)
- Removedcli-cursor@2.1.0(transitive)
- Removedconcat-stream@1.6.2(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcosmiconfig@5.1.0(transitive)
- Removedcross-spawn@6.0.6(transitive)
- Removeddebug@3.2.7(transitive)
- Removeddocker-modem@1.0.9(transitive)
- Removeddockerode@2.5.8(transitive)
- Removedenquirer@2.3.2(transitive)
- Removedexeca@1.0.0(transitive)
- Removedget-stream@4.1.0(transitive)
- Removedgluegun@3.3.5(transitive)
- Removedimport-fresh@2.0.0(transitive)
- Removedis-directory@0.3.1(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisarray@0.0.11.0.0(transitive)
- Removedjson-parse-better-errors@1.0.2(transitive)
- Removedjsonparse@1.3.1(transitive)
- Removedlodash.get@4.4.2(transitive)
- Removedlog-symbols@2.2.0(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednice-try@1.0.5(transitive)
- Removednpm-run-path@2.0.2(transitive)
- Removedonetime@2.0.1(transitive)
- Removedora@3.4.0(transitive)
- Removedp-finally@1.0.0(transitive)
- Removedparse-json@4.0.0(transitive)
- Removedpath-key@2.0.1(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedpump@1.0.3(transitive)
- Removedramda@0.24.10.25.0(transitive)
- Removedramdasauce@2.1.3(transitive)
- Removedreadable-stream@1.0.342.3.8(transitive)
- Removedresolve-from@3.0.0(transitive)
- Removedrestore-cursor@2.0.0(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsemver@5.7.26.3.1(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedstring_decoder@0.10.311.1.1(transitive)
- Removedstrip-ansi@5.2.0(transitive)
- Removedstrip-eof@1.0.0(transitive)
- Removedtar-fs@1.16.3(transitive)
- Removedtar-stream@1.6.2(transitive)
- Removedthrough@2.3.8(transitive)
- Removedto-buffer@1.1.1(transitive)
- Removedtypedarray@0.0.6(transitive)
- Removedwhich@1.3.1(transitive)
- Removedxtend@4.0.2(transitive)
- Removedyargs-parser@12.0.0(transitive)
Updatedbluebird@^3.7.1
Updateddockerode@^3.0.2
Updatedgluegun@^4.1.2
Updatedlodash@^4.17.15