@storm-software/workspace-tools 1.66.17 → 1.66.19
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,29 @@
|
|
|
1
|
+
## 1.66.19 (2024-03-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🩹 Fixes
|
|
5
|
+
|
|
6
|
+
- **workspace-tools:** Update the package root during publish ([ec87434f](https://github.com/storm-software/storm-ops/commit/ec87434f))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ❤️ Thank You
|
|
10
|
+
|
|
11
|
+
- Patrick Sullivan
|
|
12
|
+
|
|
13
|
+
## 1.66.18 (2024-03-28)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### 🩹 Fixes
|
|
17
|
+
|
|
18
|
+
- **git-tools:** Added code to add ts plugin transpilers ([ec514d57](https://github.com/storm-software/storm-ops/commit/ec514d57))
|
|
19
|
+
|
|
20
|
+
- **workspace-tools:** Remove `axios` reference from `cargo-publish` executor ([7a2e3570](https://github.com/storm-software/storm-ops/commit/7a2e3570))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### ❤️ Thank You
|
|
24
|
+
|
|
25
|
+
- Patrick Sullivan
|
|
26
|
+
|
|
1
27
|
## 1.66.17 (2024-03-28)
|
|
2
28
|
|
|
3
29
|
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
16
16
|
|
|
17
17
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.org" target="_blank">stormsoftware.org</a> to stay up to date with this developer</h3><br />
|
|
18
18
|
|
|
19
|
-
[](https://prettier.io/)
|
|
20
20
|
[](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://docusaurus.io/) 
|
|
21
21
|
|
|
22
22
|
> [!IMPORTANT]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/workspace-tools",
|
|
3
|
-
"version": "1.66.
|
|
3
|
+
"version": "1.66.19",
|
|
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": [
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"@nx/devkit": "18.0.4",
|
|
53
53
|
"@nx/esbuild": "18.0.4",
|
|
54
54
|
"@rollup/plugin-json": "6.1.0",
|
|
55
|
-
"axios": "^0.27.2",
|
|
56
55
|
"bundle-require": "^4.0.2",
|
|
57
56
|
"decky": "1.1.1",
|
|
58
57
|
"esbuild-plugin-environment": "0.3.0",
|
|
@@ -3,8 +3,7 @@ import { execSync } from "node:child_process";
|
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { parseCargoToml } from "../../utils/toml";
|
|
5
5
|
import type { CargoPublishExecutorSchema } from "./schema.d";
|
|
6
|
-
import
|
|
7
|
-
import axios from "axios";
|
|
6
|
+
import https from "node:https";
|
|
8
7
|
|
|
9
8
|
const LARGE_BUFFER = 1024 * 1000000;
|
|
10
9
|
|
|
@@ -22,7 +21,7 @@ export default async function runExecutor(
|
|
|
22
21
|
throw new Error("The executor requires a projectName.");
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
console.info(`🚀 Running Storm
|
|
24
|
+
console.info(`🚀 Running Storm Crates.io Publish executor on the ${context.projectName} crate`);
|
|
26
25
|
|
|
27
26
|
if (
|
|
28
27
|
!context.projectName ||
|
|
@@ -44,18 +43,8 @@ export default async function runExecutor(
|
|
|
44
43
|
);
|
|
45
44
|
|
|
46
45
|
try {
|
|
47
|
-
const result = await
|
|
48
|
-
|
|
49
|
-
url: `https://crates.io/api/v1/crates/${encode(cargoToml.package.name)}/${encode(
|
|
50
|
-
cargoToml.package.version
|
|
51
|
-
)}`,
|
|
52
|
-
headers: {
|
|
53
|
-
"Content-Type": "application/json",
|
|
54
|
-
Authorization: process.env.CARGO_REGISTRY_TOKEN
|
|
55
|
-
},
|
|
56
|
-
timeout: 8000
|
|
57
|
-
});
|
|
58
|
-
if (result?.data) {
|
|
46
|
+
const result = await getRegistryVersion(cargoToml.package.name, cargoToml.package.version);
|
|
47
|
+
if (result) {
|
|
59
48
|
console.warn(
|
|
60
49
|
`Skipped package "${cargoToml.package.name}" from project "${context.projectName}" because v${cargoToml.package.version} already exists in https://crates.io with tag "latest"`
|
|
61
50
|
);
|
|
@@ -107,3 +96,22 @@ export default async function runExecutor(
|
|
|
107
96
|
};
|
|
108
97
|
}
|
|
109
98
|
}
|
|
99
|
+
|
|
100
|
+
export const getRegistryVersion = (name: string, version: string): Promise<string> => {
|
|
101
|
+
return new Promise((resolve: (value: string) => void) =>
|
|
102
|
+
https
|
|
103
|
+
.get(
|
|
104
|
+
`https://crates.io/api/v1/crates/${encodeURIComponent(name)}/${encodeURIComponent(
|
|
105
|
+
version
|
|
106
|
+
)}`,
|
|
107
|
+
(res) => {
|
|
108
|
+
res.on("data", (d) => {
|
|
109
|
+
resolve(d);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
.on("error", (e) => {
|
|
114
|
+
throw e;
|
|
115
|
+
})
|
|
116
|
+
);
|
|
117
|
+
};
|
|
@@ -22,7 +22,10 @@ export default async function npmPublishExecutorFn(
|
|
|
22
22
|
if (!projectConfig) {
|
|
23
23
|
throw new Error(`Could not find project configuration for ${context.projectName}`);
|
|
24
24
|
}
|
|
25
|
-
const packageRoot = joinPathFragments(
|
|
25
|
+
const packageRoot = joinPathFragments(
|
|
26
|
+
context.root,
|
|
27
|
+
options.packageRoot ? options.packageRoot : joinPathFragments("dist", projectConfig.root)
|
|
28
|
+
);
|
|
26
29
|
|
|
27
30
|
const packageJsonPath = joinPathFragments(packageRoot, "package.json");
|
|
28
31
|
const projectPackageJson = readJsonFile(packageJsonPath);
|