Bryan Oltman
d5cbb5ac7b
chore: check in Cargo.lock ( #141 )
2024-04-19 13:51:22 -07:00
Bryan Oltman
70d130ad64
format readme
2024-04-17 16:58:58 -04:00
dependabot[bot]
0735b56f52
chore(deps): bump the shorebird_code_push-deps group ( #128 )
...
Bumps the shorebird_code_push-deps group in /shorebird_code_push with 2 updates: [ffigen](https://github.com/dart-lang/native/tree/main/pkgs ) and [mocktail](https://github.com/felangel/mocktail ).
Updates `ffigen` from 8.0.2 to 11.0.0
- [Release notes](https://github.com/dart-lang/native/releases )
- [Commits](https://github.com/dart-lang/native/commits/ffigen-v11.0.0/pkgs )
Updates `mocktail` from 0.3.0 to 1.0.3
- [Release notes](https://github.com/felangel/mocktail/releases )
- [Commits](https://github.com/felangel/mocktail/compare/mocktail-v0.3.0...mocktail-v1.0.3 )
---
updated-dependencies:
- dependency-name: ffigen
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: shorebird_code_push-deps
- dependency-name: mocktail
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: shorebird_code_push-deps
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bryan Oltman <bryanoltman@gmail.com >
2024-03-04 10:24:48 -05:00
dependabot[bot]
ba94c09646
chore(deps): bump the gh-deps group with 1 update ( #126 )
...
Bumps the gh-deps group with 1 update: [dorny/paths-filter](https://github.com/dorny/paths-filter ).
Updates `dorny/paths-filter` from 2 to 3
- [Release notes](https://github.com/dorny/paths-filter/releases )
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md )
- [Commits](https://github.com/dorny/paths-filter/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: dorny/paths-filter
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: gh-deps
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-03 19:56:09 -08:00
bryanoltman
ec48fffc83
chore(patch): version 0.2.1
2024-02-27 14:58:58 -05:00
Bryan Oltman
b9ae80fabe
chore(patch): update crt-static flag in build config ( #130 )
2024-02-27 19:58:29 +00:00
Bryan Oltman
140d3d4892
chore(patch): bump patch version
2024-02-26 17:02:34 -05:00
Bryan Oltman
b1097563db
fix(patch): statically link C runtime for Windows patch binaries ( #129 )
...
* chore: statically link C runtime for Windows patch binaries
* cleanup
2024-02-26 21:50:49 +00:00
Eric Seidel
2c45aa427d
chore: Use dependabot ( #125 )
2024-02-23 15:55:04 -05:00
Bryan Oltman
c484e4a97d
chore: improve error messages printed by updater ( #121 )
...
* fix: us OSLog framework for logging on iOS
* cleanup
* chore: improve error messages printed by updater
* remove println
* cleanup
* warn -> info
* update set_config to not return anything
* revert pub test struct
* Update library/src/config.rs
Co-authored-by: Eric Seidel <eric@shorebird.dev >
---------
Co-authored-by: Eric Seidel <eric@shorebird.dev >
2024-02-06 17:17:09 -05:00
Bryan Oltman
d3b88ec4b6
fix: us OSLog framework for logging on iOS ( #120 )
...
* fix: us OSLog framework for logging on iOS
* cleanup
2024-02-06 16:52:04 -05:00
Bryan Oltman
ed013eb257
feat: Update C API to consume Read+Seek callbacks ( #111 )
...
* Update C API to consume Read+Seek callbacks
* remove open and close functions
* update to reflect new interface
* Refactor posix file i/o to c_api (#113 )
* Refactor posix file i/o to c_api
* fix comment
* rename ExternalFile to ReadSeek
* cleanup and comments
* Add SHOREBIRD_PATCH_BASE_FILENAME const
* fix lint
* add fake callbacks for c_api tests
* fix tests
* remove os_last_error
* remove todos, add comments
* cleanup
* remove params to open
* add c_api module, tests
* reorganize
* Return Err if CFileProvider open returns null
* add comments and docs
2024-01-16 14:28:04 -05:00
Eric Seidel
c6f8b2933e
refactor: remove client_id ( #110 )
...
We added client_id back when we had a different billing model
where we would bill customers based on number of unique devices
accepting an install in a given month (similar to what expo.dev
advertised as their pricing model at the time).
We moved to a differnet pricing model and never used client_id
so removing it.
2023-12-21 13:00:14 -05:00
Eric Seidel
917ff39577
chore: Ignore .DS_Store files
2023-12-21 09:06:00 -08:00
Felix Angelov
71ab252ab9
chore: dart format
2023-12-20 16:14:17 -06:00
Bryan Oltman
a70fe54668
test: use mockito crate to test network-interfacing code ( #106 )
...
* test: use mockito crate to test network-interfacing code
* tweak
2023-11-17 10:30:25 -05:00
Bryan Oltman
52119a5906
update changelog
2023-10-20 15:48:48 -04:00
Bryan Oltman
79b3748c3d
Merge branch 'main' of https://github.com/shorebirdtech/updater
2023-10-20 15:45:15 -04:00
Bryan Oltman
a6ad4897c4
update version to 1.1.3
2023-10-20 15:44:03 -04:00
Bryan Oltman
5182397b09
docs(shorebird_code_push): improve example in readme ( #102 )
...
* docs(shorebird_code_push): improve example in readme
* wording
2023-10-20 12:53:32 -04:00
Bryan Oltman
ef20c33725
chore(shorebird_code_push): remove error log when shorebird is unavailable ( #101 )
...
* chore(shorebird_code_push): remove error log when shorebird is unavailable
* fix tests
2023-10-20 12:36:31 -04:00
Bryan Oltman
3b4b6ebc24
docs: fix method name in readme
2023-10-07 23:41:15 -04:00
Bryan Oltman
bb2e0b5c04
Update changelog
2023-10-07 23:37:07 -04:00
Bryan Oltman
c2a7665b6a
chore: bump version to 1.1.1
2023-10-07 23:34:44 -04:00
Bryan Oltman
bec99ff276
chore: format pubspec.yaml
2023-10-07 23:34:29 -04:00
Bryan Oltman
2bbcfa5752
chore: fix repository link in pubspec
2023-10-07 23:33:43 -04:00
Eric Seidel
54f47b8b36
chore: move to checkout@v4 ( #95 )
2023-10-07 19:50:33 +00:00
Bryan Oltman
d785568094
chore: don't error log if patches_state.json doesn't exist ( #97 )
2023-10-05 17:51:37 +00:00
Bryan Oltman
11c220c2ec
fix: add delay to unstick download banner ( #94 )
...
* fix: add delay to fix download banner
* revert change
* minor tweak
* reduce wait time for download banner
2023-10-03 14:01:29 -04:00
Bryan Oltman
b02610370a
refactor: move patch management functionality out of UpdaterState ( #93 )
...
* non-compiling WIP
* update
* add cfg test
* address clippy issues
* minor consistency
* introduce patch manager, delegate patch management functionality from updater state
* cleanup
* Restructure patch state on disk, adds patch validation
* Simplify patches state, move patches to subdirectories of patches/ instead of having the artifacts as immediate children
* Tests
* delete unused enum
* disk manager tests
* Tests, docs
* rename
* delete unused file
* fix todo
* error logging
* cleanup
* cleanup
* comments and cleanup
* cleanup
* debug log
* boot from previous patch if next patch is bad
* fallback logic and test
* fix log
* context -> with_context
* remove get from get_next_boot_patch
* Log patch state load error
* renaming
* coverage
* capitalization
* coverage
* Replace unwrap with ? in disk_io
* Fix record boot success
* eq none -> .is_none
* Move delete_patch_artifacts failure logging into function
* rename patch_install_success_fn to report_event_fn
* Fix patch install reporting
* update comment
2023-10-03 13:58:23 -04:00
Bryan Oltman
194fdc3220
refactor: create module directory for cache ( #91 )
2023-09-26 16:44:13 -04:00
Bryan Oltman
3f907de7c0
Revert "feat: treat iOS patches as diffs instead of full artifacts ( #88 )" ( #90 )
...
This reverts commit f4db98b759 .
2023-09-26 15:41:01 -04:00
Bryan Oltman
f4db98b759
feat: treat iOS patches as diffs instead of full artifacts ( #88 )
...
* feat: apply iOS patches from diffs
* Clean up imports
* fix lint
* Add iOS, tests
* refactor
* revert changes to shorebird_code_push
* remove unused debug trait
* coverage
* imports
2023-09-22 16:58:31 -04:00
Bryan Oltman
bd86f617e1
fix: don't serialize UpdaterState cache_dir as it can change between app runs ( #87 )
...
* fix: don't serialize UpdaterState cache_dir as it can change between app runs
* tests
* update tests
2023-09-20 16:08:58 -04:00
Eric Seidel
ebd721fea7
chore: print path create_dir_all fails at on failure ( #86 )
...
Co-authored-by: Bryan Oltman <bryanoltman@gmail.com >
2023-09-20 14:30:16 -04:00
Bryan Oltman
6a65a46027
add trailing comma
2023-09-20 10:52:29 -04:00
Bryan Oltman
b4024cf499
fix: add separate storage dir for state ( #84 )
2023-09-12 16:13:19 -04:00
Eric Seidel
84cfcf5c58
chore: add missing codecov.yml file and comments
2023-09-08 11:19:00 -07:00
Eric Seidel
edc3130400
chore: attempt to turn on codecov flags
2023-09-08 11:07:22 -07:00
Eric Seidel
e4b182d75d
chore: fix 30 of the 54 warnings from clippy pedantic. ( #81 )
...
I just ran `cargo clippy -- -W clippy::pedantic` and fixed things.
These are more invasive that the default set and the remaining
warnings are mostly about our (abysmal) public docs missing
Error and Panic sections to explain errors and panicks.
2023-09-08 17:51:07 +00:00
Eric Seidel
20b65f14c2
chore: run cargo clippy over our rust codebase ( #80 )
...
* chore: apply fixes from clippy
* Add a Safety section to appease clippy
2023-09-08 17:30:19 +00:00
Eric Seidel
15b2f6bfaa
feat: report patch install failure events ( #78 )
...
* feat: report failure events to our servers
This doesn't tell us anything about the failure, just that it
happened. Which at least will let us communicate that to customers.
This currently has no tests and will need some before landing.
* Address review comments
* Use use statements for config and events
* Add partial test
* Add comment about when save happens
2023-09-08 09:48:04 -07:00
Eric Seidel
9d4ce55c2b
refactor: Prepare to have more than one event type ( #77 )
...
Refactored our PatchInstallEvent to be just PatchEvent
and allow us to have more than one event type.
I moved it into its own events.rs file and added privacy
warnings to both this and the network code (eventually
we may move all this into a separate privacy.rs file).
I also fixed our build.rs file to not panic when our build
is otherwise broken. For whatever reason that seems to
cause the rust-analyzer to stop and not show any future
warnings (thus it's hard to fix things).
I moved away from having a "new" method for PatchEvent
with a series of Strings (which could be confused in order)
and instead am now using just the normal default struct
construction which effectively has named args.
Since EventType is now an enum, it's easy to use the
right enum not have to call PatchInstallEvent::new to
get the right magic string for "identifier".
Also added a bit more documentation to c_api.rs
2023-09-07 12:31:32 -07:00
Bryan Oltman
292f978950
fix: don't regenerate client id if UpdaterState successfully loaded ( #76 )
...
* fix: don't regenerate client id if UpdaterState successfully loaded
* tests, cleanup
* comments
2023-09-07 10:48:43 -04:00
Eric Seidel
e14f630f91
refactor: move shorebird_code_push_io and _web into src/ ( #75 )
...
* break: move shorebird_code_push_io and _web into src/
Users were sometimes importing the _web version thinking it
was the "web safe" import, rather than shorebird_code_push.dart
and then being surprised when ShorebirdCodePush did nothing.
Fixes https://github.com/shorebirdtech/shorebird/issues/1209
* Update formating for Dart 3.1
2023-09-07 07:38:15 -07:00
Eric Seidel
ef268acaf6
fix: show patch check info in logs ( #73 )
2023-09-01 08:17:02 -07:00
Bryan Oltman
53072a9128
fix: put call to report launch success on bg thread. ( #72 )
...
* fix: use non-blocking http client when reporting launch success
* Make patch install report request on bg thread
* Pass client_id instead of state
* Convert client_id from &str to String
2023-08-17 14:55:26 -04:00
Bryan Oltman
7417429d91
fix: log more friendly error message in case of no internet connection ( #67 )
...
* fix: log more friendly error message in case of no internet connection
* fix typo
* coverage
2023-08-17 08:36:10 -04:00
Bryan Oltman
99f3005ff4
feat: add support for reporting patch install events ( #71 )
...
* feat: add client_id to UpdaterState
* feat: add support for reporting patch install events
* Ensure we save UpdaterState after it's created
* Save state if we assign it a client id on load
* Don't error in report_launch_success if no patch exists
* coverage
* Rename
* Minor refactor
* coverage
* coverage
* Update library/src/updater.rs
Co-authored-by: Felix Angelov <felix@shorebird.dev >
* restore debug logs
* make test serial
---------
Co-authored-by: Felix Angelov <felix@shorebird.dev >
2023-08-11 13:56:46 -04:00
Bryan Oltman
d321ad02de
feat: add client_id to UpdaterState ( #70 )
...
* feat: add client_id to UpdaterState
* Ensure we save UpdaterState after it's created
* Save state if we assign it a client id on load
* Rename
2023-08-11 11:23:13 -04:00