@storm-software/workspace-tools 1.66.16 → 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,29 @@
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
+
15
+ ## 1.66.17 (2024-03-28)
16
+
17
+
18
+ ### 🩹 Fixes
19
+
20
+ - **workspace-tools:** Resolve issues with `axios` calls ([53306912](https://github.com/storm-software/storm-ops/commit/53306912))
21
+
22
+
23
+ ### ❤️ Thank You
24
+
25
+ - Patrick Sullivan
26
+
1
27
  ## 1.66.16 (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
- [![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.16",
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": "1.6.7",
56
55
  "bundle-require": "^4.0.2",
57
56
  "decky": "1.1.1",
58
57
  "esbuild-plugin-environment": "0.3.0",
package/project.json CHANGED
@@ -6,9 +6,7 @@
6
6
  "targets": {
7
7
  "build": {
8
8
  "executor": "@nx/esbuild:esbuild",
9
- "outputs": [
10
- "{options.outputPath}"
11
- ],
9
+ "outputs": ["{options.outputPath}"],
12
10
  "options": {
13
11
  "outputPath": "dist/packages/workspace-tools",
14
12
  "tsConfig": "packages/workspace-tools/tsconfig.lib.json",
@@ -41,19 +39,13 @@
41
39
  "skipTypeCheck": false,
42
40
  "metafile": true,
43
41
  "minify": false,
44
- "format": [
45
- "cjs"
46
- ],
42
+ "format": ["cjs"],
47
43
  "esbuildOptions": {
48
44
  "outExtension": {
49
45
  ".js": ".js"
50
46
  }
51
47
  },
52
- "external": [
53
- "nx",
54
- "@storm-software/*",
55
- "axios"
56
- ],
48
+ "external": ["nx", "@storm-software/*"],
57
49
  "assets": [
58
50
  {
59
51
  "input": "packages/workspace-tools",
@@ -68,19 +60,13 @@
68
60
  {
69
61
  "input": "packages/workspace-tools",
70
62
  "glob": "**/*.json",
71
- "ignore": [
72
- "**/tsconfig*.json",
73
- "project.json",
74
- ".eslintrc.json"
75
- ],
63
+ "ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"],
76
64
  "output": "."
77
65
  },
78
66
  {
79
67
  "input": "packages/workspace-tools",
80
68
  "glob": "**/*.js",
81
- "ignore": [
82
- "**/jest.config.js"
83
- ],
69
+ "ignore": ["**/jest.config.js"],
84
70
  "output": "."
85
71
  },
86
72
  {
@@ -112,8 +98,5 @@
112
98
  }
113
99
  }
114
100
  },
115
- "tags": [
116
- "type:util",
117
- "scope:tools"
118
- ]
101
+ "tags": ["type:util", "scope:tools"]
119
102
  }
@@ -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,6 +21,8 @@ export default async function runExecutor(
22
21
  throw new Error("The executor requires a projectName.");
23
22
  }
24
23
 
24
+ console.info(`🚀 Running Storm Crates.io Publish executor on the ${context.projectName} crate`);
25
+
25
26
  if (
26
27
  !context.projectName ||
27
28
  !context.projectsConfigurations?.projects ||
@@ -42,18 +43,8 @@ export default async function runExecutor(
42
43
  );
43
44
 
44
45
  try {
45
- const result = await axios({
46
- method: "get",
47
- url: `https://crates.io/api/v1/crates/${encode(cargoToml.package.name)}/${encode(
48
- cargoToml.package.version
49
- )}`,
50
- headers: {
51
- "Content-Type": "application/json",
52
- Authorization: process.env.CARGO_REGISTRY_TOKEN
53
- },
54
- timeout: 8000
55
- });
56
- if (result?.data) {
46
+ const result = await getRegistryVersion(cargoToml.package.name, cargoToml.package.version);
47
+ if (result) {
57
48
  console.warn(
58
49
  `Skipped package "${cargoToml.package.name}" from project "${context.projectName}" because v${cargoToml.package.version} already exists in https://crates.io with tag "latest"`
59
50
  );
@@ -105,3 +96,22 @@ export default async function runExecutor(
105
96
  };
106
97
  }
107
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
+ };