Commit Graph

3146 Commits

Author SHA1 Message Date
Nikita Galaiko
295ace965c feat: refactor zip controller to use new zip module
The zip controller has been refactored to use the new zip module. This change includes updating the import statements and modifying the main function to generate the tauri context with the new zip module.

Additionally, the zip controller now has a new struct called Controller, which contains the necessary fields for handling zip operations. The TryFrom trait has been implemented for the Controller struct to allow for easy creation from the AppHandle.

The main changes include:
- Importing the zip module and updating import statements
- Refactoring the main function to generate the tauri context with the new zip module
- Creating a new Controller struct for handling zip operations
- Implementing the TryFrom trait for the Controller struct to allow for easy creation from the AppHandle
2023-10-06 15:08:42 +02:00
Nikita Galaiko
372adef021
Merge pull request #1310 from gitbutlerapp/Add-controller-module
Add controller module
2023-10-06 12:58:40 +02:00
Nikita Galaiko
84e2d8533e pass project repository to gb_repository methods 2023-10-06 12:43:32 +02:00
Nikita Galaiko
08d26ae037 refactor: Update error handling in controller module
The changes in this commit refactor the error handling in the controller module. Instead of using a specific error type for storage errors, the code now uses the `anyhow` crate to handle errors more generically. This simplifies the code and allows for better error handling and reporting.
2023-10-06 08:47:59 +02:00
Nikita Galaiko
83b251b2b4 feat: add users controller to handle user-related operations
The users controller has been added to handle user-related operations such as getting, setting, and deleting user information. This controller is responsible for interacting with the storage module to perform these operations.
2023-10-06 08:40:27 +02:00
Nikita Galaiko
7975ae6176
Merge pull request #1309 from gitbutlerapp/Refactor-storage-error-handling
extract projects controller
2023-10-05 16:07:42 +02:00
Nikita Galaiko
09ac7f1c24 delete extra files 2023-10-05 16:03:41 +02:00
Nikita Galaiko
7e500d5671 fix tests 2023-10-05 16:03:01 +02:00
Nikita Galaiko
73d5ebf823 extract projects controller 2023-10-05 15:44:34 +02:00
Nikita Galaiko
7c452d7071
Merge pull request #1308 from gitbutlerapp/Refactor-should-flush-function
Refactor should flush function
2023-10-05 13:12:01 +02:00
Nikita Galaiko
53ed4425f6 feat: add mark_active_session function to update session metadata
The mark_active_session function has been added to the Repository struct. This function updates the last_timestamp_ms field of the current session's metadata to the current system time. This is done to keep track of the last time the session was active.

This function is called in several places where the current session is required to be updated, such as when writing to targets, branches, deltas, bookmarks, and handling git file changes. By updating the session metadata, we ensure that the session remains active and up-to-date.

This change improves the accuracy of session tracking and helps in managing active sessions effectively.
2023-10-05 13:05:18 +02:00
Nikita Galaiko
62d2b7c6fa fix: fix visibility of should_flush function and update test cases for should_flush function 2023-10-05 12:28:37 +02:00
dependabot[bot]
885185e6e3 chore(deps-dev): bump svelte from 4.2.0 to 4.2.1
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/master/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@4.2.1/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 11:58:46 +02:00
dependabot[bot]
8fcaed68be chore(deps-dev): bump nanoid from 4.0.2 to 5.0.1
Bumps [nanoid](https://github.com/ai/nanoid) from 4.0.2 to 5.0.1.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/4.0.2...5.0.1)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 11:54:52 +02:00
dependabot[bot]
94f4fb26db chore(deps-dev): bump @types/diff-match-patch from 1.0.32 to 1.0.34
Bumps [@types/diff-match-patch](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/diff-match-patch) from 1.0.32 to 1.0.34.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/diff-match-patch)

---
updated-dependencies:
- dependency-name: "@types/diff-match-patch"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 11:54:41 +02:00
dependabot[bot]
3c0035370f chore(deps-dev): bump svelte-check from 3.5.1 to 3.5.2
Bumps [svelte-check](https://github.com/sveltejs/language-tools) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check-3.5.1...svelte-check-3.5.2)

---
updated-dependencies:
- dependency-name: svelte-check
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 11:54:32 +02:00
dependabot[bot]
140f2b9bb4 chore(deps-dev): bump @sentry/sveltekit from 7.64.0 to 7.73.0
Bumps [@sentry/sveltekit](https://github.com/getsentry/sentry-javascript) from 7.64.0 to 7.73.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/7.64.0...7.73.0)

---
updated-dependencies:
- dependency-name: "@sentry/sveltekit"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 11:54:05 +02:00
Mattias Granlund
3d74940111 Update Sentry DSN in Svelte code
- changes data source desktop -> js-app
2023-10-05 11:18:04 +02:00
dependabot[bot]
0a20c2de00
chore(deps): bump sha1 from 0.10.5 to 0.10.6
Bumps [sha1](https://github.com/RustCrypto/hashes) from 0.10.5 to 0.10.6.
- [Commits](https://github.com/RustCrypto/hashes/compare/sha1-v0.10.5...sha1-v0.10.6)

---
updated-dependencies:
- dependency-name: sha1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 08:46:44 +00:00
dependabot[bot]
51fc38ed1a
chore(deps): bump refinery from 0.8.10 to 0.8.11
Bumps [refinery](https://github.com/rust-db/refinery) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/rust-db/refinery/releases)
- [Changelog](https://github.com/rust-db/refinery/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-db/refinery/compare/0.8.10...0.8.11)

---
updated-dependencies:
- dependency-name: refinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 08:46:17 +00:00
dependabot[bot]
ae7bf194dd
chore(deps): bump rustix from 0.38.11 to 0.38.13
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.11 to 0.38.13.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.11...v0.38.13)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 08:44:42 +00:00
dependabot[bot]
0b893c6b3b
chore(deps): bump reqwest from 0.11.20 to 0.11.22
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.20 to 0.11.22.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.20...v0.11.22)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 08:44:02 +00:00
Nikita Galaiko
cf25e905a5
Merge pull request #1295 from gitbutlerapp/Update-tauri-build-dependency
chore: update versions of @tauri-apps/cli and related packages to 1.5.1
2023-10-05 10:42:28 +02:00
Nikita Galaiko
148b290b0c chore: update package-ecosystem directory for cargo to root directory 2023-10-05 10:32:47 +02:00
Nikita Galaiko
7d245f6f59 chore: update versions of @tauri-apps/cli and related packages to 1.5.1 2023-10-05 10:31:51 +02:00
Nikita Galaiko
17b3c9ec04
Merge pull request #1293 from gitbutlerapp/Refactor-project-get-method
chore: refactor projects_storage methods to use consistent naming and…
2023-10-05 10:22:20 +02:00
Nikita Galaiko
a331113cd1 cargo fmt 2023-10-05 10:13:37 +02:00
Mattias Granlund
175ee13c4e Fix sveltekit error handler
- now prints the actual error to the console
2023-10-05 10:11:00 +02:00
Nikita Galaiko
37e7507e53 chore: refactor projects_storage methods to use consistent naming and simplify code
The changes in this commit refactor the methods in the `projects_storage` module to use consistent naming and simplify the code. The following changes were made:

- Renamed the `update_project` method to `update` in the `projects_storage` module.
- Renamed the `add_project` method to `add` in the `projects_storage` module.
- Renamed the `get_project` method to `get` in the `projects_storage` module.
- Renamed the `list_projects` method to `list` in the `projects_storage` module.

These changes improve code readability and maintainability by using consistent naming conventions and simplifying the method signatures.
2023-10-05 10:04:36 +02:00
Nikita Galaiko
f2b1069f73
Merge pull request #1292 from gitbutlerapp/open-errors
refactors
2023-10-05 09:45:19 +02:00
Nikita Galaiko
805a23f1b8 fix: fix async handling in App methods
- The `upsert_bookmark` method was not properly handling the async code. It now properly awaits the necessary async operations.
- The `init_project` method now properly handles async code and awaits the necessary async operations.
- The `init` method now properly handles async code and awaits the necessary async operations.
- The `add_project` method now properly handles async code and awaits the necessary async operations.

This ensures that the async operations are properly executed and awaited, preventing potential race conditions or incorrect behavior.
2023-10-05 09:39:45 +02:00
Nikita Galaiko
1ccc204c75 chore: refactor delete_project and update_project functions to be asynchronous 2023-10-05 09:34:51 +02:00
Nikita Galaiko
223cbfaba2 extracts commands mod 2023-10-05 09:28:45 +02:00
Nikita Galaiko
647ef9e613 merge upstream 2023-10-05 09:08:57 +02:00
Nikita Galaiko
b3902026be refactor: update error handling and repository opening logic in project_repository module 2023-10-05 09:08:42 +02:00
Nikita Galaiko
78daff9273
Merge pull request #1291 from gitbutlerapp/Fix-path-type
Fix path type
2023-10-05 08:58:31 +02:00
Nikita Galaiko
b2d84362a6 minor fixes 2023-10-05 08:54:13 +02:00
Nikita Galaiko
b81efe9b72 feat: update project path handling to use path::PathBuf instead of String
The previous implementation used a string to represent the project path, which led to potential issues when manipulating paths. The update changes the project path to use the path::PathBuf type, which provides better path manipulation and error handling capabilities. This change improves the overall reliability and maintainability of the code.
2023-10-05 08:44:56 +02:00
Nikita Galaiko
3f81e5bd6d
Merge pull request #1290 from gitbutlerapp/Add-test-for-register-binfile
add tests for binary registration
2023-10-05 08:31:11 +02:00
Nikita Galaiko
cfafb76a21 add tests for binary registration 2023-10-05 08:25:43 +02:00
Nikita Galaiko
2a86147e31
Merge pull request #1289 from gitbutlerapp/Remove-match-files-function
chore: remove unused fileGroup function and related code
2023-10-04 16:50:27 +02:00
Nikita Galaiko
1df251baca chore: remove unused fileGroup function and related code 2023-10-04 16:44:30 +02:00
Nikita Galaiko
b2fe090633
Merge pull request #1288 from gitbutlerapp/Remove-git-status-method
chore: remove unused Statuses component and git_status API endpoint
2023-10-04 16:40:54 +02:00
Nikita Galaiko
b86259b64c chore: remove unused Statuses component and git_status API endpoint 2023-10-04 16:35:06 +02:00
Nikita Galaiko
1f3bd0e1b8
Merge pull request #1287 from gitbutlerapp/remove-activity
Remove activity
2023-10-04 16:29:29 +02:00
Nikita Galaiko
bb88219933 remove more leftovers 2023-10-04 16:23:32 +02:00
Nikita Galaiko
67de8de1e9 ui: rm git activity 2023-10-04 16:15:46 +02:00
Nikita Galaiko
df32ebfffa chore: remove unused code related to git activity logging 2023-10-04 16:12:55 +02:00
Nikita Galaiko
65a0979649
Merge pull request #1286 from gitbutlerapp/deps-refactor
Deps refactor
2023-10-04 16:07:35 +02:00
Nikita Galaiko
8cd9431fc9 fix butler 2023-10-04 15:55:23 +02:00