update imports to reflect new package names (moved repo)

This commit is contained in:
sawka 2023-07-26 14:24:14 -07:00
parent 5d72581683
commit afbc60ce92
26 changed files with 92 additions and 92 deletions

View File

@ -20,15 +20,15 @@ import (
"github.com/google/uuid"
"github.com/gorilla/mux"
"github.com/scripthaus-dev/sh2-server/pkg/cmdrunner"
"github.com/scripthaus-dev/sh2-server/pkg/pcloud"
"github.com/scripthaus-dev/sh2-server/pkg/remote"
"github.com/scripthaus-dev/sh2-server/pkg/rtnstate"
"github.com/scripthaus-dev/sh2-server/pkg/scbase"
"github.com/scripthaus-dev/sh2-server/pkg/scpacket"
"github.com/scripthaus-dev/sh2-server/pkg/scws"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/scripthaus-dev/sh2-server/pkg/wsshell"
"github.com/commandlinedev/prompt-server/pkg/cmdrunner"
"github.com/commandlinedev/prompt-server/pkg/pcloud"
"github.com/commandlinedev/prompt-server/pkg/remote"
"github.com/commandlinedev/prompt-server/pkg/rtnstate"
"github.com/commandlinedev/prompt-server/pkg/scbase"
"github.com/commandlinedev/prompt-server/pkg/scpacket"
"github.com/commandlinedev/prompt-server/pkg/scws"
"github.com/commandlinedev/prompt-server/pkg/sstore"
"github.com/commandlinedev/prompt-server/pkg/wsshell"
)
type WebFnType = func(http.ResponseWriter, *http.Request)

4
go.mod
View File

@ -1,4 +1,4 @@
module github.com/scripthaus-dev/sh2-server
module github.com/commandlinedev/prompt-server
go 1.18
@ -13,7 +13,7 @@ require (
github.com/jmoiron/sqlx v1.3.5
github.com/mattn/go-sqlite3 v1.14.14
github.com/sawka/txwrap v0.1.2
github.com/scripthaus-dev/mshell v0.0.0
github.com/commandlinedev/apishell v0.0.0
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/mod v0.5.1
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad

View File

@ -18,17 +18,17 @@ import (
"unicode"
"github.com/google/uuid"
"github.com/scripthaus-dev/mshell/pkg/base"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/mshell/pkg/shexec"
"github.com/scripthaus-dev/sh2-server/pkg/comp"
"github.com/scripthaus-dev/sh2-server/pkg/pcloud"
"github.com/scripthaus-dev/sh2-server/pkg/remote"
"github.com/scripthaus-dev/sh2-server/pkg/remote/openai"
"github.com/scripthaus-dev/sh2-server/pkg/scbase"
"github.com/scripthaus-dev/sh2-server/pkg/scpacket"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/apishell/pkg/base"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/apishell/pkg/shexec"
"github.com/commandlinedev/prompt-server/pkg/comp"
"github.com/commandlinedev/prompt-server/pkg/pcloud"
"github.com/commandlinedev/prompt-server/pkg/remote"
"github.com/commandlinedev/prompt-server/pkg/remote/openai"
"github.com/commandlinedev/prompt-server/pkg/scbase"
"github.com/commandlinedev/prompt-server/pkg/scpacket"
"github.com/commandlinedev/prompt-server/pkg/sstore"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
)
const (

View File

@ -9,9 +9,9 @@ import (
"strings"
"github.com/google/uuid"
"github.com/scripthaus-dev/sh2-server/pkg/remote"
"github.com/scripthaus-dev/sh2-server/pkg/scpacket"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/commandlinedev/prompt-server/pkg/remote"
"github.com/commandlinedev/prompt-server/pkg/scpacket"
"github.com/commandlinedev/prompt-server/pkg/sstore"
)
const (

View File

@ -6,10 +6,10 @@ import (
"regexp"
"strings"
"github.com/scripthaus-dev/mshell/pkg/shexec"
"github.com/scripthaus-dev/mshell/pkg/simpleexpand"
"github.com/scripthaus-dev/sh2-server/pkg/scpacket"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/apishell/pkg/shexec"
"github.com/commandlinedev/apishell/pkg/simpleexpand"
"github.com/commandlinedev/prompt-server/pkg/scpacket"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/syntax"
)

View File

@ -5,11 +5,11 @@ import (
"strconv"
"strings"
"github.com/scripthaus-dev/mshell/pkg/base"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/mshell/pkg/shexec"
"github.com/scripthaus-dev/sh2-server/pkg/remote"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/commandlinedev/apishell/pkg/base"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/apishell/pkg/shexec"
"github.com/commandlinedev/prompt-server/pkg/remote"
"github.com/commandlinedev/prompt-server/pkg/sstore"
)
// PTERM=MxM,Mx25

View File

@ -11,10 +11,10 @@ import (
"unicode"
"unicode/utf8"
"github.com/scripthaus-dev/mshell/pkg/simpleexpand"
"github.com/scripthaus-dev/sh2-server/pkg/shparse"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/apishell/pkg/simpleexpand"
"github.com/commandlinedev/prompt-server/pkg/shparse"
"github.com/commandlinedev/prompt-server/pkg/sstore"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
"mvdan.cc/sh/v3/syntax"
)

View File

@ -6,9 +6,9 @@ import (
"sync"
"github.com/google/uuid"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/sh2-server/pkg/remote"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/prompt-server/pkg/remote"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
)
var globalLock = &sync.Mutex{}

View File

@ -15,10 +15,10 @@ import (
"sync"
"time"
"github.com/scripthaus-dev/sh2-server/pkg/dbutil"
"github.com/scripthaus-dev/sh2-server/pkg/rtnstate"
"github.com/scripthaus-dev/sh2-server/pkg/scbase"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/commandlinedev/prompt-server/pkg/dbutil"
"github.com/commandlinedev/prompt-server/pkg/rtnstate"
"github.com/commandlinedev/prompt-server/pkg/scbase"
"github.com/commandlinedev/prompt-server/pkg/sstore"
)
const PCloudEndpoint = "https://api.getprompt.dev/central"

View File

@ -5,10 +5,10 @@ import (
"encoding/json"
"fmt"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/sh2-server/pkg/remote"
"github.com/scripthaus-dev/sh2-server/pkg/rtnstate"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/prompt-server/pkg/remote"
"github.com/commandlinedev/prompt-server/pkg/rtnstate"
"github.com/commandlinedev/prompt-server/pkg/sstore"
)
type NoTelemetryInputType struct {

View File

@ -6,8 +6,8 @@ import (
"io"
openaiapi "github.com/sashabaranov/go-openai"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/prompt-server/pkg/sstore"
)
// https://github.com/tiktoken-go/tokenizer

View File

@ -19,15 +19,15 @@ import (
"time"
"github.com/armon/circbuf"
"github.com/commandlinedev/apishell/pkg/base"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/apishell/pkg/shexec"
"github.com/commandlinedev/apishell/pkg/statediff"
"github.com/commandlinedev/prompt-server/pkg/scbase"
"github.com/commandlinedev/prompt-server/pkg/scpacket"
"github.com/commandlinedev/prompt-server/pkg/sstore"
"github.com/creack/pty"
"github.com/google/uuid"
"github.com/scripthaus-dev/mshell/pkg/base"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/mshell/pkg/shexec"
"github.com/scripthaus-dev/mshell/pkg/statediff"
"github.com/scripthaus-dev/sh2-server/pkg/scbase"
"github.com/scripthaus-dev/sh2-server/pkg/scpacket"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"golang.org/x/mod/semver"
)
@ -76,7 +76,7 @@ const (
func init() {
if scbase.MShellVersion != base.MShellVersion {
panic(fmt.Sprintf("sh2-server mshell version must match '%s' vs '%s'", scbase.MShellVersion, base.MShellVersion))
panic(fmt.Sprintf("prompt-server apishell version must match '%s' vs '%s'", scbase.MShellVersion, base.MShellVersion))
}
}

View File

@ -1,7 +1,7 @@
package remote
import (
"github.com/scripthaus-dev/mshell/pkg/base"
"github.com/commandlinedev/apishell/pkg/base"
)
func startCmdWait(ck base.CommandKey) {

View File

@ -7,11 +7,11 @@ import (
"strings"
"github.com/alessio/shellescape"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/mshell/pkg/shexec"
"github.com/scripthaus-dev/mshell/pkg/simpleexpand"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/apishell/pkg/shexec"
"github.com/commandlinedev/apishell/pkg/simpleexpand"
"github.com/commandlinedev/prompt-server/pkg/sstore"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
"mvdan.cc/sh/v3/syntax"
)

View File

@ -18,7 +18,7 @@ import (
"time"
"github.com/google/uuid"
"github.com/scripthaus-dev/mshell/pkg/base"
"github.com/commandlinedev/apishell/pkg/base"
"golang.org/x/mod/semver"
"golang.org/x/sys/unix"
)

View File

@ -6,9 +6,9 @@ import (
"strings"
"github.com/alessio/shellescape"
"github.com/scripthaus-dev/mshell/pkg/base"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/commandlinedev/apishell/pkg/base"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/prompt-server/pkg/sstore"
)
const FeCommandPacketStr = "fecmd"

View File

@ -8,12 +8,12 @@ import (
"time"
"github.com/google/uuid"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/sh2-server/pkg/mapqueue"
"github.com/scripthaus-dev/sh2-server/pkg/remote"
"github.com/scripthaus-dev/sh2-server/pkg/scpacket"
"github.com/scripthaus-dev/sh2-server/pkg/sstore"
"github.com/scripthaus-dev/sh2-server/pkg/wsshell"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/prompt-server/pkg/mapqueue"
"github.com/commandlinedev/prompt-server/pkg/remote"
"github.com/commandlinedev/prompt-server/pkg/scpacket"
"github.com/commandlinedev/prompt-server/pkg/sstore"
"github.com/commandlinedev/prompt-server/pkg/wsshell"
)
const WSStatePacketChSize = 20

View File

@ -3,7 +3,7 @@ package shparse
import (
"strings"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
)
const (

View File

@ -5,7 +5,7 @@ import (
"unicode"
"unicode/utf8"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
)
var noEscChars []bool

View File

@ -4,7 +4,7 @@ import (
"bytes"
"fmt"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
)
//

View File

@ -4,7 +4,7 @@ import (
"fmt"
"testing"
"github.com/scripthaus-dev/sh2-server/pkg/utilfn"
"github.com/commandlinedev/prompt-server/pkg/utilfn"
)
// $(ls f[*]); ./x

View File

@ -13,11 +13,11 @@ import (
"github.com/google/uuid"
"github.com/jmoiron/sqlx"
"github.com/sawka/txwrap"
"github.com/scripthaus-dev/mshell/pkg/base"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/mshell/pkg/shexec"
"github.com/scripthaus-dev/sh2-server/pkg/dbutil"
"github.com/scripthaus-dev/sh2-server/pkg/scbase"
"github.com/commandlinedev/apishell/pkg/base"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/apishell/pkg/shexec"
"github.com/commandlinedev/prompt-server/pkg/dbutil"
"github.com/commandlinedev/prompt-server/pkg/scbase"
)
const HistoryCols = "h.historyid, h.ts, h.userid, h.sessionid, h.screenid, h.lineid, h.cmdid, h.haderror, h.cmdstr, h.remoteownerid, h.remoteid, h.remotename, h.ismetacmd, h.incognito, h.linenum"

View File

@ -9,8 +9,8 @@ import (
"path"
"github.com/google/uuid"
"github.com/scripthaus-dev/mshell/pkg/cirfile"
"github.com/scripthaus-dev/sh2-server/pkg/scbase"
"github.com/commandlinedev/apishell/pkg/cirfile"
"github.com/commandlinedev/prompt-server/pkg/scbase"
)
func CreateCmdPtyFile(ctx context.Context, screenId string, cmdId string, maxSize int64) error {

View File

@ -12,7 +12,7 @@ import (
_ "github.com/golang-migrate/migrate/v4/source/file"
"github.com/golang-migrate/migrate/v4/source/iofs"
_ "github.com/mattn/go-sqlite3"
sh2db "github.com/scripthaus-dev/sh2-server/db"
sh2db "github.com/commandlinedev/prompt-server/db"
"github.com/golang-migrate/migrate/v4"
)

View File

@ -1,7 +1,7 @@
package sstore
import (
"github.com/scripthaus-dev/sh2-server/pkg/dbutil"
"github.com/commandlinedev/prompt-server/pkg/dbutil"
)
var quickSetStr = dbutil.QuickSetStr

View File

@ -20,10 +20,10 @@ import (
"github.com/google/uuid"
"github.com/jmoiron/sqlx"
"github.com/sawka/txwrap"
"github.com/scripthaus-dev/mshell/pkg/packet"
"github.com/scripthaus-dev/mshell/pkg/shexec"
"github.com/scripthaus-dev/sh2-server/pkg/dbutil"
"github.com/scripthaus-dev/sh2-server/pkg/scbase"
"github.com/commandlinedev/apishell/pkg/packet"
"github.com/commandlinedev/apishell/pkg/shexec"
"github.com/commandlinedev/prompt-server/pkg/dbutil"
"github.com/commandlinedev/prompt-server/pkg/scbase"
_ "github.com/mattn/go-sqlite3"
)