11import { setMaxListeners } from 'events'
2+ import pkg from '../package.json'
3+ import { blue , bgBlue , green } from 'picocolors'
24import { fetch } from 'undici'
35import './sentry.js'
46
@@ -172,7 +174,7 @@ function fixOldUnframerPath() {
172174 }
173175 return false
174176}
175- import pkg from '../package.json'
177+
176178const version = pkg . version
177179
178180cli . 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 )
0 commit comments