mikeal / node.couchapp.js

Utility for writing couchapps.
Apache License 2.0
406 stars 78 forks source link

Stop parsing native object #46

Open manobi opened 12 years ago

manobi commented 12 years ago

This still pushing apps to couchdb, but is outputing :

undefined:1

^ SyntaxError: Unexpected token o at Object.parse (native)

I run tests and nothing broke.

manobi commented 12 years ago

More tests show that it just happens when the design doc already exist in database. Can another people test if my modifications broke something for you ? Because I don't use the CLI command, I have some automated task in every project making: var ddoc = {} couchapp.createApp(ddoc, url, function(app){ couchapp.loadAttachments(app.current, __dirname); app.push(); });

mikeal commented 12 years ago

there was a bug in request for a few versions that were auto-parsing JSON for every repsonse. that has been fixed, but it may have been the real cause of this bug.

but, we should change couchapp to use the builtin request json functionality rather than doing this decode inline.