Compare commits

...

225 Commits

Author SHA1 Message Date
renovate[bot] 1e407ed564 chore(deps): update eslint monorepo to v9.39.3 (#3302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-02 09:35:20 +01:00
renovate[bot] 0409a6be3d chore(deps): update dependency prettier to v3.8.1 (#3255)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-01 11:26:09 +08:00
renovate[bot] cfa22533e2 chore(deps): update dependency rollup to v4.59.0 [security] (#3292)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-01 11:12:05 +08:00
renovate[bot] 6b9f9f8d15 chore(deps): update dependency rollup to v4.55.1 (#3202)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-19 14:18:03 +01:00
renovate[bot] 02204829d2 chore(deps): update dependency typescript-eslint to v8.53.0 (#3190)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-19 13:39:05 +01:00
renovate[bot] 40f0c937ad chore(deps): update dependency prettier to v3.8.0 (#3218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-18 11:02:35 +08:00
renovate[bot] 4d98fef66b chore(deps): update dependency typescript-eslint to v8.50.1 (#3182)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-27 22:30:23 +08:00
renovate[bot] dba3722245 chore(deps): update dependency rollup to v4.54.0 (#3180)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-23 22:50:16 +08:00
renovate[bot] 156dbf0583 chore(deps): update dependency rollup to v4.53.5 (#3173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 19:16:29 +08:00
renovate[bot] 0972ee3567 chore(deps): update dependency rollup to v4.53.4 (#3168)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 11:21:06 +08:00
renovate[bot] 5c9b05f74e chore(deps): update dependency typescript-eslint to v8.50.0 (#3171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 10:58:07 +08:00
renovate[bot] e3cb564108 chore(deps): update eslint monorepo to v9.39.2 (#3165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-16 12:36:10 +08:00
renovate[bot] f7692ef395 chore(deps): update dependency typescript-eslint to v8.49.0 (#3161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 10:39:02 +08:00
renovate[bot] 5719df1d3a chore(deps): update dependency prettier to v3.7.4 (#3151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-06 13:10:44 +08:00
renovate[bot] de9be25196 chore(deps): update dependency typescript-eslint to v8.48.1 (#3147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-05 18:35:20 +08:00
renovate[bot] e8f34eb792 chore(deps): update dependency prettier to v3.7.3 (#3141)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 09:59:01 +08:00
renovate[bot] a4bbe55340 chore(deps): update dependency prettier to v3.7.2 (#3138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 10:31:29 +08:00
renovate[bot] 01e88ea90f chore(deps): update dependency prettier to v3.7.1 (#3135)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-30 20:00:54 +08:00
renovate[bot] e5f2ecf90e chore(deps): update dependency prettier to v3.7.0 (#3133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-30 19:53:36 +08:00
renovate[bot] 86564b3f4c chore(deps): update dependency typescript-eslint to v8.48.0 (#3127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-28 13:49:40 +08:00
renovate[bot] 22f16e3342 chore(deps): update dependency rollup to v4.53.3 (#3120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 16:26:24 +08:00
renovate[bot] 7bac275ab2 chore(deps): update dependency typescript-eslint to v8.47.0 (#3118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 10:47:30 +08:00
renovate[bot] fffe50cf89 chore(deps): update dependency rollup to v4.53.2 (#3104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-17 22:06:01 +08:00
renovate[bot] d751981971 chore(deps): update dependency typescript-eslint to v8.46.4 (#3106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-17 22:05:24 +08:00
renovate[bot] fcd4a0413e chore(deps): update dependency rollup to v4.53.1 (#3094)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-12 22:06:34 +08:00
renovate[bot] c48315d1d9 chore(deps): update eslint monorepo to v9.39.1 (#3087)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-08 12:36:50 +08:00
renovate[bot] 3af7fb1d62 chore(deps): update dependency typescript-eslint to v8.46.3 (#3084)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-08 12:02:34 +08:00
renovate[bot] 45a8183c8b chore(deps): update eslint monorepo to v9.39.0 (#3080)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 09:54:13 +01:00
renovate[bot] c60dc9889c chore(deps): update dependency typescript-eslint to v8.46.2 (#3061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-24 16:47:09 +08:00
renovate[bot] 552fd42f20 chore(deps): update rust crate tokio-tungstenite to 0.28 (#3017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-21 12:18:56 +02:00
renovate[bot] bf21cd96b4 chore(deps): update dependency rollup to v4.52.5 (#3014)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-21 12:16:51 +02:00
renovate[bot] 0306bc569e chore(deps): update dependency typescript-eslint to v8.46.1 (#3012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-21 12:14:46 +02:00
renovate[bot] ea93b759a3 chore(deps): update eslint monorepo to v9.38.0 (#3049)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-21 18:07:49 +08:00
renovate[bot] e517c53eb7 chore(deps): update dependency typescript to v5.9.3 (#3048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-21 18:00:02 +08:00
renovate[bot] f301907389 chore(deps): update dependency @rollup/plugin-node-resolve to v16.0.3 (#3047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-21 17:40:36 +08:00
renovate[bot] fc6cb81e97 chore(deps): update dependency vite to v7 [security] (#3041)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-21 15:28:47 +08:00
renovate[bot] 6d6e196e76 chore(deps): update dependency rollup to v4.52.0 (#3006)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 12:59:23 +02:00
renovate[bot] 85662ebded chore(deps): update eslint monorepo to v9.36.0 (#2982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 12:21:53 +02:00
renovate[bot] d6220e1e97 chore(deps): update dependency typescript-eslint to v8.44.0 (#2974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 11:56:13 +02:00
renovate[bot] b9ba371a7f chore(deps): update dependency rollup to v4.50.1 (#2987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-08 17:48:07 +08:00
renovate[bot] 658733918e chore(deps): update dependency rollup to v4.50.0 (#2967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-31 20:53:19 +08:00
renovate[bot] ed0c7961e3 chore(deps): update dependency rollup to v4.49.0 (#2963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-29 10:40:23 +08:00
renovate[bot] ca48db8c6a chore(deps): update dependency rollup to v4.48.1 (#2953)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-26 09:39:17 +08:00
renovate[bot] 5d1b206c9e chore(deps): update dependency typescript-eslint to v8.41.0 (#2957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-26 09:37:36 +08:00
renovate[bot] 76c947cfa4 chore(deps): update dependency rollup to v4.48.0 (#2949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-23 17:43:36 +08:00
renovate[bot] c983fa3206 chore(deps): update eslint monorepo to v9.34.0 (#2947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-23 09:05:30 +08:00
renovate[bot] f3fad06101 chore(deps): update dependency rollup to v4.47.1 (#2941)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 18:18:31 +08:00
renovate[bot] 424179fda4 chore(deps): update dependency rollup to v4.47.0 (#2939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 14:47:45 +08:00
renovate[bot] 406cdff40d chore(deps): update dependency rollup to v4.46.4 (#2936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-20 11:27:59 +02:00
renovate[bot] 679693fb85 chore(deps): update eslint monorepo to v9.33.0 (#2904)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-19 21:32:27 +08:00
renovate[bot] 51c41aa5f4 chore(deps): update dependency typescript-eslint to v8.40.0 (#2924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-19 21:21:03 +08:00
renovate[bot] d868ba793e chore(deps): update dependency rollup to v4.46.3 (#2921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 19:02:11 +08:00
renovate[bot] a6e95923af chore(deps): update dependency typescript-eslint to v8.39.1 (#2911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-12 09:54:53 +08:00
renovate[bot] 2a8f9b91a7 chore(deps): update dependency typescript-eslint to v8.39.0 (#2895)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-05 10:08:43 +08:00
renovate[bot] 9085c23549 chore(deps): update dependency typescript to v5.9.2 (#2887)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 11:04:45 +08:00
renovate[bot] 51a9bd82f1 chore(deps): update dependency rollup to v4.46.2 (#2883)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 13:52:57 +08:00
renovate[bot] 30aa979b9e chore(deps): update dependency rollup to v4.46.1 (#2879)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 15:19:22 +08:00
renovate[bot] 2a8539bd58 chore(deps): update dependency rollup to v4.46.0 (#2877)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-27 20:40:13 +08:00
renovate[bot] 0915146717 chore(deps): update eslint monorepo to v9.32.0 (#2874)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-26 19:50:23 +08:00
renovate[bot] d1589e1718 chore(deps): update dependency typescript-eslint to v8.38.0 (#2865)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 14:40:20 +08:00
renovate[bot] a5e5637c3c chore(deps): update dependency eslint-config-prettier to v10.1.8 (#2859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-19 17:41:21 +08:00
renovate[bot] 92a443a59e chore(deps): update dependency rollup to v4.45.1 (#2851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-18 16:54:30 +08:00
renovate[bot] 35fff903ad chore(deps): update eslint monorepo to v9.31.0 (v1) (#2840)
* chore(deps): update eslint monorepo to v9.31.0

* Deduplicates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2025-07-15 10:23:49 +08:00
renovate[bot] 717c4a7fe3 chore(deps): update dependency typescript-eslint to v8.37.0 (#2849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 09:51:53 +08:00
renovate[bot] 2ec4edd300 chore(deps): update dependency rollup to v4.45.0 (#2842)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-12 15:00:24 +08:00
Jonas Osburg 2579d25838 feat(websocket): Add proxy configuration (#1536)
Co-authored-by: FabianLars <github@fabianlars.de>
2025-07-12 00:29:26 +02:00
renovate[bot] 84049c441e chore(deps): update dependency typescript-eslint to v8.36.0 (#2833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 08:33:26 +08:00
renovate[bot] fdb67a3e08 chore(deps): update dependency rollup to v4.44.2 (#2828)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 00:10:46 +08:00
renovate[bot] a0a310756a chore(deps): update eslint monorepo to v9.30.1 (#2825)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 11:37:08 +08:00
renovate[bot] 575a9af4fe chore(deps): update dependency typescript-eslint to v8.35.1 (#2821)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 14:34:23 +08:00
renovate[bot] 2d6a880adc chore(deps): update eslint monorepo to v9.30.0 (#2817)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-29 10:49:32 +08:00
renovate[bot] ee164d8dcd chore(deps): update dependency prettier to v3.6.2 (#2815)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-27 14:06:22 +08:00
renovate[bot] 09bb1298c1 chore(deps): update dependency rollup to v4.44.1 (v1) (#2812)
* chore(deps): update dependency rollup to v4.44.1

* Fix audit

* Downgrade plugin-kit to 0.3.1 to avoid duplicates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
2025-06-26 13:27:40 +08:00
renovate[bot] c392fc24d0 chore(deps): update dependency rollup to v4.44.0 (#2760)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-25 16:26:43 +02:00
renovate[bot] c2856fa3b3 chore(deps): update rust crate tokio-tungstenite to 0.27 (#2769)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-25 15:52:30 +02:00
renovate[bot] f9ec3b129b chore(deps): update dependency prettier to v3.6.1 (#2807)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-25 17:14:22 +08:00
renovate[bot] fe0b84f21e chore(deps): update dependency typescript-eslint to v8.35.0 (#2796)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 14:18:33 +08:00
renovate[bot] 84109f9a8a chore(deps): update dependency prettier to v3.6.0 (#2790)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 10:19:41 +08:00
renovate[bot] 565679ef36 chore(deps): update dependency typescript-eslint to v8.34.1 (#2775)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 09:17:15 +08:00
renovate[bot] b438768853 chore(deps): update eslint monorepo to v9.29.0 (#2767)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 15:05:41 +08:00
renovate[bot] 9b253ca319 chore(deps): update dependency rollup to v4.42.0 (#2751)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 15:09:53 +02:00
renovate[bot] f6ffb0773d chore(deps): update dependency typescript-eslint to v8.34.0 (#2756)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 09:35:01 +08:00
renovate[bot] e9a08005c4 chore(deps): update dependency typescript-eslint to v8.33.1 (#2736)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 18:18:15 +08:00
renovate[bot] 36cd21b7d0 chore(deps): update eslint monorepo to v9.28.0 (#2731)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-31 08:58:40 +08:00
renovate[bot] d20d469aa5 chore(deps): update dependency typescript-eslint to v8.33.0 (#2723)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-28 09:40:06 +02:00
renovate[bot] 0129dd4c09 chore(deps): update dependency rollup to v4.41.1 (#2716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-24 16:05:58 +08:00
renovate[bot] f28ab8efed chore(deps): update dependency rollup to v4.41.0 (#2703)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-18 10:46:06 +02:00
renovate[bot] ebbedb17ca chore(deps): update dependency typescript-eslint to v8.32.1 (#2693)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-18 10:45:41 +02:00
renovate[bot] 829bb4295e chore(deps): update eslint monorepo to v9.27.0 (#2700)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-18 09:55:20 +02:00
renovate[bot] a1894a0c6c chore(deps): update dependency eslint-config-prettier to v10.1.5 (#2689)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-09 13:57:59 +08:00
renovate[bot] aa6ac24caf chore(deps): update eslint monorepo to v9.26.0 (#2674)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 10:51:51 +02:00
renovate[bot] 4cae589018 chore(deps): update dependency eslint-config-prettier to v10.1.3 (#2686)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 16:28:02 +08:00
renovate[bot] f32c47c866 chore(deps): update dependency rollup to v4.40.2 (#2682)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 21:33:42 +08:00
renovate[bot] 3ac26e882e chore(deps): update dependency typescript-eslint to v8.32.0 (#2680)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 11:29:23 +08:00
renovate[bot] 0f946ecc09 chore(deps): update dependency vite to v6.2.7 [security] (#2670)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-30 23:08:53 +02:00
renovate[bot] 3b8e56a4d9 chore(deps): update dependency typescript-eslint to v8.31.1 (#2667)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 08:34:57 +08:00
renovate[bot] db41519e83 chore(deps): update dependency typescript-eslint to v8.31.0 (#2654)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 15:47:13 +08:00
renovate[bot] 86826287d4 chore(deps): update dependency rollup to v4.40.1 (#2664)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 15:46:54 +08:00
renovate[bot] 5ffbccb32b chore(deps): update eslint monorepo to v9.25.1 (#2653)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-27 14:31:05 +08:00
Jack Wills 0fdb85df8a fix(single-instance): Check if pointer is null for V1 (#2657) 2025-04-24 13:29:05 +02:00
renovate[bot] b360e3785e chore(deps): update dependency typescript-eslint to v8.30.1 (#2631)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 20:17:16 +08:00
renovate[bot] 1c6e629592 chore(deps): update dependency rollup to v4.40.0 (#2628)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 20:12:36 +08:00
renovate[bot] f5fed3a44a chore(deps): update eslint monorepo to v9.25.0 (#2645)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-20 20:11:48 +08:00
renovate[bot] 2bad1f58f2 chore(deps): update dependency eslint-config-prettier to v10.1.2 (#2612)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 14:20:26 +02:00
renovate[bot] 4df36f735f chore(deps): update eslint monorepo to v9.24.0 (#2560)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-08 21:00:13 +02:00
renovate[bot] 1478e83e3a chore(deps): update dependency typescript-eslint to v8.29.1 (#2552)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-08 20:28:31 +02:00
renovate[bot] 92c61c0302 chore(deps): update dependency rollup to v4.39.0 (#2544)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-08 16:48:56 +02:00
renovate[bot] 3f167d3a96 chore(deps): update dependency typescript to v5.8.3 (v1) (#2598)
* chore(deps): update dependency typescript to v5.8.3

* audit

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <github@fabianlars.de>
2025-04-08 15:56:30 +02:00
renovate[bot] 9fa0be8b42 chore(deps): update dependency eslint-config-prettier to v10.1.1 (#2504)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-12 13:08:56 +01:00
renovate[bot] 46078a72b6 chore(deps): update dependency @rollup/plugin-node-resolve to v16.0.1 (#2521)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-12 13:02:33 +01:00
renovate[bot] 0ff1d4c3f0 chore(deps): update eslint monorepo to v9.22.0 (#2509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 21:40:34 +01:00
renovate[bot] 7fe7198cd5 chore(deps): update dependency rollup to v4.35.0 (#2512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 21:22:41 +01:00
renovate[bot] 48aebd622a chore(deps): update dependency typescript-eslint to v8.26.1 (#2518)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 20:55:16 +01:00
renovate[bot] c6836d7b0c chore(deps): update dependency prettier to v3.5.3 (#2481)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 11:10:21 +01:00
renovate[bot] 9353a94bd5 chore(deps): update dependency typescript-eslint to v8.26.0 (#2489)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 10:26:03 +01:00
FabianLars 8e59bf2cba ci: Use pnpm v10 in ci 2025-03-01 14:05:45 +01:00
FabianLars b945bf991b chore: Update pnpm to v10. Update deps to fix esbuild audit. 2025-03-01 13:59:34 +01:00
renovate[bot] e94404c3e0 chore(deps): update dependency typescript-eslint to v8.25.0 (#2460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 10:56:23 +01:00
renovate[bot] 0ab00ad06f chore(deps): update dependency eslint-config-prettier to v10.0.2 (#2464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 10:20:04 +01:00
renovate[bot] a8749fdf66 chore(deps): update dependency @types/eslint__js to v9 (v1) (#2450)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <github@fabianlars.de>
2025-02-22 23:14:02 +01:00
renovate[bot] 82d9564846 chore(deps): update dependency prettier to v3.5.2 (#2448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-22 22:25:27 +01:00
renovate[bot] 438853ce77 chore(deps): update eslint monorepo to v9.21.0 (#2449)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-22 19:07:51 +01:00
renovate[bot] 7aa0056d86 chore(deps): update dependency prettier to v3.5.1 (v1) (#2407)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <github@fabianlars.de>
2025-02-20 17:04:30 +01:00
renovate[bot] 8cb7e1cc68 chore(deps): update dependency typescript-eslint to v8.24.1 (#2413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 16:39:58 +01:00
renovate[bot] ecb439bbd3 chore(deps): update eslint monorepo (#2403)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 16:37:09 +01:00
renovate[bot] 04996b37d3 chore(deps): update dependency rollup to v4.34.8 (#2426)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 16:04:09 +01:00
renovate[bot] 1d8ef2e5c2 chore(deps): update dependency rollup to v4.34.6 (v1) (#2400)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 18:43:00 +01:00
renovate[bot] b14bdfd23c chore(deps): update dependency typescript-eslint to v8.23.0 (v1) (#2391)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-06 11:39:40 +01:00
renovate[bot] 710e967597 chore(deps): update dependency rollup to v4.34.4 (v1) (#2384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-06 11:36:22 +01:00
renovate[bot] 93df3b2e2e chore(deps): update dependency rollup to v4.32.1 (v1) (#2374)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-28 12:44:00 +01:00
renovate[bot] 4467c78193 chore(deps): update dependency typescript-eslint to v8.22.0 (v1) (#2368)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <github@fabianlars.de>
2025-01-27 22:16:06 +01:00
renovate[bot] 8df17e2192 chore(deps): update dependency rollup to v4.32.0 (v1) (#2358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 22:38:12 +01:00
renovate[bot] a2aa26f92b chore(deps): update dependency eslint to v9.19.0 (v1) (#2357)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 21:32:51 +01:00
renovate[bot] 86017acbd8 chore(deps): update dependency typescript-eslint to v8.21.0 (v1) (#2338)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 21:27:20 +01:00
renovate[bot] 3631c08018 chore(deps): update dependency @eslint/js to v9.19.0 (v1) (#2355)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 20:16:52 +01:00
renovate[bot] d7a388d6d6 chore(deps): update dependency rollup to v4.31.0 (v1) (#2334)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 15:50:32 +01:00
renovate[bot] 890005f9a2 chore(deps): update dependency typescript-eslint to v8.20.0 (v1) (#2321)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-14 10:36:53 +01:00
renovate[bot] fbe729cc4a chore(deps): update dependency eslint-config-prettier to v10 (v1) (#2319)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 17:01:34 +01:00
renovate[bot] db8823e048 chore(deps): update eslint monorepo to v9.18.0 (#2305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-11 10:27:00 +01:00
renovate[bot] 7c6211fcd2 chore(deps): update dependency typescript to v5.7.3 (v1) (#2291)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 21:29:02 +01:00
renovate[bot] aad2bc315d chore(deps): update dependency typescript-eslint to v8.19.1 (v1) (#2289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 20:42:20 +01:00
renovate[bot] 31114d4384 chore(deps): update dependency rollup to v4.30.1 (v1) (#2288)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 19:20:22 +01:00
renovate[bot] f00ad730af chore(deps): update rust crate tokio-tungstenite to 0.26 (v1) (#2211)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2025-01-06 13:44:42 +01:00
renovate[bot] f394bdfaac chore(deps): update dependency @rollup/plugin-node-resolve to v16 (v1) (#2215)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 11:12:12 +01:00
renovate[bot] 203db03fbd chore(deps): update dependency @rollup/plugin-node-resolve to v15.3.1 (v1) (#2214)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 10:09:06 +01:00
renovate[bot] 724c186d04 chore(deps): update dependency rollup to v4.30.0 (v1) (#2264)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 10:07:01 +01:00
renovate[bot] 89f7d8a8a1 chore(deps): update dependency typescript-eslint to v8.19.0 (v1) (#2220)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-05 23:21:39 +01:00
renovate[bot] 35ba3b2fec chore(deps): update eslint monorepo to v9.17.0 (v1) (#2206)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-05 23:18:17 +01:00
renovate[bot] 8f63ce851c chore(deps): update dependency rollup to v4.29.2 (v1) (#2228)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-05 23:06:53 +01:00
FabianLars 3e7329c8db chore(stronghold): fix clippy warnings 2024-12-10 12:59:38 +01:00
FabianLars 87eee6fbb3 ci: Specify 22.04 runner if needed 2024-12-10 11:52:48 +01:00
renovate[bot] 55da13d491 chore(deps): update dependency typescript-eslint to v8.18.0 (v1) (#2187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-12-10 11:34:54 +01:00
renovate[bot] d7e23048eb chore(deps): update dependency rollup to v4.28.1 (v1) (#2114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 15:39:36 +01:00
renovate[bot] 017975ad52 chore(deps): update dependency prettier to v3.4.2 (v1) (#2105)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-04 11:09:30 +01:00
renovate[bot] 06eb804685 chore(deps): update dependency typescript-eslint to v8.17.0 (#2125)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 22:19:37 +01:00
FabianLars 8244294335 chore(deps): Update typescript-eslint to stable 2024-12-02 13:57:54 +01:00
renovate[bot] 74dd5642fd chore(deps): update dependency typescript to v5.7.2 (v1) (#2085)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 11:54:39 +01:00
renovate[bot] 31d088fe68 chore(deps): update eslint monorepo to v9.15.0 (v1) (#2059)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 11:48:34 +01:00
renovate[bot] ee72cb161f chore(deps): update dependency rollup to v4.27.4 (v1) (#2087)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 11:48:13 +01:00
renovate[bot] 6f03fff567 chore(deps): update dependency prettier to v3.4.0 (#2098)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 09:19:53 +01:00
renovate[bot] 80ecd87bfc chore(deps): update dependency rollup to v4.27.3 (#2073)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 21:32:44 +01:00
renovate[bot] d92e94eac9 chore(deps): update dependency rollup to v4.27.2 (v1) (#2057)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-16 15:04:41 +01:00
renovate[bot] b082fe0492 chore(deps): update dependency rollup to v4.27.0 (v1) (#2054)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-15 12:07:17 +01:00
renovate[bot] d654045460 chore(deps): update dependency rollup to v4.26.0 (v1) (#2025)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-13 11:59:01 +01:00
renovate[bot] 0a8484c52d chore(deps): update eslint monorepo to v9.14.0 (v1) (#2000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 17:16:22 +01:00
renovate[bot] db68fe8d55 chore(deps): update dependency @tauri-apps/cli to v1.6.3 (v1) (#1938)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 12:20:13 +01:00
renovate[bot] 795c9955dd chore(deps): update dependency rollup to v4.24.4 (v1) (#1845)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 12:09:37 +01:00
renovate[bot] 0f4ce983cb chore(deps): update dependency tslib to v2.8.1 (v1) (#1944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 12:06:14 +01:00
renovate[bot] fa8ee1d4f2 chore(deps): update eslint monorepo to v9.12.0 (#1888)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-09 09:00:24 -03:00
renovate[bot] 1649d1db06 chore(deps): update dependency typescript to v5.6.3 (#1906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-09 08:46:27 -03:00
renovate[bot] 0b59bc7096 chore(deps): update eslint monorepo to v9.11.1 (v1) (#1834)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 13:20:04 +02:00
renovate[bot] 58901d7907 chore(deps): update dependency @rollup/plugin-node-resolve to v15.3.0 (v1) (#1835)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-24 13:15:00 +02:00
FabianLars 3b465674f4 chore(deps): Downgrade rollup ts plugin 2024-09-23 11:29:06 +02:00
FabianLars 63d0b27469 chore(deps): Update pnpm lockfile 2024-09-23 11:00:34 +02:00
renovate[bot] decf1e39f9 chore(deps): update dependency @rollup/plugin-typescript to v12 (v1) (#1827)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-09-23 10:50:13 +02:00
renovate[bot] 3b56e1abeb chore(deps): update eslint monorepo to v9.11.0 (v1) (#1821)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 10:41:21 +02:00
renovate[bot] 054dfc3570 chore(deps): update dependency rollup to v4.22.4 (#1819)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 09:25:45 +02:00
renovate[bot] e1bed073cd chore(deps): update dependency @rollup/plugin-node-resolve to v15.2.4 (#1826)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 09:12:24 +02:00
renovate[bot] 4af2ab9fd8 chore(deps): update dependency rollup to v4.22.0 (v1) (#1811)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-19 12:40:34 +02:00
Fabian-Lars fadee9d8ba fix(fs-extra): Don't unwrap in system time converter (#1800) 2024-09-17 16:59:58 +02:00
renovate[bot] cf058d5d4a fix(deps): update rust crate tokio-tungstenite to 0.24 (v1) (#1782)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-09-16 11:37:04 +02:00
renovate[bot] 311bfcbbbd chore(deps): update dependency @tauri-apps/cli to v1.6.2 (v1) (#1790)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-16 10:31:24 +02:00
renovate[bot] 2e627bc0b7 chore(deps): update dependency rollup to v4.21.3 (v1) (#1768)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-12 11:34:20 +02:00
renovate[bot] 32c8b6a1d9 chore(deps): update dependency typescript to v5.6.2 (v1) (#1756)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-09 22:39:16 +02:00
renovate[bot] 077b3d44fb chore(deps): update eslint monorepo to v9.10.0 (v1) (#1745)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-08 18:09:29 +02:00
FabianLars 5c249a1a10 fix(single-instance): Fix compile errors after windows-sys 0.59 update, fixes #1730 2024-09-04 10:29:29 +02:00
FabianLars 104f482ed2 chore: Upgrade inner deps to fix audit 2024-09-03 10:46:36 +02:00
FabianLars 80fbcb50d3 chore: Run prettier formatting (No visibile changes) 2024-09-03 10:37:56 +02:00
FabianLars b4c503c116 Remove authenticator plugin 2024-09-03 10:30:12 +02:00
renovate[bot] aa8e7176b0 fix(deps): update rust crate windows-sys to 0.59 (v1) (#1601)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-03 10:19:17 +02:00
renovate[bot] 20d2f5448b fix(deps): update rust crate sqlx to 0.8 [security] (v1) (#1687)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-09-03 10:02:30 +02:00
renovate[bot] 64e42b23bf chore(deps): update dependency tslib to v2.7.0 (v1) (#1720)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 15:08:34 +02:00
renovate[bot] 31afeaba45 chore(deps): update dependency rollup to v4.21.2 (v1) (#1717)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 12:43:48 +02:00
renovate[bot] 78aa1719da chore(deps): update eslint monorepo to v9.9.1 (#1718)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 12:34:38 +02:00
renovate[bot] 2b13281244 chore(deps): update dependency @tauri-apps/cli to v1.6.1 (#1716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-02 12:27:36 +02:00
renovate[bot] 677bade908 chore(deps): update dependency rollup to v4.21.0 (#1673)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-18 15:01:32 +02:00
renovate[bot] dee5649476 chore(deps): update eslint monorepo to v9.9.0 (#1644)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-10 11:28:57 +02:00
renovate[bot] becacf9cd6 chore(deps): update dependency rollup to v4.20.0 (#1622)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-03 13:05:20 +02:00
FabianLars 7c9dac1f42 chore(deps): Update time crate in lockfile 2024-08-01 12:29:07 +02:00
renovate[bot] b6cdb5c6c3 chore(deps): update dependency rollup to v4.19.2 (#1611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-01 12:18:37 +02:00
renovate[bot] 1da7892632 chore(deps): update dependency rollup to v4.19.1 (#1593)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-27 12:16:03 +02:00
renovate[bot] daa024b20e chore(deps): update eslint monorepo to v9.8.0 (#1589)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-26 23:48:36 +02:00
renovate[bot] 1a38991689 chore(deps): update dependency typescript to v5.5.4 (#1573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-23 08:56:49 +02:00
renovate[bot] 6ca80db9ac chore(deps): update dependency rollup to v4.19.0 (#1567)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-22 13:34:32 +02:00
renovate[bot] a3fe84296a chore(deps): update dependency prettier to v3.3.3 (#1543)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-13 14:53:20 +02:00
renovate[bot] cef6526caf chore(deps): update eslint monorepo to v9.7.0 (#1540)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-13 12:39:31 +02:00
renovate[bot] a32008965b chore(deps): update dependency rollup to v4.18.1 (#1528)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 19:25:58 +02:00
renovate[bot] 76b0f657d1 fix(deps): update tauri monorepo to v1.6.0 (#1513)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-02 09:50:24 +02:00
renovate[bot] f33e51c67f chore(deps): update dependency typescript to v5.5.3 (#1511)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-01 21:22:40 +02:00
Amr Bashir 862c42a457 fix(log): propagate some errors and avoid unwrapping (#1294) 2024-07-01 15:31:47 +02:00
renovate[bot] 81676da7ab chore(deps): update eslint monorepo to v9.6.0 (#1505)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-29 10:31:25 +02:00
renovate[bot] 6d8188ebfa chore(deps): update dependency typescript to v5.5.2 (#1487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-21 11:05:46 +02:00
renovate[bot] 0d649843c6 chore(deps): update eslint monorepo to v9.5.0 (#1467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-15 13:43:28 +02:00
renovate[bot] 562425644e chore(deps): update dependency prettier to v3.3.2 (#1452)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-11 11:18:39 +02:00
renovate[bot] bd3d9ca152 chore(deps): update dependency prettier to v3.3.1 (#1437)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-05 15:02:58 +02:00
renovate[bot] 49f2b4c666 chore(deps): update dependency tslib to v2.6.3 (#1435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-05 09:28:11 +02:00
renovate[bot] cb6f864eae fix(deps): update tauri monorepo (v1) (#1433)
* fix(deps): update tauri monorepo

* Update Cargo.toml

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-06-04 12:35:54 +02:00
renovate[bot] 3aa6e55036 fix(deps): update rust crate base64 to 0.22 (v1) (#1430)
* fix(deps): update rust crate base64 to 0.22

* fix lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-06-04 12:33:33 +02:00
FabianLars 7093a4d9ff chore: Remove globs from workspace.members for renovate 2024-06-04 11:36:28 +02:00
renovate[bot] 10a4d76fb3 fix(deps): update rust crate tokio-tungstenite to 0.23 (#1415)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-03 14:38:21 +02:00
FabianLars a6eaae7aba chore(store): Fix clippy issues 2024-06-03 14:06:28 +02:00
Fabian-Lars c52978d7ca chore: Update eslint to v9 with flat config (#1412)
* chore: Update eslint to v9 with flat config

* disable eslint for that whole example file. v1 not worth it imo

* update ts-eslint

* lock versions

* ci: update pnpm
2024-06-03 13:02:49 +02:00
Fabian-Lars c26b5cb9fd ci: Remove renovate config from v1 branch 2024-06-03 11:46:02 +02:00
Fabian-Lars cea68eb430 ci: Re-enable renovate for v1 2024-06-03 11:34:38 +02:00
Fabian-Lars 5e3900e682 chore: Delete .changes/upload-returnval.md 2024-04-15 18:26:32 +02:00
93 changed files with 2718 additions and 4787 deletions
-9
View File
@@ -33,15 +33,6 @@
}
},
"packages": {
"authenticator": {
"path": "./plugins/authenticator",
"manager": "rust-disabled"
},
"authenticator-js": {
"path": "./plugins/authenticator",
"manager": "javascript-disabled"
},
"autostart": {
"path": "./plugins/autostart",
"manager": "rust-disabled"
-6
View File
@@ -1,6 +0,0 @@
---
"upload": patch
"upload-js": patch
---
Return the upload response as a string and error out if the status code is not within 200-299.
-4
View File
@@ -1,4 +0,0 @@
target
node_modules
dist
dist-js
-20
View File
@@ -1,20 +0,0 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended-legacy"
],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {}
}
+2 -2
View File
@@ -39,10 +39,10 @@ jobs:
${{ runner.os }}-
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
version: 10.x.x
run_install: true
- name: audit
run: pnpm audit
@@ -7,7 +7,7 @@ on:
jobs:
version-or-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 65
outputs:
change: ${{ steps.covector.outputs.change }}
@@ -26,13 +26,13 @@ jobs:
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
version: 10.x.x
run_install: true
- name: install webkit2gtk and libudev for [authenticator]
- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
- name: cargo login
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
+4 -4
View File
@@ -42,10 +42,10 @@ jobs:
${{ runner.os }}-
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
version: 10.x.x
run_install: true
- name: eslint
run: pnpm lint
@@ -62,10 +62,10 @@ jobs:
${{ runner.os }}-
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
version: 10.x.x
run_install: true
- name: prettier check
run: pnpm format-check
+3 -3
View File
@@ -24,17 +24,17 @@ concurrency:
jobs:
clippy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install webkit2gtk and libudev for [authenticator]
- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
- name: Install clippy with stable toolchain
uses: dtolnay/rust-toolchain@stable
+5 -5
View File
@@ -26,26 +26,26 @@ concurrency:
jobs:
msrv:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install webkit2gtk and libudev for [authenticator]
- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libudev-dev
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
- uses: dtolnay/rust-toolchain@1.64.0
- uses: dtolnay/rust-toolchain@1.67.0
- uses: Swatinem/rust-cache@v2
- name: build
run: cargo build --workspace --exclude 'tauri-plugin-sql' --all-targets --all-features
- uses: dtolnay/rust-toolchain@1.65.0
- uses: dtolnay/rust-toolchain@1.80.1
- name: build sql:sqlite
run: cargo build --package 'tauri-plugin-sql' --all-targets --features sqlite
+2 -2
View File
@@ -30,11 +30,11 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
version: 10.x.x
run_install: true
- name: Build packages
Generated
+500 -374
View File
File diff suppressed because it is too large Load Diff
+24 -5
View File
@@ -1,17 +1,36 @@
[workspace]
members = ["plugins/*", "plugins/*/examples/*/src-tauri"]
# Listed without globs to prevent issues with renovate's baseBranches config.
members = [
"plugins/autostart",
"plugins/fs-extra",
"plugins/fs-watch",
"plugins/localhost",
"plugins/log",
"plugins/persisted-scope",
"plugins/positioner",
"plugins/single-instance",
"plugins/sql",
"plugins/store",
"plugins/stronghold",
"plugins/upload",
"plugins/websocket",
"plugins/window-state",
"plugins/single-instance/examples/vanilla/src-tauri",
"plugins/store/examples/AppSettingsManager/src-tauri",
"plugins/websocket/examples/tauri-app/src-tauri",
]
resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
serde = {version = "1", features = ["derive"]}
serde_json = "1"
tauri = "1"
tauri-build = "1"
serde_json = "1"
thiserror = "1"
[workspace.package]
authors = ["Tauri Programme within The Commons Conservancy"]
edition = "2021"
authors = [ "Tauri Programme within The Commons Conservancy" ]
license = "Apache-2.0 OR MIT"
rust-version = "1.64"
rust-version = "1.67"
+1 -2
View File
@@ -2,7 +2,6 @@
| | | Win | Mac | Lin | iOS | And |
| ------------------------------------------ | --------------------------------------------------------- | --- | --- | --- | --- | --- |
| [authenticator](plugins/authenticator) | Interface with hardware security keys. | ✅ | ✅ | ✅ | ? | ? |
| [autostart](plugins/autostart) | Automatically launch your app at system startup. | ✅ | ✅ | ✅ | ? | ? |
| [fs-extra](plugins/fs-extra) | File system methods that aren't included in the core API. | ✅ | ✅ | ✅ | ? | ? |
| [fs-watch](plugins/fs-watch) | Watch the filesystem for changes. | ✅ | ✅ | ✅ | ? | ? |
@@ -18,7 +17,7 @@
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? |
_This repo and all plugins require a Rust version of at least **1.64**_
_This repo and all plugins require a Rust version of at least **1.67**_
## Partners
+26
View File
@@ -0,0 +1,26 @@
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [
"**/target",
"**/node_modules",
"**/dist",
"**/dist-js",
"**/rollup.config.mjs",
"**/vite.config.ts",
".scripts",
"eslint.config.js",
],
},
eslint.configs.recommended,
eslintConfigPrettier,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: { project: true, tsconfigRootDir: import.meta.dirname },
},
},
);
+9 -14
View File
@@ -10,28 +10,23 @@
"format-check": "prettier --check ."
},
"devDependencies": {
"@rollup/plugin-node-resolve": "15.2.3",
"@eslint/js": "9.39.3",
"@rollup/plugin-node-resolve": "16.0.3",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.6.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-standard-with-typescript": "43.0.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-n": "17.2.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-security": "3.0.0",
"prettier": "3.2.5",
"rollup": "4.14.3",
"typescript": "5.4.5"
"eslint": "9.39.3",
"eslint-config-prettier": "10.1.8",
"prettier": "3.8.1",
"rollup": "4.59.0",
"typescript": "5.9.3",
"typescript-eslint": "8.53.0"
},
"resolutions": {
"semver": ">=7.5.2",
"optionator": ">=0.9.3"
},
"engines": {
"pnpm": ">=7.33.1"
"pnpm": "^10.0.0"
},
"pnpm": {
"auditConfig": {
-1
View File
@@ -1 +0,0 @@
node_modules
-29
View File
@@ -1,29 +0,0 @@
[package]
name = "tauri-plugin-authenticator"
version = "0.0.0"
description = "Use hardware security-keys in your Tauri App."
authors = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
authenticator = "0.3.1"
once_cell = "1"
sha2 = "0.10"
base64 = "0.21"
chrono = "0.4"
bytes = "1"
byteorder = "1"
openssl = "0.10"
[dev-dependencies]
rand = "0.8"
rusty-fork = "0.3"
-20
View File
@@ -1,20 +0,0 @@
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
PackageName: tauri
DataFormat: SPDXRef-1
PackageSupplier: Organization: The Tauri Programme in the Commons Conservancy
PackageHomePage: https://tauri.app
PackageLicenseDeclared: Apache-2.0
PackageLicenseDeclared: MIT
PackageCopyrightText: 2019-2022, The Tauri Programme in the Commons Conservancy
PackageSummary: <text>Tauri is a rust project that enables developers to make secure
and small desktop applications using a web frontend.
</text>
PackageComment: <text>The package includes the following libraries; see
Relationship information.
</text>
Created: 2019-05-20T09:00:00Z
PackageDownloadLocation: git://github.com/tauri-apps/tauri
PackageDownloadLocation: git+https://github.com/tauri-apps/tauri.git
PackageDownloadLocation: git+ssh://github.com/tauri-apps/tauri.git
Creator: Person: Daniel Thompson-Yvetot
-177
View File
@@ -1,177 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2017 - Present Tauri Apps Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-126
View File
@@ -1,126 +0,0 @@
![plugin-authenticator](https://github.com/tauri-apps/plugins-workspace/raw/v1/plugins/authenticator/banner.png)
Use hardware security-keys in your Tauri App.
## Install
_This plugin requires a Rust version of at least **1.64**_
There are three general methods of installation that we can recommend.
1. Use crates.io and npm (easiest and requires you to trust that our publishing pipeline worked)
2. Pull sources directly from Github using git tags / revision hashes (most secure)
3. Git submodule install this repo in your tauri project and then use the file protocol to ingest the source (most secure, but inconvenient to use)
Install the authenticator plugin by adding the following lines to your `Cargo.toml` file:
`src-tauri/Cargo.toml`
```toml
[dependencies]
tauri-plugin-authenticator = "0.1"
# or through git
tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
```
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-authenticator#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-authenticator#v1
```
## Usage
First, you need to register the authenticator plugin with Tauri:
`src-tauri/src/main.rs`
```rust
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_authenticator::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```
Afterwards, all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { Authenticator } from "tauri-plugin-authenticator-api";
const auth = new Authenticator();
auth.init(); // initialize transports
// generate a 32-bytes long random challenge
const arr = new Uint32Array(32);
window.crypto.getRandomValues(arr);
const b64 = btoa(String.fromCharCode.apply(null, arr));
// web-safe base64
const challenge = b64.replace(/\+/g, "-").replace(/\//g, "_");
const domain = "https://tauri.app";
// attempt to register with the security key
const json = await auth.register(challenge, domain);
const registerResult = JSON.parse(json);
// verify the registration was successful
const r2 = await auth.verifyRegistration(
challenge,
app,
registerResult.registerData,
registerResult.clientData,
);
const j2 = JSON.parse(r2);
// sign some data
const json = await auth.sign(challenge, app, keyHandle);
const signData = JSON.parse(json);
// verify the signature again
const counter = await auth.verifySignature(
challenge,
app,
signData.signData,
clientData,
keyHandle,
pubkey,
);
if (counter && counter > 0) {
console.log("SUCCESS!");
}
```
## Contributing
PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
## Partners
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://crabnebula.dev" target="_blank">
<img src="https://github.com/tauri-apps/plugins-workspace/raw/v1/.github/sponsors/crabnebula.svg" alt="CrabNebula" width="283">
</a>
</td>
</tr>
</tbody>
</table>
For the complete list of sponsors please visit our [website](https://tauri.app#sponsors) and [Open Collective](https://opencollective.com/tauri).
## License
Code: (c) 2015 - Present - The Tauri Programme within The Commons Conservancy.
MIT or MIT/Apache 2.0 where applicable.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

-60
View File
@@ -1,60 +0,0 @@
import { invoke } from "@tauri-apps/api/tauri";
export class Authenticator {
async init(): Promise<void> {
return await invoke("plugin:authenticator|init_auth");
}
async register(challenge: string, application: string): Promise<string> {
return await invoke("plugin:authenticator|register", {
timeout: 10000,
challenge,
application,
});
}
async verifyRegistration(
challenge: string,
application: string,
registerData: string,
clientData: string,
): Promise<string> {
return await invoke("plugin:authenticator|verify_registration", {
challenge,
application,
registerData,
clientData,
});
}
async sign(
challenge: string,
application: string,
keyHandle: string,
): Promise<string> {
return await invoke("plugin:authenticator|sign", {
timeout: 10000,
challenge,
application,
keyHandle,
});
}
async verifySignature(
challenge: string,
application: string,
signData: string,
clientData: string,
keyHandle: string,
pubkey: string,
): Promise<number> {
return await invoke("plugin:authenticator|verify_signature", {
challenge,
application,
signData,
clientData,
keyHandle,
pubkey,
});
}
}
-33
View File
@@ -1,33 +0,0 @@
{
"name": "tauri-plugin-authenticator-api",
"version": "0.0.0",
"description": "Use hardware security-keys in your Tauri App.",
"license": "MIT or APACHE-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
}
}
-11
View File
@@ -1,11 +0,0 @@
import { readFileSync } from "fs";
import { createConfig } from "../../shared/rollup.config.mjs";
export default createConfig({
input: "guest-js/index.ts",
pkg: JSON.parse(
readFileSync(new URL("./package.json", import.meta.url), "utf8"),
),
external: [/^@tauri-apps\/api/],
});
-212
View File
@@ -1,212 +0,0 @@
// Copyright 2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use authenticator::{
authenticatorservice::AuthenticatorService, statecallback::StateCallback,
AuthenticatorTransports, KeyHandle, RegisterFlags, SignFlags, StatusUpdate,
};
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use once_cell::sync::Lazy;
use serde::Serialize;
use sha2::{Digest, Sha256};
use std::io;
use std::sync::mpsc::channel;
use std::{convert::Into, sync::Mutex};
static MANAGER: Lazy<Mutex<AuthenticatorService>> = Lazy::new(|| {
let manager = AuthenticatorService::new().expect("The auth service should initialize safely");
Mutex::new(manager)
});
pub fn init_usb() {
let mut manager = MANAGER.lock().unwrap();
// theres also "add_detected_transports()" in the docs?
manager.add_u2f_usb_hid_platform_transports();
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Registration {
pub key_handle: String,
pub pubkey: String,
pub register_data: String,
pub client_data: String,
}
pub fn register(application: String, timeout: u64, challenge: String) -> crate::Result<String> {
let (chall_bytes, app_bytes, client_data_string) =
format_client_data(application.as_str(), challenge.as_str());
// log the status rx?
let (status_tx, _status_rx) = channel::<StatusUpdate>();
let mut manager = MANAGER.lock().unwrap();
let (register_tx, register_rx) = channel();
let callback = StateCallback::new(Box::new(move |rv| {
register_tx.send(rv).unwrap();
}));
let res = manager.register(
RegisterFlags::empty(),
timeout,
chall_bytes,
app_bytes,
vec![],
status_tx,
callback,
);
match res {
Ok(_r) => {
let register_result = register_rx
.recv()
.expect("Problem receiving, unable to continue");
if let Err(e) = register_result {
return Err(e.into());
}
let (register_data, device_info) = register_result.unwrap(); // error already has been checked
// println!("Register result: {}", base64::encode(&register_data));
println!("Device info: {}", &device_info);
let (key_handle, public_key) =
_u2f_get_key_handle_and_public_key_from_register_response(&register_data).unwrap();
let key_handle_base64 = URL_SAFE_NO_PAD.encode(key_handle);
let public_key_base64 = URL_SAFE_NO_PAD.encode(public_key);
let register_data_base64 = URL_SAFE_NO_PAD.encode(&register_data);
println!("Key Handle: {}", &key_handle_base64);
println!("Public Key: {}", &public_key_base64);
// Ok(base64::encode(&register_data))
// Ok(key_handle_base64)
let res = serde_json::to_string(&Registration {
key_handle: key_handle_base64,
pubkey: public_key_base64,
register_data: register_data_base64,
client_data: client_data_string,
})?;
Ok(res)
}
Err(e) => Err(e.into()),
}
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Signature {
pub key_handle: String,
pub sign_data: String,
}
pub fn sign(
application: String,
timeout: u64,
challenge: String,
key_handle: String,
) -> crate::Result<String> {
let credential = match URL_SAFE_NO_PAD.decode(key_handle) {
Ok(v) => v,
Err(e) => {
return Err(e.into());
}
};
let key_handle = KeyHandle {
credential,
transports: AuthenticatorTransports::empty(),
};
let (chall_bytes, app_bytes, _) = format_client_data(application.as_str(), challenge.as_str());
let (sign_tx, sign_rx) = channel();
let callback = StateCallback::new(Box::new(move |rv| {
sign_tx.send(rv).unwrap();
}));
// log the status rx?
let (status_tx, _status_rx) = channel::<StatusUpdate>();
let mut manager = MANAGER.lock().unwrap();
let res = manager.sign(
SignFlags::empty(),
timeout,
chall_bytes,
vec![app_bytes],
vec![key_handle],
status_tx,
callback,
);
match res {
Ok(_v) => {
let sign_result = sign_rx
.recv()
.expect("Problem receiving, unable to continue");
if let Err(e) = sign_result {
return Err(e.into());
}
let (_, handle_used, sign_data, device_info) = sign_result.unwrap();
let sig = URL_SAFE_NO_PAD.encode(sign_data);
println!("Sign result: {sig}");
println!("Key handle used: {}", URL_SAFE_NO_PAD.encode(&handle_used));
println!("Device info: {}", &device_info);
println!("Done.");
let res = serde_json::to_string(&Signature {
sign_data: sig,
key_handle: URL_SAFE_NO_PAD.encode(&handle_used),
})?;
Ok(res)
}
Err(e) => Err(e.into()),
}
}
fn format_client_data(application: &str, challenge: &str) -> (Vec<u8>, Vec<u8>, String) {
let d =
format!(r#"{{"challenge": "{challenge}", "version": "U2F_V2", "appId": "{application}"}}"#);
let mut challenge = Sha256::new();
challenge.update(d.as_bytes());
let chall_bytes = challenge.finalize().to_vec();
let mut app = Sha256::new();
app.update(application.as_bytes());
let app_bytes = app.finalize().to_vec();
(chall_bytes, app_bytes, d)
}
fn _u2f_get_key_handle_and_public_key_from_register_response(
register_response: &[u8],
) -> io::Result<(Vec<u8>, Vec<u8>)> {
if register_response[0] != 0x05 {
return Err(io::Error::new(
io::ErrorKind::InvalidData,
"Reserved byte not set correctly",
));
}
// 1: reserved
// 65: public key
// 1: key handle length
// key handle
// x.509 cert
// sig
let key_handle_len = register_response[66] as usize;
let mut public_key = register_response.to_owned();
let mut key_handle = public_key.split_off(67);
let _attestation = key_handle.split_off(key_handle_len);
// remove fist (reserved) and last (handle len) bytes
let pk: Vec<u8> = public_key[1..public_key.len() - 1].to_vec();
Ok((key_handle, pk))
}
-22
View File
@@ -1,22 +0,0 @@
use serde::{Serialize, Serializer};
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
Base64Decode(#[from] base64::DecodeError),
#[error(transparent)]
JSON(#[from] serde_json::Error),
#[error(transparent)]
U2F(#[from] crate::u2f_crate::u2ferror::U2fError),
#[error(transparent)]
Auth(#[from] authenticator::errors::AuthenticatorError),
}
impl Serialize for Error {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_str(self.to_string().as_ref())
}
}
-77
View File
@@ -1,77 +0,0 @@
// Copyright 2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
mod auth;
mod error;
mod u2f;
mod u2f_crate;
use tauri::{
plugin::{Builder as PluginBuilder, TauriPlugin},
Runtime,
};
pub use error::Error;
type Result<T> = std::result::Result<T, Error>;
#[tauri::command]
fn init_auth() {
auth::init_usb();
}
#[tauri::command]
fn register(timeout: u64, challenge: String, application: String) -> crate::Result<String> {
auth::register(application, timeout, challenge)
}
#[tauri::command]
fn verify_registration(
challenge: String,
application: String,
register_data: String,
client_data: String,
) -> crate::Result<String> {
u2f::verify_registration(application, challenge, register_data, client_data)
}
#[tauri::command]
fn sign(
timeout: u64,
challenge: String,
application: String,
key_handle: String,
) -> crate::Result<String> {
auth::sign(application, timeout, challenge, key_handle)
}
#[tauri::command]
fn verify_signature(
challenge: String,
application: String,
sign_data: String,
client_data: String,
key_handle: String,
pubkey: String,
) -> crate::Result<u32> {
u2f::verify_signature(
application,
challenge,
sign_data,
client_data,
key_handle,
pubkey,
)
}
pub fn init<R: Runtime>() -> TauriPlugin<R> {
PluginBuilder::new("authenticator")
.invoke_handler(tauri::generate_handler![
init_auth,
register,
verify_registration,
sign,
verify_signature
])
.build()
}
-105
View File
@@ -1,105 +0,0 @@
// Copyright 2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use crate::u2f_crate::messages::*;
use crate::u2f_crate::protocol::*;
use crate::u2f_crate::register::*;
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use chrono::prelude::*;
use serde::Serialize;
use std::convert::Into;
static VERSION: &str = "U2F_V2";
pub fn make_challenge(app_id: &str, challenge_bytes: Vec<u8>) -> Challenge {
let utc: DateTime<Utc> = Utc::now();
Challenge {
challenge: URL_SAFE_NO_PAD.encode(challenge_bytes),
timestamp: format!("{utc:?}"),
app_id: app_id.to_string(),
}
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct RegistrationVerification {
pub key_handle: String,
pub pubkey: String,
pub device_name: Option<String>,
}
pub fn verify_registration(
app_id: String,
challenge: String,
register_data: String,
client_data: String,
) -> crate::Result<String> {
let challenge_bytes = URL_SAFE_NO_PAD.decode(challenge)?;
let challenge = make_challenge(&app_id, challenge_bytes);
let client_data_bytes: Vec<u8> = client_data.as_bytes().into();
let client_data_base64 = URL_SAFE_NO_PAD.encode(client_data_bytes);
let client = U2f::new(app_id);
match client.register_response(
challenge,
RegisterResponse {
registration_data: register_data,
client_data: client_data_base64,
version: VERSION.to_string(),
},
) {
Ok(v) => {
let rv = RegistrationVerification {
key_handle: URL_SAFE_NO_PAD.encode(&v.key_handle),
pubkey: URL_SAFE_NO_PAD.encode(&v.pub_key),
device_name: v.device_name,
};
Ok(serde_json::to_string(&rv)?)
}
Err(e) => Err(e.into()),
}
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct SignatureVerification {
pub counter: u8,
}
pub fn verify_signature(
app_id: String,
challenge: String,
sign_data: String,
client_data: String,
key_handle: String,
pub_key: String,
) -> crate::Result<u32> {
let challenge_bytes = URL_SAFE_NO_PAD.decode(challenge)?;
let chal = make_challenge(&app_id, challenge_bytes);
let client_data_bytes: Vec<u8> = client_data.as_bytes().into();
let client_data_base64 = URL_SAFE_NO_PAD.encode(client_data_bytes);
let key_handle_bytes = URL_SAFE_NO_PAD.decode(&key_handle)?;
let pubkey_bytes = URL_SAFE_NO_PAD.decode(pub_key)?;
let client = U2f::new(app_id);
let mut _counter: u32 = 0;
match client.sign_response(
chal,
Registration {
// here only needs pubkey and keyhandle
key_handle: key_handle_bytes,
pub_key: pubkey_bytes,
attestation_cert: None,
device_name: None,
},
SignResponse {
// here needs client data and sig data and key_handle
signature_data: sign_data,
client_data: client_data_base64,
key_handle,
},
_counter,
) {
Ok(v) => Ok(v),
Err(e) => Err(e.into()),
}
}
@@ -1,8 +0,0 @@
Copyright (c) 2017
Licensed under either of
* Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
* MIT license (http://opensource.org/licenses/MIT)
at your option.
@@ -1,65 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use bytes::{Buf, BufMut};
use openssl::sha::sha256;
use serde::Serialize;
use std::io::Cursor;
use crate::u2f_crate::u2ferror::U2fError;
/// The `Result` type used in this crate.
type Result<T> = ::std::result::Result<T, U2fError>;
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Authorization {
pub counter: u32,
pub user_presence: bool,
}
pub fn parse_sign_response(
app_id: String,
client_data: Vec<u8>,
public_key: Vec<u8>,
sign_data: Vec<u8>,
) -> Result<Authorization> {
if sign_data.len() <= 5 {
return Err(U2fError::InvalidSignatureData);
}
let user_presence_flag = &sign_data[0];
let counter = &sign_data[1..=4];
let signature = &sign_data[5..];
// Let's build the msg to verify the signature
let app_id_hash = sha256(&app_id.into_bytes());
let client_data_hash = sha256(&client_data[..]);
let mut msg = vec![];
msg.put(app_id_hash.as_ref());
msg.put_u8(*user_presence_flag);
msg.put(counter);
msg.put(client_data_hash.as_ref());
let public_key = super::crypto::NISTP256Key::from_bytes(&public_key)?;
// The signature is to be verified by the relying party using the public key obtained during registration.
let verified = public_key.verify_signature(signature, msg.as_ref())?;
if !verified {
return Err(U2fError::BadSignature);
}
let authorization = Authorization {
counter: get_counter(counter),
user_presence: true,
};
Ok(authorization)
}
fn get_counter(counter: &[u8]) -> u32 {
let mut buf = Cursor::new(counter);
buf.get_u32()
}
@@ -1,156 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
//! Cryptographic operation wrapper for Webauthn. This module exists to
//! allow ease of auditing, safe operation wrappers for the webauthn library,
//! and cryptographic provider abstraction. This module currently uses OpenSSL
//! as the cryptographic primitive provider.
// Source can be found here: https://github.com/Firstyear/webauthn-rs/blob/master/src/crypto.rs
#![allow(non_camel_case_types)]
use openssl::{bn, ec, hash, nid, sign, x509};
use std::convert::TryFrom;
// use super::constants::*;
use crate::u2f_crate::u2ferror::U2fError;
use openssl::pkey::Public;
// use super::proto::*;
// Why OpenSSL over another rust crate?
// - Well, the openssl crate allows us to reconstruct a public key from the
// x/y group coords, where most others want a pkcs formatted structure. As
// a result, it's easiest to use openssl as it gives us exactly what we need
// for these operations, and despite it's many challenges as a library, it
// has resources and investment into it's maintenance, so we can a least
// assert a higher level of confidence in it that <backyard crypto here>.
// Object({Integer(-3): Bytes([48, 185, 178, 204, 113, 186, 105, 138, 190, 33, 160, 46, 131, 253, 100, 177, 91, 243, 126, 128, 245, 119, 209, 59, 186, 41, 215, 196, 24, 222, 46, 102]), Integer(-2): Bytes([158, 212, 171, 234, 165, 197, 86, 55, 141, 122, 253, 6, 92, 242, 242, 114, 158, 221, 238, 163, 127, 214, 120, 157, 145, 226, 232, 250, 144, 150, 218, 138]), Integer(-1): U64(1), Integer(1): U64(2), Integer(3): I64(-7)})
//
/// An X509PublicKey. This is what is otherwise known as a public certificate
/// which comprises a public key and other signed metadata related to the issuer
/// of the key.
pub struct X509PublicKey {
pubk: x509::X509,
}
impl std::fmt::Debug for X509PublicKey {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "X509PublicKey")
}
}
impl TryFrom<&[u8]> for X509PublicKey {
type Error = U2fError;
// Must be DER bytes. If you have PEM, base64decode first!
fn try_from(d: &[u8]) -> Result<Self, Self::Error> {
let pubk = x509::X509::from_der(d)?;
Ok(X509PublicKey { pubk })
}
}
impl X509PublicKey {
pub(crate) fn common_name(&self) -> Option<String> {
let cert = &self.pubk;
let subject = cert.subject_name();
let common = subject
.entries_by_nid(openssl::nid::Nid::COMMONNAME)
.next()
.map(|b| b.data().as_slice());
if let Some(common) = common {
std::str::from_utf8(common).ok().map(|s| s.to_string())
} else {
None
}
}
pub(crate) fn is_secp256r1(&self) -> Result<bool, U2fError> {
// Can we get the public key?
let pk = self.pubk.public_key()?;
let ec_key = pk.ec_key()?;
ec_key.check_key()?;
let ec_grpref = ec_key.group();
let ec_curve = ec_grpref.curve_name().ok_or(U2fError::OpenSSLNoCurveName)?;
Ok(ec_curve == nid::Nid::X9_62_PRIME256V1)
}
pub(crate) fn verify_signature(
&self,
signature: &[u8],
verification_data: &[u8],
) -> Result<bool, U2fError> {
let pkey = self.pubk.public_key()?;
// TODO: Should this determine the hash type from the x509 cert? Or other?
let mut verifier = sign::Verifier::new(hash::MessageDigest::sha256(), &pkey)?;
verifier.update(verification_data)?;
Ok(verifier.verify(signature)?)
}
}
pub struct NISTP256Key {
/// The key's public X coordinate.
pub x: [u8; 32],
/// The key's public Y coordinate.
pub y: [u8; 32],
}
impl NISTP256Key {
pub fn from_bytes(public_key_bytes: &[u8]) -> Result<Self, U2fError> {
if public_key_bytes.len() != 65 {
return Err(U2fError::InvalidPublicKey);
}
if public_key_bytes[0] != 0x04 {
return Err(U2fError::InvalidPublicKey);
}
let mut x: [u8; 32] = Default::default();
x.copy_from_slice(&public_key_bytes[1..=32]);
let mut y: [u8; 32] = Default::default();
y.copy_from_slice(&public_key_bytes[33..=64]);
Ok(NISTP256Key { x, y })
}
fn get_key(&self) -> Result<ec::EcKey<Public>, U2fError> {
let ec_group = ec::EcGroup::from_curve_name(openssl::nid::Nid::X9_62_PRIME256V1)?;
let xbn = bn::BigNum::from_slice(&self.x)?;
let ybn = bn::BigNum::from_slice(&self.y)?;
let ec_key = openssl::ec::EcKey::from_public_key_affine_coordinates(&ec_group, &xbn, &ybn)?;
// Validate the key is sound. IIRC this actually checks the values
// are correctly on the curve as specified
ec_key.check_key()?;
Ok(ec_key)
}
pub fn verify_signature(
&self,
signature: &[u8],
verification_data: &[u8],
) -> Result<bool, U2fError> {
let pkey = self.get_key()?;
let signature = openssl::ecdsa::EcdsaSig::from_der(signature)?;
let hash = openssl::sha::sha256(verification_data);
Ok(signature.verify(hash.as_ref(), &pkey)?)
}
}
@@ -1,54 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
// As defined by FIDO U2F Javascript API.
// https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-javascript-api.html#registration
use serde::{Deserialize, Serialize};
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct U2fRegisterRequest {
pub app_id: String,
pub register_requests: Vec<RegisterRequest>,
pub registered_keys: Vec<RegisteredKey>,
}
#[derive(Serialize)]
pub struct RegisterRequest {
pub version: String,
pub challenge: String,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct RegisteredKey {
pub version: String,
pub key_handle: Option<String>,
pub app_id: String,
}
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RegisterResponse {
pub registration_data: String,
pub version: String,
pub client_data: String,
}
#[derive(Serialize)]
#[serde(rename_all = "camelCase")]
pub struct U2fSignRequest {
pub app_id: String,
pub challenge: String,
pub registered_keys: Vec<RegisteredKey>,
}
#[derive(Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SignResponse {
pub key_handle: String,
pub signature_data: String,
pub client_data: String,
}
@@ -1,12 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
mod util;
pub mod authorization;
mod crypto;
pub mod messages;
pub mod protocol;
pub mod register;
pub mod u2ferror;
@@ -1,191 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use crate::u2f_crate::authorization::*;
use crate::u2f_crate::messages::*;
use crate::u2f_crate::register::*;
use crate::u2f_crate::u2ferror::U2fError;
use crate::u2f_crate::util::*;
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use chrono::prelude::*;
use chrono::Duration;
use serde::{Deserialize, Serialize};
type Result<T> = ::std::result::Result<T, U2fError>;
#[derive(Clone)]
pub struct U2f {
app_id: String,
}
#[derive(Deserialize, Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Challenge {
pub app_id: String,
pub challenge: String,
pub timestamp: String,
}
impl Challenge {
// Not used in this plugin.
#[allow(dead_code)]
pub fn new() -> Self {
Challenge {
app_id: String::new(),
challenge: String::new(),
timestamp: String::new(),
}
}
}
impl U2f {
// The app ID is a string used to uniquely identify an U2F app
pub fn new(app_id: String) -> Self {
U2f { app_id }
}
// Not used in this plugin.
#[allow(dead_code)]
pub fn generate_challenge(&self) -> Result<Challenge> {
let utc: DateTime<Utc> = Utc::now();
let challenge_bytes = generate_challenge(32)?;
let challenge = Challenge {
challenge: URL_SAFE_NO_PAD.encode(challenge_bytes),
timestamp: format!("{:?}", utc),
app_id: self.app_id.clone(),
};
Ok(challenge.clone())
}
// Not used in this plugin.
#[allow(dead_code)]
pub fn request(
&self,
challenge: Challenge,
registrations: Vec<Registration>,
) -> Result<U2fRegisterRequest> {
let u2f_request = U2fRegisterRequest {
app_id: self.app_id.clone(),
register_requests: self.register_request(challenge),
registered_keys: self.registered_keys(registrations),
};
Ok(u2f_request)
}
fn register_request(&self, challenge: Challenge) -> Vec<RegisterRequest> {
let mut requests: Vec<RegisterRequest> = vec![];
let request = RegisterRequest {
version: U2F_V2.into(),
challenge: challenge.challenge,
};
requests.push(request);
requests
}
pub fn register_response(
&self,
challenge: Challenge,
response: RegisterResponse,
) -> Result<Registration> {
if expiration(challenge.timestamp) > Duration::seconds(300) {
return Err(U2fError::ChallengeExpired);
}
let registration_data: Vec<u8> = URL_SAFE_NO_PAD
.decode(&response.registration_data[..])
.unwrap();
let client_data: Vec<u8> = URL_SAFE_NO_PAD.decode(&response.client_data[..]).unwrap();
parse_registration(challenge.app_id, client_data, registration_data)
}
fn registered_keys(&self, registrations: Vec<Registration>) -> Vec<RegisteredKey> {
let mut keys: Vec<RegisteredKey> = vec![];
for registration in registrations {
keys.push(get_registered_key(
self.app_id.clone(),
registration.key_handle,
));
}
keys
}
// Not used in this plugin.
#[allow(dead_code)]
pub fn sign_request(
&self,
challenge: Challenge,
registrations: Vec<Registration>,
) -> U2fSignRequest {
let mut keys: Vec<RegisteredKey> = vec![];
for registration in registrations {
keys.push(get_registered_key(
self.app_id.clone(),
registration.key_handle,
));
}
let signed_request = U2fSignRequest {
app_id: self.app_id.clone(),
challenge: URL_SAFE_NO_PAD.encode(challenge.challenge.as_bytes()),
registered_keys: keys,
};
signed_request
}
pub fn sign_response(
&self,
challenge: Challenge,
reg: Registration,
sign_resp: SignResponse,
counter: u32,
) -> Result<u32> {
if expiration(challenge.timestamp) > Duration::seconds(300) {
return Err(U2fError::ChallengeExpired);
}
if sign_resp.key_handle != get_encoded(&reg.key_handle[..]) {
return Err(U2fError::WrongKeyHandler);
}
let client_data: Vec<u8> = URL_SAFE_NO_PAD
.decode(&sign_resp.client_data[..])
.map_err(|_e| U2fError::InvalidClientData)?;
let sign_data: Vec<u8> = URL_SAFE_NO_PAD
.decode(&sign_resp.signature_data[..])
.map_err(|_e| U2fError::InvalidSignatureData)?;
let public_key = reg.pub_key;
let auth = parse_sign_response(
self.app_id.clone(),
client_data.clone(),
public_key,
sign_data.clone(),
);
match auth {
Ok(ref res) => {
// CounterTooLow is raised when the counter value received from the device is
// lower than last stored counter value.
if res.counter < counter {
Err(U2fError::CounterTooLow)
} else {
Ok(res.counter)
}
}
Err(e) => Err(e),
}
}
}
@@ -1,101 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use byteorder::{BigEndian, ByteOrder};
use bytes::{BufMut, Bytes};
use openssl::sha::sha256;
use serde::Serialize;
use crate::u2f_crate::messages::RegisteredKey;
use crate::u2f_crate::u2ferror::U2fError;
use crate::u2f_crate::util::*;
use std::convert::TryFrom;
/// The `Result` type used in this crate.
type Result<T> = ::std::result::Result<T, U2fError>;
// Single enrolment or pairing between an application and a token.
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct Registration {
pub key_handle: Vec<u8>,
pub pub_key: Vec<u8>,
// AttestationCert can be null for Authenticate requests.
pub attestation_cert: Option<Vec<u8>>,
pub device_name: Option<String>,
}
pub fn parse_registration(
app_id: String,
client_data: Vec<u8>,
registration_data: Vec<u8>,
) -> Result<Registration> {
let reserved_byte = registration_data[0];
if reserved_byte != 0x05 {
return Err(U2fError::InvalidReservedByte);
}
let mut mem = Bytes::from(registration_data);
//Start parsing ... advance the reserved byte.
let _ = mem.split_to(1);
// P-256 NIST elliptic curve
let public_key = mem.split_to(65);
// Key Handle
let key_handle_size = mem.split_to(1);
let key_len = BigEndian::read_uint(&key_handle_size[..], 1);
let key_handle = mem.split_to(key_len as usize);
// The certificate length needs to be inferred by parsing.
let cert_len = asn_length(mem.clone()).unwrap();
let attestation_certificate = mem.split_to(cert_len);
// Remaining data corresponds to the signature
let signature = mem;
// Let's build the msg to verify the signature
let app_id_hash = sha256(&app_id.into_bytes());
let client_data_hash = sha256(&client_data[..]);
let mut msg = vec![0x00]; // A byte reserved for future use [1 byte] with the value 0x00
msg.put(app_id_hash.as_ref());
msg.put(client_data_hash.as_ref());
msg.put(key_handle.clone());
msg.put(public_key.clone());
// The signature is to be verified by the relying party using the public key certified
// in the attestation certificate.
let cerificate_public_key =
super::crypto::X509PublicKey::try_from(&attestation_certificate[..])?;
if !(cerificate_public_key.is_secp256r1()?) {
return Err(U2fError::BadCertificate);
}
let verified = cerificate_public_key.verify_signature(&signature[..], &msg[..])?;
if !verified {
return Err(U2fError::BadCertificate);
}
let registration = Registration {
key_handle: key_handle[..].to_vec(),
pub_key: public_key[..].to_vec(),
attestation_cert: Some(attestation_certificate[..].to_vec()),
device_name: cerificate_public_key.common_name(),
};
Ok(registration)
}
pub fn get_registered_key(app_id: String, key_handle: Vec<u8>) -> RegisteredKey {
RegisteredKey {
app_id,
version: U2F_V2.into(),
key_handle: Some(get_encoded(key_handle.as_slice())),
}
}
@@ -1,39 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use thiserror::Error;
#[derive(Debug, Error)]
pub enum U2fError {
#[error("ASM1 Decoder error")]
Asm1DecoderError,
#[error("Not able to verify signature")]
BadSignature,
#[error("Not able to generate random bytes")]
RandomSecureBytesError,
#[error("Invalid Reserved Byte")]
InvalidReservedByte,
#[error("Challenge Expired")]
ChallengeExpired,
#[error("Wrong Key Handler")]
WrongKeyHandler,
#[error("Invalid Client Data")]
InvalidClientData,
#[error("Invalid Signature Data")]
InvalidSignatureData,
#[error("Invalid User Presence Byte")]
InvalidUserPresenceByte,
#[error("Failed to parse certificate")]
BadCertificate,
#[error("Not Trusted Anchor")]
NotTrustedAnchor,
#[error("Counter too low")]
CounterTooLow,
#[error("Invalid public key")]
OpenSSLNoCurveName,
#[error("OpenSSL no curve name")]
InvalidPublicKey,
#[error(transparent)]
OpenSSLError(#[from] openssl::error::ErrorStack),
}
@@ -1,66 +0,0 @@
// Copyright 2021 Flavio Oliveira
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use crate::u2f_crate::u2ferror::U2fError;
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use bytes::Bytes;
use chrono::prelude::*;
use chrono::Duration;
use openssl::rand;
/// The `Result` type used in this crate.
type Result<T> = ::std::result::Result<T, U2fError>;
pub const U2F_V2: &str = "U2F_V2";
// Generates a challenge from a secure, random source.
pub fn generate_challenge(size: usize) -> Result<Vec<u8>> {
let mut bytes: Vec<u8> = vec![0; size];
rand::rand_bytes(&mut bytes).map_err(|_e| U2fError::RandomSecureBytesError)?;
Ok(bytes)
}
pub fn expiration(timestamp: String) -> Duration {
let now: DateTime<Utc> = Utc::now();
let ts = timestamp.parse::<DateTime<Utc>>();
now.signed_duration_since(ts.unwrap())
}
// Decode initial bytes of buffer as ASN and return the length of the encoded structure.
// http://en.wikipedia.org/wiki/X.690
pub fn asn_length(mem: Bytes) -> Result<usize> {
let buffer: &[u8] = &mem[..];
if mem.len() < 2 || buffer[0] != 0x30 {
// Type
return Err(U2fError::Asm1DecoderError);
}
let len = buffer[1]; // Len
if len & 0x80 == 0 {
return Ok((len & 0x7f) as usize);
}
let numbem_of_bytes = len & 0x7f;
if numbem_of_bytes == 0 {
return Err(U2fError::Asm1DecoderError);
}
let mut length: usize = 0;
for num in 0..numbem_of_bytes {
length = length * 0x100 + (buffer[(2 + num) as usize] as usize);
}
length += numbem_of_bytes as usize;
Ok(length + 2) // Add the 2 initial bytes: type and length.
}
pub fn get_encoded(data: &[u8]) -> String {
let encoded: String = URL_SAFE_NO_PAD.encode(data);
encoded.trim_end_matches('=').to_string()
}
-4
View File
@@ -1,4 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -4,7 +4,7 @@ Automatically launch your application at startup. Supports Windows, Mac (via App
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -24,9 +24,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ Additional file system methods not included in the core API.
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+4 -3
View File
@@ -78,9 +78,10 @@ struct Metadata {
}
fn system_time_to_ms(time: std::io::Result<SystemTime>) -> u64 {
time.map(|t| {
let duration_since_epoch = t.duration_since(UNIX_EPOCH).unwrap();
duration_since_epoch.as_millis() as u64
time.map(|time| {
time.duration_since(UNIX_EPOCH)
.map(|t| t.as_millis() as u64)
.unwrap_or_else(|err| err.duration().as_millis() as u64)
})
.unwrap_or_default()
}
+1 -1
View File
@@ -4,7 +4,7 @@ Watch files and directories for changes using [notify](https://github.com/notify
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ Expose your apps assets through a localhost server instead of the default custom
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+1 -1
View File
@@ -63,7 +63,7 @@ impl Builder {
let asset_resolver = app.asset_resolver();
std::thread::spawn(move || {
let server =
Server::http(&format!("localhost:{port}")).expect("Unable to spawn server");
Server::http(format!("localhost:{port}")).expect("Unable to spawn server");
for req in server.incoming_requests() {
let path = req
.url()
+1 -1
View File
@@ -4,7 +4,7 @@ Configurable logging for your Tauri app.
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+1 -1
View File
@@ -200,7 +200,7 @@ export async function attachLogger(fn: LoggerFn): Promise<UnlistenFn> {
// Strip ANSI escape codes
message = message.replace(
// TODO: Investigate security/detect-unsafe-regex
// eslint-disable-next-line no-control-regex, security/detect-unsafe-regex
// eslint-disable-next-line no-control-regex
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,
"",
);
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+14 -12
View File
@@ -321,7 +321,7 @@ impl Builder {
LogTarget::Stderr => fern::Output::from(std::io::stderr()),
LogTarget::Folder(path) => {
if !path.exists() {
fs::create_dir_all(path).unwrap();
fs::create_dir_all(path)?;
}
fern::log_file(get_log_file_path(
@@ -334,9 +334,12 @@ impl Builder {
.into()
}
LogTarget::LogDir => {
let path = app_handle.path_resolver().app_log_dir().unwrap();
let path = app_handle
.path_resolver()
.app_log_dir()
.ok_or("app_log_dir is None")?;
if !path.exists() {
fs::create_dir_all(&path).unwrap();
fs::create_dir_all(&path)?;
}
fern::log_file(get_log_file_path(
@@ -358,7 +361,7 @@ impl Builder {
};
let app_handle = app_handle.clone();
tauri::async_runtime::spawn(async move {
app_handle.emit_all("log://log", payload).unwrap();
let _ = app_handle.emit_all("log://log", payload);
});
})
}
@@ -392,13 +395,9 @@ fn get_log_file_path(
log_name,
timezone_strategy
.get_now()
.format(
&time::format_description::parse(
"[year]-[month]-[day]_[hour]-[minute]-[second]"
)
.unwrap()
)
.unwrap(),
.format(&time::format_description::parse(
"[year]-[month]-[day]_[hour]-[minute]-[second]"
)?)?,
));
if to.is_file() {
// designated rotated log file name already exists
@@ -406,7 +405,10 @@ fn get_log_file_path(
let mut to_bak = to.clone();
to_bak.set_file_name(format!(
"{}.bak",
to_bak.file_name().unwrap().to_string_lossy()
to_bak
.file_name()
.map(|n| n.to_string_lossy())
.unwrap_or_default()
));
fs::rename(&to, to_bak)?;
}
-1
View File
@@ -1,4 +1,3 @@
authenticator
autostart
fs-extra
fs-watch
+1 -1
View File
@@ -12,6 +12,6 @@
## \[0.1.1]
- The MSRV was raised to 1.64!
- The MSRV was raised to 1.67!
- The plugin now recursively unescapes saved patterns before allowing/forbidding them. This effectively prevents `.persisted-scope` files from blowing up, which caused Out-Of-Memory issues, while automatically fixing existing broken files seamlessly.
- [ebb2eb2](https://github.com/tauri-apps/plugins-workspace/commit/ebb2eb2fe2ebfbb70530d16a983d396aa5829aa1) fix(persisted-scope): Prevent out-of-memory issues, fixes [#274](https://github.com/tauri-apps/plugins-workspace/pull/274) ([#328](https://github.com/tauri-apps/plugins-workspace/pull/328)) on 2023-04-26
+1 -1
View File
@@ -4,7 +4,7 @@ Save filesystem and asset scopes and restore them when the app is reopened.
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+1 -1
View File
@@ -6,7 +6,7 @@ This plugin is a port of [electron-positioner](https://github.com/jenslind/elect
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ thiserror = { workspace = true }
semver = { version = "1", optional = true }
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.52"
version = "0.59"
features = [
"Win32_System_Threading",
"Win32_System_DataExchange",
+1 -1
View File
@@ -4,7 +4,7 @@ Ensure a single instance of your tauri app is running.
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
@@ -9,6 +9,6 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@tauri-apps/cli": "1.5.11"
"@tauri-apps/cli": "1.6.3"
}
}
@@ -1,5 +1,3 @@
#![cfg(target_os = "linux")]
use std::sync::Arc;
#[cfg(feature = "semver")]
@@ -1,12 +1,10 @@
#![cfg(target_os = "macos")]
use crate::SingleInstanceCallback;
use tauri::{
plugin::{self, TauriPlugin},
Manager, Runtime,
};
pub fn init<R: Runtime>(_f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
plugin::Builder::new("single-instance").build()
}
pub fn destroy<R: Runtime, M: Manager<R>>(_manager: &M) {}
use crate::SingleInstanceCallback;
use tauri::{
plugin::{self, TauriPlugin},
Manager, Runtime,
};
pub fn init<R: Runtime>(_f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
plugin::Builder::new("single-instance").build()
}
pub fn destroy<R: Runtime, M: Manager<R>>(_manager: &M) {}
@@ -1,5 +1,3 @@
#![cfg(target_os = "windows")]
#[cfg(feature = "semver")]
use crate::semver_compat::semver_compat_string;
@@ -51,7 +49,7 @@ pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
unsafe {
let hwnd = FindWindowW(class_name.as_ptr(), window_name.as_ptr());
if hwnd != 0 {
if !hwnd.is_null() {
let data = format!(
"{}|{}\0",
std::env::current_dir()
@@ -71,7 +69,7 @@ pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
}
}
} else {
app.manage(MutexHandle(hmutex));
app.manage(MutexHandle(hmutex as _));
let hwnd = create_event_target_window::<R>(&class_name, &window_name);
unsafe {
@@ -82,7 +80,7 @@ pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
)
};
app.manage(TargetWindowHandle(hwnd));
app.manage(TargetWindowHandle(hwnd as _));
}
Ok(())
@@ -98,12 +96,12 @@ pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
pub fn destroy<R: Runtime, M: Manager<R>>(manager: &M) {
if let Some(hmutex) = manager.try_state::<MutexHandle>() {
unsafe {
ReleaseMutex(hmutex.0);
CloseHandle(hmutex.0);
ReleaseMutex(hmutex.0 as _);
CloseHandle(hmutex.0 as _);
}
}
if let Some(hwnd) = manager.try_state::<TargetWindowHandle>() {
unsafe { DestroyWindow(hwnd.0) };
unsafe { DestroyWindow(hwnd.0 as _) };
}
}
@@ -115,6 +113,9 @@ unsafe extern "system" fn single_instance_window_proc<R: Runtime>(
) -> LRESULT {
let data_ptr = GetWindowLongPtrW(hwnd, GWL_USERDATA)
as *mut (AppHandle<R>, Box<SingleInstanceCallback<R>>);
if data_ptr.is_null() {
return DefWindowProcW(hwnd, msg, wparam, lparam);
}
let (app_handle, callback) = &mut *data_ptr;
match msg {
@@ -147,12 +148,12 @@ fn create_event_target_window<R: Runtime>(class_name: &[u16], window_name: &[u16
cbClsExtra: 0,
cbWndExtra: 0,
hInstance: GetModuleHandleW(std::ptr::null()),
hIcon: 0,
hCursor: 0,
hbrBackground: 0,
hIcon: std::ptr::null_mut(),
hCursor: std::ptr::null_mut(),
hbrBackground: std::ptr::null_mut(),
lpszMenuName: std::ptr::null(),
lpszClassName: class_name.as_ptr(),
hIconSm: 0,
hIconSm: std::ptr::null_mut(),
};
RegisterClassExW(&class);
@@ -176,8 +177,8 @@ fn create_event_target_window<R: Runtime>(class_name: &[u16], window_name: &[u16
0,
0,
0,
0,
0,
std::ptr::null_mut(),
std::ptr::null_mut(),
GetModuleHandleW(std::ptr::null()),
std::ptr::null(),
);
@@ -1,5 +1,3 @@
#![cfg(feature = "semver")]
/// Takes a version and spits out a String with trailing _x, thus only considering the digits
/// relevant regarding semver compatibility
pub fn semver_compat_string(version: semver::Version) -> String {
+2 -2
View File
@@ -6,7 +6,7 @@ authors = { workspace = true }
license = { workspace = true }
edition = { workspace = true }
#rust-version = { workspace = true }
rust-version = "1.65"
rust-version = "1.80"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -17,7 +17,7 @@ tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
futures-core = "0.3"
sqlx = { version = "0.7", features = ["json", "time"] }
sqlx = { version = "0.8", features = ["json", "time"] }
time = "0.3"
tokio = { version = "1", features = ["sync"] }
+1 -1
View File
@@ -4,7 +4,7 @@ Interface with SQL databases through [sqlx](https://github.com/launchbadge/sqlx)
## Install
_This plugin requires a Rust version of at least **1.65**_
_This plugin requires a Rust version of at least **1.80**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+337 -336
View File
@@ -1,336 +1,337 @@
// Copyright 2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use futures_core::future::BoxFuture;
use serde::{ser::Serializer, Deserialize, Serialize};
use serde_json::Value as JsonValue;
use sqlx::{
error::BoxDynError,
migrate::{
MigrateDatabase, Migration as SqlxMigration, MigrationSource, MigrationType, Migrator,
},
Column, Pool, Row,
};
use tauri::{
command,
plugin::{Builder as PluginBuilder, TauriPlugin},
AppHandle, Manager, RunEvent, Runtime, State,
};
use tokio::sync::Mutex;
use std::collections::HashMap;
#[cfg(feature = "sqlite")]
use std::{fs::create_dir_all, path::PathBuf};
#[cfg(feature = "sqlite")]
type Db = sqlx::sqlite::Sqlite;
#[cfg(feature = "mysql")]
type Db = sqlx::mysql::MySql;
#[cfg(feature = "postgres")]
type Db = sqlx::postgres::Postgres;
#[cfg(feature = "sqlite")]
type LastInsertId = i64;
#[cfg(not(feature = "sqlite"))]
type LastInsertId = u64;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
Sql(#[from] sqlx::Error),
#[error(transparent)]
Migration(#[from] sqlx::migrate::MigrateError),
#[error("database {0} not loaded")]
DatabaseNotLoaded(String),
#[error("unsupported datatype: {0}")]
UnsupportedDatatype(String),
}
impl Serialize for Error {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_str(self.to_string().as_ref())
}
}
type Result<T> = std::result::Result<T, Error>;
#[cfg(feature = "sqlite")]
/// Resolves the App's **file path** from the `AppHandle` context
/// object
fn app_path<R: Runtime>(app: &AppHandle<R>) -> PathBuf {
#[allow(deprecated)] // FIXME: Change to non-deprecated function in Tauri v2
app.path_resolver()
.app_dir()
.expect("No App path was found!")
}
#[cfg(feature = "sqlite")]
/// Maps the user supplied DB connection string to a connection string
/// with a fully qualified file path to the App's designed "app_path"
fn path_mapper(mut app_path: PathBuf, connection_string: &str) -> String {
app_path.push(
connection_string
.split_once(':')
.expect("Couldn't parse the connection string for DB!")
.1,
);
format!(
"sqlite:{}",
app_path
.to_str()
.expect("Problem creating fully qualified path to Database file!")
)
}
#[derive(Default)]
struct DbInstances(Mutex<HashMap<String, Pool<Db>>>);
struct Migrations(Mutex<HashMap<String, MigrationList>>);
#[derive(Default, Deserialize)]
pub struct PluginConfig {
#[serde(default)]
preload: Vec<String>,
}
#[derive(Debug)]
pub enum MigrationKind {
Up,
Down,
}
impl From<MigrationKind> for MigrationType {
fn from(kind: MigrationKind) -> Self {
match kind {
MigrationKind::Up => Self::ReversibleUp,
MigrationKind::Down => Self::ReversibleDown,
}
}
}
/// A migration definition.
#[derive(Debug)]
pub struct Migration {
pub version: i64,
pub description: &'static str,
pub sql: &'static str,
pub kind: MigrationKind,
}
#[derive(Debug)]
struct MigrationList(Vec<Migration>);
impl MigrationSource<'static> for MigrationList {
fn resolve(self) -> BoxFuture<'static, std::result::Result<Vec<SqlxMigration>, BoxDynError>> {
Box::pin(async move {
let mut migrations = Vec::new();
for migration in self.0 {
if matches!(migration.kind, MigrationKind::Up) {
migrations.push(SqlxMigration::new(
migration.version,
migration.description.into(),
migration.kind.into(),
migration.sql.into(),
));
}
}
Ok(migrations)
})
}
}
#[command]
async fn load<R: Runtime>(
#[allow(unused_variables)] app: AppHandle<R>,
db_instances: State<'_, DbInstances>,
migrations: State<'_, Migrations>,
db: String,
) -> Result<String> {
#[cfg(feature = "sqlite")]
let fqdb = path_mapper(app_path(&app), &db);
#[cfg(not(feature = "sqlite"))]
let fqdb = db.clone();
#[cfg(feature = "sqlite")]
create_dir_all(app_path(&app)).expect("Problem creating App directory!");
if !Db::database_exists(&fqdb).await.unwrap_or(false) {
Db::create_database(&fqdb).await?;
}
let pool = Pool::connect(&fqdb).await?;
if let Some(migrations) = migrations.0.lock().await.remove(&db) {
let migrator = Migrator::new(migrations).await?;
migrator.run(&pool).await?;
}
db_instances.0.lock().await.insert(db.clone(), pool);
Ok(db)
}
/// Allows the database connection(s) to be closed; if no database
/// name is passed in then _all_ database connection pools will be
/// shut down.
#[command]
async fn close(db_instances: State<'_, DbInstances>, db: Option<String>) -> Result<bool> {
let mut instances = db_instances.0.lock().await;
let pools = if let Some(db) = db {
vec![db]
} else {
instances.keys().cloned().collect()
};
for pool in pools {
let db = instances
.get_mut(&pool) //
.ok_or(Error::DatabaseNotLoaded(pool))?;
db.close().await;
}
Ok(true)
}
/// Execute a command against the database
#[command]
async fn execute(
db_instances: State<'_, DbInstances>,
db: String,
query: String,
values: Vec<JsonValue>,
) -> Result<(u64, LastInsertId)> {
let mut instances = db_instances.0.lock().await;
let db = instances.get_mut(&db).ok_or(Error::DatabaseNotLoaded(db))?;
let mut query = sqlx::query(&query);
for value in values {
if value.is_null() {
query = query.bind(None::<JsonValue>);
} else if value.is_string() {
query = query.bind(value.as_str().unwrap().to_owned())
} else {
query = query.bind(value);
}
}
let result = query.execute(&*db).await?;
#[cfg(feature = "sqlite")]
let r = Ok((result.rows_affected(), result.last_insert_rowid()));
#[cfg(feature = "mysql")]
let r = Ok((result.rows_affected(), result.last_insert_id()));
#[cfg(feature = "postgres")]
let r = Ok((result.rows_affected(), 0));
r
}
#[command]
async fn select(
db_instances: State<'_, DbInstances>,
db: String,
query: String,
values: Vec<JsonValue>,
) -> Result<Vec<HashMap<String, JsonValue>>> {
let mut instances = db_instances.0.lock().await;
let db = instances.get_mut(&db).ok_or(Error::DatabaseNotLoaded(db))?;
let mut query = sqlx::query(&query);
for value in values {
if value.is_null() {
query = query.bind(None::<JsonValue>);
} else if value.is_string() {
query = query.bind(value.as_str().unwrap().to_owned())
} else {
query = query.bind(value);
}
}
let rows = query.fetch_all(&*db).await?;
let mut values = Vec::new();
for row in rows {
let mut value = HashMap::default();
for (i, column) in row.columns().iter().enumerate() {
let v = row.try_get_raw(i)?;
let v = crate::decode::to_json(v)?;
value.insert(column.name().to_string(), v);
}
values.push(value);
}
Ok(values)
}
/// Tauri SQL plugin builder.
#[derive(Default)]
pub struct Builder {
migrations: Option<HashMap<String, MigrationList>>,
}
impl Builder {
/// Add migrations to a database.
#[must_use]
pub fn add_migrations(mut self, db_url: &str, migrations: Vec<Migration>) -> Self {
self.migrations
.get_or_insert(Default::default())
.insert(db_url.to_string(), MigrationList(migrations));
self
}
pub fn build<R: Runtime>(mut self) -> TauriPlugin<R, Option<PluginConfig>> {
PluginBuilder::new("sql")
.invoke_handler(tauri::generate_handler![load, execute, select, close])
.setup_with_config(|app, config: Option<PluginConfig>| {
let config = config.unwrap_or_default();
#[cfg(feature = "sqlite")]
create_dir_all(app_path(app)).expect("problems creating App directory!");
tauri::async_runtime::block_on(async move {
let instances = DbInstances::default();
let mut lock = instances.0.lock().await;
for db in config.preload {
#[cfg(feature = "sqlite")]
let fqdb = path_mapper(app_path(app), &db);
#[cfg(not(feature = "sqlite"))]
let fqdb = db.clone();
if !Db::database_exists(&fqdb).await.unwrap_or(false) {
Db::create_database(&fqdb).await?;
}
let pool = Pool::connect(&fqdb).await?;
if let Some(migrations) = self.migrations.as_mut().unwrap().remove(&db) {
let migrator = Migrator::new(migrations).await?;
migrator.run(&pool).await?;
}
lock.insert(db, pool);
}
drop(lock);
app.manage(instances);
app.manage(Migrations(Mutex::new(
self.migrations.take().unwrap_or_default(),
)));
Ok(())
})
})
.on_event(|app, event| {
if let RunEvent::Exit = event {
tauri::async_runtime::block_on(async move {
let instances = &*app.state::<DbInstances>();
let instances = instances.0.lock().await;
for value in instances.values() {
value.close().await;
}
});
}
})
.build()
}
}
// Copyright 2021 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use futures_core::future::BoxFuture;
use serde::{ser::Serializer, Deserialize, Serialize};
use serde_json::Value as JsonValue;
use sqlx::{
error::BoxDynError,
migrate::{
MigrateDatabase, Migration as SqlxMigration, MigrationSource, MigrationType, Migrator,
},
Column, Pool, Row,
};
use tauri::{
command,
plugin::{Builder as PluginBuilder, TauriPlugin},
AppHandle, Manager, RunEvent, Runtime, State,
};
use tokio::sync::Mutex;
use std::collections::HashMap;
#[cfg(feature = "sqlite")]
use std::{fs::create_dir_all, path::PathBuf};
#[cfg(feature = "sqlite")]
type Db = sqlx::sqlite::Sqlite;
#[cfg(feature = "mysql")]
type Db = sqlx::mysql::MySql;
#[cfg(feature = "postgres")]
type Db = sqlx::postgres::Postgres;
#[cfg(feature = "sqlite")]
type LastInsertId = i64;
#[cfg(not(feature = "sqlite"))]
type LastInsertId = u64;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
Sql(#[from] sqlx::Error),
#[error(transparent)]
Migration(#[from] sqlx::migrate::MigrateError),
#[error("database {0} not loaded")]
DatabaseNotLoaded(String),
#[error("unsupported datatype: {0}")]
UnsupportedDatatype(String),
}
impl Serialize for Error {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: Serializer,
{
serializer.serialize_str(self.to_string().as_ref())
}
}
type Result<T> = std::result::Result<T, Error>;
#[cfg(feature = "sqlite")]
/// Resolves the App's **file path** from the `AppHandle` context
/// object
fn app_path<R: Runtime>(app: &AppHandle<R>) -> PathBuf {
#[allow(deprecated)] // FIXME: Change to non-deprecated function in Tauri v2
app.path_resolver()
.app_dir()
.expect("No App path was found!")
}
#[cfg(feature = "sqlite")]
/// Maps the user supplied DB connection string to a connection string
/// with a fully qualified file path to the App's designed "app_path"
fn path_mapper(mut app_path: PathBuf, connection_string: &str) -> String {
app_path.push(
connection_string
.split_once(':')
.expect("Couldn't parse the connection string for DB!")
.1,
);
format!(
"sqlite:{}",
app_path
.to_str()
.expect("Problem creating fully qualified path to Database file!")
)
}
#[derive(Default)]
struct DbInstances(Mutex<HashMap<String, Pool<Db>>>);
struct Migrations(Mutex<HashMap<String, MigrationList>>);
#[derive(Default, Deserialize)]
pub struct PluginConfig {
#[serde(default)]
preload: Vec<String>,
}
#[derive(Debug)]
pub enum MigrationKind {
Up,
Down,
}
impl From<MigrationKind> for MigrationType {
fn from(kind: MigrationKind) -> Self {
match kind {
MigrationKind::Up => Self::ReversibleUp,
MigrationKind::Down => Self::ReversibleDown,
}
}
}
/// A migration definition.
#[derive(Debug)]
pub struct Migration {
pub version: i64,
pub description: &'static str,
pub sql: &'static str,
pub kind: MigrationKind,
}
#[derive(Debug)]
struct MigrationList(Vec<Migration>);
impl MigrationSource<'static> for MigrationList {
fn resolve(self) -> BoxFuture<'static, std::result::Result<Vec<SqlxMigration>, BoxDynError>> {
Box::pin(async move {
let mut migrations = Vec::new();
for migration in self.0 {
if matches!(migration.kind, MigrationKind::Up) {
migrations.push(SqlxMigration::new(
migration.version,
migration.description.into(),
migration.kind.into(),
migration.sql.into(),
false,
));
}
}
Ok(migrations)
})
}
}
#[command]
async fn load<R: Runtime>(
#[allow(unused_variables)] app: AppHandle<R>,
db_instances: State<'_, DbInstances>,
migrations: State<'_, Migrations>,
db: String,
) -> Result<String> {
#[cfg(feature = "sqlite")]
let fqdb = path_mapper(app_path(&app), &db);
#[cfg(not(feature = "sqlite"))]
let fqdb = db.clone();
#[cfg(feature = "sqlite")]
create_dir_all(app_path(&app)).expect("Problem creating App directory!");
if !Db::database_exists(&fqdb).await.unwrap_or(false) {
Db::create_database(&fqdb).await?;
}
let pool = Pool::connect(&fqdb).await?;
if let Some(migrations) = migrations.0.lock().await.remove(&db) {
let migrator = Migrator::new(migrations).await?;
migrator.run(&pool).await?;
}
db_instances.0.lock().await.insert(db.clone(), pool);
Ok(db)
}
/// Allows the database connection(s) to be closed; if no database
/// name is passed in then _all_ database connection pools will be
/// shut down.
#[command]
async fn close(db_instances: State<'_, DbInstances>, db: Option<String>) -> Result<bool> {
let mut instances = db_instances.0.lock().await;
let pools = if let Some(db) = db {
vec![db]
} else {
instances.keys().cloned().collect()
};
for pool in pools {
let db = instances
.get_mut(&pool) //
.ok_or(Error::DatabaseNotLoaded(pool))?;
db.close().await;
}
Ok(true)
}
/// Execute a command against the database
#[command]
async fn execute(
db_instances: State<'_, DbInstances>,
db: String,
query: String,
values: Vec<JsonValue>,
) -> Result<(u64, LastInsertId)> {
let mut instances = db_instances.0.lock().await;
let db = instances.get_mut(&db).ok_or(Error::DatabaseNotLoaded(db))?;
let mut query = sqlx::query(&query);
for value in values {
if value.is_null() {
query = query.bind(None::<JsonValue>);
} else if value.is_string() {
query = query.bind(value.as_str().unwrap().to_owned())
} else {
query = query.bind(value);
}
}
let result = query.execute(&*db).await?;
#[cfg(feature = "sqlite")]
let r = Ok((result.rows_affected(), result.last_insert_rowid()));
#[cfg(feature = "mysql")]
let r = Ok((result.rows_affected(), result.last_insert_id()));
#[cfg(feature = "postgres")]
let r = Ok((result.rows_affected(), 0));
r
}
#[command]
async fn select(
db_instances: State<'_, DbInstances>,
db: String,
query: String,
values: Vec<JsonValue>,
) -> Result<Vec<HashMap<String, JsonValue>>> {
let mut instances = db_instances.0.lock().await;
let db = instances.get_mut(&db).ok_or(Error::DatabaseNotLoaded(db))?;
let mut query = sqlx::query(&query);
for value in values {
if value.is_null() {
query = query.bind(None::<JsonValue>);
} else if value.is_string() {
query = query.bind(value.as_str().unwrap().to_owned())
} else {
query = query.bind(value);
}
}
let rows = query.fetch_all(&*db).await?;
let mut values = Vec::new();
for row in rows {
let mut value = HashMap::default();
for (i, column) in row.columns().iter().enumerate() {
let v = row.try_get_raw(i)?;
let v = crate::decode::to_json(v)?;
value.insert(column.name().to_string(), v);
}
values.push(value);
}
Ok(values)
}
/// Tauri SQL plugin builder.
#[derive(Default)]
pub struct Builder {
migrations: Option<HashMap<String, MigrationList>>,
}
impl Builder {
/// Add migrations to a database.
#[must_use]
pub fn add_migrations(mut self, db_url: &str, migrations: Vec<Migration>) -> Self {
self.migrations
.get_or_insert(Default::default())
.insert(db_url.to_string(), MigrationList(migrations));
self
}
pub fn build<R: Runtime>(mut self) -> TauriPlugin<R, Option<PluginConfig>> {
PluginBuilder::new("sql")
.invoke_handler(tauri::generate_handler![load, execute, select, close])
.setup_with_config(|app, config: Option<PluginConfig>| {
let config = config.unwrap_or_default();
#[cfg(feature = "sqlite")]
create_dir_all(app_path(app)).expect("problems creating App directory!");
tauri::async_runtime::block_on(async move {
let instances = DbInstances::default();
let mut lock = instances.0.lock().await;
for db in config.preload {
#[cfg(feature = "sqlite")]
let fqdb = path_mapper(app_path(app), &db);
#[cfg(not(feature = "sqlite"))]
let fqdb = db.clone();
if !Db::database_exists(&fqdb).await.unwrap_or(false) {
Db::create_database(&fqdb).await?;
}
let pool = Pool::connect(&fqdb).await?;
if let Some(migrations) = self.migrations.as_mut().unwrap().remove(&db) {
let migrator = Migrator::new(migrations).await?;
migrator.run(&pool).await?;
}
lock.insert(db, pool);
}
drop(lock);
app.manage(instances);
app.manage(Migrations(Mutex::new(
self.migrations.take().unwrap_or_default(),
)));
Ok(())
})
})
.on_event(|app, event| {
if let RunEvent::Exit = event {
tauri::async_runtime::block_on(async move {
let instances = &*app.state::<DbInstances>();
let instances = instances.0.lock().await;
for value in instances.values() {
value.close().await;
}
});
}
})
.build()
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ Simple, persistent key-value store.
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
@@ -8,8 +8,8 @@
"tauri": "tauri"
},
"devDependencies": {
"@tauri-apps/cli": "1.5.11",
"vite": "^5.0.12",
"typescript": "^5.3.3"
"@tauri-apps/cli": "1.6.3",
"typescript": "^5.8.2",
"vite": "^7.0.0"
}
}
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+2 -2
View File
@@ -81,7 +81,7 @@ impl<R: Runtime> StoreBuilder<R> {
/// # Ok(())
/// # }
pub fn defaults(mut self, defaults: HashMap<String, JsonValue>) -> Self {
self.cache = defaults.clone();
self.cache.clone_from(&defaults);
self.defaults = Some(defaults);
self
}
@@ -279,7 +279,7 @@ impl<R: Runtime> Store<R> {
);
}
}
self.cache = defaults.clone();
self.cache.clone_from(defaults);
}
Ok(())
} else {
+1 -1
View File
@@ -4,7 +4,7 @@ Store secrets and keys using the [IOTA Stronghold](https://github.com/iotaledger
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+1 -1
View File
@@ -113,7 +113,7 @@ impl<'de> Deserialize<'de> for KeyType {
{
struct KeyTypeVisitor;
impl<'de> Visitor<'de> for KeyTypeVisitor {
impl Visitor<'_> for KeyTypeVisitor {
type Value = KeyType;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+1 -1
View File
@@ -5,7 +5,7 @@ Download files from a remote HTTP server to disk.
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+1 -1
View File
@@ -18,7 +18,7 @@ async function listenToEventIfNeeded(event: string): Promise<void> {
// We're not awaiting this Promise to prevent issues with Promise.all
// the listener will still be registered in time.
appWindow.listen<ProgressPayload>(event, ({ payload }) => {
void appWindow.listen<ProgressPayload>(event, ({ payload }) => {
const handler = handlers.get(payload.id);
if (handler != null) {
handler(payload.progress, payload.total);
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+7 -1
View File
@@ -19,4 +19,10 @@ http = "1"
rand = "0.8"
futures-util = "0.3"
tokio = { version = "1", features = ["net", "sync"] }
tokio-tungstenite = { version = "0.21", features = ["native-tls"] }
tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
hyper = { version = "1", features = ["client"] }
hyper-util = { version = "0.1", features = ["tokio", "http1"] }
base64 = "0.22"
[features]
rustls-tls-native-roots = ["tokio-tungstenite/rustls-tls-native-roots"]
+1 -1
View File
@@ -4,7 +4,7 @@
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
@@ -9,9 +9,9 @@
"preview": "vite preview"
},
"devDependencies": {
"@tauri-apps/cli": "1.5.11",
"typescript": "^5.3.3",
"vite": "^5.0.12"
"@tauri-apps/cli": "1.6.3",
"typescript": "^5.8.2",
"vite": "^7.0.0"
},
"dependencies": {
"tauri-plugin-websocket-api": "link:..\\.."
@@ -11,7 +11,7 @@ tauri = { workspace = true }
tokio = { version = "1", features = ["net"] }
futures-util = "0.3"
tauri-plugin-websocket = { path = "../../../" }
tokio-tungstenite = "0.21"
tokio-tungstenite = "0.28"
[build-dependencies]
tauri-build = { workspace = true }
@@ -1,3 +1,4 @@
/* eslint-disable */
import WebSocket from "tauri-plugin-websocket-api";
import "./style.css";
@@ -10,8 +10,9 @@ body {
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
Cantarell, "Helvetica Neue", sans-serif;
}
a {
+28 -2
View File
@@ -1,11 +1,37 @@
import { invoke, transformCallback } from "@tauri-apps/api/tauri";
export interface ConnectionConfig {
/**
* Read buffer capacity. The default value is 128 KiB.
*/
readBufferSize?: number;
/** The target minimum size of the write buffer to reach before writing the data to the underlying stream. The default value is 128 KiB.
*
* If set to 0 each message will be eagerly written to the underlying stream. It is often more optimal to allow them to buffer a little, hence the default value.
*/
writeBufferSize?: number;
/** The max size of the write buffer in bytes. Setting this can provide backpressure in the case the write buffer is filling up due to write errors. The default value is unlimited.
*
* Note: The write buffer only builds up past write_buffer_size when writes to the underlying stream are failing. So the write buffer can not fill up if you are not observing write errors.
*
* Note: Should always be at least write_buffer_size + 1 message and probably a little more depending on error handling strategy.
*/
maxWriteBufferSize?: number;
maxMessageSize?: number;
maxFrameSize?: number;
/**
* The maximum size of an incoming message. The string "none" means no size limit. The default value is 64 MiB which should be reasonably big for all normal use-cases but small enough to prevent memory eating by a malicious user.
*/
maxMessageSize?: number | "none";
/**
* The maximum size of a single incoming message frame. The string "none" means no size limit. The limit is for frame payload NOT including the frame header. The default value is 16 MiB which should be reasonably big for all normal use-cases but small enough to prevent memory eating by a malicious user.
*/
maxFrameSize?: number | "none";
/**
* When set to true, the server will accept and handle unmasked frames from the client. According to the RFC 6455, the server must close the connection to the client in such cases, however it seems like there are some popular libraries that are sending unmasked frames, ignoring the RFC. By default this option is set to false, i.e. according to RFC 6455.
*/
acceptUnmaskedFrames?: boolean;
/**
* Additional connect request headers.
*/
headers?: HeadersInit;
}
+2 -2
View File
@@ -24,9 +24,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+208 -37
View File
@@ -1,16 +1,23 @@
use base64::prelude::{Engine, BASE64_STANDARD};
use futures_util::{stream::SplitSink, SinkExt, StreamExt};
use http::header::{HeaderName, HeaderValue};
use http::{
header::{HeaderName, HeaderValue},
Request,
};
use hyper::client::conn;
use hyper_util::rt::TokioIo;
use serde::{ser::Serializer, Deserialize, Serialize};
use tauri::{
api::ipc::{format_callback, CallbackFn},
plugin::{Builder as PluginBuilder, TauriPlugin},
Manager, Runtime, State, Window,
AppHandle, Manager, Runtime, State, Window,
};
use tokio::{net::TcpStream, sync::Mutex};
use tokio_tungstenite::{
connect_async_tls_with_config,
client_async_tls_with_config, connect_async_tls_with_config,
tungstenite::{
client::IntoClientRequest,
error::UrlError,
protocol::{CloseFrame as ProtocolCloseFrame, WebSocketConfig},
Message,
},
@@ -19,10 +26,12 @@ use tokio_tungstenite::{
use std::collections::HashMap;
use std::str::FromStr;
use std::sync::Mutex as StdMutex;
type Id = u32;
type WebSocket = WebSocketStream<MaybeTlsStream<TcpStream>>;
type WebSocketWriter = SplitSink<WebSocket, Message>;
type WebSocketWriter =
SplitSink<WebSocketStream<tokio_tungstenite::MaybeTlsStream<TcpStream>>, Message>;
type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
@@ -35,6 +44,16 @@ enum Error {
InvalidHeaderValue(#[from] tokio_tungstenite::tungstenite::http::header::InvalidHeaderValue),
#[error(transparent)]
InvalidHeaderName(#[from] tokio_tungstenite::tungstenite::http::header::InvalidHeaderName),
#[error(transparent)]
ProxyConnection(#[from] hyper::Error),
#[error("proxy returned status code: {0}")]
ProxyStatus(u16),
#[error(transparent)]
ProxyIo(#[from] std::io::Error),
#[error(transparent)]
ProxyHttp(#[from] http::Error),
#[error(transparent)]
ProxyJoinHandle(#[from] tokio::task::JoinError),
}
impl Serialize for Error {
@@ -49,15 +68,43 @@ impl Serialize for Error {
#[derive(Default)]
struct ConnectionManager(Mutex<HashMap<Id, WebSocketWriter>>);
struct TlsConnector(Mutex<Option<Connector>>);
struct TlsConnector(StdMutex<Option<Connector>>);
struct ProxyConfigurationInternal(StdMutex<Option<ProxyConfiguration>>);
#[derive(Clone)]
pub struct ProxyAuth {
pub username: String,
pub password: String,
}
impl ProxyAuth {
pub fn encode(&self) -> String {
BASE64_STANDARD.encode(format!("{}:{}", self.username, self.password))
}
}
#[derive(Clone)]
pub struct ProxyConfiguration {
pub proxy_url: String,
pub proxy_port: u16,
pub auth: Option<ProxyAuth>,
}
#[derive(Deserialize)]
#[serde(untagged, rename_all = "camelCase")]
enum Max {
None,
Number(usize),
}
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ConnectionConfig {
pub(crate) struct ConnectionConfig {
pub read_buffer_size: Option<usize>,
pub write_buffer_size: Option<usize>,
pub max_write_buffer_size: Option<usize>,
pub max_message_size: Option<usize>,
pub max_frame_size: Option<usize>,
pub max_message_size: Option<Max>,
pub max_frame_size: Option<Max>,
#[serde(default)]
pub accept_unmasked_frames: bool,
pub headers: Option<Vec<(String, String)>>,
@@ -65,18 +112,38 @@ pub struct ConnectionConfig {
impl From<ConnectionConfig> for WebSocketConfig {
fn from(config: ConnectionConfig) -> Self {
// Disabling the warning on max_send_queue which we don't use anymore since it was deprecated.
#[allow(deprecated)]
Self {
max_send_queue: None,
write_buffer_size: config.write_buffer_size.unwrap_or(128 * 1024),
max_write_buffer_size: config.max_write_buffer_size.unwrap_or(usize::MAX),
// This may be harmful since if it's not provided from js we're overwriting the default value with None, meaning no size limit.
max_message_size: config.max_message_size,
// This may be harmful since if it's not provided from js we're overwriting the default value with None, meaning no size limit.
max_frame_size: config.max_frame_size,
accept_unmasked_frames: config.accept_unmasked_frames,
let mut builder =
WebSocketConfig::default().accept_unmasked_frames(config.accept_unmasked_frames);
if let Some(read_buffer_size) = config.read_buffer_size {
builder = builder.read_buffer_size(read_buffer_size)
}
if let Some(write_buffer_size) = config.write_buffer_size {
builder = builder.write_buffer_size(write_buffer_size)
}
if let Some(max_write_buffer_size) = config.max_write_buffer_size {
builder = builder.max_write_buffer_size(max_write_buffer_size)
}
if let Some(max_message_size) = config.max_message_size {
let max_size = match max_message_size {
Max::None => Option::None,
Max::Number(n) => Some(n),
};
builder = builder.max_message_size(max_size);
}
if let Some(max_frame_size) = config.max_frame_size {
let max_size = match max_frame_size {
Max::None => Option::None,
Max::Number(n) => Some(n),
};
builder = builder.max_frame_size(max_size);
}
builder
}
}
@@ -105,10 +172,6 @@ async fn connect<R: Runtime>(
) -> Result<Id> {
let id = rand::random();
let mut request = url.into_client_request()?;
let tls_connector = match window.try_state::<TlsConnector>() {
Some(tls_connector) => tls_connector.0.lock().await.clone(),
None => None,
};
if let Some(headers) = config.as_ref().and_then(|c| c.headers.as_ref()) {
for (k, v) in headers {
@@ -118,9 +181,21 @@ async fn connect<R: Runtime>(
}
}
let (ws_stream, _) =
let tls_connector = window
.try_state::<TlsConnector>()
.and_then(|c| c.0.lock().unwrap().clone());
let proxy_config = window
.try_state::<ProxyConfigurationInternal>()
.and_then(|c| c.0.lock().unwrap().clone());
let ws_stream = if let Some(proxy_config) = proxy_config {
connect_using_proxy(request, config, proxy_config, tls_connector).await?
} else {
connect_async_tls_with_config(request, config.map(Into::into), false, tls_connector)
.await?;
.await?
.0
};
tauri::async_runtime::spawn(async move {
let (write, read) = ws_stream.split();
@@ -136,25 +211,25 @@ async fn connect<R: Runtime>(
let response = match message {
Ok(Message::Text(t)) => {
serde_json::to_value(WebSocketMessage::Text(t)).unwrap()
serde_json::to_value(WebSocketMessage::Text(t.to_string())).unwrap()
}
Ok(Message::Binary(t)) => {
serde_json::to_value(WebSocketMessage::Binary(t)).unwrap()
serde_json::to_value(WebSocketMessage::Binary(t.to_vec())).unwrap()
}
Ok(Message::Ping(t)) => {
serde_json::to_value(WebSocketMessage::Ping(t)).unwrap()
serde_json::to_value(WebSocketMessage::Ping(t.to_vec())).unwrap()
}
Ok(Message::Pong(t)) => {
serde_json::to_value(WebSocketMessage::Pong(t)).unwrap()
serde_json::to_value(WebSocketMessage::Pong(t.to_vec())).unwrap()
}
Ok(Message::Close(t)) => {
serde_json::to_value(WebSocketMessage::Close(t.map(|v| CloseFrame {
code: v.code.into(),
reason: v.reason.into_owned(),
reason: v.reason.to_string(),
})))
.unwrap()
}
Ok(Message::Frame(_)) => serde_json::Value::Null, // This value can't be recieved.
Ok(Message::Frame(_)) => serde_json::Value::Null, // This value can't be received.
Err(e) => serde_json::to_value(Error::from(e)).unwrap(),
};
let js = format_callback(callback_function, &response)
@@ -168,6 +243,62 @@ async fn connect<R: Runtime>(
Ok(id)
}
async fn connect_using_proxy(
request: Request<()>,
config: Option<ConnectionConfig>,
proxy_config: ProxyConfiguration,
tls_connector: Option<Connector>,
) -> Result<WebSocket> {
let domain = domain(&request)?;
let port = request
.uri()
.port_u16()
.or_else(|| match request.uri().scheme_str() {
Some("wss") => Some(443),
Some("ws") => Some(80),
_ => None,
})
.ok_or(Error::Websocket(
tokio_tungstenite::tungstenite::Error::Url(UrlError::UnsupportedUrlScheme),
))?;
let tcp = TcpStream::connect(format!(
"{}:{}",
proxy_config.proxy_url, proxy_config.proxy_port
))
.await?;
let io = TokioIo::new(tcp);
let (mut request_sender, proxy_connection) =
conn::http1::handshake::<TokioIo<tokio::net::TcpStream>, String>(io).await?;
let proxy_connection_task = tokio::spawn(proxy_connection.without_shutdown());
let addr = format!("{domain}:{port}");
let mut req_builder = Request::connect(addr);
if let Some(auth) = proxy_config.auth {
req_builder = req_builder.header("Proxy-Authorization", format!("Basic {}", auth.encode()));
}
// TODO: This looks super fishy
let req = req_builder.body("".to_string())?;
let res = request_sender.send_request(req).await?;
if !res.status().is_success() {
return Err(Error::ProxyStatus(res.status().as_u16()));
}
let proxied_tcp_socket = proxy_connection_task.await??.io.into_inner();
let (ws_stream, _) = client_async_tls_with_config(
request,
proxied_tcp_socket,
config.map(Into::into),
tls_connector,
)
.await?;
Ok(ws_stream)
}
#[tauri::command]
async fn send(
manager: State<'_, ConnectionManager>,
@@ -177,13 +308,13 @@ async fn send(
if let Some(write) = manager.0.lock().await.get_mut(&id) {
write
.send(match message {
WebSocketMessage::Text(t) => Message::Text(t),
WebSocketMessage::Binary(t) => Message::Binary(t),
WebSocketMessage::Ping(t) => Message::Ping(t),
WebSocketMessage::Pong(t) => Message::Pong(t),
WebSocketMessage::Text(t) => Message::Text(t.into()),
WebSocketMessage::Binary(t) => Message::Binary(t.into()),
WebSocketMessage::Ping(t) => Message::Ping(t.into()),
WebSocketMessage::Pong(t) => Message::Pong(t.into()),
WebSocketMessage::Close(t) => Message::Close(t.map(|v| ProtocolCloseFrame {
code: v.code.into(),
reason: std::borrow::Cow::Owned(v.reason),
reason: v.reason.into(),
})),
})
.await?;
@@ -200,12 +331,14 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
#[derive(Default)]
pub struct Builder {
tls_connector: Option<Connector>,
proxy_configuration: Option<ProxyConfiguration>,
}
impl Builder {
pub fn new() -> Self {
Self {
tls_connector: None,
proxy_configuration: None,
}
}
@@ -214,14 +347,52 @@ impl Builder {
self
}
pub fn proxy_configuration(mut self, proxy_configuration: ProxyConfiguration) -> Self {
self.proxy_configuration.replace(proxy_configuration);
self
}
pub fn build<R: Runtime>(self) -> TauriPlugin<R> {
PluginBuilder::new("websocket")
.invoke_handler(tauri::generate_handler![connect, send])
.setup(|app| {
app.manage(ConnectionManager::default());
app.manage(TlsConnector(Mutex::new(self.tls_connector)));
app.manage(TlsConnector(StdMutex::new(self.tls_connector)));
app.manage(ProxyConfigurationInternal(StdMutex::new(
self.proxy_configuration,
)));
Ok(())
})
.build()
}
}
pub async fn reconfigure_proxy(app: &AppHandle, proxy_config: Option<ProxyConfiguration>) {
if let Some(state) = app.try_state::<ProxyConfigurationInternal>() {
*state.0.lock().unwrap() = proxy_config;
}
}
pub async fn reconfigure_tls_connector(app: &AppHandle, tls_connector: Option<Connector>) {
if let Some(state) = app.try_state::<TlsConnector>() {
*state.0.lock().unwrap() = tls_connector;
}
}
// Copied from tokio-tungstenite internal function (tokio-tungstenite/src/lib.rs) with the same name
// Get a domain from an URL.
#[allow(clippy::result_large_err)]
#[inline]
fn domain(
request: &tokio_tungstenite::tungstenite::handshake::client::Request,
) -> tokio_tungstenite::tungstenite::Result<String, tokio_tungstenite::tungstenite::Error> {
match request.uri().host() {
// rustls expects IPv6 addresses without the surrounding [] brackets
Some(d) if d.starts_with('[') && d.ends_with(']') => Ok(d[1..d.len() - 1].to_string()),
Some(d) => Ok(d.to_string()),
None => Err(tokio_tungstenite::tungstenite::Error::Url(
tokio_tungstenite::tungstenite::error::UrlError::NoHostName,
)),
}
}
+1 -1
View File
@@ -4,7 +4,7 @@ Save window positions and sizes and restore them when the app is reopened.
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -25,9 +25,9 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
"tslib": "2.8.1"
},
"dependencies": {
"@tauri-apps/api": "1.5.3"
"@tauri-apps/api": "1.6.0"
}
}
+1454 -2241
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -1,3 +1,5 @@
packages:
- plugins/*
- plugins/*/examples/*
onlyBuiltDependencies:
- esbuild
-23
View File
@@ -1,23 +0,0 @@
{
"extends": ["config:base"],
"enabledManagers": ["cargo", "npm"],
"semanticCommitType": "chore",
"ignorePaths": [
"**/node_modules/**",
"**/bower_components/**",
"**/vendor/**",
"**/__tests__/**",
"**/test/**",
"**/tests/**",
"**/__fixtures__/**"
],
"packageRules": [
{
"description": "Disable node/pnpm version updates",
"matchPackageNames": ["node", "pnpm"],
"matchDepTypes": ["engines", "packageManager"],
"enabled": false
}
],
"postUpdateOptions": ["pnpmDedupe"]
}
+1 -1
View File
@@ -4,7 +4,7 @@
## Install
_This plugin requires a Rust version of at least **1.64**_
_This plugin requires a Rust version of at least **1.67**_
There are three general methods of installation that we can recommend.