Skip to content

Commit

Permalink
go modules, update xtermjs, add basic tmux copy
Browse files Browse the repository at this point in the history
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
  • Loading branch information
Adphi committed Jan 17, 2022
1 parent a080c85 commit aee8f00
Show file tree
Hide file tree
Showing 127 changed files with 3,413 additions and 14,918 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ gotty
bindata
builds
js/node_modules/*
.idea
54 changes: 0 additions & 54 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ VERSION = 2.0.0-alpha.3
BUILD_OPTIONS = -ldflags "-X main.Version=$(VERSION) -X main.CommitID=$(GIT_COMMIT)"

gotty: main.go server/*.go webtty/*.go backend/*.go Makefile
godep go build ${BUILD_OPTIONS}
go build ${BUILD_OPTIONS}

.PHONY: asset
asset: bindata/static/js/gotty-bundle.js bindata/static/index.html bindata/static/favicon.png bindata/static/css/index.css bindata/static/css/xterm.css bindata/static/css/xterm_customize.css
Expand Down Expand Up @@ -42,10 +42,10 @@ bindata/static/css/index.css: bindata/static/css resources/index.css
bindata/static/css/xterm_customize.css: bindata/static/css resources/xterm_customize.css
cp resources/xterm_customize.css bindata/static/css/xterm_customize.css

bindata/static/css/xterm.css: bindata/static/css js/node_modules/xterm/dist/xterm.css
cp js/node_modules/xterm/dist/xterm.css bindata/static/css/xterm.css
bindata/static/css/xterm.css: bindata/static/css js/node_modules/xterm/css/xterm.css
cp js/node_modules/xterm/css/xterm.css bindata/static/css/xterm.css

js/node_modules/xterm/dist/xterm.css:
js/node_modules/xterm/css/xterm.css:
cd js && \
npm install

Expand All @@ -58,7 +58,6 @@ js/node_modules/webpack:
npm install

tools:
go get github.com/tools/godep
go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr
go get github.com/jteeuwen/go-bindata/...
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
[![Wercker](http://img.shields.io/wercker/ci/55d0eeff7331453f0801982c.svg?style=flat-square)][wercker]
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]

[release]: https://github.com/yudai/gotty/releases
[release]: https://go.linka.cloud/gotty/releases
[wercker]: https://app.wercker.com/project/bykey/03b91f441bebeda34f80e09a9f14126f
[license]: https://github.com/yudai/gotty/blob/master/LICENSE
[license]: https://go.linka.cloud/gotty/blob/master/LICENSE

GoTTY is a simple command line tool that turns your CLI tools into web applications.

![Screenshot](https://raw.githubusercontent.com/yudai/gotty/master/screenshot.gif)

# Installation

Download the latest stable binary file from the [Releases](https://github.com/yudai/gotty/releases) page. Note that the release marked `Pre-release` is built for testing purpose, which can include unstable or breaking changes. Download a release marked [Latest release](https://github.com/yudai/gotty/releases/latest) for a stabale build.
Download the latest stable binary file from the [Releases](https://go.linka.cloud/gotty/releases) page. Note that the release marked `Pre-release` is built for testing purpose, which can include unstable or breaking changes. Download a release marked [Latest release](https://go.linka.cloud/gotty/releases/latest) for a stabale build.

(Files named with `darwin_amd64` are for Mac OS X users)

Expand All @@ -31,7 +31,7 @@ $ brew install yudai/gotty/gotty
If you have a Go language environment, you can install GoTTY with the `go get` command. However, this command builds a binary file from the latest master branch, which can include unstable or breaking changes. GoTTY requires go1.9 or later.

```sh
$ go get github.com/yudai/gotty
$ go get go.linka.cloud/gotty
```

# Usage
Expand Down Expand Up @@ -94,7 +94,7 @@ preferences {
}
```

See the [`.gotty`](https://github.com/yudai/gotty/blob/master/.gotty) file in this repository for the list of configuration options.
See the [`.gotty`](https://go.linka.cloud/gotty/blob/master/.gotty) file in this repository for the list of configuration options.

### Security Options

Expand Down
2 changes: 1 addition & 1 deletion backend/localcommand/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"syscall"
"time"

"github.com/yudai/gotty/server"
"go.linka.cloud/gotty/server"
)

type Options struct {
Expand Down
19 changes: 19 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module go.linka.cloud/gotty

go 1.17

require (
github.com/NYTimes/gziphandler v0.0.0-20170804200234-967539e5e271
github.com/codegangsta/cli v1.19.1
github.com/elazarl/go-bindata-assetfs v0.0.0-20150813044622-d5cac425555c
github.com/fatih/structs v0.0.0-20150526064352-a9f7daa9c272
github.com/gorilla/websocket v0.0.0-20150811171432-b6ab76f1fe98
github.com/kr/pty v0.0.0-20150511174710-5cf931ef8f76
github.com/pkg/errors v0.8.1-0.20161029093637-248dadf4e906
github.com/yudai/hcl v0.0.0-20151013225006-5fa2393b3552
)

require (
github.com/hashicorp/go-multierror v0.0.0-20150608033521-56912fb08d85 // indirect
github.com/stretchr/testify v1.7.0 // indirect
)
28 changes: 28 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
github.com/NYTimes/gziphandler v0.0.0-20170804200234-967539e5e271 h1:rEXtCtsQnEC8QeWYL2BpqmOuondcABYaKHux21ddDns=
github.com/NYTimes/gziphandler v0.0.0-20170804200234-967539e5e271/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/codegangsta/cli v1.19.1 h1:+wkU9+nidApJ051CVhVGnj5li64qOfLPz7eZMn2DPXw=
github.com/codegangsta/cli v1.19.1/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/elazarl/go-bindata-assetfs v0.0.0-20150813044622-d5cac425555c h1:Knqh8y6EeTJQ3FZsqdRq7XfB7/RimWQjBtO4YRzUgcE=
github.com/elazarl/go-bindata-assetfs v0.0.0-20150813044622-d5cac425555c/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
github.com/fatih/structs v0.0.0-20150526064352-a9f7daa9c272 h1:0fRL8zAP1oZiyz+nKKlJsW7yAIHeIjMOCr4fmGximHk=
github.com/fatih/structs v0.0.0-20150526064352-a9f7daa9c272/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/gorilla/websocket v0.0.0-20150811171432-b6ab76f1fe98 h1:VQR6w4PocLvhbzu1AtDRjW0RXe1gntyKTX2JYYX28kI=
github.com/gorilla/websocket v0.0.0-20150811171432-b6ab76f1fe98/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/hashicorp/go-multierror v0.0.0-20150608033521-56912fb08d85 h1:cUIqw6AGGDeIa1KYdG1mLl/bX+WGDbvZJ+dhb2tprxo=
github.com/hashicorp/go-multierror v0.0.0-20150608033521-56912fb08d85/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I=
github.com/kr/pty v0.0.0-20150511174710-5cf931ef8f76 h1:i5TIRQpbCg4aJMUtVHIhkQnSw++Z405Z5pzqHqeNkdU=
github.com/kr/pty v0.0.0-20150511174710-5cf931ef8f76/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/pkg/errors v0.8.1-0.20161029093637-248dadf4e906 h1:BKfCEBHnHoXswNe0Btj/zOfiyn40z6qOti8SeLbQgdM=
github.com/pkg/errors v0.8.1-0.20161029093637-248dadf4e906/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yudai/hcl v0.0.0-20151013225006-5fa2393b3552 h1:tjsK9T2IA3d2FFNxzDP7AJf+EXhyuPd7PB4Z2HrtAoc=
github.com/yudai/hcl v0.0.0-20151013225006-5fa2393b3552/go.mod h1:hg0ZaCmQL3rze1cH8Fh2g0a9q8vQs0uN8ESpePEwSEw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
102 changes: 50 additions & 52 deletions js/dist/gotty-bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/dist/main.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
8 changes: 6 additions & 2 deletions js/dist/xterm.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import * as bare from "xterm";
import { lib } from "libapps";
import { IDisposable, Terminal } from 'xterm';
import { FitAddon } from "xterm-addon-fit";
export declare class Xterm {
elem: HTMLElement;
term: bare;
term: Terminal;
resizeListener: () => void;
decoder: lib.UTF8Decoder;
message: HTMLElement;
messageTimeout: number;
messageTimer: number;
fitAddon: FitAddon;
disposables: IDisposable[];
constructor(elem: HTMLElement);
info(): {
columns: number;
Expand All @@ -23,4 +26,5 @@ export declare class Xterm {
deactivate(): void;
reset(): void;
close(): void;
setUpTmuxClipboard(): void;
}
Loading

0 comments on commit aee8f00

Please sign in to comment.