Sync with latest libmutton development version

This commit is contained in:
2025-12-11 20:14:19 -05:00
parent 19dd1fd685
commit fb70b38dc3
5 changed files with 13 additions and 14 deletions
+2 -2
View File
@@ -4,8 +4,8 @@ go 1.25.5
require (
github.com/charmbracelet/glamour v0.7.0
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251110055016-10ee4f91fcb6
github.com/rwinkhart/libmutton v0.4.3-0.20251210051340-01be63c587ca
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366
github.com/rwinkhart/libmutton v0.4.3-0.20251212003405-35db3bf20b8a
golang.org/x/term v0.37.0
)
+4 -4
View File
@@ -40,14 +40,14 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rwinkhart/glamour-temp-MUTN v0.7.2 h1:/CBexwkGdL8HuZjO7M0zzjGHaHCr9/r4XTOtUJa+pPE=
github.com/rwinkhart/glamour-temp-MUTN v0.7.2/go.mod h1:DN/eJaNQ5h7dgxzfmWFo7By+b82CKEUdNaY6z4R4v3c=
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251110055016-10ee4f91fcb6 h1:tGGtw5Wr4laDrU7Ooe95g4E+O6c+oY18atamcMPaMY8=
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251110055016-10ee4f91fcb6/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY=
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366 h1:aKB7jcFstg11bRqDnjNzQIGM4+VA4JlE1HDNaPRpm8g=
github.com/rwinkhart/go-boilerplate v0.1.1-0.20251211171453-df1fb21b2366/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY=
github.com/rwinkhart/go-highlite v0.1.1 h1:9TxbRhYVfD/3YaEgNk1BtEiZ0t8/5mxDUZqNMXHodT0=
github.com/rwinkhart/go-highlite v0.1.1/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA=
github.com/rwinkhart/go-winio v0.1.0 h1:b72agLW+dETGmhR3VbcbwnStfgKfc5AfgJOXBJDkaHg=
github.com/rwinkhart/go-winio v0.1.0/go.mod h1:ZWa7ssZJT30CCDGJ7fk/2SBTq9BIQrrVjrcss0UW2s0=
github.com/rwinkhart/libmutton v0.4.3-0.20251210051340-01be63c587ca h1:dw+GpadTrCg7ExZWio2sTX/XxDt+x4P1Ll16kEN+R+8=
github.com/rwinkhart/libmutton v0.4.3-0.20251210051340-01be63c587ca/go.mod h1:PPF4/BxKeZnKdF2371am2at9nZ3QYm5fL7mLbGuI6U0=
github.com/rwinkhart/libmutton v0.4.3-0.20251212003405-35db3bf20b8a h1:RqfvWNKqoZbAXhKd9ieUeD8MO7sJu1Ieq+UjnUn+AVo=
github.com/rwinkhart/libmutton v0.4.3-0.20251212003405-35db3bf20b8a/go.mod h1:UF4UDldzEOwni81M95Wr5gPfiyoAEOaie8RBWiYC6Ng=
github.com/rwinkhart/peercred-mini v0.1.2 h1:4cGWDbv0whvLeVvbUdx84V/9p+2fS+DEXgrA1KxlRFo=
github.com/rwinkhart/peercred-mini v0.1.2/go.mod h1:LLHG7YshHEpbpJJP+Il9nx2dnGj5O3VGE32rWmflj0c=
github.com/rwinkhart/rcw v0.2.3 h1:g1rVaspZnZM8nWupeSdVO827di4ORMZnczw6iXyo01Y=
+3 -4
View File
@@ -18,7 +18,6 @@ import (
"github.com/rwinkhart/libmutton/crypt"
"github.com/rwinkhart/libmutton/global"
"github.com/rwinkhart/libmutton/syncclient"
"github.com/rwinkhart/libmutton/synccycles"
)
func main() {
@@ -60,7 +59,7 @@ func main() {
case "add":
cli.AddEntry(realPath, 0)
case "shear":
err := syncclient.ShearRemoteFromClient(args[1], false) // pass the incomplete path as the server and all clients (reading from the deletions directory) will have a different home directory
err := syncclient.ShearRemote(args[1], false) // pass the incomplete path as the server and all clients (reading from the deletions directory) will have a different home directory
if err != nil {
other.PrintError("Failed to shear target: "+err.Error(), back.ErrorWrite)
}
@@ -170,7 +169,7 @@ func main() {
case "note", "-n":
cli.AddEntry(realPath, 2)
case "folder", "-f":
err := syncclient.AddFolderRemoteFromClient(args[1]) // pass the incomplete path as the server will have a different home directory
err := syncclient.AddFolderRemote(args[1]) // pass the incomplete path as the server will have a different home directory
if err != nil {
other.PrintError("Failed to add folder: "+err.Error(), back.ErrorWrite)
}
@@ -212,7 +211,7 @@ func main() {
if err != nil {
other.PrintError("Failed to get current device ID: "+err.Error(), back.ErrorRead)
}
_, _, _, err = synccycles.DeviceIDGen(oldDeviceID, "")
_, _, _, err = syncclient.GenDeviceID(oldDeviceID, "")
if err != nil {
other.PrintError("Failed to change device ID: "+err.Error(), global.ErrorSyncProcess)
}
+2 -2
View File
@@ -18,12 +18,12 @@ import (
func RenameCli(oldVanityPath string) {
// prompt user for new location and rename
newVanityPath := front.Input("New location:")
err := syncclient.RenameRemoteFromClient(oldVanityPath, newVanityPath)
err := syncclient.RenameRemote(oldVanityPath, newVanityPath)
if err != nil {
other.PrintError("Failed to rename entry: "+err.Error(), back.ErrorWrite)
}
// exit is done from sync.RenameRemoteFromClient
// exit is done from sync.RenameRemote
}
// EditEntryField edits a field of an entry at realPath (user input).
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"github.com/rwinkhart/go-boilerplate/back"
"github.com/rwinkhart/go-boilerplate/front"
"github.com/rwinkhart/go-boilerplate/other"
"github.com/rwinkhart/go-boilerplate/stringy"
"github.com/rwinkhart/libmutton/core"
"github.com/rwinkhart/libmutton/synccycles"
)
// inputPasswordGen prompts the user for password generation parameters and returns a generated password as a string.
@@ -24,7 +24,7 @@ func inputPasswordGen() string {
complexity = 0.2 // (ultra) complex
// 2 and 3 indicate complex and ultra complex charsets, respectively
}
return synccycles.StringGen(passLength, complexity, passCharset)
return stringy.StringGen(passLength, complexity, passCharset)
}
// writeEntryCLI writes an entry to realPath and previews it (errors if no data is supplied).