mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-28 20:05:50 +03:00
Merge branch 'main' into kitty-keyboard-support
This commit is contained in:
commit
b4523809a1
@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
|
||||
## [Unreleased]
|
||||
* feat(layouts): allow consuming a layout through a url (https://github.com/zellij-org/zellij/pull/3351)
|
||||
* dependencies: eliminate future incompatibility warnings (https://github.com/zellij-org/zellij/pull/3315)
|
||||
* fix(plugins): occasional out of order events on startup (https://github.com/zellij-org/zellij/pull/3367)
|
||||
|
||||
## [0.40.1] - 2024-05-02
|
||||
* fix(sessions): issue where sessions would occasionally become unresponsive (https://github.com/zellij-org/zellij/pull/3281)
|
||||
|
487
Cargo.lock
generated
487
Cargo.lock
generated
@ -165,7 +165,7 @@ checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965"
|
||||
dependencies = [
|
||||
"async-task",
|
||||
"concurrent-queue 1.2.2",
|
||||
"fastrand",
|
||||
"fastrand 1.7.0",
|
||||
"futures-lite",
|
||||
"once_cell",
|
||||
"slab",
|
||||
@ -200,7 +200,7 @@ dependencies = [
|
||||
"log",
|
||||
"parking",
|
||||
"polling",
|
||||
"rustix",
|
||||
"rustix 0.37.7",
|
||||
"slab",
|
||||
"socket2",
|
||||
"waker-fn",
|
||||
@ -228,7 +228,7 @@ dependencies = [
|
||||
"futures-lite",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"signal-hook 0.3.14",
|
||||
"signal-hook",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
@ -278,6 +278,12 @@ dependencies = [
|
||||
"syn 1.0.96",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atomic"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba"
|
||||
|
||||
[[package]]
|
||||
name = "atomic-waker"
|
||||
version = "1.0.0"
|
||||
@ -343,6 +349,21 @@ version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
|
||||
dependencies = [
|
||||
"bit-vec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-vec"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
@ -376,6 +397,15 @@ dependencies = [
|
||||
"generic-array 0.14.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||
dependencies = [
|
||||
"generic-array 0.14.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-padding"
|
||||
version = "0.1.5"
|
||||
@ -394,17 +424,11 @@ dependencies = [
|
||||
"async-channel",
|
||||
"async-task",
|
||||
"atomic-waker",
|
||||
"fastrand",
|
||||
"fastrand 1.7.0",
|
||||
"futures-lite",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "boxfnonce"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5988cb1d626264ac94100be357308f29ff7cbdd3b36bda27f450a4ee3f713426"
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
version = "1.5.0"
|
||||
@ -499,6 +523,12 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "cfg_aliases"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.19"
|
||||
@ -664,7 +694,7 @@ dependencies = [
|
||||
"hmac",
|
||||
"percent-encoding",
|
||||
"rand 0.8.5",
|
||||
"sha2",
|
||||
"sha2 0.9.9",
|
||||
"time 0.2.27",
|
||||
"version_check",
|
||||
]
|
||||
@ -814,7 +844,7 @@ dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"crossbeam-utils",
|
||||
"lazy_static",
|
||||
"memoffset",
|
||||
"memoffset 0.6.5",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
@ -837,6 +867,16 @@ dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
|
||||
dependencies = [
|
||||
"generic-array 0.14.5",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-mac"
|
||||
version = "0.10.1"
|
||||
@ -854,7 +894,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb2a7d3066da2de787b7f032c736763eb7ae5d355f81a68bab2675a96008b0bf"
|
||||
dependencies = [
|
||||
"lab",
|
||||
"phf 0.11.1",
|
||||
"phf",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -909,11 +949,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "daemonize"
|
||||
version = "0.4.1"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70c24513e34f53b640819f0ac9f705b673fcf4006d7aab8778bee72ebfc89815"
|
||||
checksum = "ab8bfdaacb3c887a54d41bdf48d3af8873b3f5566469f8ba21b92057509f116e"
|
||||
dependencies = [
|
||||
"boxfnonce",
|
||||
"libc",
|
||||
]
|
||||
|
||||
@ -1004,6 +1043,16 @@ dependencies = [
|
||||
"generic-array 0.14.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer 0.10.4",
|
||||
"crypto-common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "directories"
|
||||
version = "5.0.1"
|
||||
@ -1013,16 +1062,6 @@ dependencies = [
|
||||
"dirs-sys 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
|
||||
dependencies = [
|
||||
"cfg-if 0.1.10",
|
||||
"dirs-sys 0.3.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "4.0.0"
|
||||
@ -1157,23 +1196,21 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.1"
|
||||
version = "0.3.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
|
||||
checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
|
||||
dependencies = [
|
||||
"errno-dragonfly",
|
||||
"libc",
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "errno-dragonfly"
|
||||
version = "0.1.2"
|
||||
name = "euclid"
|
||||
version = "0.22.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
|
||||
checksum = "87f253bc5c813ca05792837a0ff4b3a580336b224512d48f7eda1d7dd9210787"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1204,6 +1241,16 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
|
||||
|
||||
[[package]]
|
||||
name = "fancy-regex"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2"
|
||||
dependencies = [
|
||||
"bit-set",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "1.7.0"
|
||||
@ -1213,6 +1260,12 @@ dependencies = [
|
||||
"instant",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
|
||||
|
||||
[[package]]
|
||||
name = "file-id"
|
||||
version = "0.1.0"
|
||||
@ -1356,7 +1409,7 @@ version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"fastrand 1.7.0",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"memchr",
|
||||
@ -1843,7 +1896,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
|
||||
dependencies = [
|
||||
"hermit-abi 0.3.1",
|
||||
"io-lifetimes",
|
||||
"rustix",
|
||||
"rustix 0.37.7",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
@ -1907,7 +1960,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8388a371e0e2ede18bbd94e476fcd45b4ac65cefcedf0c06fd13bd8389574a6"
|
||||
dependencies = [
|
||||
"miette",
|
||||
"nom 7.1.1",
|
||||
"nom",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
@ -1966,9 +2019,9 @@ checksum = "72d9d1bd215936bc8647ad92986bb56f3f216550b53c44ab785e3217ae33625e"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.149"
|
||||
version = "0.2.153"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
|
||||
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
|
||||
|
||||
[[package]]
|
||||
name = "libnghttp2-sys"
|
||||
@ -2018,6 +2071,12 @@ version = "0.3.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.4.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.11"
|
||||
@ -2071,6 +2130,16 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mac_address"
|
||||
version = "1.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aa12182b93606fff55b70a5cfe6130eaf7407c2ea4f2c2bcc8b113b67c9928f"
|
||||
dependencies = [
|
||||
"nix 0.28.0",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mach"
|
||||
version = "0.3.2"
|
||||
@ -2122,6 +2191,24 @@ dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miette"
|
||||
version = "5.8.0"
|
||||
@ -2250,29 +2337,33 @@ dependencies = [
|
||||
"cc",
|
||||
"cfg-if 1.0.0",
|
||||
"libc",
|
||||
"memoffset",
|
||||
"memoffset 0.6.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.24.2"
|
||||
version = "0.26.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc"
|
||||
checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"cfg-if 1.0.0",
|
||||
"libc",
|
||||
"memoffset",
|
||||
"memoffset 0.7.1",
|
||||
"pin-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "5.1.2"
|
||||
name = "nix"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af"
|
||||
checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"version_check",
|
||||
"bitflags 2.5.0",
|
||||
"cfg-if 1.0.0",
|
||||
"cfg_aliases",
|
||||
"libc",
|
||||
"memoffset 0.9.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2444,6 +2535,15 @@ dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ordered-float"
|
||||
version = "4.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "os_str_bytes"
|
||||
version = "6.1.0"
|
||||
@ -2575,24 +2675,6 @@ dependencies = [
|
||||
"indexmap",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12"
|
||||
dependencies = [
|
||||
"phf_shared 0.8.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
|
||||
dependencies = [
|
||||
"phf_shared 0.10.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.11.1"
|
||||
@ -2600,27 +2682,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c"
|
||||
dependencies = [
|
||||
"phf_macros",
|
||||
"phf_shared 0.11.1",
|
||||
"phf_shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_codegen"
|
||||
version = "0.8.0"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815"
|
||||
checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a"
|
||||
dependencies = [
|
||||
"phf_generator 0.8.0",
|
||||
"phf_shared 0.8.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_generator"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526"
|
||||
dependencies = [
|
||||
"phf_shared 0.8.0",
|
||||
"rand 0.7.3",
|
||||
"phf_generator",
|
||||
"phf_shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2629,7 +2701,7 @@ version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf"
|
||||
dependencies = [
|
||||
"phf_shared 0.11.1",
|
||||
"phf_shared",
|
||||
"rand 0.8.5",
|
||||
]
|
||||
|
||||
@ -2639,31 +2711,13 @@ version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66"
|
||||
dependencies = [
|
||||
"phf_generator 0.11.1",
|
||||
"phf_shared 0.11.1",
|
||||
"phf_generator",
|
||||
"phf_shared",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.96",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7"
|
||||
dependencies = [
|
||||
"siphasher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
|
||||
dependencies = [
|
||||
"siphasher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.11.1"
|
||||
@ -2905,7 +2959,6 @@ dependencies = [
|
||||
"rand_chacha 0.2.2",
|
||||
"rand_core 0.5.1",
|
||||
"rand_hc",
|
||||
"rand_pcg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2966,15 +3019,6 @@ dependencies = [
|
||||
"rand_core 0.5.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_pcg"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
|
||||
dependencies = [
|
||||
"rand_core 0.5.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.5.3"
|
||||
@ -3069,15 +3113,6 @@ dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "remove_dir_all"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rend"
|
||||
version = "0.3.6"
|
||||
@ -3169,10 +3204,23 @@ dependencies = [
|
||||
"errno",
|
||||
"io-lifetimes",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"linux-raw-sys 0.3.7",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
|
||||
dependencies = [
|
||||
"bitflags 2.5.0",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys 0.4.13",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.10"
|
||||
@ -3388,6 +3436,17 @@ dependencies = [
|
||||
"opaque-debug 0.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sha2"
|
||||
version = "0.10.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"cpufeatures",
|
||||
"digest 0.10.7",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shell-words"
|
||||
version = "1.1.0"
|
||||
@ -3400,17 +3459,7 @@ version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd1c7ddea665294d484c39fd0c0d2b7e35bbfe10035c5fe1854741a57f6880e1"
|
||||
dependencies = [
|
||||
"dirs 4.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook"
|
||||
version = "0.1.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"signal-hook-registry",
|
||||
"dirs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3788,16 +3837,14 @@ checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d"
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.3.0"
|
||||
version = "3.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
|
||||
checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"fastrand",
|
||||
"libc",
|
||||
"redox_syscall 0.2.13",
|
||||
"remove_dir_all",
|
||||
"winapi",
|
||||
"fastrand 2.1.0",
|
||||
"rustix 0.38.34",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3821,14 +3868,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "terminfo"
|
||||
version = "0.7.3"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76971977e6121664ec1b960d1313aacfa75642adc93b9d4d53b247bd4cb1747e"
|
||||
checksum = "666cd3a6681775d22b200409aad3b089c5b99fb11ecdd8a204d9d62f8148498f"
|
||||
dependencies = [
|
||||
"dirs 2.0.2",
|
||||
"dirs",
|
||||
"fnv",
|
||||
"nom 5.1.2",
|
||||
"phf 0.8.0",
|
||||
"nom",
|
||||
"phf",
|
||||
"phf_codegen",
|
||||
]
|
||||
|
||||
@ -3843,13 +3890,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "termwiz"
|
||||
version = "0.20.0"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9509a978a10fcbace4991deae486ae10885e0f4c2c465123e08c9714a90648fa"
|
||||
checksum = "5a75313e21da5d4406ea31402035b3b97aa74c04356bdfafa5d1043ab4e551d1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.0",
|
||||
"bitflags 1.3.2",
|
||||
"bitflags 2.5.0",
|
||||
"fancy-regex",
|
||||
"filedescriptor",
|
||||
"finl_unicode",
|
||||
"fixedbitset",
|
||||
@ -3858,18 +3906,18 @@ dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
"memmem",
|
||||
"nix 0.24.2",
|
||||
"nix 0.26.4",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"ordered-float 3.3.0",
|
||||
"ordered-float 4.2.0",
|
||||
"pest",
|
||||
"pest_derive",
|
||||
"phf 0.10.1",
|
||||
"regex",
|
||||
"phf",
|
||||
"semver 0.11.0",
|
||||
"sha2",
|
||||
"signal-hook 0.1.17",
|
||||
"sha2 0.10.8",
|
||||
"signal-hook",
|
||||
"siphasher",
|
||||
"tempfile",
|
||||
"terminfo",
|
||||
"termios",
|
||||
"thiserror",
|
||||
@ -3877,8 +3925,10 @@ dependencies = [
|
||||
"unicode-segmentation",
|
||||
"vtparse",
|
||||
"wezterm-bidi",
|
||||
"wezterm-blob-leases",
|
||||
"wezterm-color-types",
|
||||
"wezterm-dynamic",
|
||||
"wezterm-dynamic 0.2.0",
|
||||
"wezterm-input-types",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
@ -4202,6 +4252,7 @@ version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a"
|
||||
dependencies = [
|
||||
"atomic",
|
||||
"getrandom 0.2.10",
|
||||
"serde",
|
||||
]
|
||||
@ -4552,7 +4603,7 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"mach",
|
||||
"memoffset",
|
||||
"memoffset 0.6.5",
|
||||
"more-asserts",
|
||||
"region",
|
||||
"scopeguard",
|
||||
@ -4745,19 +4796,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1560382cf39b0fa92473eae4d5b3772f88c63202cbf5a72c35db72ba99e66c36"
|
||||
dependencies = [
|
||||
"log",
|
||||
"wezterm-dynamic",
|
||||
"wezterm-dynamic 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wezterm-blob-leases"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e5a5e0adf7eed68976410def849a4bdab6f6e9f6163f152de9cb89deea9e60b"
|
||||
dependencies = [
|
||||
"getrandom 0.2.10",
|
||||
"mac_address",
|
||||
"once_cell",
|
||||
"sha2 0.10.8",
|
||||
"thiserror",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wezterm-color-types"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c6e7a483dd2785ba72705c51e8b1be18300302db2a78368dac9bc8773857777"
|
||||
checksum = "7de81ef35c9010270d63772bebef2f2d6d1f2d20a983d27505ac850b8c4b4296"
|
||||
dependencies = [
|
||||
"csscolorparser",
|
||||
"deltae",
|
||||
"lazy_static",
|
||||
"wezterm-dynamic",
|
||||
"wezterm-dynamic 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4773,6 +4838,19 @@ dependencies = [
|
||||
"wezterm-dynamic-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wezterm-dynamic"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dfb128bacfa86734e07681fb6068e34c144698e84ee022d6e009145d1abb77b5"
|
||||
dependencies = [
|
||||
"log",
|
||||
"ordered-float 4.2.0",
|
||||
"strsim",
|
||||
"thiserror",
|
||||
"wezterm-dynamic-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wezterm-dynamic-derive"
|
||||
version = "0.1.0"
|
||||
@ -4784,6 +4862,18 @@ dependencies = [
|
||||
"syn 1.0.96",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wezterm-input-types"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7012add459f951456ec9d6c7e6fc340b1ce15d6fc9629f8c42853412c029e57e"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"euclid",
|
||||
"lazy_static",
|
||||
"wezterm-dynamic 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "which"
|
||||
version = "4.2.5"
|
||||
@ -4857,6 +4947,15 @@ dependencies = [
|
||||
"windows-targets 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.42.2"
|
||||
@ -4887,6 +4986,22 @@ dependencies = [
|
||||
"windows_x86_64_msvc 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.52.5",
|
||||
"windows_aarch64_msvc 0.52.5",
|
||||
"windows_i686_gnu 0.52.5",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc 0.52.5",
|
||||
"windows_x86_64_gnu 0.52.5",
|
||||
"windows_x86_64_gnullvm 0.52.5",
|
||||
"windows_x86_64_msvc 0.52.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.42.2"
|
||||
@ -4899,6 +5014,12 @@ version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.33.0"
|
||||
@ -4917,6 +5038,12 @@ version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.33.0"
|
||||
@ -4935,6 +5062,18 @@ version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.33.0"
|
||||
@ -4953,6 +5092,12 @@ version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.33.0"
|
||||
@ -4971,6 +5116,12 @@ version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42.2"
|
||||
@ -4983,6 +5134,12 @@ version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.33.0"
|
||||
@ -5001,6 +5158,12 @@ version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
|
||||
|
||||
[[package]]
|
||||
name = "xflags"
|
||||
version = "0.3.1"
|
||||
@ -5175,7 +5338,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"shellexpand",
|
||||
"signal-hook 0.3.14",
|
||||
"signal-hook",
|
||||
"strip-ansi-escapes",
|
||||
"strum",
|
||||
"strum_macros",
|
||||
|
@ -444,6 +444,7 @@ pub(crate) fn start_client(opts: CliArgs) {
|
||||
layout_dir.clone(),
|
||||
config_without_layout.clone(),
|
||||
),
|
||||
LayoutInfo::Url(url) => Layout::from_url(&url, config_without_layout.clone()),
|
||||
};
|
||||
match new_session_layout {
|
||||
Ok(new_session_layout) => {
|
||||
|
@ -14,7 +14,7 @@ ansi_term = "0.12.1"
|
||||
async-trait = "0.1.50"
|
||||
base64 = "0.13.0"
|
||||
byteorder = "1.4.3"
|
||||
daemonize = "0.4.1"
|
||||
daemonize = "0.5"
|
||||
serde_json = "1.0"
|
||||
unicode-width = "0.1.8"
|
||||
url = "2.2.2"
|
||||
|
@ -288,7 +288,7 @@ pub fn start_server(mut os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) {
|
||||
umask(current_umask);
|
||||
daemonize::Daemonize::new()
|
||||
.working_directory(std::env::current_dir().unwrap())
|
||||
.umask(current_umask.bits())
|
||||
.umask(current_umask.bits() as u32)
|
||||
.start()
|
||||
.expect("could not daemonize the server process");
|
||||
|
||||
|
@ -543,8 +543,6 @@ impl WasmBridge {
|
||||
mut updates: Vec<(Option<PluginId>, Option<ClientId>, Event)>,
|
||||
shutdown_sender: Sender<()>,
|
||||
) -> Result<()> {
|
||||
let err_context = || "failed to update plugin state".to_string();
|
||||
|
||||
let plugins_to_update: Vec<(
|
||||
PluginId,
|
||||
ClientId,
|
||||
@ -563,57 +561,62 @@ impl WasmBridge {
|
||||
.contains_key(&plugin_id)
|
||||
})
|
||||
.collect();
|
||||
for (pid, cid, event) in updates.drain(..) {
|
||||
for (plugin_id, client_id, running_plugin, subscriptions) in &plugins_to_update {
|
||||
let subs = subscriptions.lock().unwrap().clone();
|
||||
// FIXME: This is very janky... Maybe I should write my own macro for Event -> EventType?
|
||||
let event_type =
|
||||
EventType::from_str(&event.to_string()).with_context(err_context)?;
|
||||
if (subs.contains(&event_type) || event_type == EventType::PermissionRequestResult)
|
||||
&& Self::message_is_directed_at_plugin(pid, cid, plugin_id, client_id)
|
||||
{
|
||||
task::spawn({
|
||||
let senders = self.senders.clone();
|
||||
let running_plugin = running_plugin.clone();
|
||||
let event = event.clone();
|
||||
let plugin_id = *plugin_id;
|
||||
let client_id = *client_id;
|
||||
let _s = shutdown_sender.clone();
|
||||
async move {
|
||||
let mut running_plugin = running_plugin.lock().unwrap();
|
||||
let mut plugin_render_assets = vec![];
|
||||
let _s = _s; // guard to allow the task to complete before cleanup/shutdown
|
||||
match apply_event_to_plugin(
|
||||
plugin_id,
|
||||
client_id,
|
||||
&mut running_plugin,
|
||||
&event,
|
||||
&mut plugin_render_assets,
|
||||
senders.clone(),
|
||||
) {
|
||||
Ok(()) => {
|
||||
let _ = senders.send_to_screen(ScreenInstruction::PluginBytes(
|
||||
plugin_render_assets,
|
||||
));
|
||||
},
|
||||
Err(e) => {
|
||||
log::error!("{:?}", e);
|
||||
task::spawn({
|
||||
let mut updates = updates.clone();
|
||||
let senders = self.senders.clone();
|
||||
let s = shutdown_sender.clone();
|
||||
async move {
|
||||
let _s = s;
|
||||
for (pid, cid, event) in updates.drain(..) {
|
||||
for (plugin_id, client_id, running_plugin, subscriptions) in &plugins_to_update
|
||||
{
|
||||
let subs = subscriptions.lock().unwrap().clone();
|
||||
// FIXME: This is very janky... Maybe I should write my own macro for Event -> EventType?
|
||||
if let Ok(event_type) = EventType::from_str(&event.to_string()) {
|
||||
if (subs.contains(&event_type)
|
||||
|| event_type == EventType::PermissionRequestResult)
|
||||
&& Self::message_is_directed_at_plugin(
|
||||
pid, cid, plugin_id, client_id,
|
||||
)
|
||||
{
|
||||
let mut running_plugin = running_plugin.lock().unwrap();
|
||||
let mut plugin_render_assets = vec![];
|
||||
match apply_event_to_plugin(
|
||||
*plugin_id,
|
||||
*client_id,
|
||||
&mut running_plugin,
|
||||
&event,
|
||||
&mut plugin_render_assets,
|
||||
senders.clone(),
|
||||
) {
|
||||
Ok(()) => {
|
||||
let _ = senders.send_to_screen(
|
||||
ScreenInstruction::PluginBytes(plugin_render_assets),
|
||||
);
|
||||
},
|
||||
Err(e) => {
|
||||
log::error!("{:?}", e);
|
||||
|
||||
// https://stackoverflow.com/questions/66450942/in-rust-is-there-a-way-to-make-literal-newlines-in-r-using-windows-c
|
||||
let stringified_error =
|
||||
format!("{:?}", e).replace("\n", "\n\r");
|
||||
// https://stackoverflow.com/questions/66450942/in-rust-is-there-a-way-to-make-literal-newlines-in-r-using-windows-c
|
||||
let stringified_error =
|
||||
format!("{:?}", e).replace("\n", "\n\r");
|
||||
|
||||
handle_plugin_crash(
|
||||
plugin_id,
|
||||
stringified_error,
|
||||
senders.clone(),
|
||||
);
|
||||
},
|
||||
handle_plugin_crash(
|
||||
*plugin_id,
|
||||
stringified_error,
|
||||
senders.clone(),
|
||||
);
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// loop once more to update the cached events for the pending plugins (probably currently
|
||||
// being loaded, we'll send them these events when they load)
|
||||
for (pid, _cid, event) in updates.drain(..) {
|
||||
for (plugin_id, cached_events) in self.cached_events_for_pending_plugins.iter_mut() {
|
||||
if pid.is_none() || pid.as_ref() == Some(plugin_id) {
|
||||
cached_events.push(EventOrPipeMessage::Event(event.clone()));
|
||||
|
@ -11,44 +11,44 @@ include = ["src/**/*", "assets/"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = { version = "1.0.70", features = ["backtrace"] }
|
||||
async-channel = "1.8.0"
|
||||
backtrace = "0.3.55"
|
||||
rmp-serde = "1.1.0"
|
||||
clap = { version = "3.2.2", features = ["derive", "env"] }
|
||||
clap_complete = "3.2.1"
|
||||
colored = "2.0.0"
|
||||
colorsys = "0.6.5"
|
||||
common-path = "1.0.0"
|
||||
crossbeam = "0.8.1"
|
||||
directories = "5.0"
|
||||
include_dir = "0.7.3"
|
||||
kdl = { version = "4.5.0", features = ["span"] }
|
||||
lazy_static = "1.4.0"
|
||||
libc = "0.2"
|
||||
log = "0.4.17"
|
||||
miette = { version = "5.7.0", features = ["fancy"] }
|
||||
nix = "0.23.1"
|
||||
once_cell = "1.8.0"
|
||||
percent-encoding = "2.1.0"
|
||||
prost = "0.11.9"
|
||||
regex = "1.5.5"
|
||||
rmp-serde = "1.1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
shellexpand = "3.0.0"
|
||||
strip-ansi-escapes = "0.1.0"
|
||||
strum = "0.20.0"
|
||||
strum_macros = "0.20.1"
|
||||
thiserror = "1.0.30"
|
||||
url = { version = "2.2.2", features = ["serde"] }
|
||||
vte = { version = "0.11.0", default-features = false }
|
||||
log = "0.4.17"
|
||||
unicode-width = "0.1.8"
|
||||
miette = { version = "5.7.0", features = ["fancy"] }
|
||||
regex = "1.5.5"
|
||||
tempfile = "3.2.0"
|
||||
kdl = { version = "4.5.0", features = ["span"] }
|
||||
shellexpand = "3.0.0"
|
||||
thiserror = "1.0.30"
|
||||
unicode-width = "0.1.8"
|
||||
url = { version = "2.2.2", features = ["serde"] }
|
||||
uuid = { version = "1.4.1", features = ["serde", "v4"] }
|
||||
async-channel = "1.8.0"
|
||||
include_dir = "0.7.3"
|
||||
prost = "0.11.9"
|
||||
common-path = "1.0.0"
|
||||
bitflags = "2.5.0"
|
||||
vte = { version = "0.11.0", default-features = false }
|
||||
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
||||
termwiz = "0.20.0"
|
||||
termwiz = "0.22"
|
||||
log4rs = "1.2.0"
|
||||
signal-hook = "0.3"
|
||||
interprocess = "1.2.1"
|
||||
|
@ -1146,6 +1146,7 @@ pub struct SessionInfo {
|
||||
pub enum LayoutInfo {
|
||||
BuiltIn(String),
|
||||
File(String),
|
||||
Url(String),
|
||||
}
|
||||
|
||||
impl LayoutInfo {
|
||||
@ -1153,12 +1154,14 @@ impl LayoutInfo {
|
||||
match self {
|
||||
LayoutInfo::BuiltIn(name) => &name,
|
||||
LayoutInfo::File(name) => &name,
|
||||
LayoutInfo::Url(url) => &url,
|
||||
}
|
||||
}
|
||||
pub fn is_builtin(&self) -> bool {
|
||||
match self {
|
||||
LayoutInfo::BuiltIn(_name) => true,
|
||||
LayoutInfo::File(_name) => false,
|
||||
LayoutInfo::Url(_url) => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ pub enum DownloaderError {
|
||||
Io(#[source] std::io::Error),
|
||||
#[error("File name cannot be found in URL: {0}")]
|
||||
NotFoundFileName(String),
|
||||
#[error("Failed to parse URL body: {0}")]
|
||||
InvalidUrlBody(String),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@ -110,6 +112,29 @@ impl Downloader {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
pub async fn download_without_cache(url: &str) -> Result<String, DownloaderError> {
|
||||
// result is the stringified body
|
||||
let client = surf::client().with(surf::middleware::Redirect::default());
|
||||
|
||||
let res = client
|
||||
.get(url)
|
||||
.header("Content-Type", "application/octet-stream")
|
||||
.await
|
||||
.map_err(|e| DownloaderError::Request(e))?;
|
||||
|
||||
let mut downloaded_bytes: Vec<u8> = vec![];
|
||||
let mut stream = res.bytes();
|
||||
while let Some(byte) = stream.next().await {
|
||||
let byte = byte.map_err(|e| DownloaderError::Io(e))?;
|
||||
downloaded_bytes.push(byte);
|
||||
}
|
||||
|
||||
log::debug!("Download complete");
|
||||
let stringified = String::from_utf8(downloaded_bytes)
|
||||
.map_err(|e| DownloaderError::InvalidUrlBody(format!("{}", e)))?;
|
||||
|
||||
Ok(stringified)
|
||||
}
|
||||
|
||||
fn parse_name(&self, url: &str) -> Result<String, DownloaderError> {
|
||||
Url::parse(url)
|
||||
|
@ -529,9 +529,25 @@ impl Action {
|
||||
let layout_dir = layout_dir
|
||||
.or_else(|| config.and_then(|c| c.options.layout_dir))
|
||||
.or_else(|| get_layout_dir(find_default_config_dir()));
|
||||
let (path_to_raw_layout, raw_layout, swap_layouts) =
|
||||
|
||||
let (path_to_raw_layout, raw_layout, swap_layouts) = if let Some(layout_url) =
|
||||
layout_path.to_str().and_then(|l| {
|
||||
if l.starts_with("http://") || l.starts_with("https://") {
|
||||
Some(l)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}) {
|
||||
(
|
||||
layout_url.to_owned(),
|
||||
Layout::stringified_from_url(layout_url)
|
||||
.map_err(|e| format!("Failed to load layout: {}", e))?,
|
||||
None,
|
||||
)
|
||||
} else {
|
||||
Layout::stringified_from_path_or_default(Some(&layout_path), layout_dir)
|
||||
.map_err(|e| format!("Failed to load layout: {}", e))?;
|
||||
.map_err(|e| format!("Failed to load layout: {}", e))?
|
||||
};
|
||||
let layout = Layout::from_str(&raw_layout, path_to_raw_layout, swap_layouts.as_ref().map(|(f, p)| (f.as_str(), p.as_str())), cwd).map_err(|e| {
|
||||
let stringified_error = match e {
|
||||
ConfigError::KdlError(kdl_error) => {
|
||||
|
@ -96,6 +96,8 @@ pub enum ConfigError {
|
||||
PluginsError(#[from] PluginsConfigError),
|
||||
#[error("{0}")]
|
||||
ConversionError(#[from] ConversionError),
|
||||
#[error("{0}")]
|
||||
DownloadError(String),
|
||||
}
|
||||
|
||||
impl ConfigError {
|
||||
|
@ -8,6 +8,8 @@
|
||||
// place.
|
||||
// If plugins should be able to depend on the layout system
|
||||
// then [`zellij-utils`] could be a proper place.
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use crate::downloader::Downloader;
|
||||
use crate::{
|
||||
data::{Direction, LayoutInfo},
|
||||
home::{default_layout_dir, find_default_config_dir},
|
||||
@ -18,6 +20,8 @@ use crate::{
|
||||
pane_size::{Constraint, Dimension, PaneGeom},
|
||||
setup::{self},
|
||||
};
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use async_std::task;
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::fmt::{Display, Formatter};
|
||||
@ -1145,6 +1149,7 @@ impl Layout {
|
||||
LayoutInfo::BuiltIn(layout_name) => {
|
||||
Self::stringified_from_default_assets(&PathBuf::from(layout_name))?
|
||||
},
|
||||
LayoutInfo::Url(url) => (url.clone(), Self::stringified_from_url(&url)?, None),
|
||||
};
|
||||
Layout::from_kdl(
|
||||
&raw_layout,
|
||||
@ -1179,6 +1184,20 @@ impl Layout {
|
||||
),
|
||||
}
|
||||
}
|
||||
pub fn stringified_from_url(url: &str) -> Result<String, ConfigError> {
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
let raw_layout = task::block_on(async move {
|
||||
let download = Downloader::download_without_cache(url).await;
|
||||
match download {
|
||||
Ok(stringified) => Ok(stringified),
|
||||
Err(e) => Err(ConfigError::DownloadError(format!("{}", e))),
|
||||
}
|
||||
})?;
|
||||
// silently fail - this should not happen in plugins and legacy architecture is hard
|
||||
#[cfg(target_family = "wasm")]
|
||||
let raw_layout = String::new();
|
||||
Ok(raw_layout)
|
||||
}
|
||||
pub fn from_path_or_default(
|
||||
layout_path: Option<&PathBuf>,
|
||||
layout_dir: Option<PathBuf>,
|
||||
@ -1197,6 +1216,25 @@ impl Layout {
|
||||
let config = Config::from_kdl(&raw_layout, Some(config))?; // this merges the two config, with
|
||||
Ok((layout, config))
|
||||
}
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub fn from_url(url: &str, config: Config) -> Result<(Layout, Config), ConfigError> {
|
||||
let raw_layout = task::block_on(async move {
|
||||
let download = Downloader::download_without_cache(url).await;
|
||||
match download {
|
||||
Ok(stringified) => Ok(stringified),
|
||||
Err(e) => Err(ConfigError::DownloadError(format!("{}", e))),
|
||||
}
|
||||
})?;
|
||||
let layout = Layout::from_kdl(&raw_layout, url.into(), None, None)?;
|
||||
let config = Config::from_kdl(&raw_layout, Some(config))?; // this merges the two config, with
|
||||
Ok((layout, config))
|
||||
}
|
||||
#[cfg(target_family = "wasm")]
|
||||
pub fn from_url(url: &str, config: Config) -> Result<(Layout, Config), ConfigError> {
|
||||
Err(ConfigError::DownloadError(format!(
|
||||
"Unsupported platform, cannot download layout from the web"
|
||||
)))
|
||||
}
|
||||
pub fn from_path_or_default_without_config(
|
||||
layout_path: Option<&PathBuf>,
|
||||
layout_dir: Option<PathBuf>,
|
||||
|
@ -2172,6 +2172,7 @@ impl SessionInfo {
|
||||
let (layout_name, layout_source) = match layout_info {
|
||||
LayoutInfo::File(name) => (name.clone(), "file"),
|
||||
LayoutInfo::BuiltIn(name) => (name.clone(), "built-in"),
|
||||
LayoutInfo::Url(url) => (url.clone(), "url"),
|
||||
};
|
||||
let mut layout_node = KdlNode::new(format!("{}", layout_name));
|
||||
let layout_source = KdlEntry::new_prop("source", layout_source);
|
||||
|
@ -546,6 +546,10 @@ impl TryFrom<LayoutInfo> for ProtobufLayoutInfo {
|
||||
source: "built-in".to_owned(),
|
||||
name,
|
||||
}),
|
||||
LayoutInfo::Url(name) => Ok(ProtobufLayoutInfo {
|
||||
source: "url".to_owned(),
|
||||
name,
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -556,6 +560,7 @@ impl TryFrom<ProtobufLayoutInfo> for LayoutInfo {
|
||||
match protobuf_layout_info.source.as_str() {
|
||||
"file" => Ok(LayoutInfo::File(protobuf_layout_info.name)),
|
||||
"built-in" => Ok(LayoutInfo::BuiltIn(protobuf_layout_info.name)),
|
||||
"url" => Ok(LayoutInfo::Url(protobuf_layout_info.name)),
|
||||
_ => Err("Unknown source for layout"),
|
||||
}
|
||||
}
|
||||
|
@ -671,9 +671,23 @@ impl Setup {
|
||||
.and_then(|cli_options| cli_options.default_layout.clone())
|
||||
})
|
||||
.or_else(|| config.options.default_layout.clone());
|
||||
// we merge-override the config here because the layout might contain configuration
|
||||
// that needs to take precedence
|
||||
Layout::from_path_or_default(chosen_layout.as_ref(), layout_dir.clone(), config)
|
||||
if let Some(layout_url) = chosen_layout
|
||||
.as_ref()
|
||||
.and_then(|l| l.to_str())
|
||||
.and_then(|l| {
|
||||
if l.starts_with("http://") || l.starts_with("https://") {
|
||||
Some(l)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
{
|
||||
Layout::from_url(layout_url, config)
|
||||
} else {
|
||||
// we merge-override the config here because the layout might contain configuration
|
||||
// that needs to take precedence
|
||||
Layout::from_path_or_default(chosen_layout.as_ref(), layout_dir.clone(), config)
|
||||
}
|
||||
}
|
||||
fn handle_setup_commands(cli_args: &CliArgs) {
|
||||
if let Some(Command::Setup(ref setup)) = &cli_args.command {
|
||||
|
Loading…
Reference in New Issue
Block a user