Commit Graph

11 Commits

Author SHA1 Message Date
Mike Sawka
e2e71898c1
new wlog package to do distributed logging from waveshell back to wavesrv (#295) 2024-02-15 17:42:43 -08:00
Mike Sawka
b762df179f
zsh cleanup and stats (#247)
* better osrelease parsing (ignore garbage at end of string)

* add defaultshelltype to telemetry input

* track reinit errors by shelltype to see if zsh integration is working
2024-01-23 17:19:03 -08:00
Mike Sawka
422338c04b
zsh support (#227)
adds zsh support to waveterm.  big change, lots going on here.  lots of other improvements and bug fixes added while debugging and building out the feature.

Commits:

* refactor shexec parser.go into new package shellenv.  separate out bash specific parsing from generic functions

* checkpoint

* work on refactoring shexec.  created two new packages shellapi (for bash/zsh specific stuff), and shellutil (shared between shellapi and shexec)

* more refactoring

* create shellapi interface to abstract bash specific functionality

* more refactoring, move bash shell state parsing to shellapi

* move makeRcFile to shellapi.  remove all of the 'client' options CLI options from waveshell

* get shellType passed through to server/single paths for waveshell

* add a local shelltype detector

* mock out a zshapi

* move shelltype through more of the code

* get a command to run via zsh

* zsh can now switch directories.  poc, needs cleanup

* working on ShellState encoding differences between zsh/bash.  Working on parsing zsh decls.  move utilfn package into waveshell (shouldn't have been in wavesrv)

* switch to use []byte for vardecl serialization + diffs

* progress on zsh environment.  still have issues reconciling init environment with trap environment

* fix typeset argument parsing

* parse promptvars, more zsh specific ignores

* fix bug with promptvar not getting set (wrong check in FeState func)

* add sdk (issue #188) to list of rtnstate commands

* more zsh compatibility -- working with a larger ohmyzsh environment.  ignore more variables, handle exit trap better.  unique path/fpath.  add a processtype variable to base.

* must return a value

* zsh alias parsing/restoring.  diff changes (and rtnstate changes).  introduces linediff v1.

* force zmodload of zsh/parameter

* starting work on zsh functions

* need a v1 of mapdiff as well (to handle null chars)

* pack/unpack of ints was wrong (one used int and one use uint).  turned out we only ever encoded '0' so it worked.  that also means it is safe to change unpack to unpackUInt

* reworking for binary encoding of aliases and functions (because of zsh allows any character, including nulls, in names and values)

* fixes, working on functions, issue with line endings

* zsh functions.  lots of ugliness here around dealing with line dicipline and cooked stty.  new runcommand function to grab output from a non-tty fd.  note that we still to run the actual command in a stty to get the proper output.

* write uuid tempdir, cleanup with tmprcfilename code

* hack in some simple zsh function declaration finding code for rtnstate.  create function diff for rtnstate that supports zsh

* make sure key order is constant so shell hashes are consistent

* fix problems with state diffs to support new zsh formats.  add diff/apply code to shellapi (moved from shellenv), that is now specific to zsh or bash

* add log packet and new shellstate packets

* switch to shellstate map that's also keyed by shelltype

* add shelltype to remoteinstance

* remove shell argument from waveshell

* added new shelltype statemap to remote.go (msh), deal with fallout

* move shellstate out of init packet, and move to an explicit reinit call.  try to initialize all of the active shell states

* change dont always store init state (only store on demand).  initialize shell states on demand (if not already initialized).  allow reset to change shells

* add shellpref field to remote table.  use to drive the default shell choice for new tabs

* show shelltag on cmdinput, pass through ri and remote (defaultshellstate)

* bump mshell version to v0.4

* better version validation for shellstate.  also relax compatibility requirements for diffing states (shelltype + major version need to match)

* better error handling, check shellstate compatibility during run (on waveshell server)

* add extra separator for bash shellstate processing to deal with spurious output from rc files

* special migration for v30 -- flag invalid bash shell states and show special button in UI to fix

* format

* remove zsh-decls (unused)

* remove test code

* remove debug print

* fix typo
2024-01-16 16:11:04 -08:00
Evan Simkowitz
092a8de715
Escape error output in main-server to quiet security alert (#185) 2023-12-22 17:55:20 -08:00
Evan Simkowitz
b733724c7d
Add sidebar banner when new release is available (#147)
* Server impl

* add update check setting

* add commands

* fix capitalization of commands

* apply suggestions

* add migration and fix backend bugs

* Add sidebar banner

* remove installedversion, add 5s timeout

* add icon, capture and log errors from release check

* missing return nil

* remove highlight

* remove commented less

* do not fail releasecheckoncommand if release check operation fails

* remove debug condition

* fix update on auto check, move banner display logic into frontend

* remove unnecessary import

* simplify null check

* clean up the invoking of the releasechecker
2023-12-15 17:43:54 -08:00
sawka
1a566d06aa gc was collecting the lockfile early causing it not to work. fixed with runtime.KeepAlive 2023-11-09 16:26:44 -08:00
sawka
f2baa59af6 fix default workspace creation bug. fix no workspace message 2023-11-01 23:41:04 -07:00
sawka
afc5bbd212
Update Data Directories and Environment Variables (#59)
* phase 1 of wave runtime migration.  update waveterm_dev, build vars, waveterm_app_path.  fix errors with plugins readmes and screenshot directories.  use asset loaders in webpack.  fix window-empty styles.  wave-migrate script.  remove unused scripthaus commands.  other fixes

* waveterm_home directory.  lots of internal scbase prompt names to wave

* update waveterm.lock file

* change wave data directories.  remove welcome modal code

* update waveterm.db name

* fix Wave menu (add back default items).  Update TOS modal words

* fix typescript errors
2023-11-01 01:26:19 -07:00
Red J Adaya
046d219555
add license notice (#37) 2023-10-16 21:31:13 -07:00
sawka
18a44086fc rename imports for wavesrv 2023-10-16 13:30:10 -07:00
sawka
77fee42365 move to wavesrv directory to prepare for merge to waveterm 2023-10-16 13:19:34 -07:00