uniwind-pro 1.2.1 → 1.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniwind-pro",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "description": "Uniwind Pro CLI",
6
6
  "keywords": [
@@ -29,8 +29,8 @@
29
29
  "author": "Codemask",
30
30
  "license": "UNLICENSED",
31
31
  "dependencies": {
32
- "@tailwindcss/node": "4.2.1",
33
- "@tailwindcss/oxide": "4.2.1",
32
+ "@tailwindcss/node": "4.3.0",
33
+ "@tailwindcss/oxide": "4.3.0",
34
34
  "@zowe/secrets-for-zowe-sdk": "8.29.4",
35
35
  "chalk": "5.6.2",
36
36
  "chokidar": "5.0.0",
@@ -42,5 +42,19 @@
42
42
  "lightningcss": "1.30.1",
43
43
  "open": "11.0.0",
44
44
  "tar": "7.5.13"
45
+ },
46
+ "peerDependencies": {
47
+ "metro": "*",
48
+ "metro-cache": "*",
49
+ "@expo/metro-config": "*",
50
+ "metro-transform-worker": "*"
51
+ },
52
+ "peerDependenciesMeta": {
53
+ "@expo/metro-config": {
54
+ "optional": true
55
+ },
56
+ "metro-transform-worker": {
57
+ "optional": true
58
+ }
45
59
  }
46
60
  }
@@ -40,6 +40,30 @@ export const buildDownloadError = async (response, cdnUrl) => {
40
40
  return error
41
41
  }
42
42
 
43
+ // Format a non-HTTP failure for display: the stacktrace plus the error code and
44
+ // the underlying `cause`. Network failures surface as `TypeError: fetch failed`,
45
+ // whose real reason (ENOTFOUND / ECONNREFUSED / connect timeout / TLS error)
46
+ // lives on `error.cause`, so it is surfaced explicitly here.
47
+ export const formatUnexpectedError = (error) => {
48
+ const lines = [error.stack || error.message || String(error)]
49
+
50
+ if (error.code) {
51
+ lines.push(`\nCode: ${error.code}`)
52
+ }
53
+
54
+ const cause = error.cause
55
+
56
+ if (cause) {
57
+ lines.push(`\nCause: ${cause.message || cause}`)
58
+
59
+ if (cause.code) {
60
+ lines.push(`Cause code: ${cause.code}`)
61
+ }
62
+ }
63
+
64
+ return lines.join('\n')
65
+ }
66
+
43
67
  // Format a captured response body for display: pretty-print JSON bodies, pass
44
68
  // other bodies through as-is, and return null when there is nothing to show.
45
69
  export const formatBody = (http) => {
@@ -4,7 +4,7 @@ import { dirname, join, resolve } from 'node:path'
4
4
  import { fileURLToPath } from 'node:url'
5
5
  import { UNIWIND_AUTH_TOKEN, SERVICE, UNIWIND_WEB_URL, HELP_EMAIL } from '../consts.js'
6
6
  import { downloadFromCI, downloadFromCLI } from './install.js'
7
- import { formatBody } from './errors.js'
7
+ import { formatBody, formatUnexpectedError } from './errors.js'
8
8
 
9
9
  // Create bin symlinks for aliased package
10
10
  const createBinSymlinks = () => {
@@ -65,11 +65,7 @@ main().catch((error) => {
65
65
  // the "Access denied" guidance would be misleading, so show the stacktrace instead.
66
66
  if (!error.http) {
67
67
  console.log(chalk.red.bold('Installation failed (unexpected error):\n'))
68
- console.log(chalk.gray(error.stack || error.message))
69
-
70
- if (error.code) {
71
- console.log(chalk.gray(`\nCode: ${error.code}`))
72
- }
68
+ console.log(chalk.gray(formatUnexpectedError(error)))
73
69
 
74
70
  process.exit(1)
75
71
  }