Running an invalid `sdk` subcommand like `xtool sdk list` (there's no
`list` subcommand) is interpreted as "install the sdk at path `./list`".
We previously unconditionally removed the existing SDK during
installation. By switching the order so that we validate the path first,
we avoid performing a potentially destructive action unless we have
clear intent.
See #186.
Before:
```bash
$ xtool sdk list
Removing existing SDK... # destructive!
Error: Could not read file or directory at path 'list'.
```
After:
```bash
$ xtool sdk list
Error: Could not read file or directory at path 'list'.
See 'xtool help sdk' for usage.
```
- We now have a single tmpdir "root" that can be recreated at launch to
clean up old stragglers
- The location of this tmpdir root can be controlled by `XTL_TMPDIR` or
`TMPDIR`. In general the path is `$TMPDIR/sh.xtool`.
With this change it should be possible to `export XTL_TMPDIR=/var/tmp`
if `/tmp` doesn't have enough space, which fixes#23.
- Make some enums non-exhaustive (closes#77)
- Also a tentative fix for #62 and #64
- Improve logging on deserialization failure
We now use raw JS to patch the OpenAPI spec instead of openapi-overlay.
It's a lot more flexible this way.
Closes#68
## On any platform
You can now do
```bash
xtool dev build --triple arm64-apple-ios-simulator [--ipa]
```
To build a .app/.ipa that works on the simulator.
## On macOS
You can do
```bash
xtool dev --simulator
```
To one-shot build-and-install on the booted simulator.