@storm-software/workspace-tools 1.66.6 → 1.66.7
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.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/executors/cargo-publish/executor.ts +17 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.66.7 (2024-03-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🩹 Fixes
|
|
5
|
+
|
|
6
|
+
- **workspace-tools:** Enhance error formatting and handling in `cargo-publish` executor ([a0423bc6](https://github.com/storm-software/storm-ops/commit/a0423bc6))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ❤️ Thank You
|
|
10
|
+
|
|
11
|
+
- Patrick Sullivan
|
|
12
|
+
|
|
1
13
|
## 1.66.6 (2024-03-28)
|
|
2
14
|
|
|
3
15
|
|
package/package.json
CHANGED
|
@@ -70,10 +70,14 @@ export default async function runExecutor(
|
|
|
70
70
|
};
|
|
71
71
|
} catch (error: any) {
|
|
72
72
|
if (
|
|
73
|
-
error?.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
(error?.message &&
|
|
74
|
+
typeof error.message === "string" &&
|
|
75
|
+
error.message.toLowerCase().includes("crate version") &&
|
|
76
|
+
error.message.toLowerCase().includes("is already uploaded")) ||
|
|
77
|
+
(error?.cause?.message &&
|
|
78
|
+
typeof error.cause.message === "string" &&
|
|
79
|
+
error.cause.message.toLowerCase().includes("crate version") &&
|
|
80
|
+
error.cause.message.toLowerCase().includes("is already uploaded"))
|
|
77
81
|
) {
|
|
78
82
|
console.log(
|
|
79
83
|
`Skipped package "${cargoToml.package.name}" from project "${cargoToml.package.name}" because v${cargoToml.package.version} already exists in https://crates.io with tag "latest"`
|
|
@@ -86,9 +90,18 @@ export default async function runExecutor(
|
|
|
86
90
|
|
|
87
91
|
console.error("Failed to publish to https://crates.io");
|
|
88
92
|
console.error(error);
|
|
93
|
+
console.log("");
|
|
94
|
+
console.error(formatLog(error));
|
|
89
95
|
|
|
90
96
|
return {
|
|
91
97
|
success: false
|
|
92
98
|
};
|
|
93
99
|
}
|
|
94
100
|
}
|
|
101
|
+
|
|
102
|
+
const formatLog = (message: any): string =>
|
|
103
|
+
typeof message === "object"
|
|
104
|
+
? Object.keys(message)
|
|
105
|
+
.map((key) => ` - ${key}=${formatLog(message[key])}`)
|
|
106
|
+
.join("\n")
|
|
107
|
+
: JSON.stringify(message);
|