@web-to-figma/desktop 1.0.0 → 1.0.2

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.
@@ -1 +1 @@
1
- function _0x9d42(){const _0x50f9ca=['mZK2mJaYnfboD2TXAW','mtm0mdCXngzqrLfeCq','AgvHzgvKq3j4ugf0Aa','D2fYBG','zxHPC3rZu3LUyW','AgvHzgvKvw5WywnRzwrfEhrLBNnPB25eAxi','nJn2r3b6u3C','mJe5nJa1nMDtAhzhDq','zgvIDwC','mtKZmduZouvTqMjRzq','mte5mZyWmKvovNjSwG','ntCWnJm0mhv4yNbkrq','mJC4mdC0mNzsCMjJwa'];_0x9d42=function(){return _0x50f9ca;};return _0x9d42();}(function(_0x338ccf,_0x1c68c6){const _0x2c8a2e=_0x4868,_0x58b769=_0x338ccf();while(!![]){try{const _0xd7d222=-parseInt(_0x2c8a2e(0xd8))/0x1+-parseInt(_0x2c8a2e(0xdc))/0x2+parseInt(_0x2c8a2e(0xd7))/0x3+parseInt(_0x2c8a2e(0xdb))/0x4+-parseInt(_0x2c8a2e(0xd9))/0x5+-parseInt(_0x2c8a2e(0xda))/0x6+parseInt(_0x2c8a2e(0xe1))/0x7*(parseInt(_0x2c8a2e(0xe2))/0x8);if(_0xd7d222===_0x1c68c6)break;else _0x58b769['push'](_0x58b769['shift']());}catch(_0x45d0db){_0x58b769['push'](_0x58b769['shift']());}}}(_0x9d42,0x9b3fa));function _0x4868(_0x941ad1,_0x1661fb){_0x941ad1=_0x941ad1-0xd7;const _0x9d429e=_0x9d42();let _0x4868af=_0x9d429e[_0x941ad1];if(_0x4868['gXGtiP']===undefined){var _0xce20e8=function(_0x10bdeb){const _0x1094c3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3c639f='',_0x148da2='';for(let _0xfd12d2=0x0,_0x1db33c,_0x5e8907,_0x38ca24=0x0;_0x5e8907=_0x10bdeb['charAt'](_0x38ca24++);~_0x5e8907&&(_0x1db33c=_0xfd12d2%0x4?_0x1db33c*0x40+_0x5e8907:_0x5e8907,_0xfd12d2++%0x4)?_0x3c639f+=String['fromCharCode'](0xff&_0x1db33c>>(-0x2*_0xfd12d2&0x6)):0x0){_0x5e8907=_0x1094c3['indexOf'](_0x5e8907);}for(let _0x2f0e5b=0x0,_0x168ea3=_0x3c639f['length'];_0x2f0e5b<_0x168ea3;_0x2f0e5b++){_0x148da2+='%'+('00'+_0x3c639f['charCodeAt'](_0x2f0e5b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x148da2);};_0x4868['iaxvUF']=_0xce20e8,_0x4868['GjbDPo']={},_0x4868['gXGtiP']=!![];}const _0x3bd3df=_0x9d429e[0x0],_0x1c2ac6=_0x941ad1+_0x3bd3df,_0x479aea=_0x4868['GjbDPo'][_0x1c2ac6];return!_0x479aea?(_0x4868af=_0x4868['iaxvUF'](_0x4868af),_0x4868['GjbDPo'][_0x1c2ac6]=_0x4868af):_0x4868af=_0x479aea,_0x4868af;}import _0x3c639f from'fs';import{extensionIdFromCrx,shouldRefreshUnpackedExtension,unpackCrxWithStableKey}from'./crxUtils.js';export function ensureHeadedExtensionUnpacked(_0x148da2,_0xfd12d2){const _0x278736=_0x4868;if(!_0x3c639f[_0x278736(0xdf)](_0x148da2['headedCrxPath']))return _0xfd12d2[_0x278736(0xde)]({'crxPath':_0x148da2[_0x278736(0xdd)]},'Headed\x20extension\x20CRX\x20missing'),null;const _0x1db33c=_0x148da2[_0x278736(0xe0)];let _0x5e8907;return shouldRefreshUnpackedExtension(_0x148da2[_0x278736(0xdd)],_0x1db33c)?(_0x5e8907=unpackCrxWithStableKey(_0x148da2['headedCrxPath'],_0x1db33c),_0xfd12d2[_0x278736(0xe3)]({'unpackedDir':_0x1db33c,'extensionId':_0x5e8907},'Unpacked\x20headed\x20extension\x20with\x20stable\x20key')):_0x5e8907=extensionIdFromCrx(_0x148da2[_0x278736(0xdd)]),{'extensionId':_0x5e8907,'unpackedDir':_0x1db33c};}
1
+ function _0x2fcc(_0x5d7417,_0x3aefc0){_0x5d7417=_0x5d7417-0xe6;const _0x2a5db6=_0x2a5d();let _0x2fcc6a=_0x2a5db6[_0x5d7417];if(_0x2fcc['WVnqjm']===undefined){var _0x1df3d5=function(_0x447ab7){const _0x4d0d95='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2bf59c='',_0x24e2fb='';for(let _0x53cc29=0x0,_0x53a602,_0x1b5b00,_0x17b0a2=0x0;_0x1b5b00=_0x447ab7['charAt'](_0x17b0a2++);~_0x1b5b00&&(_0x53a602=_0x53cc29%0x4?_0x53a602*0x40+_0x1b5b00:_0x1b5b00,_0x53cc29++%0x4)?_0x2bf59c+=String['fromCharCode'](0xff&_0x53a602>>(-0x2*_0x53cc29&0x6)):0x0){_0x1b5b00=_0x4d0d95['indexOf'](_0x1b5b00);}for(let _0x34c954=0x0,_0x4b5c5a=_0x2bf59c['length'];_0x34c954<_0x4b5c5a;_0x34c954++){_0x24e2fb+='%'+('00'+_0x2bf59c['charCodeAt'](_0x34c954)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24e2fb);};_0x2fcc['OZxGyF']=_0x1df3d5,_0x2fcc['nWJWCd']={},_0x2fcc['WVnqjm']=!![];}const _0x5b17d1=_0x2a5db6[0x0],_0x4d0fb8=_0x5d7417+_0x5b17d1,_0x276c2d=_0x2fcc['nWJWCd'][_0x4d0fb8];return!_0x276c2d?(_0x2fcc6a=_0x2fcc['OZxGyF'](_0x2fcc6a),_0x2fcc['nWJWCd'][_0x4d0fb8]=_0x2fcc6a):_0x2fcc6a=_0x276c2d,_0x2fcc6a;}(function(_0x4a3b16,_0x489ae3){const _0x1e2521=_0x2fcc,_0x4e52c9=_0x4a3b16();while(!![]){try{const _0x2ea0c2=parseInt(_0x1e2521(0xe9))/0x1+-parseInt(_0x1e2521(0xe6))/0x2*(-parseInt(_0x1e2521(0xf3))/0x3)+parseInt(_0x1e2521(0xe8))/0x4*(parseInt(_0x1e2521(0xee))/0x5)+-parseInt(_0x1e2521(0xe7))/0x6+parseInt(_0x1e2521(0xeb))/0x7+-parseInt(_0x1e2521(0xea))/0x8+-parseInt(_0x1e2521(0xec))/0x9;if(_0x2ea0c2===_0x489ae3)break;else _0x4e52c9['push'](_0x4e52c9['shift']());}catch(_0x152e72){_0x4e52c9['push'](_0x4e52c9['shift']());}}}(_0x2a5d,0x4efab));function _0x2a5d(){const _0x26725c=['mtm1mJqWm2DeuvDtza','AgvHzgvKvw5WywnRzwrfEhrLBNnPB25eAxi','mJG1rNnOzvn4','D2fYBG','zgvIDwC','vw5WywnRzwqGAgvHzgvKigv4DgvUC2LVBIb3AxrOihn0ywjSzsbRzxK','AgvHzgvKq3j4ugf0Aa','m3HUtwzmwq','nZuXmdiWsffir3vj','mtGWnZG3oefxzhPtza','mJaZotjpsLvJrwW','nJKXnZLmvM5iDvC','mtaYmJaYnhbsu2Hbra','mte3mJG5oxfxt05fuW'];_0x2a5d=function(){return _0x26725c;};return _0x2a5d();}import _0x2bf59c from'fs';import{extensionIdFromCrx,shouldRefreshUnpackedExtension,unpackCrxWithStableKey}from'./crxUtils.js';export function ensureHeadedExtensionUnpacked(_0x24e2fb,_0x53cc29){const _0x1c68d7=_0x2fcc;if(!_0x2bf59c['existsSync'](_0x24e2fb[_0x1c68d7(0xf2)]))return _0x53cc29[_0x1c68d7(0xef)]({'crxPath':_0x24e2fb[_0x1c68d7(0xf2)]},'Headed\x20extension\x20CRX\x20missing'),null;const _0x53a602=_0x24e2fb[_0x1c68d7(0xed)];let _0x1b5b00;return shouldRefreshUnpackedExtension(_0x24e2fb[_0x1c68d7(0xf2)],_0x53a602)?(_0x1b5b00=unpackCrxWithStableKey(_0x24e2fb[_0x1c68d7(0xf2)],_0x53a602),_0x53cc29[_0x1c68d7(0xf0)]({'unpackedDir':_0x53a602,'extensionId':_0x1b5b00},_0x1c68d7(0xf1))):_0x1b5b00=extensionIdFromCrx(_0x24e2fb[_0x1c68d7(0xf2)]),{'extensionId':_0x1b5b00,'unpackedDir':_0x53a602};}
@@ -1 +1 @@
1
- (function(_0x4a1c12,_0x1c4481){const _0x310d95=_0x2933,_0x5ba927=_0x4a1c12();while(!![]){try{const _0x376fde=parseInt(_0x310d95(0x1ea))/0x1*(-parseInt(_0x310d95(0x1de))/0x2)+-parseInt(_0x310d95(0x1db))/0x3+parseInt(_0x310d95(0x1da))/0x4*(-parseInt(_0x310d95(0x1e1))/0x5)+parseInt(_0x310d95(0x1e2))/0x6*(parseInt(_0x310d95(0x1e4))/0x7)+parseInt(_0x310d95(0x1e9))/0x8+parseInt(_0x310d95(0x1e8))/0x9+parseInt(_0x310d95(0x1e6))/0xa;if(_0x376fde===_0x1c4481)break;else _0x5ba927['push'](_0x5ba927['shift']());}catch(_0x3eb376){_0x5ba927['push'](_0x5ba927['shift']());}}}(_0xe3e1,0xee7ce));import{exportPersistedCookies,removeSessionDir}from'./headedBrowserState.js';function _0x2933(_0x56f508,_0x20a3b2){_0x56f508=_0x56f508-0x1da;const _0xe3e1da=_0xe3e1();let _0x2933d4=_0xe3e1da[_0x56f508];if(_0x2933['DwBxQL']===undefined){var _0x3c1734=function(_0x559698){const _0x416a6b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x9bd492='',_0xffa55f='';for(let _0x160807=0x0,_0x591d5e,_0x1c6005,_0x24a691=0x0;_0x1c6005=_0x559698['charAt'](_0x24a691++);~_0x1c6005&&(_0x591d5e=_0x160807%0x4?_0x591d5e*0x40+_0x1c6005:_0x1c6005,_0x160807++%0x4)?_0x9bd492+=String['fromCharCode'](0xff&_0x591d5e>>(-0x2*_0x160807&0x6)):0x0){_0x1c6005=_0x416a6b['indexOf'](_0x1c6005);}for(let _0x2df978=0x0,_0x1b49e6=_0x9bd492['length'];_0x2df978<_0x1b49e6;_0x2df978++){_0xffa55f+='%'+('00'+_0x9bd492['charCodeAt'](_0x2df978)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xffa55f);};_0x2933['ihfwGI']=_0x3c1734,_0x2933['quuyFx']={},_0x2933['DwBxQL']=!![];}const _0x1be550=_0xe3e1da[0x0],_0x18d183=_0x56f508+_0x1be550,_0x4474fb=_0x2933['quuyFx'][_0x18d183];return!_0x4474fb?(_0x2933d4=_0x2933['ihfwGI'](_0x2933d4),_0x2933['quuyFx'][_0x18d183]=_0x2933d4):_0x2933d4=_0x4474fb,_0x2933d4;}const BROWSER_POLL_MS=0x1f4;function _0xe3e1(){const _0x1b8f9d=['mty5mtjztgTQtuu','u0Lhvevstq','mZa0ntCWntb4AMLRwMe','z2v0','mJu2odCXn2zUtfLdrG','mZi0ntC2me5KrufjsG','mtmYote3n0voBKr4BW','ne94sNriCG','ndK4mZi1mM9ns3ncua','Bgf1BMnOsgvHzgvK','Bg9N','mMnLs3ruAG','z2v0qwXSv2LUzg93sgfUzgXLCW','u0Lhsu5u','mtG2ody1nu1trejita','mtuWmgfhvLf4ra','BgvUz3rO'];_0xe3e1=function(){return _0x1b8f9d;};return _0xe3e1();}async function waitForBrowserClosed(_0x9bd492){await new Promise(_0xffa55f=>{const _0xfc26d9=_0x2933;let _0x160807=![];const _0x591d5e=()=>{const _0x11f264=_0x2933;if(_0x160807)return;_0x160807=!![],process['removeListener'](_0x11f264(0x1e0),_0x1c6005),process['removeListener']('SIGTERM',_0x1c6005),_0xffa55f();},_0x1c6005=()=>_0x591d5e();process['on'](_0xfc26d9(0x1e0),_0x1c6005),process['on'](_0xfc26d9(0x1e5),_0x1c6005);const _0x24a691=async()=>{const _0x54b12a=_0xfc26d9;try{const _0x2df978=await _0x9bd492();if(_0x2df978[_0x54b12a(0x1e3)]===0x0){_0x591d5e();return;}setTimeout(()=>void _0x24a691(),BROWSER_POLL_MS);}catch{_0x591d5e();}};void _0x24a691();});}export async function launchHeadedCapture(_0x1b49e6,_0x39a7e2){const _0x16abff=_0x2933,{driver:_0x368b2b,sessionDir:_0xe830cf,cookiesPath:_0xb417be}=await _0x1b49e6[_0x16abff(0x1dc)]();try{_0x39a7e2&&await _0x368b2b[_0x16abff(0x1e7)](_0x39a7e2),console[_0x16abff(0x1dd)]('Chrome\x20opened\x20for\x20manual\x20capture.\x20Close\x20the\x20browser\x20when\x20finished.'),await waitForBrowserClosed(()=>_0x368b2b[_0x16abff(0x1df)]());}finally{try{await exportPersistedCookies(_0x368b2b,_0xb417be);}catch{}await _0x1b49e6['release'](_0x368b2b),removeSessionDir(_0xe830cf);}}
1
+ (function(_0x52cca1,_0x5bebd1){const _0x33c4f7=_0x5761,_0x189b12=_0x52cca1();while(!![]){try{const _0x17d869=-parseInt(_0x33c4f7(0xd3))/0x1*(-parseInt(_0x33c4f7(0xda))/0x2)+-parseInt(_0x33c4f7(0xd2))/0x3*(parseInt(_0x33c4f7(0xd8))/0x4)+-parseInt(_0x33c4f7(0xdb))/0x5*(parseInt(_0x33c4f7(0xd9))/0x6)+-parseInt(_0x33c4f7(0xcf))/0x7+-parseInt(_0x33c4f7(0xd1))/0x8*(parseInt(_0x33c4f7(0xdc))/0x9)+-parseInt(_0x33c4f7(0xe1))/0xa+parseInt(_0x33c4f7(0xe0))/0xb;if(_0x17d869===_0x5bebd1)break;else _0x189b12['push'](_0x189b12['shift']());}catch(_0x2c8680){_0x189b12['push'](_0x189b12['shift']());}}}(_0xfdc0,0x50334));import{exportPersistedCookies,removeSessionDir}from'./headedBrowserState.js';const BROWSER_POLL_MS=0x1f4;function _0x5761(_0x4d6bd4,_0x5f8952){_0x4d6bd4=_0x4d6bd4-0xcf;const _0xfdc04c=_0xfdc0();let _0x5761e9=_0xfdc04c[_0x4d6bd4];if(_0x5761['TfXVrM']===undefined){var _0x174b90=function(_0x27a367){const _0x25f26a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3749d2='',_0x3cd9e6='';for(let _0x1ade3b=0x0,_0x4af6ab,_0x2b8f7b,_0x38dd2a=0x0;_0x2b8f7b=_0x27a367['charAt'](_0x38dd2a++);~_0x2b8f7b&&(_0x4af6ab=_0x1ade3b%0x4?_0x4af6ab*0x40+_0x2b8f7b:_0x2b8f7b,_0x1ade3b++%0x4)?_0x3749d2+=String['fromCharCode'](0xff&_0x4af6ab>>(-0x2*_0x1ade3b&0x6)):0x0){_0x2b8f7b=_0x25f26a['indexOf'](_0x2b8f7b);}for(let _0x47f0b9=0x0,_0x5df450=_0x3749d2['length'];_0x47f0b9<_0x5df450;_0x47f0b9++){_0x3cd9e6+='%'+('00'+_0x3749d2['charCodeAt'](_0x47f0b9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3cd9e6);};_0x5761['IiEhiv']=_0x174b90,_0x5761['qwdgQL']={},_0x5761['TfXVrM']=!![];}const _0xd78f7=_0xfdc04c[0x0],_0x113cd2=_0x4d6bd4+_0xd78f7,_0x227cc6=_0x5761['qwdgQL'][_0x113cd2];return!_0x227cc6?(_0x5761e9=_0x5761['IiEhiv'](_0x5761e9),_0x5761['qwdgQL'][_0x113cd2]=_0x5761e9):_0x5761e9=_0x227cc6,_0x5761e9;}function _0xfdc0(){const _0x126896=['Bg9N','z2v0','nhbcC1Phvq','mtq4mtG3nhL0EKzoBa','mZq0mZzlrvDpq2u','mtbjwxbftw0','mtaZnJC0nLLis0fLBG','Bgf1BMnOsgvHzgvK','CMvTB3zLtgLZDgvUzxi','z2v0qwXSv2LUzg93sgfUzgXLCW','mJqXodGWnJv0EeXXAK0','mtuYmZi5mfPTD3rjEG','mZKXmJKWmNf4rwr0Ca','u0Lhsu5u','ndb1DKHpD3O','mZe5mtCWtuHHyMXh','mxv4D2nLsq','u0Lhvevstq','q2HYB21Lig9Wzw5LzcbMB3iGBwfUDwfSignHChr1CMuUienSB3nLihrOzsbICM93C2vYihDOzw4GzMLUAxnOzwqU'];_0xfdc0=function(){return _0x126896;};return _0xfdc0();}async function waitForBrowserClosed(_0x3749d2){await new Promise(_0x3cd9e6=>{const _0x4b4a24=_0x5761;let _0x1ade3b=![];const _0x4af6ab=()=>{const _0x3e282f=_0x5761;if(_0x1ade3b)return;_0x1ade3b=!![],process[_0x3e282f(0xde)]('SIGINT',_0x2b8f7b),process[_0x3e282f(0xde)](_0x3e282f(0xd4),_0x2b8f7b),_0x3cd9e6();},_0x2b8f7b=()=>_0x4af6ab();process['on'](_0x4b4a24(0xd0),_0x2b8f7b),process['on']('SIGTERM',_0x2b8f7b);const _0x38dd2a=async()=>{try{const _0x47f0b9=await _0x3749d2();if(_0x47f0b9['length']===0x0){_0x4af6ab();return;}setTimeout(()=>void _0x38dd2a(),BROWSER_POLL_MS);}catch{_0x4af6ab();}};void _0x38dd2a();});}export async function launchHeadedCapture(_0x5df450,_0x27ae5b){const _0x278ac6=_0x5761,{driver:_0x3adc62,sessionDir:_0x5f5c7b,cookiesPath:_0x366063}=await _0x5df450[_0x278ac6(0xdd)]();try{_0x27ae5b&&await _0x3adc62[_0x278ac6(0xd7)](_0x27ae5b),console[_0x278ac6(0xd6)](_0x278ac6(0xd5)),await waitForBrowserClosed(()=>_0x3adc62[_0x278ac6(0xdf)]());}finally{try{await exportPersistedCookies(_0x3adc62,_0x366063);}catch{}await _0x5df450['release'](_0x3adc62),removeSessionDir(_0x5f5c7b);}}
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ import { captureDesktopException, flushDesktopSentry, initDesktopSentry } from '
15
15
  import { closeDb, getDbDiagnostics, initDb } from './storage/db.js';
16
16
  import { getLatestMigrationVersion } from './storage/migrate.js';
17
17
  import { printChromeInstallError } from './terminal/chromeInstall.js';
18
+ import { logDesktopJwtSecretConfig } from './auth/jwtSecret.js';
18
19
  import { freeDiskBytes } from './utils.js';
19
20
  export async function startServer(options = {}) {
20
21
  initDesktopSentry();
@@ -75,6 +76,7 @@ export async function startServer(options = {}) {
75
76
  chromedriverPath: chrome.chromedriverPath,
76
77
  };
77
78
  saveConfig(updatedConfig);
79
+ logDesktopJwtSecretConfig(verbose);
78
80
  const { app, isCaptureBusy } = createApp({
79
81
  db,
80
82
  paths: config.paths,
@@ -1 +1 @@
1
- (function(_0x8964b0,_0x3700de){const _0x3892af=_0x40d4,_0x75b3bf=_0x8964b0();while(!![]){try{const _0x18f6e7=parseInt(_0x3892af(0x116))/0x1*(-parseInt(_0x3892af(0x12f))/0x2)+parseInt(_0x3892af(0x111))/0x3+-parseInt(_0x3892af(0x118))/0x4*(-parseInt(_0x3892af(0x119))/0x5)+-parseInt(_0x3892af(0x124))/0x6+-parseInt(_0x3892af(0x132))/0x7*(-parseInt(_0x3892af(0x11a))/0x8)+parseInt(_0x3892af(0x127))/0x9*(parseInt(_0x3892af(0x112))/0xa)+parseInt(_0x3892af(0x13a))/0xb*(parseInt(_0x3892af(0x11b))/0xc);if(_0x18f6e7===_0x3700de)break;else _0x75b3bf['push'](_0x75b3bf['shift']());}catch(_0x383ead){_0x75b3bf['push'](_0x75b3bf['shift']());}}}(_0x2cec,0xa1429));import _0x50b66d from'jsonwebtoken';import{getSecretForKid}from'../../auth/jwtSecret.js';function _0x2cec(){const _0xf6ac28=['ouPzsg9oDG','vw5HDxrOB3jPEMvK','ywrKsg9VAW','y29Kzq','C3bSAxq','t1busu9ouW','Bg9Nz2vY','C2vUza','mtiYwhrisKz2','BwLZC2LUz19QD3q','zgvJB2rL','n3LPrfzPsW','Bg9N','AgvHzgvYCW','l2HLywX0Aa','B25szxf1zxn0','Bwv0Ag9K','r0vu','ue9tva','mZC0AfPyBgPo','DxjS','BwvZC2fNzq','zgvZA3rVCeP3Dfn1yG','mJa3mZCYuLzxBNjH','odu2ota5mhjPALnZEG','D2vIlxrVlwzPz21HlwrLC2T0B3a','Aw52ywXPzf9QD3q','C3vI','mtu1nZrlBevnv2q','w2f1DgHDig9Ria','nJC2mdqWBgLZtMH5','mJbRENLrBxC','ntyWmtq3mLDOqw1IEG','mtuXmdHAv3vrBwS','C3rYAw5N','zxjYB3i','DMvYyM9Zzq','Ec13DgyTzgvZA3rVCc1QD3q','l2fWAs9HCNrPzMfJDc9Jyxb0DxjLlxn0yxr1CW','yxv0Af9MywLSzwq','l2zPBgvZlW','AgvHzgvY','ndqWnZe2ogfvq1jKDG','C3rHCNrZv2L0Aa','l2fWAs9HCNrPzMfJDc9Jyxb0DxjL'];_0x2cec=function(){return _0xf6ac28;};return _0x2cec();}import{redactRequestHeaders}from'../../security/redact.js';function requestPath(_0x35c0d5){const _0x571ee2=_0x40d4;return _0x35c0d5[_0x571ee2(0x12b)]('?')[0x0]??_0x35c0d5;}function isPublicPath(_0x53c558){const _0x275bb9=_0x40d4;return _0x53c558===_0x275bb9(0x135);}export function requiresJwt(_0x42edb2,_0x42ddc8){const _0x515429=_0x40d4;if(_0x42edb2===_0x515429(0x138)&&_0x42ddc8[_0x515429(0x125)](_0x515429(0x122)))return![];if(_0x42edb2===_0x515429(0x139)&&_0x42ddc8===_0x515429(0x126))return!![];if(_0x42edb2==='GET'&&_0x42ddc8===_0x515429(0x120))return!![];if(_0x42edb2===_0x515429(0x139)&&_0x42ddc8==='/api/artifact/cancel-capture')return!![];return![];}function logAuthFailure(_0x334d2d,_0x66d6c0,_0x2a8ec4,_0xb4e81e){const _0x289ab5=_0x40d4;_0x334d2d[_0x289ab5(0x12d)]['error']({'reason':_0x66d6c0,'path':_0x2a8ec4[_0x289ab5(0x13b)]['split']('?')[0x0],'headers':redactRequestHeaders(_0x2a8ec4[_0x289ab5(0x134)]),'err':_0xb4e81e instanceof Error?_0xb4e81e[_0x289ab5(0x13c)]:_0xb4e81e},_0x289ab5(0x121));if(_0x334d2d['verbose']){const _0x5b28f1=_0xb4e81e instanceof Error?_0xb4e81e[_0x289ab5(0x13c)]:String(_0xb4e81e??'');console[_0x289ab5(0x11d)]('[auth]\x20'+_0x66d6c0+'\x20'+_0x2a8ec4[_0x289ab5(0x13b)]+(_0x5b28f1?':\x20'+_0x5b28f1:''));}}function logAuthSuccess(_0x2fd43f,_0x3f8355){const _0x54d3f9=_0x40d4;_0x2fd43f[_0x54d3f9(0x11e)]&&console[_0x54d3f9(0x133)](_0x54d3f9(0x117)+_0x3f8355[_0x54d3f9(0x137)]+'\x20'+_0x3f8355['url']);}function _0x40d4(_0xbed595,_0x251dd2){_0xbed595=_0xbed595-0x110;const _0x2cec9a=_0x2cec();let _0x40d497=_0x2cec9a[_0xbed595];if(_0x40d4['kMJkhZ']===undefined){var _0x1a06c1=function(_0xab417d){const _0x407557='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x50b66d='',_0x35c0d5='';for(let _0x53c558=0x0,_0x42edb2,_0x42ddc8,_0x334d2d=0x0;_0x42ddc8=_0xab417d['charAt'](_0x334d2d++);~_0x42ddc8&&(_0x42edb2=_0x53c558%0x4?_0x42edb2*0x40+_0x42ddc8:_0x42ddc8,_0x53c558++%0x4)?_0x50b66d+=String['fromCharCode'](0xff&_0x42edb2>>(-0x2*_0x53c558&0x6)):0x0){_0x42ddc8=_0x407557['indexOf'](_0x42ddc8);}for(let _0x66d6c0=0x0,_0x2a8ec4=_0x50b66d['length'];_0x66d6c0<_0x2a8ec4;_0x66d6c0++){_0x35c0d5+='%'+('00'+_0x50b66d['charCodeAt'](_0x66d6c0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x35c0d5);};_0x40d4['BBaJMX']=_0x1a06c1,_0x40d4['PVRTmX']={},_0x40d4['kMJkhZ']=!![];}const _0x566987=_0x2cec9a[0x0],_0xb75b27=_0xbed595+_0x566987,_0x15786c=_0x40d4['PVRTmX'][_0xb75b27];return!_0x15786c?(_0x40d497=_0x40d4['BBaJMX'](_0x40d497),_0x40d4['PVRTmX'][_0xb75b27]=_0x40d497):_0x40d497=_0x15786c,_0x40d497;}export function registerDesktopAuth(_0x5ec489,_0x3d8688){const _0x3e3754=_0x40d4;_0x5ec489[_0x3e3754(0x129)](_0x3e3754(0x136),async(_0x540af5,_0x445f04)=>{const _0x236c51=_0x3e3754;if(_0x540af5['method']===_0x236c51(0x12c))return;const _0xb1f87f=requestPath(_0x540af5[_0x236c51(0x13b)]);if(isPublicPath(_0xb1f87f)||!requiresJwt(_0x540af5[_0x236c51(0x137)],_0xb1f87f))return;const _0x35b5c8=_0x540af5[_0x236c51(0x134)][_0x236c51(0x11f)];if(!_0x35b5c8||typeof _0x35b5c8!==_0x236c51(0x11c))return logAuthFailure(_0x3d8688,_0x236c51(0x130),_0x540af5),_0x445f04[_0x236c51(0x12a)](0x191)[_0x236c51(0x12e)]({'message':'Unauthorized'});try{const _0x316266=_0x50b66d[_0x236c51(0x131)](_0x35b5c8,{'complete':!![]}),_0x45321b=_0x316266&&typeof _0x316266==='object'&&_0x316266[_0x236c51(0x123)]?_0x316266[_0x236c51(0x123)]['kid']:undefined,_0x50fe33=_0x50b66d['verify'](_0x35b5c8,getSecretForKid(_0x45321b),{'algorithms':['HS256'],'issuer':'web-to-figma-plugin','audience':_0x236c51(0x113)});_0x540af5[_0x236c51(0x110)]=_0x50fe33[_0x236c51(0x115)],logAuthSuccess(_0x3d8688,_0x540af5);}catch(_0xa35b53){return logAuthFailure(_0x3d8688,_0x236c51(0x114),_0x540af5,_0xa35b53),_0x445f04[_0x236c51(0x12a)](0x191)[_0x236c51(0x12e)]({'message':_0x236c51(0x128)});}});}
1
+ (function(_0x22231e,_0x19e60b){const _0x321fa3=_0x8bfe,_0x55119e=_0x22231e();while(!![]){try{const _0x2c01e7=-parseInt(_0x321fa3(0x15d))/0x1*(parseInt(_0x321fa3(0x13e))/0x2)+-parseInt(_0x321fa3(0x137))/0x3+-parseInt(_0x321fa3(0x158))/0x4*(parseInt(_0x321fa3(0x154))/0x5)+parseInt(_0x321fa3(0x155))/0x6*(parseInt(_0x321fa3(0x15c))/0x7)+-parseInt(_0x321fa3(0x156))/0x8*(parseInt(_0x321fa3(0x13b))/0x9)+parseInt(_0x321fa3(0x144))/0xa+parseInt(_0x321fa3(0x14c))/0xb*(parseInt(_0x321fa3(0x145))/0xc);if(_0x2c01e7===_0x19e60b)break;else _0x55119e['push'](_0x55119e['shift']());}catch(_0x17a167){_0x55119e['push'](_0x55119e['shift']());}}}(_0x4618,0xbacf7));function _0x4618(){const _0x4eb867=['Bg9Nz2vY','BwvZC2fNzq','DMvYyM9Zzq','C3rYAw5N','zxjYB3i','D2vIlxrVlwzPz21HlwrLC2T0B3a','ue9tva','ndu0odK5mhHtrwTyDG','DMvYAwz5','Ec13DgyTzgvZA3rVCc1QD3q','zgvJB2rL','mJCXntnjuvr2rha','zgvZA3rVCeP3Dfn1yG','D2vIlxrVlwzPz21HlxbSDwDPBG','ngLst3nivW','BwLZC2LUz19QD3q','Aw52ywXPzf9QD3q','yxv0Af9MywLSzwq','B25szxf1zxn0','C3vI','otC1otGYmhzkrM5rDa','ntCZmJr2uNPfCKK','y29Kzq','l2fWAs9HCNrPzMfJDc9Jyxb0DxjLlxn0yxr1CW','AgvHzgvY','A2LK','Bwv0Ag9K','C2vUza','nJi1owf3sxnTsq','l2fWAs9HCNrPzMfJDc9Jyxb0DxjL','ywrKsg9VAW','l2zPBgvZlW','sfmYnty','C3bSAxq','l2HLywX0Aa','AgvHzgvYCW','mtbMrgTprvC','odu4ywDZqM52','mZGXnNPRy01zEa','w2f1DgHDig9Ria','mZCZntjWs1DxB24','Bg9N','DxjS','w2f1DgHDia','mJCZotfrC250y2G','mJu3mtGYywD1z1vj','vw5HDxrOB3jPEMvK','r0vu'];_0x4618=function(){return _0x4eb867;};return _0x4618();}import _0x2c57ee from'jsonwebtoken';import{getSecretForKid}from'../../auth/jwtSecret.js';import{redactRequestHeaders}from'../../security/redact.js';function requestPath(_0x4bca5b){const _0x5a42f3=_0x8bfe;return _0x4bca5b[_0x5a42f3(0x151)]('?')[0x0]??_0x4bca5b;}function _0x8bfe(_0x4627a4,_0xe0819b){_0x4627a4=_0x4627a4-0x12e;const _0x46188a=_0x4618();let _0x8bfec4=_0x46188a[_0x4627a4];if(_0x8bfe['KGHvvK']===undefined){var _0x52e049=function(_0xa49253){const _0x98d17f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c57ee='',_0x4bca5b='';for(let _0x4d6dc6=0x0,_0x14ca32,_0x42d4dc,_0x4ebf1a=0x0;_0x42d4dc=_0xa49253['charAt'](_0x4ebf1a++);~_0x42d4dc&&(_0x14ca32=_0x4d6dc6%0x4?_0x14ca32*0x40+_0x42d4dc:_0x42d4dc,_0x4d6dc6++%0x4)?_0x2c57ee+=String['fromCharCode'](0xff&_0x14ca32>>(-0x2*_0x4d6dc6&0x6)):0x0){_0x42d4dc=_0x98d17f['indexOf'](_0x42d4dc);}for(let _0x4dec51=0x0,_0x5580d2=_0x2c57ee['length'];_0x4dec51<_0x5580d2;_0x4dec51++){_0x4bca5b+='%'+('00'+_0x2c57ee['charCodeAt'](_0x4dec51)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4bca5b);};_0x8bfe['RNLpsD']=_0x52e049,_0x8bfe['STPheX']={},_0x8bfe['KGHvvK']=!![];}const _0x13d69c=_0x46188a[0x0],_0x2daac2=_0x4627a4+_0x13d69c,_0x33f0bb=_0x8bfe['STPheX'][_0x2daac2];return!_0x33f0bb?(_0x8bfec4=_0x8bfe['RNLpsD'](_0x8bfec4),_0x8bfe['STPheX'][_0x2daac2]=_0x8bfec4):_0x8bfec4=_0x33f0bb,_0x8bfec4;}function isPublicPath(_0x4d6dc6){const _0x5f4dbb=_0x8bfe;return _0x4d6dc6===_0x5f4dbb(0x152);}export function requiresJwt(_0x14ca32,_0x42d4dc){const _0x4d97a4=_0x8bfe;if(_0x14ca32===_0x4d97a4(0x12f)&&_0x42d4dc['startsWith'](_0x4d97a4(0x14f)))return![];if(_0x14ca32==='POST'&&_0x42d4dc===_0x4d97a4(0x14d))return!![];if(_0x14ca32==='GET'&&_0x42d4dc===_0x4d97a4(0x147))return!![];if(_0x14ca32===_0x4d97a4(0x136)&&_0x42d4dc==='/api/artifact/cancel-capture')return!![];return![];}function logAuthFailure(_0x4ebf1a,_0x4dec51,_0x5580d2,_0x33d5ca){const _0xebbbb2=_0x8bfe;_0x4ebf1a[_0xebbbb2(0x130)][_0xebbbb2(0x134)]({'reason':_0x4dec51,'path':_0x5580d2[_0xebbbb2(0x15a)][_0xebbbb2(0x151)]('?')[0x0],'headers':redactRequestHeaders(_0x5580d2[_0xebbbb2(0x153)]),'err':_0x33d5ca instanceof Error?_0x33d5ca[_0xebbbb2(0x131)]:_0x33d5ca},_0xebbbb2(0x141));if(_0x4ebf1a[_0xebbbb2(0x132)]){const _0x36dc64=_0x33d5ca instanceof Error?_0x33d5ca[_0xebbbb2(0x131)]:String(_0x33d5ca??'');console[_0xebbbb2(0x134)](_0xebbbb2(0x15b)+_0x4dec51+'\x20'+_0x5580d2[_0xebbbb2(0x15a)]+(_0x36dc64?':\x20'+_0x36dc64:''));}}function logAuthSuccess(_0x5b9d0a,_0x4637d8){const _0xe0a1ba=_0x8bfe;_0x5b9d0a[_0xe0a1ba(0x132)]&&console[_0xe0a1ba(0x159)](_0xe0a1ba(0x157)+_0x4637d8[_0xe0a1ba(0x14a)]+'\x20'+_0x4637d8[_0xe0a1ba(0x15a)]);}export function registerDesktopAuth(_0x1058ef,_0x2a91a5){const _0x48939c=_0x8bfe;_0x1058ef[_0x48939c(0x14e)](_0x48939c(0x142),async(_0x51f193,_0x1eaf86)=>{const _0xd8390b=_0x48939c;if(_0x51f193[_0xd8390b(0x14a)]==='OPTIONS')return;const _0x3b0682=requestPath(_0x51f193[_0xd8390b(0x15a)]);if(isPublicPath(_0x3b0682)||!requiresJwt(_0x51f193['method'],_0x3b0682))return;const _0x445928=_0x51f193[_0xd8390b(0x153)][_0xd8390b(0x139)];if(!_0x445928||typeof _0x445928!==_0xd8390b(0x133))return logAuthFailure(_0x2a91a5,_0xd8390b(0x13f),_0x51f193),_0x1eaf86[_0xd8390b(0x146)](0x191)[_0xd8390b(0x14b)]({'message':'Unauthorized'});try{const _0xd68d=_0x2c57ee[_0xd8390b(0x13a)](_0x445928,{'complete':!![]}),_0x21501c=_0xd68d&&typeof _0xd68d==='object'&&_0xd68d[_0xd8390b(0x148)]?_0xd68d[_0xd8390b(0x148)][_0xd8390b(0x149)]:undefined,_0x268e2c=_0x2c57ee[_0xd8390b(0x138)](_0x445928,getSecretForKid(_0x21501c),{'algorithms':[_0xd8390b(0x150)],'issuer':_0xd8390b(0x13d),'audience':_0xd8390b(0x135)});_0x51f193[_0xd8390b(0x13c)]=_0x268e2c[_0xd8390b(0x143)],logAuthSuccess(_0x2a91a5,_0x51f193);}catch(_0xc49024){return logAuthFailure(_0x2a91a5,_0xd8390b(0x140),_0x51f193,_0xc49024),_0x1eaf86['code'](0x191)[_0xd8390b(0x14b)]({'message':_0xd8390b(0x12e)});}});}
@@ -85,15 +85,15 @@ export function formatServerBanner(options) {
85
85
  ];
86
86
  if (updateAvailable) {
87
87
  const updateTitle = [
88
- c(ANSI.bold + ANSI.brightYellow, '⬆', color),
88
+ brand('⬆', color, true),
89
89
  ' ',
90
- c(ANSI.bold + ANSI.brightYellow, 'Update available:', color),
90
+ brand('Update available:', color, true),
91
91
  ' ',
92
92
  c(ANSI.bold + ANSI.brightGreen, `v${updateAvailable.latest}`, color),
93
93
  ].join('');
94
94
  const updateAction = [
95
95
  c(ANSI.dim + ANSI.gray, 'Press ', color),
96
- c(ANSI.bold + ANSI.brightYellow, updateKey, color),
96
+ brand(updateKey, color, true),
97
97
  c(ANSI.dim + ANSI.gray, ' to update now', color),
98
98
  ].join('');
99
99
  lines.push(emptyRow(color));
@@ -1,9 +1,9 @@
1
1
  import readline from 'node:readline';
2
- import os from 'node:os';
3
2
  import { formatServerBanner } from '../terminal/banner.js';
4
3
  import { CHECK_INTERVAL_MS, checkForUpdate } from './versionCheck.js';
5
4
  import { installUpdate, isGloballyInstalled } from './installer.js';
6
5
  import { appendUpdateLog } from './updateLog.js';
6
+ const UPDATE_KEY = 'Ctrl+U';
7
7
  export class UpdaterRuntime {
8
8
  options;
9
9
  updateAvailable = null;
@@ -43,12 +43,11 @@ export class UpdaterRuntime {
43
43
  }
44
44
  printBanner() {
45
45
  const { currentVersion, port } = this.options;
46
- const updateKey = os.platform() === 'darwin' ? 'Cmd+U' : 'Ctrl+U';
47
46
  console.log(formatServerBanner({
48
47
  currentVersion,
49
48
  port,
50
49
  updateAvailable: this.updateAvailable,
51
- updateKey,
50
+ updateKey: UPDATE_KEY,
52
51
  showNpxUpdateHint: !isGloballyInstalled(),
53
52
  }));
54
53
  }
@@ -142,11 +141,10 @@ export class UpdaterRuntime {
142
141
  }
143
142
  }
144
143
  export function printUnsupportedVersionMessage(currentVersion, minSupportedVersion) {
145
- const updateKey = os.platform() === 'darwin' ? 'Cmd+U' : 'Ctrl+U';
146
144
  console.error('');
147
145
  console.error('This version is no longer supported.');
148
146
  console.error(`Installed: v${currentVersion} Minimum: v${minSupportedVersion}`);
149
- console.error(`Press ${updateKey} to update, or run:`);
147
+ console.error(`Press ${UPDATE_KEY} to update, or run:`);
150
148
  console.error(' npm install -g @web-to-figma/desktop@latest');
151
149
  console.error('Web to Figma will not run until updated.');
152
150
  console.error('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-to-figma/desktop",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Web to Figma Desktop - Convert any website or HTML code to design",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "dev": "npm run build && node bin/web-to-figma.js start --verbose",
33
33
  "doctor": "npm run build && node bin/web-to-figma.js doctor",
34
34
  "test": "npm run build && npm run test:run",
35
- "test:run": "node --test dist/test/versionCheck.test.js dist/test/captureStatus.test.js dist/test/desktopJwt.test.js dist/test/uploadBody.test.js dist/test/checkServer.test.js dist/test/headedBrowserState.test.js dist/test/crxUtils.test.js",
35
+ "test:run": "node --test dist/test/versionCheck.test.js dist/test/captureStatus.test.js dist/test/desktopJwt.test.js dist/test/jwtSecret.test.js dist/test/uploadBody.test.js dist/test/checkServer.test.js dist/test/headedBrowserState.test.js dist/test/crxUtils.test.js",
36
36
  "smoke": "npm run build && npm run smoke:run",
37
37
  "smoke:run": "node scripts/smoke-test.js",
38
38
  "prepack": "node scripts/prepack.js",