this was returning an array before in part because it needed to check if the array was empty to detect an error case. now, it doesn't need to do that, so there's no point in returning an array that statically only has one item just to join it with commas later (which will have no effect since it only has one item). If we ever want to modify this, we can just as well change something like `'node12-macos-x64'` to `'node12-macos-x64,node12-macos-arm64'` in the `getTargets` function.
prior to this, the `reject` on line 28 does not hault execution. it's reasonable that this mistake was made because it's an easy one to make if you don't allow the function that ultimately had the failure case to have the control flow.
As it was before, code _after_ the reject was still executing.
Now, the promise rejection is handled in the place it really occurs. Promises are designed to work well with `throw` like this and since there is no other callback that the throw is captured in (e.g. like a setTimeout or something) this is totally fine to do. Here is what the output would look like:
```
> ts-node src/scripts/pkg.ts
Error: [pkg-inso] Unsupported OS: freebsd
at getTargets (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:24:9)
at /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:29:21
at new Promise (<anonymous>)
at pkg (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:28:10)
at Object.<anonymous> (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/src/scripts/pkg.ts:67:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Module.m._compile (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/node_modules/ts-node/src/index.ts:1056:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Object.require.extensions.<computed> [as .ts] (/home/dimitri/src/github.com/Kong/insomnia/packages/insomnia-inso/node_modules/ts-node/src/index.ts:1059:12)
at Module.load (internal/modules/cjs/loader.js:985:32)
```
also fixes some other things, e.g. using the (now deprecated) `--appDataDir` option.
also adds a (hopefully) helpful message for if this breaks in the future because of the files moving
* Use forwardRef for the Pane components
* Update packages/insomnia-app/app/ui/containers/app.tsx
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
* Disable spellchecking and prevent fething translations from Chromium's CDN
* Update packages/insomnia-app/app/main/window-utils.ts
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
* don't unnecessarily disable spellcheck
since, after all, it doesn't download in Mac and upcoming versions of Windows. it's not like we have a thing against spellchecking - the ticket is to disable a dictionary download.
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
* Allow autocomplete to be registered
* On shortcut update refresh pane to enable shortcuts to register correctly
* Improve types and add explanation about keyname order
* bind code-editor to hotkeyregistry via redux so that it updates keymaps on change
* remove force refresh via key and convert to named export
* send hotkeyregistry in environment autocomplete options
* use autocomplete delay from settings
* Use Pick<T>
Co-authored-by: Timothy Lim <tim.lim@intercom.io>
Co-authored-by: gatzjames <jamesgatzos@gmail.com>
Co-authored-by: Opender Singh <opender.singh@konghq.com>