Closed blimmer closed 4 years ago
Edit looks good to me @blimmer β however we seem to have broken the Travis job (not sure why the exit code is 0 but it didn't finish successfully):
Hey @kevinschaich it looks like that problem is because the PR's building off of my fork and doesn't have your mintable.config.json
checked into the Travis secrets. I get the same problem when I try to run the master
branch locally:
~/code/mintable-fork ξ° ξ master ξ° yarn mintable
yarn run v1.21.1
$ node ./src/scripts/mintable.js
Using config /Users/blimmer/code/mintable-test/mintable.config.json.
Note: The messages displayed below are automated and may contain duplicates.
β Fetching current config
β Fetching current config
β Fetching current config
β Writing config
β Writing config
β Writing default config
β Fetching current config
(node:38497) UnhandledPromiseRejectionWarning: Error: Missing Plaid "client_id"
at new Client (/Users/blimmer/code/mintable-test/node_modules/plaid/lib/PlaidClient.js:13:11)
at Object.<anonymous> (/Users/blimmer/code/mintable-test/src/lib/plaid.js:19:22)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /Users/blimmer/code/mintable-test/src/scripts/mintable.js:88:28
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:38497) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:38497) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
β¨ Done in 0.39s.
I opened https://github.com/kevinschaich/mintable/pull/51 to make it actually fail the build. However, I'm not sure what the ideal fix would be for builds on forks.
Hey @blimmer thanks for that subsequent PR βΒ Iβve also added you as a collaborator so please feel free to make your branches here rather than on a fork to avoid the Travis issue!
Will try to think of a workaround for that in the coming weeks. I might be able to just create a public βtemplateβ account for Mintable on each of the services so my API keys are not out in the open.
This commit adds logic to recursively sanitize the configuration object before it's written out to disk. It trims leading and trailing whitespace from string values in arrays or objects.
Fixes #42