Skip to content

Commit 94ebfd6

Browse files
chore(release): bump ironposh-web to v0.5.0
1 parent 08eff3c commit 94ebfd6

File tree

9 files changed

+24
-5
lines changed

9 files changed

+24
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
*.log
44
.serena/
55
.zed
6+
7+
# Local wasm-bindgen output for WebTerminal dev override; generated artifact, not source.
8+
/crates/ironposh-web/pkg-devolutions/

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ironposh-async/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ uuid = "1.0"
1818

1919
[target.'cfg(target_arch = "wasm32")'.dependencies]
2020
futures-timer = { version = "3", features = ["wasm-bindgen"] }
21+
web-time = "1.1.0"
2122
web-sys = { version = "0.3.81", features = ["console"], optional = true }
2223

2324
[dev-dependencies]

crates/ironposh-async/src/clock.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// A small monotonic clock abstraction.
2+
//
3+
// `std::time::Instant` is not available on `wasm32-unknown-unknown` and will
4+
// panic at runtime ("time not implemented on this platform"). Use `web_time`
5+
// on wasm instead.
6+
7+
#[cfg(target_arch = "wasm32")]
8+
pub type Instant = web_time::Instant;
9+
10+
#[cfg(not(target_arch = "wasm32"))]
11+
pub type Instant = std::time::Instant;

crates/ironposh-async/src/connection.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{sync::Arc, time::Instant};
1+
use std::sync::Arc;
22

33
use anyhow::Context;
44
use futures::{SinkExt, StreamExt, channel::mpsc, join};
@@ -11,6 +11,7 @@ use ironposh_client_core::{
1111
};
1212
use tracing::{Instrument, Level, debug, info, info_span, span, trace, warn};
1313

14+
use crate::clock::Instant;
1415
use crate::{HostIo, HostSubmitter, HttpClient, session, session_serial};
1516

1617
/// Run the connector handshake loop: step through authentication until Connected.

crates/ironposh-async/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use ironposh_client_core::host::{HostCall, HostCallScope, Submission};
44
use std::future::Future;
55

66
// Internal modules
7+
mod clock;
78
mod connection;
89
mod session;
910
mod session_serial;

crates/ironposh-async/src/session_serial/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//! that shuttles data between I/O channels and this core.
88
99
use std::collections::VecDeque;
10-
use std::time::Instant;
1110

1211
use anyhow::Context;
1312
use ironposh_client_core::PwshCoreError;
@@ -22,6 +21,7 @@ use uuid::Uuid;
2221
use super::diag;
2322
use super::scheduler::{DefaultReceiveScheduler, ReceiveScheduler, TargetId};
2423
use crate::HostResponse;
24+
use crate::clock::Instant;
2525

2626
// ── Backend trait ─────────────────────────────────────────────────────────
2727

crates/ironposh-async/src/session_serial/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ use futures_timer::Delay;
1515
use ironposh_client_core::connector::active_session::{ActiveSession, UserEvent};
1616
use ironposh_client_core::connector::conntion_pool::TrySend;
1717
use ironposh_client_core::host::HostCall;
18-
use std::time::{Duration, Instant};
18+
use std::time::Duration;
1919
use tracing::{info, instrument, trace};
2020

2121
use ironposh_client_core::connector::UserOperation;
2222

2323
use self::core::SessionCore;
24+
use crate::clock::Instant;
2425
use crate::{HostResponse, HttpClient};
2526

2627
/// Console diagnostic logging for WASM debugging.

crates/ironposh-web/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ironposh-web"
3-
version = "0.4.3"
3+
version = "0.5.0"
44
authors = ["irving ou <jou@devolutions.net>"]
55
edition = "2018"
66
description = "PowerShell Remoting over WinRM for WebAssembly"

0 commit comments

Comments
 (0)