Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

servicing

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

servicing - npm Package Compare versions

Comparing version
0.0.3
to
0.0.4
+64
-56
Cargo.lock

@@ -100,8 +100,2 @@ # This file is automatically @generated by Cargo.

name = "base64"
version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64"
version = "0.22.0"

@@ -134,5 +128,5 @@ source = "registry+https://github.com/rust-lang/crates.io-index"

name = "bumpalo"
version = "3.15.4"
version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"

@@ -147,5 +141,5 @@ [[package]]

name = "cc"
version = "1.0.90"
version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7"

@@ -203,5 +197,5 @@ [[package]]

name = "encoding_rs"
version = "0.8.33"
version = "0.8.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1"
checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
dependencies = [

@@ -327,5 +321,5 @@ "cfg-if",

name = "getrandom"
version = "0.2.12"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5"
checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
dependencies = [

@@ -428,5 +422,5 @@ "cfg-if",

name = "hyper"
version = "1.2.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a"
checksum = "9f24ce812868d86d19daa79bf3bf9175bc44ea323391147a5e3abde2a283871b"
dependencies = [

@@ -783,5 +777,5 @@ "bytes",

name = "proc-macro2"
version = "1.0.79"
version = "1.0.80"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
checksum = "a56dea16b0a29e94408b9aa5e2940a4eedbd128a1ba20e8f7ae60fd3d465af0e"
dependencies = [

@@ -856,5 +850,5 @@ "unicode-ident",

name = "quote"
version = "1.0.35"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
dependencies = [

@@ -915,7 +909,7 @@ "proc-macro2",

name = "reqwest"
version = "0.12.2"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d66674f2b6fb864665eea7a3c1ac4e3dfacd2fda83cf6f935a612e01b0e3338"
checksum = "3e6cc1e89e689536eb5aeede61520e874df5a4707df811cd5da4aa5fbb2aae19"
dependencies = [
"base64 0.21.7",
"base64",
"bytes",

@@ -977,10 +971,17 @@ "encoding_rs",

name = "rustls-pemfile"
version = "1.0.4"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d"
dependencies = [
"base64 0.21.7",
"base64",
"rustls-pki-types",
]
[[package]]
name = "rustls-pki-types"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247"
[[package]]
name = "ryu"

@@ -1087,5 +1088,5 @@ version = "1.0.17"

name = "servicing"
version = "0.0.3"
version = "0.0.4"
dependencies = [
"base64 0.22.0",
"base64",
"bincode",

@@ -1141,5 +1142,5 @@ "dirs",

name = "syn"
version = "2.0.58"
version = "2.0.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687"
checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a"
dependencies = [

@@ -1501,3 +1502,3 @@ "proc-macro2",

dependencies = [
"windows-targets 0.52.4",
"windows-targets 0.52.5",
]

@@ -1522,13 +1523,14 @@

name = "windows-targets"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
dependencies = [
"windows_aarch64_gnullvm 0.52.4",
"windows_aarch64_msvc 0.52.4",
"windows_i686_gnu 0.52.4",
"windows_i686_msvc 0.52.4",
"windows_x86_64_gnu 0.52.4",
"windows_x86_64_gnullvm 0.52.4",
"windows_x86_64_msvc 0.52.4",
"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",
]

@@ -1544,5 +1546,5 @@

name = "windows_aarch64_gnullvm"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"

@@ -1557,5 +1559,5 @@ [[package]]

name = "windows_aarch64_msvc"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"

@@ -1570,7 +1572,13 @@ [[package]]

name = "windows_i686_gnu"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
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"

@@ -1583,5 +1591,5 @@ version = "0.48.5"

name = "windows_i686_msvc"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"

@@ -1596,5 +1604,5 @@ [[package]]

name = "windows_x86_64_gnu"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"

@@ -1609,5 +1617,5 @@ [[package]]

name = "windows_x86_64_gnullvm"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"

@@ -1622,11 +1630,11 @@ [[package]]

name = "windows_x86_64_msvc"
version = "0.52.4"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
[[package]]
name = "winreg"
version = "0.50.0"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5"
dependencies = [

@@ -1633,0 +1641,0 @@ "cfg-if",

[package]
name = "servicing"
version = "0.0.3"
version = "0.0.4"
edition = "2021"

@@ -5,0 +5,0 @@

Metadata-Version: 2.3
Name: servicing
Version: 0.0.3
Version: 0.0.4
Classifier: Programming Language :: Rust

@@ -5,0 +5,0 @@ Classifier: Programming Language :: Python :: Implementation :: CPython

@@ -13,4 +13,8 @@ from typing import List, Optional

def __init__(self, port: int,
replicas: int, cloud: str) -> None: ...
def __init__(self, port: Optional[int] = None,
replicas: Optional[int] = None,
cloud: Optional[str] = None,
workdir: Optional[str] = None,
setup: Optional[str] = None,
run: Optional[str] = None) -> None: ...

@@ -65,5 +69,7 @@

def save(self) -> None:
def save(self, location: Optional[str] = None) -> None:
"""
Save the dispatcher's cache
:param location: the location of the cache, defaults to home directory
"""

@@ -82,4 +88,3 @@

:param location: the location of the cache
:return: the status of the service in string format
:param location: the location of the cache, defaults to home directory
"""

@@ -86,0 +91,0 @@

@@ -272,3 +272,3 @@ #![allow(dead_code)] // Remove this later

pub fn save(&self) -> Result<(), ServicingError> {
pub fn save(&self, location: Option<PathBuf>) -> Result<(), ServicingError> {
let bin = bincode::serialize(&*self.service.lock()?)?;

@@ -278,3 +278,14 @@

&helper::create_file(
&helper::create_directory(".servicing", true)?,
&{
if let Some(location) = location {
helper::create_directory(
location
.to_str()
.ok_or(ServicingError::General("Location is None".to_string()))?,
false,
)?
} else {
helper::create_directory(".servicing", true)?
}
},
"services.bin",

@@ -345,5 +356,8 @@ )?,

Some(UserProvidedConfig {
port: 1234,
replicas: 5,
cloud: "aws".to_string(),
port: Some(1234),
replicas: Some(5),
cloud: Some("aws".to_string()),
workdir: None,
setup: None,
run: None,
}),

@@ -353,3 +367,3 @@ )

dis.save().unwrap();
dis.save(None).unwrap();

@@ -356,0 +370,0 @@ // check what has been added

@@ -7,5 +7,8 @@ use pyo3::{pyclass, pymethods};

pub struct UserProvidedConfig {
pub port: u16,
pub replicas: u16,
pub cloud: String,
pub port: Option<u16>,
pub replicas: Option<u16>,
pub cloud: Option<String>,
pub workdir: Option<String>,
pub setup: Option<String>,
pub run: Option<String>,
}

@@ -16,3 +19,10 @@

#[new]
pub fn new(port: u16, replicas: u16, cloud: String) -> Self {
pub fn new(
port: Option<u16>,
replicas: Option<u16>,
cloud: Option<String>,
workdir: Option<String>,
setup: Option<String>,
run: Option<String>,
) -> Self {
UserProvidedConfig {

@@ -22,2 +32,5 @@ port,

cloud,
workdir,
setup,
run,
}

@@ -38,5 +51,20 @@ }

pub fn update(&mut self, config: &UserProvidedConfig) {
self.service.replicas = config.replicas;
self.resources.ports = config.port;
self.resources.cloud = config.cloud.clone();
if let Some(port) = config.port {
self.resources.ports = port;
}
if let Some(replicas) = config.replicas {
self.service.replicas = replicas;
}
if let Some(cloud) = &config.cloud {
self.resources.cloud = cloud.clone();
}
if let Some(workdir) = &config.workdir {
self.workdir = workdir.clone();
}
if let Some(setup) = &config.setup {
self.setup = setup.clone();
}
if let Some(run) = &config.run {
self.run = run.clone();
}
}

@@ -43,0 +71,0 @@