Getting user-friendly email to work on the terminal is difficult. There's a lot of information out there, but a lot of it is ill-suited or overkill for the average user, who simply wants to check Gmail or some other web mail account in their terminal. This post is meant to be an opinionated overview of what you need to get such a system in place.
/* A naively-implemented urql exchange for monitoring whether urql is fetching | |
* a query or a mutation on a global level. | |
* | |
* https://formidable.com/open-source/urql/docs/concepts/exchanges | |
* https://wonka.kitten.sh | |
* https://wonka.kitten.sh/api/operators#onpush | |
* | |
* Example usage: | |
* | |
* // If this number is greater than 0, an operation is in-flight and so urql is fetching |
Function # | Exported from bar | reexported from reexportBar | imported by index | Used in bar | Used in reexportBar | Used in index | |
---|---|---|---|---|---|---|---|
1 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | |
3 | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | ✔️ | |
4 | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | ❌ | |
5 | ✔️ | ✔️ | ✔️ | ❌ | ✔️ | ✔️ | |
6 | ✔️ | ✔️ | ✔️ | ❌ | ✔️ | ❌ | |
7 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | |
8 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ❌ | |
9 | ✔️ | ✔️ | ❌ | ✔️ | ✔️ | — |
Scenario | index s/e | reexportBar s/e | bar s/e | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Baseline | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ||
sE | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | ⚫️ | 🔵 | ||
uE | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | 🔵 | 🔵 | |||||
uE + sE | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | 🔵 | 🔵 | |||||
cM | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | 🔵 | 🔵 | ⚫️ | 🔵 | 🔵 | 🔵 | 🔵 | |||||
cM + uE | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | 🔵 | 🔵 | ⚫️ | 🔵 | 🔵 | 🔵 | 🔵 | |||||
cM + sE | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | 🔵 | 🔵 | ⚫️ | 🔵 | 🔵 | 🔵 | 🔵 | |||||
cM + uE + sE | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | 🔵 | 🔵 | ⚫️ | 🔵 | 🔵 | 🔵 | 🔵 | |||||
Production | 🔵 | 🔵 | 🔵 | ⚫️ | ⚫️ | ⚫️ | 🔵 | ⚫️ | 🔵 | 🔵 | ⚫️ | 🔵 | 🔵 | 🔵 | 🔵 |
/*!****************!*\ | |
!*** ./bar.js ***! | |
\****************/ | |
/*! exports provided: bar */function(e,t,n){"use strict";n.r(t),n.d(t,"bar",(function(){return o}));const o=()=>console.log("bar");console.log("bar side effect")},"./baz.js": | |
/*!****************!*\ | |
!*** ./baz.js ***! | |
\****************/ | |
/*! exports provided: baz */function(e,t,n){"use strict";n.r(t),n.d(t,"baz",(function(){return o}));const o=()=>console.log("baz");console.log("baz side effect")},"./foo.js": | |
/*!****************!*\ | |
!*** ./foo.js ***! |
import { | |
TypeInfo, | |
visit, | |
visitWithTypeInfo, | |
isLeafType, | |
isNonNullType, | |
GraphQLList | |
} from "graphql"; | |
import { query as q } from "faunadb-fql-lib"; |
- If you install a package that has periods in the attribute path, you'll need to wrap the subpath on the command line using escaped double quotation marks. For example, packages generated by the
node2nix
tool can have NPM package versions affixed to the attribute, depending on hownode2nix
is set up. Version^0.0.1-1
ofredux-devtools-cli
may be represented asnodeModules.redux-devtools-cli-^0.0.1-1
, which on the command line would be installed like so:npm -f '<nixpkgs>' -iA "nodeModules.\"redux-devtools-cli-^0.0.1-1\""
.
All data flows downward from queries, which are what fetch data from/push data to the server. Generally speaking, queries are only executed by QueryRenderer
, although there are exceptions (e.g., pagination container queries). _Fragments are NEVER the original source of data from a server. If you see fragment ...
, it MUST receive its data from elsewhere, most likely a QueryRenderer
.
Take the following example:
NOTE, April 18, 2020: I wrote this document in February 2019 when I was actively investigating Electron. I haven't used it since then and have largely forgotten what this was for or how electron-webpack works. I vaguely remember the problem, but that's it. It would appear based on the comments below that this document is still coming up in web searches but has become out of date and parts of it don't work. If anyone has specific fixes to my instructions, please leave them in the comments and I'll happily incorporate them.
The current version (as of 2019-02-02) of electron-webpack is set up with the assumption that your BrowserWindow instance has nodeIntegration: true
. However, Electron is encouraging users to set nodeIntegration: false
as a security precaution, and in the future BrowserWindows will have this setting set to false by default. Doing so now with electron-webpack throws an error because the index.html template has commonjs re