Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "replay"
version = "0.1.0"
edition = "2024"
name = "replay_pty"
version = "0.0.1"
authors = ["leduclean", "baptleduc"]
edition = "2021"
description = "A CLI tool to record and replay shell commands"
readme = "README.md"
license = "MIT"
Expand All @@ -10,6 +11,11 @@ repository = "https://github.com/baptleduc/replay"
[lib]
path = "src/lib.rs"

[[bin]]
name = "replay"
path = "src/main.rs"


[dependencies]
anyhow = "1.0.98"
assert_cmd = "2.0.17"
Expand Down
2 changes: 1 addition & 1 deletion src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! It will ensure we get the correct args and then return
//! a correct Structure to run the corresponding commands
use crate::{
commands::{RunnableCommand, clear, drop, list, record, run},
commands::{clear, drop, list, record, run, RunnableCommand},
errors::ReplayResult,
};
use clap::{Parser, Subcommand};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::io::{stdin, stdout};

use super::RunnableCommand;
use crate::errors::ReplayResult;
use crate::pty::{RecordConfig, run_internal};
use crate::pty::{run_internal, RecordConfig};
use clap::Args;

#[derive(Args, PartialEq, Eq, Debug)]
Expand Down
4 changes: 2 additions & 2 deletions src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
use super::RunnableCommand;
use crate::args;
use crate::errors::ReplayResult;
use crate::pty::{RawModeReader, RecordConfig, run_internal};
use crate::pty::{run_internal, RawModeReader, RecordConfig};
use crate::session::Session;
use clap::{Args, value_parser};
use clap::{value_parser, Args};
use std::io::stdout;

/// CLI command to run a recorded session.
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Argument parsing, command dispatching and core logic.

use crossterm::terminal;
use replay::run;
use replay_pty::run;
use std::{env, process};

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::errors::{ReplayError, ReplayResult};
use crate::paths;
use chrono::Utc;
use rev_lines::RevLines;
use serde::{Deserialize, Deserializer, Serialize, de::DeserializeOwned};
use serde::{de::DeserializeOwned, Deserialize, Deserializer, Serialize};
use sha2::{Digest, Sha256};
use std::fs::File;
use std::io::{BufRead, BufReader, Read, Seek, SeekFrom, Write};
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use assert_cmd::Command;
use predicates::prelude::*;
use replay::session::Session;
use replay_pty::session::Session;
use serial_test::serial;
use uuid::Uuid;

Expand Down