Skip to content

Commit ea6fcea

Browse files
committed
release. add buy url
1 parent 4955ec3 commit ea6fcea

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

unframer/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# unframer
22

3+
## 3.2.11
4+
5+
### Patch Changes
6+
7+
- Add subscription link for buying
8+
39
## 3.2.10
410

511
### Patch Changes

unframer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unframer",
3-
"version": "3.2.10",
3+
"version": "3.2.11",
44
"description": "Import Framer components directly in your React app, type safe and customizable",
55
"sideEffects": false,
66
"repository": "https://github.com/remorses/unframer",

unframer/src/cli.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { setMaxListeners } from 'events'
2+
import pkg from '../package.json'
3+
import { blue, bgBlue, green } from 'picocolors'
24
import { fetch } from 'undici'
35
import './sentry.js'
46

@@ -172,7 +174,7 @@ function fixOldUnframerPath() {
172174
}
173175
return false
174176
}
175-
import pkg from '../package.json'
177+
176178
const version = pkg.version
177179

178180
cli.version(version).help()
@@ -371,7 +373,10 @@ export async function configFromFetch({
371373
const client = await createClient({
372374
url: url || 'https://unframer.co',
373375
headers: {
374-
'X-Agent': 'cli',
376+
'X-Agent':
377+
process.env.GITHUB_ACTIONS === 'true'
378+
? 'github-actions'
379+
: 'cli',
375380
},
376381
})
377382

@@ -390,11 +395,17 @@ export async function configFromFetch({
390395
}
391396
return 'A React Export subscription is required to download components.'
392397
})()
393-
const details = buyUrl
394-
? `${message}\nPurchase subscription: ${buyUrl}`
395-
: message
398+
396399
// spinner.error(details)
397-
throw new Error(details, { cause: error })
400+
spinner.error(message)
401+
console.info('')
402+
console.info(
403+
'Go to this url to buy the Framer React Export subscription:\n',
404+
)
405+
console.info(green(buyUrl))
406+
console.info()
407+
process.exit(1)
408+
// throw new Error(details, { cause: error })
398409
}
399410
spinner.error('Error fetching project data:')
400411
console.error(error)

unframer/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '3.2.10'
1+
export const version = '3.2.11'

0 commit comments

Comments
 (0)