Compare commits

...

45 Commits

Author SHA1 Message Date
MrStashley 52eddd8c6b fixed logs 2024-03-11 15:07:02 -07:00
MrStashley 1e646a480c added user keybind config path 2024-03-11 15:02:55 -07:00
MrStashley 6df7a79ea0 removed old handle config func 2024-03-11 12:10:01 -07:00
MrStashley dd2d80475c initial change for http file server 2024-03-11 12:08:43 -07:00
MrStashley 753aee63c5 addressed feedback 2024-03-07 13:25:43 -08:00
MrStashley 90a6dea264 added config api path 2024-03-07 13:12:48 -08:00
Mike Sawka 8b540cd989 bump waveshell to v0.5.0 (#403) 2024-03-07 13:06:34 -08:00
Mike Sawka 45a3f7e721 add minimap linestate for codeedit to disable minimap (#402) 2024-03-07 12:04:17 -08:00
Mike Sawka a3d2b1a54c small lightmode fixups (#400) 2024-03-07 11:33:41 -08:00
Mike Sawka d77dd5f507 updates for codeedit light mode (#399) 2024-03-07 11:24:54 -08:00
Mike Sawka 237a1088b0 fix mainview border/padding (#398) 2024-03-07 11:08:02 -08:00
Cole Lashley 036b0ff989 Keybindings second wave - System Keybindings (#386)
* added system level keybindings

* added process key event

* added fix for code check

* add event.returnValue, remove console.logs, change sendSync to send
2024-03-06 21:31:03 -08:00
Mike Sawka 29acdc6eff cmdinput actions (filter, ai, and history) (#395)
* clientsettings fixups -- border top, padding, and remove theme dropdown for prod

* new cmdinput actions, get the filter commands showing, titlebars for info history and info aichat, toggles for history
2024-03-06 19:15:51 -08:00
Evan Simkowitz 3a119ae575 Update go version in build helper (#394) 2024-03-06 17:41:01 -08:00
Evan Simkowitz 72a5d18d0d remove upload step (#393) 2024-03-06 17:22:43 -08:00
Mike Sawka 4357bcf1c8 implement /reset:cwd (fix for #278) and more (#392)
* checkpoint some ideas on a new branch

* checkpoint on new errors / errorcode passing

* get CodedError piped all the way through to infomsg

* implement a /reset:cwd command to deal with cases when the cwd is invalid.  other assorted debugging, utility, and fixups

* on invalid cwd, show message to run /reset:cwd
2024-03-06 16:37:54 -08:00
Evan Simkowitz 33fc3518c0 Sign and notarize directly in build-helper (#389)
* Sign and notarize in CI

* add dmg

* remove flag

* fix env var

* add team id

* conditionally set apple specific env vars

* publish to a staging location

* upload unzipped

* add script to publish to staging, update publish url

* turn off autodiscovery again

* update scripts

* deprecate old method

* move stuff

* remove autodiscovery
2024-03-06 16:07:48 -08:00
Mike Sawka 2735b03cb8 update go.sum files (#391) 2024-03-06 14:47:41 -08:00
Sylvie Crowe 6091305bb3 SSH Quick Fixes (#385)
* fix: allow ssh user to use numbers/capital letters

Prior to this change, usernames could not start with numbers and could
not contain capital letters at all. Note that the username can also
start with capital letters.

* fix: update ssh_config with IdentityFiles fix

This adds the update that provides the ssh2 defaults for IdentityFiles.
This will allow the usual defaults to be searched when none are
explicitly provided.

* fix: overwrite identity files instead of appending

This change makes it so a waveterm configured identity file will
overwrite the one in the config instead of attempting to append it. This
matches the behavior of openssh.

* style: use regular font for markdown user input

This makes the Markdown User Input indistinct from user input without
markdown. It changes the font and makes a couple small adjustments to
the font size and line height.

* fix: use font property instead of font-family

The markdown css for User Input can be simplified with the font being
set by the "font" property rather than the "font-family" property.
2024-03-06 12:33:01 -08:00
Mike Sawka 55a5b8615b nerf markdown header font sizes -- match github (#388) 2024-03-06 11:52:26 -08:00
Mike Sawka a1ab25936e zsh fixes (fix for #368), clean up zsh option handling, more debugging code (#387)
* logging and add a flag to debug returnstate file

* fix for issue #368.  clean up more zsh options.  force global_rcs to be off.
2024-03-06 11:38:27 -08:00
Cole Lashley 7bf1a259a2 Keybindings PR first section - Updating keyutil (#384)
* updated keyutil

* added keybindings file

* export checkKeyPressed
2024-03-05 18:19:47 -08:00
Evan Simkowitz bde2a9ccfe Update dependencies (#383)
* Bump go-github and update license disclaimers

* update go version

* upgrade electron-builder
2024-03-05 16:12:52 -08:00
Mike Sawka c078f017ed align line-actions, scale with terminal font size (#382) 2024-03-05 14:36:39 -08:00
Evan Simkowitz 01dc6144ac Replace the cloud tab icon with the non-sharp version (#381) 2024-03-05 13:19:33 -08:00
Evan Simkowitz b54cad6304 Fix vertical scroll bar in tab bar (#380) 2024-03-05 13:08:18 -08:00
Mike Sawka e30748109c Minor Fixes (border, history line background), Toggle DevUI (#379)
* restore sidebar right border, fix line-container background color for history

* add a dev-only 'Toggle Dev UI' switch in the View Menu (for testing UI and screenshots, etc.)
2024-03-05 12:52:37 -08:00
Red J Adaya 70db1e1b48 History view theme fixes (#377)
* use Dropdown element in history view

* use elements for filters

* fix for selected and hovered color
2024-03-04 23:34:35 -08:00
Mike Sawka 93d46cca80 app border fixup (no transparency), terminal background image POC (#378)
* use native border (remove transparency from app window), remove css borders, remove default --term variables, force setClientData to set --term font variables on first set.

* terminal background images
2024-03-04 23:33:54 -08:00
Evan Simkowitz 4ef921bdd1 Support Linux packaging via electron-builder (#371)
* Add linux makers

* missed some

* remove eu-strip

* blah

* add description

* remove v from version

* add exec name

* use bin

* add bin to both

* test flatpak

* test adding dev dependencies

* remove flatpak for now

* add command to flatten directory structure

* update package info

* save rpm info

* save work

* add bin to packagerConfig

* save work

* okay let's see what happens

* iterate array

* test more

* remove large

* test

* test

* remove linux arm

* test addl targets

* add quiet to zip

* revert dir flatten

* remove pacman

* add s3 bucket to electron-builder config

* make dir

* only copy artifacts

* don't merge

* zip recurse

* blah

* replace with electronupdater

* make generic

* fix

* fix stuff

* Update build-helper.yml

* test fix

* fix path

* remove tree

* messed up comment

* remove touch

* add platform name to artifact

* remove license

* remove forge

* cleanup builder config

* switch artifact name order

* Remove darwin restriction on autoupdate

* try adding back pacman

* fix license

* remove pacman again

* rewrite scripts

* add binary paths to builder

* clean up

* Update scripts

* update interval and readme

* remove flatpak and snap dependencies for now

* upload with a wildcard

* fix paths for addl binaries

* add back blockmap

* update release path

* add newline

* remove forge config

* 2 small fixes - remove double cd for waveshell building, and remove GOARCH for wavesrv binary in dev mode
2024-03-04 22:03:53 -08:00
Ian Jennings 1979e401d4 test pr branch (#376) 2024-03-04 21:06:10 -08:00
Red J Adaya baf00ac514 Light theme (#365)
* light theme for button element

* light them for connections view

* remove box-shadows

* light theme for textfield

* unify form elements colors

* light theme for modals

* remove inset from modal box-shadow

* light theme for tooltip

* remove empty fies. theme new tab setting spacer

* light theme for cmdinput

* light theme for scroll

* minor global color change

* connections and history view light theme improvements

* light them for line actions bg

* light theme for sidebar actions

* more on line themes and fixes

* use font shorthand

* use --form-element-* for all form elements colors

* update/remove some cmdiput colors

* update terminal colors for light mode

* move term lightmode settings to new file (needs updates for more contrast)

* lighten up panel color, remove 'dev' panel color for now (since we're testing light mode)

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-03-04 17:05:05 -08:00
Red J Adaya b5022c555a force re-rerender when switching themes (#374) 2024-03-04 16:40:30 -08:00
Mike Sawka ab21591314 updates for terminal fonts / colors (#375)
* updating fonts and colors

* use wavegreen for green

* cmdinput should use terminal colors

* adjust colors, bright up bright-white.  cmdinput use more term colors.
2024-03-04 16:27:34 -08:00
Evan Simkowitz 1f9d9b160a Add min-width to sidebar so it won't shrink when the window gets too small (#373) 2024-03-04 16:09:23 -08:00
Sylvie Crowe 50953839b1 SSH Cleanup (#370)
* feat: allow user input verification for install

Depending on the method of installing waveshell, it may be desired to
pop up a modal for user verification. This is a first pass at handling
these special cases. The focus is on installing while previously
connected and auto installing while connecting.

* chore: update mshell to waveshell in error msg

* fix: run waveshell remotely with chosen shell

This ensures that the appropriate shell is used to run the waveshell
command remotely. It hasn't made a difference in my experience but is
desired in order to match the local launch.

* chore: simplify command to run waveshell remotely

This change removes the extra check for a directory and just tries to
run the command instead. It pipes the usual error to null and prints an
init packet instead.

* fix: prevent wavesrv crash during bad connection

The waveshell launch can fail in two different ways. If it has a
recoverable failure, it will attempt to reinstall waveshell. If not, it
is supposed to print an error. The unrecoverable case was causing a
segfault due to a misnamed variable. This change corrects it.

* fix: correct auto install user input modal

The previous combination of flags to catch auto install did not work
properly. This corrects them.

* chore: add "s" to countdown for user input timer

Makes it clear that the countdown is seconds.

* fix: remove auto password entry for sudo remote

The auto password entry for sudo remotes printed an error that was not
in response to the user input. To avoid this confusion, it has been
removed entirely.

* feat: add auto focus to user input modal

This automatically moves the cursor to the text box when the modal pops
up.

* feat: handle enter/escape keys for password entry

The password modal previously had to have buttons clicked to close it.
This change allows the user to close it with whatever is bound to escape
and to submit with whatever is bound to enter.

* chore: update an any type to correct type

* fix: correct keyboard event type from last commit

* fix: check identity files are readable early

Previously, an invalid identity file would send a dummy signer if the
file didn't exist. This resulted in extra sign in attempts that have no
chance of success. This could cause someone to get locked out of a
connection because of too many failed attempts. By performing the check
early, we no longer have to make these extra attempts.

* fix: only check global known hosts as root

The root user should not be able to write to a local known_hosts file.
If it does, it risks overwriting the default global behavior for only
the root user. This problem would only occur if waveterm was launched as
root, but we should protect against it just in case.

* feat: add remote name for remote password prompt

This change clarifies the remote name for password and keyboard
interactive prompts. It displays a message that authentication has been
requested from <hostname>. It is not added to publickey passphrase since
those phrases are specific to the key and not the remote.

* revert "simplify cmd to run waveshell remotely"

This reverts commit 4e5eea51b65318428f83a16133b7cc3df53832bd.
2024-03-04 11:56:20 -08:00
Mike Sawka 438d17b933 linux/darwin overrides for logo position and corner rounding (#372)
* linux/darwin overrides for logo position and corner rounding

* more perfect border/border-radius on mac
2024-03-04 11:55:43 -08:00
Mike Sawka 31b9c3d3a5 calculate editor height correctly (#367) 2024-03-01 18:28:39 -08:00
Mike Sawka adf83c73b1 codeedit ui updates (#366)
* codeedit UI updates

* deal with long messages, cleanup
2024-03-01 18:11:28 -08:00
Mike Sawka 089862d990 initialize lhe (#364) 2024-03-01 00:14:28 -08:00
Red J Adaya b5d481734f Theme switching (#361)
* init

* init

* theme override mechanism by changing href value in header link tag

* remove debugging code

* remove debugging code. no need to force rerender

* remove overrides.less

* get some light colors showing in light theme
2024-03-01 00:01:23 -08:00
Mike Sawka 402c8c2485 recalculate dynamic layout heights (#362)
* working on MagicLayout.  update constants and move to dynamic computation in textmeasure.

* magic line height -- no jitter.  and add some debugging code for helping to fix future problems

* fix openai fonts
2024-02-29 23:46:22 -08:00
Mike Sawka 41f91b6a8a More Font / UI Updates and Cleanup (#360)
* font updates, settings modals, tabs, change base font.

* aichat responses

* fix updatemodel errors/warnings.  more font inconsistencies

* history fixes

* more fixups, fix some warnings, text/font updates for various subsystems
2024-02-29 21:40:01 -08:00
Mike Sawka 5af7d21e4b update to tab highlighting for active tab. tweak to sidebar logo (no name, fix left next to traffic lights) (#358) 2024-02-29 14:53:34 -08:00
Sylvie Crowe 6c115716b0 Integrate SSH Library with Waveshell Installation/Auto-update (#322)
* refactor launch code to integrate install easier

The previous set up of launch was difficult to navigate. This makes it
much clearer which will make the auto install flow easier to manage.

* feat: integrate auto install into new ssh setup

This change makes it possible to auto install using the ssh library
instead of making a call to the ssh cli command. This will auto install
if the installed waveshell version is incorrect or cannot be found.

* chore: clean up some lints for sshclient

There was a context that didn't have it's cancel function deferred and
an error that wasn't being handle. They're fixed now.

* fix: disconnect client if requested or launch fail

A recent commit made it so a client remained part of the MShellProc
after being disconnected. This is undesireable since a manual
disconnection indicates that the user will need to enter their
credentials again if required. Similarly, if the launch fails with an
error, the expectation is that credentials will have to be entered
again.

* fix: use legacy timer for the time being

The legacy timer frustrates me because it adds a lot of state to the
MShellProc struct that is complicated to manage. But it currently works,
so I will be keeping it for the time being.

* fix: change separator between remoteref and name

With the inclusion of the port number in the canonical id, the :
separator between the remoteref and remote name causes problems if the
port is parsed instead. This changes it to a # in order to avoid this
conflict.

* fix: check for null when closing extra files

It is possible for the list of extra files to contain null files. This
change ensures the null files will not be erroneously closed.

* fix: change connecting method to show port once

With port added to the canonicalname, it no longer makes sense to append
the port afterward.

* feat: use user input modal for sudo connection

The sudo connection used to have a unique way of entering a password.
This change provides an alternative method using the user input modal
that the other connection methods use. It does not work perfectly with
this revision, but the basic building blocks are in place. It needs a
few timer updates to be complete.

* fix: remove old timer to prevent conflicts with it

With this change the old timer is no longer needed. It is not fully
removed yet, but it is disabled so as to not get in the way.
Additionally, error handling has been slightly improved.

There is still a bug where an incorrect password prints a new password
prompt after the error message. That needs to be fixed in the future.
2024-02-29 11:37:03 -08:00
132 changed files with 5653 additions and 7145 deletions
+25 -31
View File
@@ -1,25 +1,19 @@
name: "Build Helper"
on: workflow_dispatch
env:
GO_VERSION: "1.21.5"
GO_VERSION: "1.22.0"
NODE_VERSION: "21.5.0"
jobs:
runbuild:
outputs:
WAVETERM_VERSION: ${{ steps.set-version.outputs.WAVETERM_VERSION }}
strategy:
matrix:
include:
- platform: "darwin"
arch: "x64"
runner: "macos-latest"
scripthaus: "build-package"
- platform: "darwin"
arch: "arm64"
arch: "universal"
runner: "macos-latest-xlarge"
scripthaus: "build-package"
- platform: "linux"
arch: "x64"
arch: "amd64"
runner: "ubuntu-latest"
scripthaus: "build-package-linux"
runs-on: ${{ matrix.runner }}
@@ -29,6 +23,11 @@ jobs:
with:
repository: scripthaus-dev/scripthaus
path: scripthaus
- name: Install Linux Build Dependencies (Linux only)
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install rpm
- uses: actions/setup-go@v5
with:
go-version: ${{env.GO_VERSION}}
@@ -36,7 +35,8 @@ jobs:
wavesrv/go.sum
waveshell/go.sum
scripthaus/go.sum
- run: |
- name: Install Scripthaus
run: |
go work use ./scripthaus;
cd scripthaus;
go get ./...;
@@ -45,30 +45,24 @@ jobs:
with:
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
- id: set-version
- name: Set Version
id: set-version
run: |
VERSION=$(node -e 'console.log(require("./version.js"))')
echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
- run: yarn --frozen-lockfile
- run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
- uses: actions/upload-artifact@v4
with:
name: waveterm-build-${{ matrix.platform }}-${{ matrix.arch }}
path: out/make/zip/${{ matrix.platform }}/${{ matrix.arch }}/*.zip
retention-days: 2
upload:
name: "Upload Builds"
runs-on: ubuntu-latest
needs: [runbuild]
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: buildtemp
- run: |
echo "${{ needs.runbuild.outputs.WAVETERM_VERSION }}" > buildtemp/version.txt
- run: (cd buildtemp; zip ../waveterm-builds.zip *)
- run: aws s3 cp waveterm-builds.zip s3://waveterm-github-artifacts/
- name: Install Yarn Dependencies
run: yarn --frozen-lockfile
- name: Build ${{ matrix.platform }}/${{ matrix.arch }}
run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
env:
GOARCH: ${{ matrix.arch }}
CSC_LINK: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE}}
CSC_KEY_PASSWORD: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE_PWD }}
APPLE_ID: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_PWD }}
APPLE_TEAM_ID: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
- name: Upload to S3 staging
run: aws s3 cp make/ s3://waveterm-github-artifacts/staging/${{ steps.set-version.outputs.WAVETERM_VERSION }}/ --recursive --exclude "*/*" --exclude "builder-*.yml"
env:
AWS_ACCESS_KEY_ID: "${{ secrets.S3_USERID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.S3_SECRETKEY }}"
+2
View File
@@ -20,3 +20,5 @@ temp.sql
.idea/
test/
.vscode/
make/
waveterm-builds.zip
+1 -4
View File
@@ -1,12 +1,9 @@
rm ~/Desktop/WITH-LOVE-FROM-AMERICA.txt
cd ~/actions-runner/_work/testdriver/testdriver/
brew install go
brew tap scripthaus-dev/scripthaus
brew install scripthaus
npm install -g yarn
mkdir ~/build
cd ~/build
git clone https://github.com/wavetermdev/waveterm.git
cd waveterm
scripthaus run build-backend
echo "Yarn"
yarn
+1 -1
View File
@@ -9,7 +9,7 @@
# Wave Terminal
A open-source, cross-platform, AI-integrated, modern terminal for seamless workflows.
An open-source, cross-platform, AI-integrated, modern terminal for seamless workflows.
Wave isn't just another terminal emulator; it's a rethink on how terminals are built. Wave combines command line with the power of the open web to help veteran CLI users and new developers alike.
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+258
View File
@@ -0,0 +1,258 @@
[
{
"command": "system:toggleDeveloperTools",
"keys": ["Cmd:Option:i"]
},
{
"command": "generic:cancel",
"keys": ["Escape"]
},
{
"command": "generic:confirm",
"keys": ["Enter"]
},
{
"command": "generic:deleteItem",
"keys": ["Backspace", "Delete"]
},
{
"command": "generic:selectAbove",
"keys": ["ArrowUp"]
},
{
"command": "generic:selectBelow",
"keys": ["ArrowDown"]
},
{
"command": "generic:selectPageAbove",
"keys": ["PageUp"]
},
{
"command": "generic:selectPageBelow",
"keys": ["PageDown"]
},
{
"command": "app:openHistory",
"keys": ["Cmd:h"]
},
{
"command": "app:openTabSearchModal",
"keys": ["Cmd:p"]
},
{
"command": "app:newTab",
"keys": ["Cmd:t"]
},
{
"command": "app:focusCmdInput",
"keys": ["Cmd:i"]
},
{
"command": "app:focusSelectedLine",
"keys": ["Cmd:l"]
},
{
"command": "app:restartCommand",
"keys": ["Cmd:r"]
},
{
"command": "app:restartLastCommand",
"keys": ["Cmd:Shift:r"]
},
{
"command": "app:closeCurrentTab",
"keys": ["Cmd:w"]
},
{
"command": "app:selectLineAbove",
"keys": ["Cmd:ArrowUp", "Cmd:PageUp"]
},
{
"command": "app:selectLineBelow",
"keys": ["Cmd:ArrowDown", "Cmd:PageDown"]
},
{
"command": "app:selectTab-1",
"keys": ["Cmd:1"]
},
{
"command": "app:selectTab-2",
"keys": ["Cmd:2"]
},
{
"command": "app:selectTab-3",
"keys": ["Cmd:3"]
},
{
"command": "app:selectTab-4",
"keys": ["Cmd:4"]
},
{
"command": "app:selectTab-5",
"keys": ["Cmd:5"]
},
{
"command": "app:selectTab-6",
"keys": ["Cmd:6"]
},
{
"command": "app:selectTab-7",
"keys": ["Cmd:7"]
},
{
"command": "app:selectTab-8",
"keys": ["Cmd:8"]
},
{
"command": "app:selectTab-9",
"keys": ["Cmd:9"]
},
{
"command": "app:selectTabLeft",
"keys": ["Cmd:["]
},
{
"command": "app:selectTabRight",
"keys": ["Cmd:]"]
},
{
"command": "app:selectWorkspace-1",
"keys": ["Cmd:Ctrl:1"]
},
{
"command": "app:selectWorkspace-2",
"keys": ["Cmd:Ctrl:2"]
},
{
"command": "app:selectWorkspace-3",
"keys": ["Cmd:Ctrl:3"]
},
{
"command": "app:selectWorkspace-4",
"keys": ["Cmd:Ctrl:4"]
},
{
"command": "app:selectWorkspace-5",
"keys": ["Cmd:Ctrl:5"]
},
{
"command": "app:selectWorkspace-6",
"keys": ["Cmd:Ctrl:6"]
},
{
"command": "app:selectWorkspace-7",
"keys": ["Cmd:Ctrl:7"]
},
{
"command": "app:selectWorkspace-8",
"keys": ["Cmd:Ctrl:8"]
},
{
"command": "app:selectWorkspace-9",
"keys": ["Cmd:Ctrl:9"]
},
{
"command": "app:toggleSidebar",
"keys": ["Cmd:Ctrl:s"]
},
{
"command": "app:deleteActiveLine",
"keys": ["Cmd:d"]
},
{
"command": "app:bookmarkActiveLine",
"keys": ["Cmd:b"]
},
{
"command": "bookmarks:edit",
"keys": ["e"]
},
{
"command": "bookmarks:copy",
"keys": ["c"]
},
{
"command": "cmdinput:autocomplete",
"keys": ["Tab"]
},
{
"command": "cmdinput:expandInput",
"keys": ["Cmd:e"]
},
{
"command": "cmdinput:clearInput",
"keys": ["Ctrl:c"]
},
{
"command": "cmdinput:cutLineLeftOfCursor",
"keys": ["Ctrl:u"]
},
{
"command": "cmdinput:previousHistoryItem",
"keys": ["Ctrl:p"]
},
{
"command": "cmdinput:nextHistoryItem",
"keys": ["Ctrl:n"]
},
{
"command": "cmdinput:cutWordLeftOfCursor",
"keys": ["Ctrl:w"]
},
{
"command": "cmdinput:paste",
"keys": ["Ctrl:y"]
},
{
"command": "cmdinput:openHistory",
"keys": ["Ctrl:r"]
},
{
"command": "cmdinput:openAIChat",
"keys": ["Ctrl:Space"]
},
{
"command": "history:closeHistory",
"keys": ["Ctrl:g", "Ctrl:c"]
},
{
"command": "history:toggleShowRemotes",
"keys": ["Cmd:r", "Ctrl:r"]
},
{
"command": "history:changeScope",
"keys": ["Ctrl:s", "Cmd:s"]
},
{
"command": "history:selectNextItem",
"keys": ["Ctrl:n"]
},
{
"command": "history:selectPreviousItem",
"keys": ["Ctrl:p"]
},
{
"command": "aichat:clearHistory",
"keys": ["Ctrl:l"]
},
{
"command": "terminal:copy",
"keys": ["Ctrl:Shift:c"]
},
{
"command": "terminal:paste",
"keys": ["Ctrl:Shift:v"]
},
{
"command": "codeedit:save",
"keys": ["Cmd:s"]
},
{
"command": "codeedit:close",
"keys": ["Cmd:d"]
},
{
"command": "codeedit:togglePreview",
"keys": ["Cmd:p"]
}
]
+2 -1
View File
@@ -1,3 +1,4 @@
*/
*builds/
*-staged/
*.zip
*.dmg
+71
View File
@@ -0,0 +1,71 @@
# Building for release
## Build Helper workflow
Our release builds are managed by the "Build Helper" GitHub Action, which is defined
in [`build-helper.yml`](../.github/workflows/build-helper.yml).
Under the hood, this will call the `build-package` and `build-package-linux` scripts in
[`scripthaus.md`](../scripthaus.md), which will build the Electron codebase using
WebPack and then the `wavesrv` and `mshell` binaries, then it will call `electron-builder`
to generate the distributable app packages. The configuration for `electron-builder`
is [`electron-builder.config.js`](../electron-builder.config.js).
This will also sign and notarize the macOS app package.
Once a build is complete, it will be placed in `s3://waveterm-github-artifacts/staging/<version>`.
It can be downloaded for testing using the [`download-staged-artifact.sh`](./download-staged-artifact.sh)
script. When you are ready to publish the artifacts to the public release feed, use the
[`publish-from-staging.sh`](./publish-from-staging.sh) script to directly copy the artifacts from
the staging bucket to the releases bucket.
## Automatic updates
Thanks to `electron-updater`, we are able to provide automatic app updates for macOS and Linux,
as long as the app was distributed as a DMG, AppImage, RPM, or DEB file.
With each release, `latest-mac.yml` and `latest-linux.yml` files will be produced that point to the
newest release. These also include file sizes and checksums to aid in validating the packages. The app
will check these files in our S3 bucket every hour to see if a new version is available.
## Local signing and notarizing for macOS (Deprecated)
The [`prepare-macos.sh`](./deprecated/prepare-macos.sh) script will download the latest build
artifacts from S3 and sign and notarize the macOS binaries within it. It will then
generate a DMG and a new ZIP archive with the new signed app.
This will call a few different JS scripts to perform more complicated operations.
[`osx-sign.js`](./deprecated/osx-sign.js) and [`osx-notarize.js`](./deprecated/osx-notarize.js) call
underlying Electron APIs to sign and notarize the package.
[`update-latest-mac.js`](./deprecated/update-latest-mac.js) will then update the `latest-mac.yml`
file with the SHA512 checksum and file size of the new signed and notarized installer. This
is important for the `electron-updater` auto-update mechanism to then find and validate new releases.
## Uploading release artifacts for distribution (Deprecated)
### Upload script
Once the build has been fully validated and is ready to be released, the
[`upload-release.sh`](./deprecated/upload-release.sh) script is then used to grab the completed
artifacts and upload them to the `dl.waveterm.dev` S3 bucket for distribution.
### Homebrew
Homebrew currently requires a manual bump of the version, but now that we have auto-updates,
we should add our cask to the list of apps that can be automatically bumped.
### Linux
We do not currently submit the Linux packages to any of the package repositories. We
are working on addressing this in the near future.
## `electron-build` configuration
Most of our configuration is fairly standard. The main exception to this is that we exclude
our Go binaries from the ASAR archive that Electron generates. ASAR files cannot be executed
by NodeJS because they are not seen as files and therefore cannot be executed via a Shell
command. More information can be found
[here](https://www.electronjs.org/docs/latest/tutorial/asar-archives#executing-binaries-inside-asar-archive).
We also exclude most of our `node_modules` from packaging, as WebPack handles packaging
of any dependencies for us. The one exception is `monaco-editor`.
-20
View File
@@ -1,20 +0,0 @@
const eu = require("@electron/universal");
const path = require("path");
const x64Path = path.resolve(__dirname, "temp", "x64", "Wave.app");
const arm64Path = path.resolve(__dirname, "temp", "arm64", "Wave.app");
const outPath = path.resolve(__dirname, "temp", "Wave.app");
console.log("building universal package");
console.log("x64 path", x64Path);
console.log("arm64 path", arm64Path);
console.log("output path", outPath);
(async () => {
await eu.makeUniversalApp({
x64AppPath: x64Path,
arm64AppPath: arm64Path,
outAppPath: outPath,
});
console.log("created macos universal app");
})();
-97
View File
@@ -1,97 +0,0 @@
#!/bin/bash
# This script is used to build the universal app for macOS
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
rm -f *.zip *.dmg
ZIP_DIR=$SCRIPT_DIR/zip
rm -rf $ZIP_DIR
mkdir $ZIP_DIR
TEMP_DIR=$SCRIPT_DIR/temp
rm -rf $TEMP_DIR
mkdir $TEMP_DIR
BUILDS_DIR=$SCRIPT_DIR/builds
rm -rf $BUILDS_DIR
# Download the builds zip
aws s3 cp s3://waveterm-github-artifacts/waveterm-builds.zip .
BUILDS_ZIP=waveterm-builds.zip
if ! [ -f $BUILDS_ZIP ]; then
echo "no $BUILDS_ZIP found";
exit 1;
fi
echo "unzipping $BUILDS_ZIP"
unzip -q $BUILDS_ZIP -d $BUILDS_DIR
rm $BUILDS_ZIP
# Ensure we have exactly one of each build
find_build()
{
local BUILD_DIR=$1
local BUILD_PATTERN=$2
local BUILD_PATH=$(find $BUILD_DIR -type f -iname "$BUILD_PATTERN")
local NUM_MATCHES=$(echo $BUILD_PATH | wc -l)
if [ "0" -eq "$NUM_MATCHES" ]; then
echo "no $BUILD_NAME found in $BUILD_DIR"
exit 1
elif [ "1" -lt "$NUM_MATCHES" ]; then
echo "multiple $BUILD_NAME found in $BUILD_DIR"
exit 1
fi
echo $BUILD_PATH
}
X64_ZIP=$(find_build $BUILDS_DIR "Wave-darwin-x64-*.zip")
ARM64_ZIP=$(find_build $BUILDS_DIR "Wave-darwin-arm64-*.zip")
set -e
echo "unzipping zip files"
unzip -q $X64_ZIP -d $TEMP_DIR/x64
unzip -q $ARM64_ZIP -d $TEMP_DIR/arm64
rm $ARM64_ZIP $X64_ZIP
# Create universal app and sign and notarize it
TEMP_WAVE_DIR_ARM=$TEMP_DIR/x64/Wave.app
TEMP_WAVE_DIR_X64=$TEMP_DIR/arm64/Wave.app
TEMP_WAVE_DIR_UNIVERSAL=$TEMP_DIR/Wave.app
lipo -create -output $TEMP_DIR/wavesrv $TEMP_WAVE_DIR_X64/Contents/Resources/app/bin/wavesrv $TEMP_WAVE_DIR_ARM/Contents/Resources/app/bin/wavesrv
rm -rf $TEMP_WAVE_DIR_ARM/Contents/Resources/app
mv $TEMP_WAVE_DIR_X64/Contents/Resources/app $TEMP_DIR
cp $TEMP_DIR/wavesrv $TEMP_DIR/app/bin/wavesrv
mkdir $TEMP_WAVE_DIR_ARM/Contents/Resources/app
mkdir $TEMP_WAVE_DIR_X64/Contents/Resources/app
node $SCRIPT_DIR/build-universal.js
rm -rf $TEMP_WAVE_DIR_UNIVERSAL/Contents/Resources/app
mv $TEMP_DIR/app $TEMP_WAVE_DIR_UNIVERSAL/Contents/Resources/app
node $SCRIPT_DIR/osx-sign.js
DEBUG=electron-notarize node $SCRIPT_DIR/osx-notarize.js
echo "universal app creation success (build/sign/notarize)"
UVERSION=$(cat $BUILDS_DIR/version.txt)
DMG_NAME="waveterm-macos-universal-${UVERSION}.dmg"
ZIP_NAME="Wave-macos-universal-${UVERSION}.zip"
echo "creating universal zip"
ditto $TEMP_WAVE_DIR_UNIVERSAL $ZIP_DIR/Wave.app
cd $ZIP_DIR
zip -9yqr $ZIP_NAME Wave.app
mv $ZIP_NAME $BUILDS_DIR/
cd $SCRIPT_DIR
# Expects create-dmg repo to be cloned in the same parent directory as the waveterm repo.
echo "creating universal dmg"
$SCRIPT_DIR/../../create-dmg/create-dmg \
--volname "WaveTerm" \
--window-pos 200 120 \
--window-size 600 300 \
--icon-size 100 \
--icon "Wave.app" 200 130 \
--hide-extension "Wave.app" \
--app-drop-link 400 125 \
$DMG_NAME \
"$TEMP_WAVE_DIR_UNIVERSAL"
echo "success, created $DMG_NAME"
mv $DMG_NAME $BUILDS_DIR/
spctl -a -vvv -t install $TEMP_WAVE_DIR_UNIVERSAL/
rm -rf $TEMP_DIR $ZIP_DIR
+46
View File
@@ -0,0 +1,46 @@
// Usage: node generate-hash.js <path-to-installer>
// Example: node generate-hash.js ./make/Wave-0.0.1.dmg
// This script will generate a hash of the installer file, as defined by electron-builder.
// Courtesy of https://github.com/electron-userland/electron-builder/issues/3913#issuecomment-504698845
const path = require("path");
const fs = require("fs");
const crypto = require("crypto");
/**
* Generate a hash of a file, as defined by electron-builder
* @param {string} file - Path to the file
* @param {string} algorithm - Hash algorithm to use
* @param {string} encoding - Encoding to use
* @returns {Promise<string>} - The hash of the file
*/
async function hashFile(file, algorithm = "sha512", encoding = "base64") {
return new Promise((resolve, reject) => {
const hash = crypto.createHash(algorithm);
hash.on("error", reject).setEncoding(encoding);
fs.createReadStream(file, {
highWaterMark: 1024 * 1024,
/* better to use more memory but hash faster */
})
.on("error", reject)
.on("end", () => {
hash.end();
resolve(hash.read());
})
.pipe(hash, {
end: false,
});
});
}
if (require.main === module) {
const installerPath = path.resolve(process.cwd(), process.argv[2]);
(async () => {
const hash = await hashFile(installerPath);
console.log(`hash of ${installerPath}: ${hash}`);
})();
}
module.exports = {
hashFile,
};
+37
View File
@@ -0,0 +1,37 @@
// Notarize the Wave.app for macOS
const { notarize } = require("@electron/notarize");
const path = require("path");
/**
* Notarize the Wave.app for macOS
* @param {string} waveAppPath - Path to the Wave.app
* @returns {Promise<void>}
*/
async function notarizeApp(waveAppPath) {
return notarize({
appPath: waveAppPath,
tool: "notarytool",
keychainProfile: "notarytool-creds",
})
.then(() => {
console.log("notarize success");
})
.catch((e) => {
console.log("notarize error", e);
process.exit(1);
});
}
if (require.main === module) {
console.log("running osx-notarize");
const waveAppPath = path.resolve(__dirname, "temp", "Wave.app");
(async () => {
await notarizeApp(waveAppPath);
console.log("notarization complete");
})();
}
module.exports = {
notarizeApp,
};
+45
View File
@@ -0,0 +1,45 @@
// Sign the app and binaries for macOS
const { signAsync } = require("@electron/osx-sign");
const path = require("path");
const fs = require("fs");
/**
* Sign the app and binaries for macOS
* @param {string} waveAppPath - Path to the Wave.app
* @returns {Promise<void>}
*/
async function signApp(waveAppPath) {
const binDirPath = path.resolve(waveAppPath, "Contents", "Resources", "app.asar.unpacked", "bin");
const binFilePaths = fs
.readdirSync(binDirPath, { recursive: true, withFileTypes: true })
.filter((f) => f.isFile())
.map((f) => path.resolve(binDirPath, f.path, f.name));
console.log("waveAppPath", waveAppPath);
console.log("binDirPath", binDirPath);
console.log("binFilePaths", binFilePaths);
return signAsync({
app: waveAppPath,
binaries: binFilePaths,
})
.then(() => {
console.log("signing success");
})
.catch((e) => {
console.log("signing error", e);
process.exit(1);
});
}
if (require.main === module) {
console.log("running osx-sign");
const waveAppPath = path.resolve(__dirname, "temp", "Wave.app");
(async () => {
await signApp(waveAppPath);
console.log("signing complete");
})();
}
module.exports = {
signApp,
};
+88
View File
@@ -0,0 +1,88 @@
#!/bin/bash
# This script is used to sign and notarize the universal app for macOS
# Gets the directory of the script
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Remove old files and dirs, create new ones
rm -f *.zip *.dmg
ZIP_DIR=$SCRIPT_DIR/zip
rm -rf $ZIP_DIR
mkdir $ZIP_DIR
TEMP_DIR=$SCRIPT_DIR/temp
rm -rf $TEMP_DIR
mkdir $TEMP_DIR
BUILDS_DIR=$SCRIPT_DIR/builds
rm -rf $BUILDS_DIR
# Download the builds zip
aws s3 cp s3://waveterm-github-artifacts/waveterm-builds.zip .
BUILDS_ZIP=waveterm-builds.zip
if ! [ -f $BUILDS_ZIP ]; then
echo "no $BUILDS_ZIP found";
exit 1;
fi
echo "unzipping $BUILDS_ZIP"
unzip -q $BUILDS_ZIP -d $BUILDS_DIR
rm $BUILDS_ZIP
# Finds a file in a directory matching a filename pattern. Ensures there is exactly one match.
find_file()
{
local FILE_DIR=$1
local FILE_PATTERN=$2
local FILE_PATH=$(find $FILE_DIR -type f -iname "$FILE_PATTERN")
local NUM_MATCHES=$(echo $FILE_PATH | wc -l)
if [ "0" -eq "$NUM_MATCHES" ]; then
echo "no $FILE_PATTERN found in $FILE_DIR"
exit 1
elif [ "1" -lt "$NUM_MATCHES" ]; then
echo "multiple $FILE_PATTERN found in $FILE_DIR"
exit 1
fi
echo $FILE_PATH
}
# Unzip Mac build
MAC_ZIP=$(find_file $BUILDS_DIR "Wave-darwin-universal-*.zip")
unzip -q $MAC_ZIP -d $TEMP_DIR
# Sign and notarize the app
node $SCRIPT_DIR/osx-sign.js
DEBUG=electron-notarize node $SCRIPT_DIR/osx-notarize.js
# Zip and move
echo "creating universal zip"
ZIP_NAME=$(basename $MAC_ZIP)
TEMP_WAVE_DIR_UNIVERSAL=$TEMP_DIR/Wave.app
ditto $TEMP_WAVE_DIR_UNIVERSAL $ZIP_DIR/Wave.app
cd $ZIP_DIR
zip -9yqr $ZIP_NAME Wave.app
mv $ZIP_NAME $BUILDS_DIR/
cd $SCRIPT_DIR
# Create a dmg
# Expects create-dmg repo to be cloned in the same parent directory as the waveterm repo.
echo "creating universal dmg"
DMG_NAME=$(echo $ZIP_NAME | sed 's/\.zip/\.dmg/')
$SCRIPT_DIR/../../create-dmg/create-dmg \
--volname "WaveTerm" \
--window-pos 200 120 \
--window-size 600 300 \
--icon-size 100 \
--icon "Wave.app" 200 130 \
--hide-extension "Wave.app" \
--app-drop-link 400 125 \
$DMG_NAME \
"$TEMP_WAVE_DIR_UNIVERSAL"
echo "success, created $DMG_NAME"
mv $DMG_NAME $BUILDS_DIR/
spctl -a -vvv -t install $TEMP_WAVE_DIR_UNIVERSAL/
# Update latest-mac.yml
echo "updating latest-mac.yml"
LATEST_MAC_YML=$BUILDS_DIR/latest-mac.yml
node $SCRIPT_DIR/update-latest-mac.js $MAC_ZIP $LATEST_MAC_YML
# Clean up
rm -rf $TEMP_DIR $ZIP_DIR
+40
View File
@@ -0,0 +1,40 @@
// Updates the latest-mac.yml file with the signed and notarized version of the latest installer
// Usage: node update-latest.js <path-to-installer>
const path = require("path");
const fs = require("fs");
const { hashFile } = require("./generate-hash");
const yaml = require("yaml");
/**
* Updates the latest-mac.yml file with the signed and notarized version of the latest installer
* @param {string} installerPath - Path to the installer
* @param {string} ymlPath - Path to the latest-mac.yml file
* @returns {Promise<void>}
*/
async function updateLatestMac(installerPath, ymlPath) {
const hash = (await hashFile(installerPath)).trim();
const size = fs.statSync(installerPath).size;
const yml = yaml.parse(fs.readFileSync(ymlPath, "utf8"));
for (const file of yml.files) {
if (file.url === path.basename(installerPath)) {
file.sha512 = hash;
file.size = size;
}
}
yml.sha512 = hash;
fs.writeFileSync(ymlPath, yaml.stringify(yml));
}
if (require.main === module) {
const installerPath = path.resolve(process.cwd(), process.argv[2]);
const ymlPath = path.resolve(process.cwd(), process.argv[3]);
(async () => {
await updateLatestMac(installerPath, ymlPath);
console.log("latest-mac.yml updated");
})();
}
module.exports = {
updateLatestMac,
};
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
# This script is used to upload signed and notarized releases to S3 and update the Electron auto-update release feeds.
# Gets the directory of the script
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BUILDS_DIR=$SCRIPT_DIR/builds
TEMP2_DIR=$SCRIPT_DIR/temp2
AUTOUPDATE_RELEASE_PATH="dl.waveterm.dev/releases"
# Copy the builds to the temp2 directory
echo "Copying builds to temp2"
rm -rf $TEMP2_DIR
mkdir -p $TEMP2_DIR
cp -r $BUILDS_DIR/* $TEMP2_DIR
UVERSION=$(cat $TEMP2_DIR/version.txt)
if [ -z "$UVERSION" ]; then
echo "version.txt is empty"
exit 1
fi
# Remove files we don't want to upload
rm $TEMP2_DIR/version.txt
rm $TEMP2_DIR/builder-*.yml
# Upload the artifacts
echo "Uploading build artifacts to $AUTOUPDATE_RELEASE_PATH"
aws s3 cp $TEMP2_DIR/ s3://$AUTOUPDATE_RELEASE_PATH/ --recursive
# Clean up
echo "Cleaning up"
rm -rf $TEMP2_DIR
+16
View File
@@ -0,0 +1,16 @@
# Downloads the artifacts for the specified version from the staging bucket for local testing.
# Usage: download-staged-artifact.sh <version>
# Example: download-staged-artifact.sh 0.1.0
# Retrieve version from the first argument
VERSION=$1
if [ -z "$VERSION" ]; then
echo "Usage: $0 <version>"
exit
fi
# Download the artifacts for the specified version from the staging bucket
DOWNLOAD_DIR=$VERSION-staged
rm -rf $DOWNLOAD_DIR
mkdir -p $DOWNLOAD_DIR
aws s3 cp s3://waveterm-github-artifacts/staging/$VERSION/ $DOWNLOAD_DIR/ --recursive
-18
View File
@@ -1,18 +0,0 @@
const { notarize } = require("@electron/notarize");
const path = require("path");
console.log("running osx-notarize");
const waveAppPath = path.resolve(__dirname, "temp", "Wave.app");
notarize({
appPath: waveAppPath,
tool: "notarytool",
keychainProfile: "notarytool-creds",
})
.then(() => {
console.log("notarize success");
})
.catch((e) => {
console.log("notarize error", e);
process.exit(1);
});
-22
View File
@@ -1,22 +0,0 @@
const { signAsync } = require("@electron/osx-sign");
const path = require("path");
console.log("running osx-sign");
const waveAppPath = path.resolve(__dirname, "temp", "Wave.app");
signAsync({
app: waveAppPath,
binaries: [
waveAppPath + "/Contents/Resources/app/bin/wavesrv",
waveAppPath + "/Contents/Resources/app/bin/mshell/mshell-v0.4-linux.amd64",
waveAppPath + "/Contents/Resources/app/bin/mshell/mshell-v0.4-linux.arm64",
waveAppPath + "/Contents/Resources/app/bin/mshell/mshell-v0.4-darwin.amd64",
waveAppPath + "/Contents/Resources/app/bin/mshell/mshell-v0.4-darwin.arm64",
],
})
.then(() => {
console.log("signing success");
})
.catch((e) => {
console.log("signing error", e);
process.exit(1);
});

Some files were not shown because too many files have changed in this diff Show More