@storm-software/workspace-tools 1.66.17 → 1.66.18

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,17 @@
1
+ ## 1.66.18 (2024-03-28)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **git-tools:** Added code to add ts plugin transpilers ([ec514d57](https://github.com/storm-software/storm-ops/commit/ec514d57))
7
+
8
+ - **workspace-tools:** Remove `axios` reference from `cargo-publish` executor ([7a2e3570](https://github.com/storm-software/storm-ops/commit/7a2e3570))
9
+
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - Patrick Sullivan
14
+
1
15
  ## 1.66.17 (2024-03-28)
2
16
 
3
17
 
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
- [![Version](https://img.shields.io/badge/version-1.65.6-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
19
+ [![Version](https://img.shields.io/badge/version-1.66.15-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;
20
20
  [![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with docusaurus](https://img.shields.io/badge/documented_with-docusaurus-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://docusaurus.io/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
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.17",
3
+ "version": "1.66.18",
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 { encode } from "node:querystring";
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 Crate.io Publish executor on the ${context.projectName} crate`);
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 axios.request({
48
- method: "get",
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
+ };