tailscale/cmd
Mihai Parparita 1a093ef482 cmd/tsconnect: extract NPM package for reusing in other projects
`src/` is broken up into several subdirectories:
- `lib/` and `types`/ for shared code and type definitions (more code
  will be moved here)
- `app/` for the existing Preact-app
- `pkg/` for the new NPM package

A new `build-pkg` esbuild-based command is added to generate the files
for the NPM package. To generate type definitions (something that esbuild
does not do), we set up `dts-bundle-generator`.

Includes additional cleanups to the Wasm type definitions (we switch to
string literals for enums, since exported const enums are hard to use
via packages).

Also allows the control URL to be set a runtime (in addition to the
current build option), so that we don't have to rebuild the package
for dev vs. prod use.

Updates #5415

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2022-08-24 17:29:52 -07:00
..
addlicense cmd/addlicense: add command to add licenseheaders to generated code 2021-07-19 15:31:56 -07:00
cloner cmd/{cloner,viewer}: add support for map values with pointers 2022-08-03 13:02:17 -07:00
derper client,cmd/tailscale,ipn,tka,types: implement tka initialization flow 2022-08-22 11:35:16 -07:00
derpprobe net/stun: convert to use net/netip.AddrPort 2022-08-15 12:46:01 -04:00
gitops-pusher cmd/gitops-pusher: things i forgot to push last PR (#5128) 2022-07-25 09:09:32 -04:00
hello net/netaddr: start migrating to net/netip via new netaddr adapter package 2022-07-25 16:20:43 -07:00
mkpkg cmd/mkpkg: use package flag (#4373) 2022-04-07 16:38:33 -04:00
nginx-auth cmd/nginx-auth: allow use of shared nodes 2022-08-24 09:41:56 -07:00
printdep Docker: add ALPINE.txt to manage alpine versions 2022-06-29 11:47:09 -07:00
proxy-to-grafana all: gofmt for Go 1.19 2022-08-02 10:08:05 -07:00
speedtest cmd: upgrade to ffcli v3 2021-09-14 13:21:55 -07:00
tailscale client,cmd/tailscale,ipn,tka,types: implement tka initialization flow 2022-08-22 11:35:16 -07:00
tailscaled net/dns: [win] add MagicDNS entries to etc/hosts 2022-08-19 12:38:11 -05:00
testcontrol all: use any instead of interface{} 2022-03-17 11:35:09 -07:00
tsconnect cmd/tsconnect: extract NPM package for reusing in other projects 2022-08-24 17:29:52 -07:00
tsshd cmd/tsshd: add a package line to appease gofmt 2022-07-25 20:52:04 -07:00
viewer cmd/viewer: add flag to support Clone generation without Views 2022-08-17 15:15:27 -07:00