These are chat archives for deployd/contributors

25th
Oct 2016
Andrei Alecu
@andreialecu
Oct 25 2016 12:23 UTC
Hey, @NicolasRitouet - making the dashboard a dpd module is a great idea!
I think it should be possible for a module to respond with text/html content and render its html at its endpoint, I don't remember there being anything that would prevent that
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 12:32 UTC
how could you do that? can the module know about the route and overwrite the rendering?
Andrei Alecu
@andreialecu
Oct 25 2016 12:44 UTC
well suppose you have a dpd-event
it already has an url, and it returns some output at that url
you can even do it now, albeit a bit hacky by running something like ctx.res.setHeader('content-type', 'text/html'); ctx.res.done('<html><body><h1>Hello</h1></body></html>');
inside that dpd-event
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 13:42 UTC
true
a bit hacky, but could work
Andrei Alecu
@andreialecu
Oct 25 2016 13:45 UTC
if you were to create a real dpd module for the dashboard, you'd of course have access to the ctx right in the module so this wouldn't feel hacky
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 13:46 UTC
oh yeah
can you review and eventually approve this ticket: deployd/deployd#772 ?
Andrei Alecu
@andreialecu
Oct 25 2016 13:49 UTC
alright, I see a problem though, it links to os-x instead of windows
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 13:49 UTC
true
good that we have a thorough review process :)
I’ll change this
Andrei Alecu
@andreialecu
Oct 25 2016 13:51 UTC
hmm, regarding installing deployd globally, that's not necessarily a good idea, but without it the cli wouldn't be easily accessible via command line
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 13:51 UTC
I agree 100% with you
I hate installing modules globally, but as you said, we can’t do better at the moment
my plan is to extract the CLI part
Andrei Alecu
@andreialecu
Oct 25 2016 13:52 UTC
I think it might be possible to easily hack the cli out into its own package, I'll give it some time right now and look at it
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 13:52 UTC
that would be awesome, I can also help
Andrei Alecu
@andreialecu
Oct 25 2016 13:52 UTC
I remember looking at it before
the only problem I think would be for the tests, since they also use the cli to work, but the cli could come as a devDependency instead
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 13:54 UTC
wasn’t devDependencies not installed by default with npm3?
oh no
it was peerDependencies
Andrei Alecu
@andreialecu
Oct 25 2016 13:58 UTC
interesting, I'm looking at my hard drive and I already have the cli extracted, I forgot why I didn't publish it
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 13:58 UTC
lol
Andrei Alecu
@andreialecu
Oct 25 2016 13:58 UTC
it seems to work
actually
it's been here for 2 years apparently
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 14:01 UTC
ok
I’ll take a look
the CLI would need to bootstrap a boilerplate also
but it’s an awesome start
Andrei Alecu
@andreialecu
Oct 25 2016 14:02 UTC
it does
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 14:02 UTC
true
I forgot
Andrei Alecu
@andreialecu
Oct 25 2016 14:02 UTC
try npm install -g andreialecu/deployd-cli
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 14:02 UTC
I know, I remember now
Andrei Alecu
@andreialecu
Oct 25 2016 14:02 UTC
and dpd create test123
then cd test123 and dpd
I think the dependencies are outdated though
actually it doesn't have any
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 14:05 UTC
Andrei Alecu
@andreialecu
Oct 25 2016 14:50 UTC
@NicolasRitouet I think the CLI extraction is done, could you test this: https://github.com/andreialecu/deployd/tree/refactor-extractcli ?
If all is well we should move my deployd-cli repo under deployd in github, and I'll make a PR with this
mainly what is important is the ability to still run integration tests, and they seem to be running via the cli package that I extracted
Nicolas Ritouet
@NicolasRitouet
Oct 25 2016 16:48 UTC
looks good, I’ll take a look this evening