cleanup: Export internal packages, rename module and imports, don't rely on generated credits string

create-reload-action
Lukasz Janyst 4 years ago
parent 1ade2d9146
commit a0837f069e
No known key found for this signature in database
GPG Key ID: 32DE641041F17A9A
  1. 2
      go.mod
  2. 10
      pkg/api/api.go
  3. 2
      pkg/api/ctx.go
  4. 4
      pkg/api/focus.go
  5. 0
      pkg/app/base/args.go
  6. 36
      pkg/app/base/base.go
  7. 4
      pkg/app/base/migration.go
  8. 0
      pkg/app/base/profiling.go
  9. 0
      pkg/app/base/restart.go
  10. 0
      pkg/app/base/restart_test.go
  11. 28
      pkg/app/bridge/bridge.go
  12. 0
      pkg/bridge/autostart.go
  13. 22
      pkg/bridge/bridge.go
  14. 4
      pkg/bridge/bug_report.go
  15. 0
      pkg/bridge/constants.go
  16. 0
      pkg/bridge/release_notes.go
  17. 12
      pkg/bridge/store_factory.go
  18. 2
      pkg/bridge/types.go
  19. 2
      pkg/config/cache/cache.go
  20. 0
      pkg/config/cache/cache_test.go
  21. 0
      pkg/config/settings/kvs.go
  22. 0
      pkg/config/settings/kvs_test.go
  23. 0
      pkg/config/settings/settings.go
  24. 0
      pkg/config/tls/cert_store_darwin.go
  25. 0
      pkg/config/tls/cert_store_linux.go
  26. 0
      pkg/config/tls/cert_store_windows.go
  27. 0
      pkg/config/tls/tls.go
  28. 0
      pkg/config/tls/tls_test.go
  29. 0
      pkg/config/useragent/platform.go
  30. 0
      pkg/config/useragent/platform_test.go
  31. 0
      pkg/config/useragent/useragent.go
  32. 0
      pkg/config/useragent/useragent_test.go
  33. 0
      pkg/constants/constants.go
  34. 0
      pkg/constants/update_default.go
  35. 0
      pkg/constants/update_qa.go
  36. 2
      pkg/cookies/jar.go
  37. 2
      pkg/cookies/jar_test.go
  38. 0
      pkg/crash/actions.go
  39. 2
      pkg/crash/handler.go
  40. 0
      pkg/crash/handler_test.go
  41. 2
      pkg/events/events.go
  42. 0
      pkg/frontend/.gitignore
  43. 0
      pkg/frontend/Makefile.local
  44. 2
      pkg/frontend/cli/account_utils.go
  45. 6
      pkg/frontend/cli/accounts.go
  46. 12
      pkg/frontend/cli/frontend.go
  47. 4
      pkg/frontend/cli/system.go
  48. 10
      pkg/frontend/cli/updates.go
  49. 2
      pkg/frontend/cli/utils.go
  50. 6
      pkg/frontend/clientconfig/config.go
  51. 8
      pkg/frontend/clientconfig/config_applemail.go
  52. 18
      pkg/frontend/frontend.go
  53. 0
      pkg/frontend/qml/AccountDelegate.qml
  54. 0
      pkg/frontend/qml/AccountView.qml
  55. 0
      pkg/frontend/qml/Banner.qml
  56. 0
      pkg/frontend/qml/Bridge.qml
  57. 0
      pkg/frontend/qml/BridgeTest/UserControl.qml
  58. 0
      pkg/frontend/qml/BridgeTest/UserList.qml
  59. 0
      pkg/frontend/qml/BridgeTest/UserModel.qml
  60. 0
      pkg/frontend/qml/Bridge_test.qml
  61. 0
      pkg/frontend/qml/BugReportView.qml
  62. 0
      pkg/frontend/qml/Configuration.qml
  63. 0
      pkg/frontend/qml/ConfigurationItem.qml
  64. 0
      pkg/frontend/qml/ContentWrapper.qml
  65. 0
      pkg/frontend/qml/DebugWrapper.qml
  66. 0
      pkg/frontend/qml/GeneralSettings.qml
  67. 0
      pkg/frontend/qml/HelpView.qml
  68. 0
      pkg/frontend/qml/LocalCacheSettings.qml
  69. 0
      pkg/frontend/qml/MainWindow.qml
  70. 0
      pkg/frontend/qml/NotificationDialog.qml
  71. 0
      pkg/frontend/qml/NotificationPopups.qml
  72. 0
      pkg/frontend/qml/Notifications/Notification.qml
  73. 0
      pkg/frontend/qml/Notifications/NotificationFilter.qml
  74. 0
      pkg/frontend/qml/Notifications/Notifications.qml
  75. 0
      pkg/frontend/qml/Notifications/qmldir
  76. 0
      pkg/frontend/qml/PortSettings.qml
  77. 0
      pkg/frontend/qml/Proton/Action.qml
  78. 0
      pkg/frontend/qml/Proton/ApplicationWindow.qml
  79. 0
      pkg/frontend/qml/Proton/Button.qml
  80. 0
      pkg/frontend/qml/Proton/CheckBox.qml
  81. 0
      pkg/frontend/qml/Proton/ColorScheme.qml
  82. 0
      pkg/frontend/qml/Proton/ComboBox.qml
  83. 0
      pkg/frontend/qml/Proton/Dialog.qml
  84. 0
      pkg/frontend/qml/Proton/Label.qml
  85. 0
      pkg/frontend/qml/Proton/Menu.qml
  86. 0
      pkg/frontend/qml/Proton/MenuItem.qml
  87. 0
      pkg/frontend/qml/Proton/Popup.qml
  88. 0
      pkg/frontend/qml/Proton/RadioButton.qml
  89. 0
      pkg/frontend/qml/Proton/Style.qml
  90. 0
      pkg/frontend/qml/Proton/Switch.qml
  91. 0
      pkg/frontend/qml/Proton/TextArea.qml
  92. 0
      pkg/frontend/qml/Proton/TextField.qml
  93. 0
      pkg/frontend/qml/Proton/Toggle.qml
  94. 0
      pkg/frontend/qml/Proton/qmldir
  95. 0
      pkg/frontend/qml/SMTPSettings.qml
  96. 0
      pkg/frontend/qml/SettingsItem.qml
  97. 0
      pkg/frontend/qml/SettingsView.qml
  98. 0
      pkg/frontend/qml/SetupGuide.qml
  99. 0
      pkg/frontend/qml/SignIn.qml
  100. 0
      pkg/frontend/qml/SplashScreen.qml
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,4 +1,4 @@
module github.com/ProtonMail/proton-bridge
module github.com/ljanyst/peroxide
go 1.15

@ -25,11 +25,11 @@ import (
"fmt"
"net/http"
"github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/events"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ProtonMail/proton-bridge/pkg/ports"
"github.com/ljanyst/peroxide/pkg/bridge"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/events"
"github.com/ljanyst/peroxide/pkg/listener"
"github.com/ljanyst/peroxide/pkg/ports"
"github.com/sirupsen/logrus"
)

@ -20,7 +20,7 @@ package api
import (
"net/http"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ljanyst/peroxide/pkg/listener"
)
// httpHandler with Go's Response and Request.

@ -21,8 +21,8 @@ import (
"fmt"
"net/http"
"github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/events"
"github.com/ljanyst/peroxide/pkg/bridge"
"github.com/ljanyst/peroxide/pkg/events"
)
// focusHandler should be called from other instances (attempt to start bridge

@ -39,24 +39,24 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/ProtonMail/go-autostart"
"github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/ProtonMail/proton-bridge/internal/api"
"github.com/ProtonMail/proton-bridge/internal/config/cache"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/config/tls"
"github.com/ProtonMail/proton-bridge/internal/config/useragent"
"github.com/ProtonMail/proton-bridge/internal/constants"
"github.com/ProtonMail/proton-bridge/internal/cookies"
"github.com/ProtonMail/proton-bridge/internal/crash"
"github.com/ProtonMail/proton-bridge/internal/events"
"github.com/ProtonMail/proton-bridge/internal/locations"
"github.com/ProtonMail/proton-bridge/internal/logging"
"github.com/ProtonMail/proton-bridge/internal/sentry"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/ProtonMail/proton-bridge/internal/users/credentials"
"github.com/ProtonMail/proton-bridge/internal/versioner"
"github.com/ProtonMail/proton-bridge/pkg/keychain"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
"github.com/ljanyst/peroxide/pkg/api"
"github.com/ljanyst/peroxide/pkg/config/cache"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/config/tls"
"github.com/ljanyst/peroxide/pkg/config/useragent"
"github.com/ljanyst/peroxide/pkg/constants"
"github.com/ljanyst/peroxide/pkg/cookies"
"github.com/ljanyst/peroxide/pkg/crash"
"github.com/ljanyst/peroxide/pkg/events"
"github.com/ljanyst/peroxide/pkg/locations"
"github.com/ljanyst/peroxide/pkg/logging"
"github.com/ljanyst/peroxide/pkg/sentry"
"github.com/ljanyst/peroxide/pkg/updater"
"github.com/ljanyst/peroxide/pkg/users/credentials"
"github.com/ljanyst/peroxide/pkg/versioner"
"github.com/ljanyst/peroxide/pkg/keychain"
"github.com/ljanyst/peroxide/pkg/listener"
"github.com/ljanyst/peroxide/pkg/pmapi"
"github.com/allan-simon/go-singleinstance"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"

@ -21,8 +21,8 @@ import (
"os"
"path/filepath"
"github.com/ProtonMail/proton-bridge/internal/constants"
"github.com/ProtonMail/proton-bridge/internal/locations"
"github.com/ljanyst/peroxide/pkg/constants"
"github.com/ljanyst/peroxide/pkg/locations"
"github.com/sirupsen/logrus"
)

@ -22,20 +22,20 @@ import (
"crypto/tls"
"time"
"github.com/ProtonMail/proton-bridge/internal/api"
"github.com/ProtonMail/proton-bridge/internal/app/base"
pkgBridge "github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
pkgTLS "github.com/ProtonMail/proton-bridge/internal/config/tls"
"github.com/ProtonMail/proton-bridge/internal/constants"
"github.com/ProtonMail/proton-bridge/internal/frontend"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ProtonMail/proton-bridge/internal/imap"
"github.com/ProtonMail/proton-bridge/internal/smtp"
"github.com/ProtonMail/proton-bridge/internal/store"
"github.com/ProtonMail/proton-bridge/internal/store/cache"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/ProtonMail/proton-bridge/pkg/message"
"github.com/ljanyst/peroxide/pkg/api"
"github.com/ljanyst/peroxide/pkg/app/base"
pkgBridge "github.com/ljanyst/peroxide/pkg/bridge"
"github.com/ljanyst/peroxide/pkg/config/settings"
pkgTLS "github.com/ljanyst/peroxide/pkg/config/tls"
"github.com/ljanyst/peroxide/pkg/constants"
"github.com/ljanyst/peroxide/pkg/frontend"
"github.com/ljanyst/peroxide/pkg/frontend/types"
"github.com/ljanyst/peroxide/pkg/imap"
"github.com/ljanyst/peroxide/pkg/smtp"
"github.com/ljanyst/peroxide/pkg/store"
"github.com/ljanyst/peroxide/pkg/store/cache"
"github.com/ljanyst/peroxide/pkg/updater"
"github.com/ljanyst/peroxide/pkg/message"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"

@ -26,17 +26,17 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/ProtonMail/go-autostart"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/constants"
"github.com/ProtonMail/proton-bridge/internal/metrics"
"github.com/ProtonMail/proton-bridge/internal/sentry"
"github.com/ProtonMail/proton-bridge/internal/store/cache"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/ProtonMail/proton-bridge/internal/users"
"github.com/ProtonMail/proton-bridge/pkg/message"
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/constants"
"github.com/ljanyst/peroxide/pkg/metrics"
"github.com/ljanyst/peroxide/pkg/sentry"
"github.com/ljanyst/peroxide/pkg/store/cache"
"github.com/ljanyst/peroxide/pkg/updater"
"github.com/ljanyst/peroxide/pkg/users"
"github.com/ljanyst/peroxide/pkg/message"
"github.com/ljanyst/peroxide/pkg/pmapi"
"github.com/ljanyst/peroxide/pkg/listener"
logrus "github.com/sirupsen/logrus"
)

@ -28,8 +28,8 @@ import (
"path/filepath"
"sort"
"github.com/ProtonMail/proton-bridge/internal/logging"
"github.com/ProtonMail/proton-bridge/pkg/pmapi"
"github.com/ljanyst/peroxide/pkg/logging"
"github.com/ljanyst/peroxide/pkg/pmapi"
)
const MaxAttachmentSize = 7 * 1024 * 1024 // 7 MB total limit

@ -21,12 +21,12 @@ import (
"fmt"
"path/filepath"
"github.com/ProtonMail/proton-bridge/internal/sentry"
"github.com/ProtonMail/proton-bridge/internal/store"
"github.com/ProtonMail/proton-bridge/internal/store/cache"
"github.com/ProtonMail/proton-bridge/internal/users"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ProtonMail/proton-bridge/pkg/message"
"github.com/ljanyst/peroxide/pkg/sentry"
"github.com/ljanyst/peroxide/pkg/store"
"github.com/ljanyst/peroxide/pkg/store/cache"
"github.com/ljanyst/peroxide/pkg/users"
"github.com/ljanyst/peroxide/pkg/listener"
"github.com/ljanyst/peroxide/pkg/message"
)
type storeFactory struct {

@ -20,7 +20,7 @@ package bridge
import (
"github.com/Masterminds/semver/v3"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/ljanyst/peroxide/pkg/updater"
)
type Locator interface {

@ -22,7 +22,7 @@ import (
"os"
"path/filepath"
"github.com/ProtonMail/proton-bridge/pkg/files"
"github.com/ljanyst/peroxide/pkg/files"
)
type Cache struct {

@ -27,7 +27,7 @@ import (
"sync"
"time"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ljanyst/peroxide/pkg/config/settings"
)
type cookiesByHost map[string][]*http.Cookie

@ -24,7 +24,7 @@ import (
"testing"
"time"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

@ -19,7 +19,7 @@
package crash
import (
"github.com/ProtonMail/proton-bridge/internal/sentry"
"github.com/ljanyst/peroxide/pkg/sentry"
"github.com/sirupsen/logrus"
)

@ -21,7 +21,7 @@ package events
import (
"time"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ljanyst/peroxide/pkg/listener"
)
// Constants of events used by the event listener in bridge.

@ -22,7 +22,7 @@ import (
"strconv"
"strings"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ljanyst/peroxide/pkg/frontend/types"
"github.com/abiosoft/ishell"
)

@ -21,9 +21,9 @@ import (
"context"
"strings"
"github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ljanyst/peroxide/pkg/bridge"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/frontend/types"
"github.com/abiosoft/ishell"
)

@ -19,12 +19,12 @@
package cli
import (
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/events"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ProtonMail/proton-bridge/internal/locations"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/events"
"github.com/ljanyst/peroxide/pkg/frontend/types"
"github.com/ljanyst/peroxide/pkg/locations"
"github.com/ljanyst/peroxide/pkg/updater"
"github.com/ljanyst/peroxide/pkg/listener"
"github.com/abiosoft/ishell"
"github.com/sirupsen/logrus"

@ -23,8 +23,8 @@ import (
"strconv"
"strings"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/pkg/ports"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/ports"
"github.com/abiosoft/ishell"
)

@ -18,12 +18,9 @@
package cli
import (
"strings"
"github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/abiosoft/ishell"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/updater"
)
func (f *frontendCLI) checkUpdates(c *ishell.Context) {
@ -41,9 +38,6 @@ func (f *frontendCLI) checkUpdates(c *ishell.Context) {
}
func (f *frontendCLI) printCredits(c *ishell.Context) {
for _, pkg := range strings.Split(bridge.Credits, ";") {
f.Println(pkg)
}
}
func (f *frontendCLI) enableAutoUpdates(c *ishell.Context) {

@ -20,7 +20,7 @@ package cli
import (
"strings"
pmapi "github.com/ProtonMail/proton-bridge/pkg/pmapi"
pmapi "github.com/ljanyst/peroxide/pkg/pmapi"
"github.com/fatih/color"
)

@ -22,9 +22,9 @@ package clientconfig
import (
"errors"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/config/useragent"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/config/useragent"
"github.com/ljanyst/peroxide/pkg/frontend/types"
"github.com/sirupsen/logrus"
)

@ -28,10 +28,10 @@ import (
"strings"
"time"
"github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/config/useragent"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ProtonMail/proton-bridge/pkg/mobileconfig"
"github.com/ljanyst/peroxide/pkg/bridge"
"github.com/ljanyst/peroxide/pkg/config/useragent"
"github.com/ljanyst/peroxide/pkg/frontend/types"
"github.com/ljanyst/peroxide/pkg/mobileconfig"
)
const (

@ -19,15 +19,15 @@
package frontend
import (
"github.com/ProtonMail/proton-bridge/internal/bridge"
"github.com/ProtonMail/proton-bridge/internal/config/settings"
"github.com/ProtonMail/proton-bridge/internal/config/useragent"
"github.com/ProtonMail/proton-bridge/internal/frontend/cli"
"github.com/ProtonMail/proton-bridge/internal/frontend/qt"
"github.com/ProtonMail/proton-bridge/internal/frontend/types"
"github.com/ProtonMail/proton-bridge/internal/locations"
"github.com/ProtonMail/proton-bridge/internal/updater"
"github.com/ProtonMail/proton-bridge/pkg/listener"
"github.com/ljanyst/peroxide/pkg/bridge"
"github.com/ljanyst/peroxide/pkg/config/settings"
"github.com/ljanyst/peroxide/pkg/config/useragent"
"github.com/ljanyst/peroxide/pkg/frontend/cli"
"github.com/ljanyst/peroxide/pkg/frontend/qt"
"github.com/ljanyst/peroxide/pkg/frontend/types"
"github.com/ljanyst/peroxide/pkg/locations"
"github.com/ljanyst/peroxide/pkg/updater"
"github.com/ljanyst/peroxide/pkg/listener"
)
type Frontend interface {

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

Loading…
Cancel
Save