dockerfile-analyzer 0.3.0__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/Cargo.lock +11 -12
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/Cargo.toml +2 -2
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/PKG-INFO +1 -1
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/src/models.rs +7 -7
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/src/parse_utils.rs +4 -4
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/.github/dependabot.yml +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/.github/workflows/CI.yml +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/.gitignore +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/LICENSE +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/README.md +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/dockerfile_analyzer.pyi +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/example.py +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/py.typed +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/pyproject.toml +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/src/analyzer.rs +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/src/constants.rs +0 -0
- {dockerfile_analyzer-0.3.0 → dockerfile_analyzer-0.3.2}/src/lib.rs +0 -0
|
@@ -20,7 +20,7 @@ dependencies = [
|
|
|
20
20
|
|
|
21
21
|
[[package]]
|
|
22
22
|
name = "dockerfile-analyzer"
|
|
23
|
-
version = "0.3.
|
|
23
|
+
version = "0.3.2"
|
|
24
24
|
dependencies = [
|
|
25
25
|
"docker-image",
|
|
26
26
|
"parse-dockerfile",
|
|
@@ -94,9 +94,9 @@ dependencies = [
|
|
|
94
94
|
|
|
95
95
|
[[package]]
|
|
96
96
|
name = "pyo3"
|
|
97
|
-
version = "0.
|
|
97
|
+
version = "0.26.0"
|
|
98
98
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
-
checksum = "
|
|
99
|
+
checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383"
|
|
100
100
|
dependencies = [
|
|
101
101
|
"indoc",
|
|
102
102
|
"libc",
|
|
@@ -111,19 +111,18 @@ dependencies = [
|
|
|
111
111
|
|
|
112
112
|
[[package]]
|
|
113
113
|
name = "pyo3-build-config"
|
|
114
|
-
version = "0.
|
|
114
|
+
version = "0.26.0"
|
|
115
115
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
116
|
-
checksum = "
|
|
116
|
+
checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f"
|
|
117
117
|
dependencies = [
|
|
118
|
-
"once_cell",
|
|
119
118
|
"target-lexicon",
|
|
120
119
|
]
|
|
121
120
|
|
|
122
121
|
[[package]]
|
|
123
122
|
name = "pyo3-ffi"
|
|
124
|
-
version = "0.
|
|
123
|
+
version = "0.26.0"
|
|
125
124
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
-
checksum = "
|
|
125
|
+
checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105"
|
|
127
126
|
dependencies = [
|
|
128
127
|
"libc",
|
|
129
128
|
"pyo3-build-config",
|
|
@@ -131,9 +130,9 @@ dependencies = [
|
|
|
131
130
|
|
|
132
131
|
[[package]]
|
|
133
132
|
name = "pyo3-macros"
|
|
134
|
-
version = "0.
|
|
133
|
+
version = "0.26.0"
|
|
135
134
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
136
|
-
checksum = "
|
|
135
|
+
checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded"
|
|
137
136
|
dependencies = [
|
|
138
137
|
"proc-macro2",
|
|
139
138
|
"pyo3-macros-backend",
|
|
@@ -143,9 +142,9 @@ dependencies = [
|
|
|
143
142
|
|
|
144
143
|
[[package]]
|
|
145
144
|
name = "pyo3-macros-backend"
|
|
146
|
-
version = "0.
|
|
145
|
+
version = "0.26.0"
|
|
147
146
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
148
|
-
checksum = "
|
|
147
|
+
checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf"
|
|
149
148
|
dependencies = [
|
|
150
149
|
"heck",
|
|
151
150
|
"proc-macro2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "dockerfile-analyzer"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.2"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ name = "dockerfile_analyzer"
|
|
|
10
10
|
crate-type = ["cdylib"]
|
|
11
11
|
|
|
12
12
|
[dependencies]
|
|
13
|
-
pyo3 = "0.
|
|
13
|
+
pyo3 = "0.26.0"
|
|
14
14
|
docker-image = {version = "0.2.1"}
|
|
15
15
|
parse-dockerfile = { version = "0.1.1", default-features = false }
|
|
16
16
|
shlex = "1.3.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dockerfile-analyzer
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -26,7 +26,7 @@ impl InstructionStats {
|
|
|
26
26
|
)
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
fn to_dict(&self, py: Python) -> PyResult<
|
|
29
|
+
fn to_dict(&self, py: Python) -> PyResult<Py<PyAny>> {
|
|
30
30
|
let dict = PyDict::new(py);
|
|
31
31
|
dict.set_item("total_count", self.total_count)?;
|
|
32
32
|
dict.set_item("by_type", &self.by_type)?;
|
|
@@ -64,7 +64,7 @@ impl ImageComponents {
|
|
|
64
64
|
)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
fn to_dict(&self, py: Python) -> PyResult<
|
|
67
|
+
fn to_dict(&self, py: Python) -> PyResult<Py<PyAny>> {
|
|
68
68
|
let dict = PyDict::new(py);
|
|
69
69
|
dict.set_item("registry", &self.registry)?;
|
|
70
70
|
dict.set_item("name", &self.name)?;
|
|
@@ -102,7 +102,7 @@ impl Image {
|
|
|
102
102
|
)
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
fn to_dict(&self, py: Python) -> PyResult<
|
|
105
|
+
fn to_dict(&self, py: Python) -> PyResult<Py<PyAny>> {
|
|
106
106
|
let dict = PyDict::new(py);
|
|
107
107
|
dict.set_item("full", &self.full)?;
|
|
108
108
|
|
|
@@ -148,7 +148,7 @@ impl MultistageAnalysis {
|
|
|
148
148
|
)
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
fn to_dict(&self, py: Python) -> PyResult<
|
|
151
|
+
fn to_dict(&self, py: Python) -> PyResult<Py<PyAny>> {
|
|
152
152
|
let dict = PyDict::new(py);
|
|
153
153
|
dict.set_item("is_multistage", self.is_multistage)?;
|
|
154
154
|
dict.set_item(
|
|
@@ -215,12 +215,12 @@ impl Analysis {
|
|
|
215
215
|
)
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
fn to_dict(&self, py: Python) -> PyResult<
|
|
218
|
+
fn to_dict(&self, py: Python) -> PyResult<Py<PyAny>> {
|
|
219
219
|
let dict = PyDict::new(py);
|
|
220
220
|
dict.set_item("num_stages", self.num_stages)?;
|
|
221
221
|
|
|
222
222
|
// Convert Vec<Image> to Vec<PyObject>
|
|
223
|
-
let images: PyResult<Vec<
|
|
223
|
+
let images: PyResult<Vec<Py<PyAny>>> =
|
|
224
224
|
self.images.iter().map(|img| img.to_dict(py)).collect();
|
|
225
225
|
dict.set_item("images", images?)?;
|
|
226
226
|
|
|
@@ -259,7 +259,7 @@ impl KeyValueInstr {
|
|
|
259
259
|
)
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
fn to_dict(&self, py: Python) -> PyResult<
|
|
262
|
+
fn to_dict(&self, py: Python) -> PyResult<Py<PyAny>> {
|
|
263
263
|
let dict = PyDict::new(py);
|
|
264
264
|
dict.set_item("args", &self.args)?;
|
|
265
265
|
dict.set_item("labels", &self.labels)?;
|
|
@@ -49,9 +49,9 @@ fn extract_tokens_from_instr(ins: &str) -> Vec<String> {
|
|
|
49
49
|
processed
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
fn vec_to_map(
|
|
52
|
+
fn vec_to_map(toks: &[String]) -> HashMap<String, String> {
|
|
53
53
|
let mut res = HashMap::new();
|
|
54
|
-
for chunk in
|
|
54
|
+
for chunk in toks.chunks(2) {
|
|
55
55
|
match chunk {
|
|
56
56
|
[k, v] => {
|
|
57
57
|
res.insert(k.to_string(), v.to_string());
|
|
@@ -66,9 +66,9 @@ fn vec_to_map(v: &[String]) -> HashMap<String, String> {
|
|
|
66
66
|
res
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
fn vec_to_map_opt_val(
|
|
69
|
+
fn vec_to_map_opt_val(toks: &[String]) -> HashMap<String, Option<String>> {
|
|
70
70
|
let mut res: HashMap<String, Option<String>> = HashMap::new();
|
|
71
|
-
for chunk in
|
|
71
|
+
for chunk in toks.chunks(2) {
|
|
72
72
|
match chunk {
|
|
73
73
|
[k, v] => {
|
|
74
74
|
res.insert(k.to_string(), Some(v.to_string()));
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|