@storm-software/workspace-tools 1.66.11 → 1.66.12

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,15 @@
1
+ ## 1.66.12 (2024-03-28)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **workspace-tools:** Resolved `axios` module import issue ([a2bf92c2](https://github.com/storm-software/storm-ops/commit/a2bf92c2))
7
+
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - Patrick Sullivan
12
+
1
13
  ## 1.66.11 (2024-03-28)
2
14
 
3
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/workspace-tools",
3
- "version": "1.66.11",
3
+ "version": "1.66.12",
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": [
@@ -3,21 +3,24 @@ 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 axios from "axios";
7
6
  import { encode } from "node:querystring";
8
7
 
9
8
  const LARGE_BUFFER = 1024 * 1000000;
10
9
 
11
- const REGISTRY = axios.create({
12
- baseURL: "https://crates.io/api/v1/crates",
13
- headers: { "Content-Type": "application/json", Authorization: process.env.CARGO_REGISTRY_TOKEN },
14
- timeout: 8000
15
- });
16
-
17
10
  export default async function runExecutor(
18
11
  options: CargoPublishExecutorSchema,
19
12
  context: ExecutorContext
20
13
  ) {
14
+ const axios = await import("axios");
15
+ const registryApi = axios.default.create({
16
+ baseURL: "https://crates.io/api/v1/crates",
17
+ headers: {
18
+ "Content-Type": "application/json",
19
+ Authorization: process.env.CARGO_REGISTRY_TOKEN
20
+ },
21
+ timeout: 8000
22
+ });
23
+
21
24
  /**
22
25
  * We need to check both the env var and the option because the executor may have been triggered
23
26
  * indirectly via dependsOn, in which case the env var will be set, but the option will not.
@@ -48,7 +51,7 @@ export default async function runExecutor(
48
51
  );
49
52
 
50
53
  try {
51
- const result = await REGISTRY.get(
54
+ const result = await registryApi.get(
52
55
  `/${encode(cargoToml.package.name)}/${encode(cargoToml.package.version)}`
53
56
  );
54
57
  if (result?.data) {