uniwind-pro 1.5.1 → 1.7.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/README.md CHANGED
@@ -25,7 +25,7 @@ bunx uniwind-pro
25
25
 
26
26
  ## Demo
27
27
 
28
- Check out the [Uniwind Pro Demo](https://github.com/uni-stack/uniwind-pro-demo) — a complete Expo SDK 54 / React Native 0.83.5 app showcasing the C++ engine, ShadowTree updates, and native transitions. Clone it and run on your iOS simulator.
28
+ Check out the [Uniwind Pro Demo](https://github.com/uni-stack/uniwind-pro-demo) (Uniwind Pro v1.6.0) — a complete Expo SDK 56 / React Native 0.85.3 app showcasing the C++ engine, ShadowTree updates, Reanimated animations, native transitions, and scoped CSS variables. Clone it and run on your iOS simulator.
29
29
 
30
30
  ## Get Started
31
31
  - [Purchase a license](https://docs.uniwind.dev/pro/get-license)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniwind-pro",
3
- "version": "1.5.1",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "description": "Uniwind Pro CLI",
6
6
  "keywords": [
@@ -26,11 +26,11 @@
26
26
  "bin": {
27
27
  "uniwind-pro": "./pre/cli/index.js"
28
28
  },
29
- "author": "Codemask",
29
+ "author": "Unistack",
30
30
  "license": "UNLICENSED",
31
31
  "dependencies": {
32
- "@tailwindcss/node": "4.3.0",
33
- "@tailwindcss/oxide": "4.3.0",
32
+ "@tailwindcss/node": "4.3.3",
33
+ "@tailwindcss/oxide": "4.3.3",
34
34
  "@zowe/secrets-for-zowe-sdk": "8.29.4",
35
35
  "chalk": "5.6.2",
36
36
  "chokidar": "5.0.0",
@@ -42,6 +42,13 @@ export const enforceCachePolicy = (packageVersion) => {
42
42
  } catch {}
43
43
  }
44
44
 
45
+ // Banned accounts lose the whole local cache, not just the current version
46
+ export const purgeCache = () => {
47
+ try {
48
+ rmSync(CACHE_ROOT, { recursive: true, force: true })
49
+ } catch {}
50
+ }
51
+
45
52
  // The cache stores the verified tarball (plus an informational .sha256
46
53
  // sidecar), not extracted files, so every restore re-verifies the bytes
47
54
  // against the checksum published on the CDN before extracting them.
@@ -9,6 +9,7 @@ import { INSTALLATION_URL, SERVICE, HELP_EMAIL } from '../consts.js'
9
9
  import {
10
10
  copyDirectoryContents,
11
11
  enforceCachePolicy,
12
+ purgeCache,
12
13
  restoreFromCache,
13
14
  saveToCache,
14
15
  } from './cache.js'
@@ -21,6 +22,35 @@ const PKG_ROOT = join(__dirname, '../../')
21
22
  const pkgPath = join(PKG_ROOT, 'package.json')
22
23
  const streamPipeline = promisify(pipeline)
23
24
 
25
+ // A 403 from the CDN means the account is banned: drop the local cache so the
26
+ // package cannot be restored offline, then fail the install.
27
+ const handleBannedResponse = async (response, handle) => {
28
+ if (response.status !== 403) {
29
+ return
30
+ }
31
+
32
+ const body = await response.json().catch(() => ({}))
33
+
34
+ purgeCache()
35
+
36
+ if (handle) {
37
+ try {
38
+ const { keyring } = await import('@zowe/secrets-for-zowe-sdk')
39
+ await keyring.deletePassword(SERVICE, handle)
40
+ } catch {}
41
+ }
42
+
43
+ console.log(chalk.red.bold('\nYour account has been banned.\n'))
44
+
45
+ if (body.error && body.error !== 'Your account has been banned.') {
46
+ console.log(chalk.red(`${body.error}\n`))
47
+ }
48
+
49
+ console.log(chalk.yellow(`Contact ${HELP_EMAIL} if you believe this is a mistake.\n`))
50
+
51
+ process.exit(1)
52
+ }
53
+
24
54
  const warnIfOutdated = async (versionCheck, currentVersion) => {
25
55
  const result = await versionCheck
26
56
 
@@ -135,6 +165,8 @@ export const downloadFromCI = async (licenseUUID) => {
135
165
  const cdnUrl = `${INSTALLATION_URL}/ci/${packageVersion}/${licenseUUID}`
136
166
  const response = await fetch(cdnUrl)
137
167
 
168
+ await handleBannedResponse(response)
169
+
138
170
  if (response.status === 429) {
139
171
  const body = await response.json().catch(() => ({}))
140
172
 
@@ -187,6 +219,8 @@ export const downloadFromCLI = async ({ account: handle, password: token }) => {
187
219
  return
188
220
  }
189
221
 
222
+ await handleBannedResponse(response, handle)
223
+
190
224
  if (response.status === 429) {
191
225
  const body = await response.json().catch(() => ({}))
192
226