@storm-software/workspace-tools 1.66.5 → 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 CHANGED
@@ -1,3 +1,27 @@
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
+
13
+ ## 1.66.6 (2024-03-28)
14
+
15
+
16
+ ### 🩹 Fixes
17
+
18
+ - **workspace-tools:** Updated `cargo-publish` to skip publishing when neccesary ([01ec5e99](https://github.com/storm-software/storm-ops/commit/01ec5e99))
19
+
20
+
21
+ ### ❤️ Thank You
22
+
23
+ - Patrick Sullivan
24
+
1
25
  ## 1.66.5 (2024-03-28)
2
26
 
3
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.66.5",
3
+ "version": "1.66.7",
4
4
  "private": false,
5
5
  "description": "⚡ A Nx plugin package that contains various executors and generators used in a Storm workspaces.",
6
6
  "keywords": [
@@ -69,11 +69,39 @@ export default async function runExecutor(
69
69
  success: true
70
70
  };
71
71
  } catch (error: any) {
72
+ if (
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"))
81
+ ) {
82
+ console.log(
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"`
84
+ );
85
+
86
+ return {
87
+ success: true
88
+ };
89
+ }
90
+
72
91
  console.error("Failed to publish to https://crates.io");
73
92
  console.error(error);
93
+ console.log("");
94
+ console.error(formatLog(error));
74
95
 
75
96
  return {
76
97
  success: false
77
98
  };
78
99
  }
79
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);