These are chat archives for assetgraph/assetgraph

2nd
Nov 2016
Peter Müller
@Munter
Nov 02 2016 14:59
$ seespee http://localhost:8080
Unhandled rejection TypeError: Cannot read property 'url' of undefined
    at /Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/lib/seespee.js:88:38
    at tryCatcher (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)
Andreas Lind
@papandreou
Nov 02 2016 15:01
@Munter Hmm, that means that assetGraph.findAssets({type: 'Html', isInitial: true}) returns an empty array.
It's a pretty unfortunate error message.
Andreas Lind
@papandreou
Nov 02 2016 15:08
@Munter Could you try again with seespee@1.10.1?
Peter Müller
@Munter
Nov 02 2016 15:08
I think its because that url it behind a http auth
Forgot about that
seespee@1.10.1:
$ seespee http://localhost:8080
Unhandled rejection Error: checkAssets transform: No HTML assets found (http://localhost:8080)
    at checkAssets (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/lib/seespee.js:63:23)
    at Immediate.<anonymous> (/Users/PML/.nvm/versions/node/v6.7.0/lib/node_modules/seespee/node_modules/assetgraph/lib/index.js:635:35)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)
Andreas Lind
@papandreou
Nov 02 2016 15:11
That's a little better, but not quite perfect.
Does it work if you put the correct credentials in the url like seespee http://munter:foobar@localhost:8080?
Peter Müller
@Munter
Nov 02 2016 15:12
Maybe there should be an even earlier specific handling of bad http responses. I guess there will be some warning emitted
Andreas Lind
@papandreou
Nov 02 2016 15:12
Yeah, I thought i had wired that up.
Anyway, it should be easy to add that to the test suite. It already uses unexpected-mitm etc.
Peter Müller
@Munter
Nov 02 2016 15:15
Passing http auth credentials in the url works though :)
Andreas Lind
@papandreou
Nov 02 2016 15:16
I knew I built that into teepee :)
Peter Müller
@Munter
Nov 02 2016 15:18
Don't know if you've seen https://helmetjs.github.io/docs/
I'm using it to set up my CSP headers in express right now. It's very close to what we talked about with being able to define the headers on a more granular level
Maybe seespee should have a --helmet switch ;)
Andreas Lind
@papandreou
Nov 02 2016 15:35
That would be nice :)
I use express-extractheaders and buildProduction
Peter Müller
@Munter
Nov 02 2016 15:37
I would do that if I could. Just trying to figure out what things are needed for people to utilise these tools without having to buy into buildProduction, which is apparently a huge leap for them
Andreas Lind
@papandreou
Nov 02 2016 15:48
That's a good argument for providing these specialized, assetgraph-based tools