Forward GnuPG agent from macOS to Linux
Run gpg once as your to create the directory structure
gpg --list-keys
| // Part of https://github.com/chris-rock/node-crypto-examples | |
| var crypto = require('crypto'), | |
| algorithm = 'aes-256-ctr', | |
| password = 'd6F3Efeq'; | |
| function encrypt(buffer){ | |
| var cipher = crypto.createCipher(algorithm,password) | |
| var crypted = Buffer.concat([cipher.update(buffer),cipher.final()]); | |
| return crypted; |
| // This is the attribute that continuation local storage uses to hold onto | |
| // the current context. The value comes from https://github.com/othiym23/node-continuation-local-storage/blob/fc770288979f6050e4371c1e1b44d2b76b233664/context.js#L11 | |
| const CLS_CONTEXT_ATTRIBUTE = 'error@context'; | |
| // A formatError function that can be used with | |
| // https://www.apollographql.com/docs/apollo-server/features/errors#for-the-client-response | |
| function formatError (err) { | |
| // The continuation-local-storage module attaches a context attribute to | |
| // errors so that the context can be resolved from errors. The attribute | |
| // is enumerable by default and so it gets included in GraphQL error |