@web-to-figma/desktop 1.0.3 → 1.0.4

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 _0x1724(_0x11e508,_0x542f50){_0x11e508=_0x11e508-0x19b;const _0x3dbc58=_0x3dbc();let _0x1724f7=_0x3dbc58[_0x11e508];if(_0x1724['VWIkDe']===undefined){var _0x3deeb4=function(_0x3ee671){const _0x327b4a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x190151='',_0x5391a0='';for(let _0x3d0d25=0x0,_0x3bfb8e,_0x3baac7,_0x55da38=0x0;_0x3baac7=_0x3ee671['charAt'](_0x55da38++);~_0x3baac7&&(_0x3bfb8e=_0x3d0d25%0x4?_0x3bfb8e*0x40+_0x3baac7:_0x3baac7,_0x3d0d25++%0x4)?_0x190151+=String['fromCharCode'](0xff&_0x3bfb8e>>(-0x2*_0x3d0d25&0x6)):0x0){_0x3baac7=_0x327b4a['indexOf'](_0x3baac7);}for(let _0xf20610=0x0,_0xf2f787=_0x190151['length'];_0xf20610<_0xf2f787;_0xf20610++){_0x5391a0+='%'+('00'+_0x190151['charCodeAt'](_0xf20610)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5391a0);};_0x1724['joUgxm']=_0x3deeb4,_0x1724['kAUGzS']={},_0x1724['VWIkDe']=!![];}const _0x523f68=_0x3dbc58[0x0],_0x5f38f1=_0x11e508+_0x523f68,_0x394eca=_0x1724['kAUGzS'][_0x5f38f1];return!_0x394eca?(_0x1724f7=_0x1724['joUgxm'](_0x1724f7),_0x1724['kAUGzS'][_0x5f38f1]=_0x1724f7):_0x1724f7=_0x394eca,_0x1724f7;}(function(_0x382e19,_0x4cc11d){const _0x17a6c1=_0x1724,_0x26251c=_0x382e19();while(!![]){try{const _0x45d085=-parseInt(_0x17a6c1(0x1c4))/0x1+-parseInt(_0x17a6c1(0x1af))/0x2+parseInt(_0x17a6c1(0x1b2))/0x3*(parseInt(_0x17a6c1(0x1ab))/0x4)+parseInt(_0x17a6c1(0x1b6))/0x5+-parseInt(_0x17a6c1(0x1a9))/0x6+-parseInt(_0x17a6c1(0x1bf))/0x7*(parseInt(_0x17a6c1(0x1b7))/0x8)+parseInt(_0x17a6c1(0x1be))/0x9*(parseInt(_0x17a6c1(0x1bd))/0xa);if(_0x45d085===_0x4cc11d)break;else _0x26251c['push'](_0x26251c['shift']());}catch(_0x5c6451){_0x26251c['push'](_0x26251c['shift']());}}}(_0x3dbc,0x373d4));import _0x190151 from'crypto';import _0x5391a0 from'fs';import _0x3d0d25 from'path';import{parseJsonSafe}from'../utils.js';function asChromiumDriver(_0x3bfb8e){return _0x3bfb8e;}export function cleanupOrphanSessionDirs(_0x3baac7){const _0x1586ef=_0x1724;if(!_0x5391a0['existsSync'](_0x3baac7))return;for(const _0x55da38 of _0x5391a0[_0x1586ef(0x1c3)](_0x3baac7,{'withFileTypes':!![]})){if(!_0x55da38['isDirectory']())continue;removeSessionDir(_0x3d0d25[_0x1586ef(0x1c5)](_0x3baac7,_0x55da38[_0x1586ef(0x1a8)]));}}export function createHeadedSessionDir(_0xf20610){const _0x40e000=_0x1724;_0x5391a0[_0x40e000(0x19c)](_0xf20610,{'recursive':!![]});const _0xf2f787=_0x3d0d25[_0x40e000(0x1c5)](_0xf20610,_0x190151[_0x40e000(0x19f)]());return _0x5391a0['mkdirSync'](_0x3d0d25[_0x40e000(0x1c5)](_0xf2f787,'Default'),{'recursive':!![]}),_0xf2f787;}export function seedPinnedExtensionPreferences(_0x4ea7d4,_0x12dd5e){const _0x47d984=_0x1724,_0x357606=_0x3d0d25[_0x47d984(0x1c5)](_0x4ea7d4,_0x47d984(0x1c1),_0x47d984(0x1ba)),_0x459e58=parseJsonSafe(_0x5391a0[_0x47d984(0x1ae)](_0x357606)?_0x5391a0[_0x47d984(0x1c0)](_0x357606,_0x47d984(0x1bc)):null,{}),_0x208707=parseJsonSafe(typeof _0x459e58['extensions']===_0x47d984(0x1c2)&&_0x459e58[_0x47d984(0x1b3)]!==null?JSON[_0x47d984(0x1a1)](_0x459e58[_0x47d984(0x1b3)]):null,{});_0x208707[_0x47d984(0x1b5)]=[_0x12dd5e],_0x459e58['extensions']=_0x208707,_0x5391a0[_0x47d984(0x1b1)](_0x357606,JSON[_0x47d984(0x1a1)](_0x459e58));}export function createInitialPreferencesFile(_0x3f3465,_0x42db4f){const _0x2f8222=_0x1724,_0x11626b=_0x3d0d25[_0x2f8222(0x1c5)](_0x3f3465,'initial_preferences.json'),_0x328c02={'extensions':{'pinned_extensions':[_0x42db4f]},'distribution':{'skip_first_run_ui':!![],'show_welcome_page':![]}};return _0x5391a0['writeFileSync'](_0x11626b,JSON[_0x2f8222(0x1a1)](_0x328c02)),_0x11626b;}export function removeSessionDir(_0x37a033){const _0x6eb615=_0x1724;try{_0x5391a0[_0x6eb615(0x19d)](_0x37a033,{'recursive':!![],'force':!![]});}catch{}}function readPersistedCookies(_0x1e2170){const _0x277219=_0x1724;if(!_0x5391a0[_0x277219(0x1ae)](_0x1e2170))return[];const _0x22ad2d=parseJsonSafe(_0x5391a0[_0x277219(0x1c0)](_0x1e2170,_0x277219(0x1bc)),[]);return Array[_0x277219(0x1a3)](_0x22ad2d)?_0x22ad2d:[];}function writePersistedCookies(_0x1f2cd7,_0x1a6fa3){const _0x5e2d2f=_0x1724;_0x5391a0[_0x5e2d2f(0x19c)](_0x3d0d25[_0x5e2d2f(0x1a0)](_0x1f2cd7),{'recursive':!![]}),_0x5391a0[_0x5e2d2f(0x1b1)](_0x1f2cd7,JSON[_0x5e2d2f(0x1a1)](_0x1a6fa3,null,0x2)+'\x0a');}function _0x3dbc(){const _0x4852a2=['zxHPC3rZu3LUyW','ndiXnZy2reTmt2fU','Ahr0Ce9UBhK','D3jPDgvgAwXLu3LUyW','mJe0nJK4tefSqxjq','zxH0zw5ZAw9UCW','Cgf0Aa','CgLUBMvKx2v4DgvUC2LVBNm','mtGXodK5nwPmqMTMDG','mZi2mta0u3rpvwP1','ChjPB3jPDhK','yM9VBgvHBG','uhjLzMvYzw5Jzxm','DMfSDwu','DxrMoa','nZa3ntiYmgDvDwTIyq','owPTq3Hcva','n2v5CeXbDG','CMvHzezPBgvtEw5J','rgvMyxvSDa','B2jQzwn0','CMvHzgrPCLn5BMm','mZm2mJq2ywLgANvb','AM9PBG','C2vUzerLDLrVB2XZq29TBwfUza','BwTKAxjtEw5J','CM1tEw5J','BgvUz3rO','CMfUzg9Tvvvjra','zgLYBMfTzq','C3rYAw5NAwz5','y29VA2LLCW','AxnbCNjHEq','zxHWAxjLCW','C2fTzvnPDgu','tMv0D29YAY5LBMfIBgu','BNvTyMvY','BMfTzq','mtK3mJqXmgnQwxnmCq','C2vJDxjL','nhrnuuvVzq','zg9TywLU','tMv0D29YAY5NzxrbBgXdB29RAwvZ'];_0x3dbc=function(){return _0x4852a2;};return _0x3dbc();}function toSetCookieParam(_0x1d976f){const _0x589f2a=_0x1724,_0x2ddd89={'name':_0x1d976f[_0x589f2a(0x1a8)],'value':_0x1d976f[_0x589f2a(0x1bb)],'domain':_0x1d976f[_0x589f2a(0x1ac)],'path':_0x1d976f[_0x589f2a(0x1b4)]||'/'};return typeof _0x1d976f['expires']===_0x589f2a(0x1a7)&&_0x1d976f[_0x589f2a(0x1a4)]>0x0&&(_0x2ddd89[_0x589f2a(0x1a4)]=_0x1d976f[_0x589f2a(0x1a4)]),typeof _0x1d976f[_0x589f2a(0x1b0)]==='boolean'&&(_0x2ddd89[_0x589f2a(0x1b0)]=_0x1d976f[_0x589f2a(0x1b0)]),typeof _0x1d976f['secure']===_0x589f2a(0x1b9)&&(_0x2ddd89[_0x589f2a(0x1aa)]=_0x1d976f[_0x589f2a(0x1aa)]),_0x1d976f['sameSite']&&(_0x2ddd89[_0x589f2a(0x1a5)]=_0x1d976f[_0x589f2a(0x1a5)]),_0x1d976f[_0x589f2a(0x1b8)]&&(_0x2ddd89[_0x589f2a(0x1b8)]=_0x1d976f[_0x589f2a(0x1b8)]),_0x2ddd89;}export async function importPersistedCookies(_0x24a4f,_0x487ec1){const _0x3dc10d=_0x1724,_0x3b5335=readPersistedCookies(_0x487ec1);if(_0x3b5335[_0x3dc10d(0x19e)]===0x0)return;const _0x1ae01b=asChromiumDriver(_0x24a4f);await _0x1ae01b[_0x3dc10d(0x19b)](_0x3dc10d(0x1a6),{}),await _0x1ae01b[_0x3dc10d(0x19b)]('Network.setCookies',{'cookies':_0x3b5335['map'](toSetCookieParam)});}export async function exportPersistedCookies(_0x5e2c26,_0x350242){const _0x55ce59=_0x1724,_0x4f7a3e=asChromiumDriver(_0x5e2c26);await _0x4f7a3e['sendDevToolsCommand'](_0x55ce59(0x1a6),{});const _0x2d430e=await _0x4f7a3e['sendAndGetDevToolsCommand'](_0x55ce59(0x1ad),{}),_0x183570=Array[_0x55ce59(0x1a3)](_0x2d430e['cookies'])?_0x2d430e[_0x55ce59(0x1a2)]:[];writePersistedCookies(_0x350242,_0x183570);}export function resetHeadedBrowserState(_0x223eeb,_0x243e99){const _0x3f690a=_0x1724;cleanupOrphanSessionDirs(_0x243e99),_0x5391a0[_0x3f690a(0x1ae)](_0x223eeb)&&_0x5391a0[_0x3f690a(0x19d)](_0x223eeb,{'recursive':!![],'force':!![]});}
1
+ (function(_0x2f1547,_0x3613b8){const _0x59f941=_0x28f9,_0x2870c3=_0x2f1547();while(!![]){try{const _0x5060d4=-parseInt(_0x59f941(0xfc))/0x1+-parseInt(_0x59f941(0x11e))/0x2+-parseInt(_0x59f941(0x10c))/0x3+-parseInt(_0x59f941(0x123))/0x4*(-parseInt(_0x59f941(0x114))/0x5)+parseInt(_0x59f941(0x112))/0x6+parseInt(_0x59f941(0xf9))/0x7+-parseInt(_0x59f941(0x107))/0x8;if(_0x5060d4===_0x3613b8)break;else _0x2870c3['push'](_0x2870c3['shift']());}catch(_0xd3cee4){_0x2870c3['push'](_0x2870c3['shift']());}}}(_0x3ed4,0x79845));import _0x476467 from'crypto';import _0x23bc17 from'fs';import _0xd39aef from'path';import{parseJsonSafe}from'../utils.js';function asChromiumDriver(_0x10f496){return _0x10f496;}export function cleanupOrphanSessionDirs(_0x5ea3e9){const _0x17bce6=_0x28f9;if(!_0x23bc17[_0x17bce6(0x121)](_0x5ea3e9))return;for(const _0x34e11f of _0x23bc17[_0x17bce6(0x116)](_0x5ea3e9,{'withFileTypes':!![]})){if(!_0x34e11f[_0x17bce6(0xfd)]())continue;removeSessionDir(_0xd39aef[_0x17bce6(0xff)](_0x5ea3e9,_0x34e11f['name']));}}export function createHeadedSessionDir(_0x3d84cb){const _0x27ffae=_0x28f9;_0x23bc17[_0x27ffae(0x102)](_0x3d84cb,{'recursive':!![]});const _0x253c42=_0xd39aef[_0x27ffae(0xff)](_0x3d84cb,_0x476467[_0x27ffae(0x10b)]());return _0x23bc17['mkdirSync'](_0xd39aef[_0x27ffae(0xff)](_0x253c42,_0x27ffae(0x124)),{'recursive':!![]}),_0x253c42;}export function seedPinnedExtensionPreferences(_0x15f82c,_0x4dfb76){const _0x15c2ae=_0x28f9,_0x187b4e=_0xd39aef[_0x15c2ae(0xff)](_0x15f82c,_0x15c2ae(0x124),_0x15c2ae(0x103)),_0x5d8f4e=parseJsonSafe(_0x23bc17['existsSync'](_0x187b4e)?_0x23bc17[_0x15c2ae(0x10e)](_0x187b4e,_0x15c2ae(0x110)):null,{}),_0x52e644=parseJsonSafe(typeof _0x5d8f4e[_0x15c2ae(0x11b)]===_0x15c2ae(0x109)&&_0x5d8f4e[_0x15c2ae(0x11b)]!==null?JSON['stringify'](_0x5d8f4e['extensions']):null,{});_0x52e644[_0x15c2ae(0x100)]=[_0x4dfb76],_0x5d8f4e['extensions']=_0x52e644,_0x23bc17[_0x15c2ae(0xfe)](_0x187b4e,JSON[_0x15c2ae(0x10d)](_0x5d8f4e));}export function createInitialPreferencesFile(_0x5899ce,_0x3e9260){const _0x386cde=_0x28f9,_0x3c42b2=_0xd39aef[_0x386cde(0xff)](_0x5899ce,_0x386cde(0x111)),_0xe11292={'extensions':{'pinned_extensions':[_0x3e9260]},'distribution':{'skip_first_run_ui':!![],'show_welcome_page':![]}};return _0x23bc17['writeFileSync'](_0x3c42b2,JSON[_0x386cde(0x10d)](_0xe11292)),_0x3c42b2;}export function removeSessionDir(_0xf82ec5){try{_0x23bc17['rmSync'](_0xf82ec5,{'recursive':!![],'force':!![]});}catch{}}function readPersistedCookies(_0x2bd5db){const _0x2c777f=_0x28f9;if(!_0x23bc17[_0x2c777f(0x121)](_0x2bd5db))return[];const _0x519964=parseJsonSafe(_0x23bc17['readFileSync'](_0x2bd5db,_0x2c777f(0x110)),[]);return Array[_0x2c777f(0x11c)](_0x519964)?_0x519964:[];}function writePersistedCookies(_0x2f16d1,_0x98ace0){const _0x45866d=_0x28f9;_0x23bc17[_0x45866d(0x102)](_0xd39aef['dirname'](_0x2f16d1),{'recursive':!![]}),_0x23bc17[_0x45866d(0xfe)](_0x2f16d1,JSON['stringify'](_0x98ace0,null,0x2)+'\x0a');}function _0x28f9(_0x2f209c,_0x35e80f){_0x2f209c=_0x2f209c-0xf9;const _0x3ed436=_0x3ed4();let _0x28f93d=_0x3ed436[_0x2f209c];if(_0x28f9['MIuvvh']===undefined){var _0x48dae4=function(_0x6ca542){const _0x4e2fe9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x476467='',_0x23bc17='';for(let _0xd39aef=0x0,_0x10f496,_0x5ea3e9,_0x34e11f=0x0;_0x5ea3e9=_0x6ca542['charAt'](_0x34e11f++);~_0x5ea3e9&&(_0x10f496=_0xd39aef%0x4?_0x10f496*0x40+_0x5ea3e9:_0x5ea3e9,_0xd39aef++%0x4)?_0x476467+=String['fromCharCode'](0xff&_0x10f496>>(-0x2*_0xd39aef&0x6)):0x0){_0x5ea3e9=_0x4e2fe9['indexOf'](_0x5ea3e9);}for(let _0x3d84cb=0x0,_0x253c42=_0x476467['length'];_0x3d84cb<_0x253c42;_0x3d84cb++){_0x23bc17+='%'+('00'+_0x476467['charCodeAt'](_0x3d84cb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x23bc17);};_0x28f9['nhwGwi']=_0x48dae4,_0x28f9['tUBFJi']={},_0x28f9['MIuvvh']=!![];}const _0x3ce34f=_0x3ed436[0x0],_0xe7a331=_0x2f209c+_0x3ce34f,_0x5ca76c=_0x28f9['tUBFJi'][_0xe7a331];return!_0x5ca76c?(_0x28f93d=_0x28f9['nhwGwi'](_0x28f93d),_0x28f9['tUBFJi'][_0xe7a331]=_0x28f93d):_0x28f93d=_0x5ca76c,_0x28f93d;}function toSetCookieParam(_0x3eff2e){const _0x5e9a96=_0x28f9,_0x3524c9={'name':_0x3eff2e[_0x5e9a96(0x101)],'value':_0x3eff2e['value'],'domain':_0x3eff2e[_0x5e9a96(0x106)],'path':_0x3eff2e[_0x5e9a96(0x117)]||'/'};return typeof _0x3eff2e[_0x5e9a96(0x118)]===_0x5e9a96(0x120)&&_0x3eff2e[_0x5e9a96(0x118)]>0x0&&(_0x3524c9[_0x5e9a96(0x118)]=_0x3eff2e['expires']),typeof _0x3eff2e[_0x5e9a96(0x11a)]===_0x5e9a96(0x105)&&(_0x3524c9[_0x5e9a96(0x11a)]=_0x3eff2e[_0x5e9a96(0x11a)]),typeof _0x3eff2e[_0x5e9a96(0xfb)]===_0x5e9a96(0x105)&&(_0x3524c9[_0x5e9a96(0xfb)]=_0x3eff2e[_0x5e9a96(0xfb)]),_0x3eff2e[_0x5e9a96(0x11f)]&&(_0x3524c9[_0x5e9a96(0x11f)]=_0x3eff2e[_0x5e9a96(0x11f)]),_0x3eff2e[_0x5e9a96(0x11d)]&&(_0x3524c9['priority']=_0x3eff2e[_0x5e9a96(0x11d)]),_0x3524c9;}export async function importPersistedCookies(_0x34b884,_0x1a9804){const _0xc9ee11=_0x28f9,_0x356f79=readPersistedCookies(_0x1a9804);if(_0x356f79[_0xc9ee11(0x108)]===0x0)return;const _0x1b4a58=asChromiumDriver(_0x34b884);await _0x1b4a58[_0xc9ee11(0x119)](_0xc9ee11(0x122),{}),await _0x1b4a58['sendDevToolsCommand'](_0xc9ee11(0x113),{'cookies':_0x356f79[_0xc9ee11(0x10a)](toSetCookieParam)});}export async function exportPersistedCookies(_0x1f41b3,_0x59a59f){const _0x17b990=_0x28f9,_0xdca102=asChromiumDriver(_0x1f41b3);await _0xdca102[_0x17b990(0x119)](_0x17b990(0x122),{});const _0x4977e3=await _0xdca102[_0x17b990(0x104)](_0x17b990(0xfa),{}),_0x54deed=Array['isArray'](_0x4977e3[_0x17b990(0x10f)])?_0x4977e3[_0x17b990(0x10f)]:[];writePersistedCookies(_0x59a59f,_0x54deed);}function _0x3ed4(){const _0x4c674f=['Cgf0Aa','zxHWAxjLCW','C2vUzerLDLrVB2XZq29TBwfUza','Ahr0Ce9UBhK','zxH0zw5ZAw9UCW','AxnbCNjHEq','ChjPB3jPDhK','mJe1mtG2quTLr2Xl','C2fTzvnPDgu','BNvTyMvY','zxHPC3rZu3LUyW','tMv0D29YAY5LBMfIBgu','nfn0zvfcDW','rgvMyxvSDa','nte1mJi0nuPTuvrxra','tMv0D29YAY5NzxrbBgXdB29RAwvZ','C2vJDxjL','nde2mdu0uLvbsNrA','AxneAxjLy3rVCNK','D3jPDgvgAwXLu3LUyW','AM9PBG','CgLUBMvKx2v4DgvUC2LVBNm','BMfTzq','BwTKAxjtEw5J','uhjLzMvYzw5Jzxm','C2vUzefUzeDLDerLDLrVB2XZq29TBwfUza','yM9VBgvHBG','zg9TywLU','mtyXnZi0og1JtwnIva','BgvUz3rO','B2jQzwn0','BwfW','CMfUzg9Tvvvjra','mJu2nJCXnNnhzLvWtG','C3rYAw5NAwz5','CMvHzezPBgvtEw5J','y29VA2LLCW','DxrMoa','Aw5PDgLHBf9WCMvMzxjLBMnLCY5QC29U','ndGZntuYmejbuNfesW','tMv0D29YAY5ZzxrdB29RAwvZ','mJy4ntC2nwHysKfxDa','CM1tEw5J','CMvHzgrPCLn5BMm'];_0x3ed4=function(){return _0x4c674f;};return _0x3ed4();}export function resetHeadedBrowserState(_0x3b18f8,_0x4d3d98){const _0x56b776=_0x28f9;cleanupOrphanSessionDirs(_0x4d3d98),_0x23bc17[_0x56b776(0x121)](_0x3b18f8)&&_0x23bc17[_0x56b776(0x115)](_0x3b18f8,{'recursive':!![],'force':!![]});}
@@ -1 +1 @@
1
- function _0x33e8(_0x486d00,_0x23a76c){_0x486d00=_0x486d00-0x197;const _0x419d9c=_0x419d();let _0x33e852=_0x419d9c[_0x486d00];if(_0x33e8['NoofBP']===undefined){var _0x424612=function(_0xe9e81b){const _0x561096='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x11bfe1='',_0x31db34='';for(let _0xd10cb0=0x0,_0x1ec1aa,_0x2da61a,_0x4d9dfc=0x0;_0x2da61a=_0xe9e81b['charAt'](_0x4d9dfc++);~_0x2da61a&&(_0x1ec1aa=_0xd10cb0%0x4?_0x1ec1aa*0x40+_0x2da61a:_0x2da61a,_0xd10cb0++%0x4)?_0x11bfe1+=String['fromCharCode'](0xff&_0x1ec1aa>>(-0x2*_0xd10cb0&0x6)):0x0){_0x2da61a=_0x561096['indexOf'](_0x2da61a);}for(let _0x39f772=0x0,_0x30a6cd=_0x11bfe1['length'];_0x39f772<_0x30a6cd;_0x39f772++){_0x31db34+='%'+('00'+_0x11bfe1['charCodeAt'](_0x39f772)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x31db34);};_0x33e8['eHAkdN']=_0x424612,_0x33e8['DCUYqe']={},_0x33e8['NoofBP']=!![];}const _0x305b39=_0x419d9c[0x0],_0x155543=_0x486d00+_0x305b39,_0x5ec5b3=_0x33e8['DCUYqe'][_0x155543];return!_0x5ec5b3?(_0x33e852=_0x33e8['eHAkdN'](_0x33e852),_0x33e8['DCUYqe'][_0x155543]=_0x33e852):_0x33e852=_0x5ec5b3,_0x33e852;}function _0x419d(){const _0x11aa6c=['mtm1ndK2ouD0Cu1iuW','nJCYnJjtruPjAvu','nJG3oti3zLfpAwfW','AgvHzgvKvw5WywnRzwrfEhrLBNnPB25eAxi','zxHPC3rZu3LUyW','nJu4mtG3mMfkugfkCW','vw5WywnRzwqGAgvHzgvKigv4DgvUC2LVBIb3AxrOihn0ywjSzsbRzxK','mtyYvhzVwfbw','mZu4oteWwgf0BvPt','D2fYBG','sgvHzgvKigv4DgvUC2LVBIbduLGGBwLZC2LUzW','AgvHzgvKq3j4ugf0Aa','zgvIDwC','mJeXmJa2ndHlrgfKDei','mJCYmJC1zMTjs2D0'];_0x419d=function(){return _0x11aa6c;};return _0x419d();}(function(_0xbafe9a,_0x44f3e4){const _0x66d8f2=_0x33e8,_0x2ca69a=_0xbafe9a();while(!![]){try{const _0x242f9a=parseInt(_0x66d8f2(0x199))/0x1+parseInt(_0x66d8f2(0x1a1))/0x2+-parseInt(_0x66d8f2(0x1a2))/0x3+parseInt(_0x66d8f2(0x1a5))/0x4+-parseInt(_0x66d8f2(0x19f))/0x5*(-parseInt(_0x66d8f2(0x198))/0x6)+parseInt(_0x66d8f2(0x1a0))/0x7+-parseInt(_0x66d8f2(0x19e))/0x8;if(_0x242f9a===_0x44f3e4)break;else _0x2ca69a['push'](_0x2ca69a['shift']());}catch(_0x1f027d){_0x2ca69a['push'](_0x2ca69a['shift']());}}}(_0x419d,0xcb3d7));import _0x11bfe1 from'fs';import{extensionIdFromCrx,shouldRefreshUnpackedExtension,unpackCrxWithStableKey}from'./crxUtils.js';export function ensureHeadedExtensionUnpacked(_0x31db34,_0xd10cb0){const _0x368d17=_0x33e8;if(!_0x11bfe1[_0x368d17(0x1a4)](_0x31db34['headedCrxPath']))return _0xd10cb0[_0x368d17(0x19a)]({'crxPath':_0x31db34[_0x368d17(0x19c)]},_0x368d17(0x19b)),null;const _0x1ec1aa=_0x31db34[_0x368d17(0x1a3)];let _0x2da61a;return shouldRefreshUnpackedExtension(_0x31db34[_0x368d17(0x19c)],_0x1ec1aa)?(_0x2da61a=unpackCrxWithStableKey(_0x31db34[_0x368d17(0x19c)],_0x1ec1aa),_0xd10cb0[_0x368d17(0x19d)]({'unpackedDir':_0x1ec1aa,'extensionId':_0x2da61a},_0x368d17(0x197))):_0x2da61a=extensionIdFromCrx(_0x31db34[_0x368d17(0x19c)]),{'extensionId':_0x2da61a,'unpackedDir':_0x1ec1aa};}
1
+ (function(_0x526cf4,_0x5e02fc){const _0x212eaf=_0x5a70,_0x5d6a2d=_0x526cf4();while(!![]){try{const _0x5ec0b2=-parseInt(_0x212eaf(0x70))/0x1+parseInt(_0x212eaf(0x78))/0x2*(-parseInt(_0x212eaf(0x7b))/0x3)+-parseInt(_0x212eaf(0x7f))/0x4*(parseInt(_0x212eaf(0x7c))/0x5)+-parseInt(_0x212eaf(0x72))/0x6*(-parseInt(_0x212eaf(0x77))/0x7)+-parseInt(_0x212eaf(0x75))/0x8+parseInt(_0x212eaf(0x74))/0x9*(-parseInt(_0x212eaf(0x7a))/0xa)+parseInt(_0x212eaf(0x73))/0xb;if(_0x5ec0b2===_0x5e02fc)break;else _0x5d6a2d['push'](_0x5d6a2d['shift']());}catch(_0x3897bd){_0x5d6a2d['push'](_0x5d6a2d['shift']());}}}(_0x1fd6,0xc63b8));import _0x5cf86f from'fs';import{extensionIdFromCrx,shouldRefreshUnpackedExtension,unpackCrxWithStableKey}from'./crxUtils.js';export function ensureHeadedExtensionUnpacked(_0x32f470,_0x5875d4){const _0xf82101=_0x5a70;if(!_0x5cf86f[_0xf82101(0x7e)](_0x32f470[_0xf82101(0x6f)]))return _0x5875d4['warn']({'crxPath':_0x32f470[_0xf82101(0x6f)]},_0xf82101(0x76)),null;const _0x12efd0=_0x32f470[_0xf82101(0x71)];let _0x184b6a;return shouldRefreshUnpackedExtension(_0x32f470[_0xf82101(0x6f)],_0x12efd0)?(_0x184b6a=unpackCrxWithStableKey(_0x32f470[_0xf82101(0x6f)],_0x12efd0),_0x5875d4[_0xf82101(0x79)]({'unpackedDir':_0x12efd0,'extensionId':_0x184b6a},_0xf82101(0x7d))):_0x184b6a=extensionIdFromCrx(_0x32f470['headedCrxPath']),{'extensionId':_0x184b6a,'unpackedDir':_0x12efd0};}function _0x5a70(_0xa8095f,_0x42c403){_0xa8095f=_0xa8095f-0x6f;const _0x1fd6b0=_0x1fd6();let _0x5a70d4=_0x1fd6b0[_0xa8095f];if(_0x5a70['kktnCH']===undefined){var _0xd996c6=function(_0x3bec0e){const _0x560b51='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5cf86f='',_0x32f470='';for(let _0x5875d4=0x0,_0x12efd0,_0x184b6a,_0x4b71a6=0x0;_0x184b6a=_0x3bec0e['charAt'](_0x4b71a6++);~_0x184b6a&&(_0x12efd0=_0x5875d4%0x4?_0x12efd0*0x40+_0x184b6a:_0x184b6a,_0x5875d4++%0x4)?_0x5cf86f+=String['fromCharCode'](0xff&_0x12efd0>>(-0x2*_0x5875d4&0x6)):0x0){_0x184b6a=_0x560b51['indexOf'](_0x184b6a);}for(let _0xf90c82=0x0,_0x2a60bc=_0x5cf86f['length'];_0xf90c82<_0x2a60bc;_0xf90c82++){_0x32f470+='%'+('00'+_0x5cf86f['charCodeAt'](_0xf90c82)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x32f470);};_0x5a70['mAohcl']=_0xd996c6,_0x5a70['JNXtir']={},_0x5a70['kktnCH']=!![];}const _0x2036f2=_0x1fd6b0[0x0],_0x38c6cd=_0xa8095f+_0x2036f2,_0x4e2b51=_0x5a70['JNXtir'][_0x38c6cd];return!_0x4e2b51?(_0x5a70d4=_0x5a70['mAohcl'](_0x5a70d4),_0x5a70['JNXtir'][_0x38c6cd]=_0x5a70d4):_0x5a70d4=_0x4e2b51,_0x5a70d4;}function _0x1fd6(){const _0x775680=['mta5nda5mwHSBfnTBG','AgvHzgvKvw5WywnRzwrfEhrLBNnPB25eAxi','mtq1nZKXnM9ytvjpzq','ndq4nZeWmZvMwNHHuxy','nJaZA2f3wunT','otq5mJm0ng9ksefgzq','sgvHzgvKigv4DgvUC2LVBIbduLGGBwLZC2LUzW','n09pEffOva','mZGYv3vSsxbq','zgvIDwC','mZy1mgfpugTerG','mJG0mwvYCePlrW','mtG5nJC1uvLstK1x','vw5WywnRzwqGAgvHzgvKigv4DgvUC2LVBIb3AxrOihn0ywjSzsbRzxK','zxHPC3rZu3LUyW','mta4tu9Rwufz','AgvHzgvKq3j4ugf0Aa'];_0x1fd6=function(){return _0x775680;};return _0x1fd6();}
@@ -1 +1 @@
1
- (function(_0x422904,_0x36a328){const _0x40c25b=_0x2214,_0x433ad0=_0x422904();while(!![]){try{const _0x3e7039=-parseInt(_0x40c25b(0x11e))/0x1+-parseInt(_0x40c25b(0x118))/0x2*(-parseInt(_0x40c25b(0x10e))/0x3)+-parseInt(_0x40c25b(0x10b))/0x4*(parseInt(_0x40c25b(0x10d))/0x5)+-parseInt(_0x40c25b(0x111))/0x6*(parseInt(_0x40c25b(0x10a))/0x7)+-parseInt(_0x40c25b(0x119))/0x8*(parseInt(_0x40c25b(0x112))/0x9)+-parseInt(_0x40c25b(0x10f))/0xa*(parseInt(_0x40c25b(0x10c))/0xb)+parseInt(_0x40c25b(0x113))/0xc*(parseInt(_0x40c25b(0x117))/0xd);if(_0x3e7039===_0x36a328)break;else _0x433ad0['push'](_0x433ad0['shift']());}catch(_0x2513c6){_0x433ad0['push'](_0x433ad0['shift']());}}}(_0x2d2b,0x7ac50));import{exportPersistedCookies,removeSessionDir}from'./headedBrowserState.js';const BROWSER_POLL_MS=0x1f4;function _0x2d2b(){const _0x20939b=['mty2mdbWr3jPuxK','og1jqvfqyG','Bgf1BMnOsgvHzgvK','z2v0qwXSv2LUzg93sgfUzgXLCW','CMvSzwfZzq','CMvTB3zLtgLZDgvUzxi','nZq2mJi4uwTrD2Dw','z2v0','mtCYmdzQAeHRt2C','nfbxuvHkrW','mtqZCw1VBenX','ntCZntq1veLUrKH6','mtC3vNHeC29J','mtu3mdKWr05Mufbo','Bg9N','mtuYnhfAwhbwCW','mti4ndC2ofLVywPHEq','mtG3nJy4r2HZt25L','BgvUz3rO','q2HYB21Lig9Wzw5LzcbMB3iGBwfUDwfSignHChr1CMuUienSB3nLihrOzsbICM93C2vYihDOzw4GzMLUAxnOzwqU','u0Lhsu5u','mtuZnfjwrhjYAa'];_0x2d2b=function(){return _0x20939b;};return _0x2d2b();}async function waitForBrowserClosed(_0x59c319){await new Promise(_0x3dcad3=>{const _0x531c4a=_0x2214;let _0x31aab6=![];const _0x4bd7c9=()=>{const _0x3b2c4b=_0x2214;if(_0x31aab6)return;_0x31aab6=!![],process[_0x3b2c4b(0x11d)](_0x3b2c4b(0x116),_0x4de1f3),process[_0x3b2c4b(0x11d)]('SIGTERM',_0x4de1f3),_0x3dcad3();},_0x4de1f3=()=>_0x4bd7c9();process['on'](_0x531c4a(0x116),_0x4de1f3),process['on']('SIGTERM',_0x4de1f3);const _0x523b56=async()=>{const _0x174ec4=_0x531c4a;try{const _0xd72ef6=await _0x59c319();if(_0xd72ef6[_0x174ec4(0x114)]===0x0){_0x4bd7c9();return;}setTimeout(()=>void _0x523b56(),BROWSER_POLL_MS);}catch{_0x4bd7c9();}};void _0x523b56();});}function _0x2214(_0x2cb972,_0x156bf1){_0x2cb972=_0x2cb972-0x109;const _0x2d2bfb=_0x2d2b();let _0x22148c=_0x2d2bfb[_0x2cb972];if(_0x2214['zTmTlK']===undefined){var _0x91d17d=function(_0x549bd7){const _0x465825='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x59c319='',_0x3dcad3='';for(let _0x31aab6=0x0,_0x4bd7c9,_0x4de1f3,_0x523b56=0x0;_0x4de1f3=_0x549bd7['charAt'](_0x523b56++);~_0x4de1f3&&(_0x4bd7c9=_0x31aab6%0x4?_0x4bd7c9*0x40+_0x4de1f3:_0x4de1f3,_0x31aab6++%0x4)?_0x59c319+=String['fromCharCode'](0xff&_0x4bd7c9>>(-0x2*_0x31aab6&0x6)):0x0){_0x4de1f3=_0x465825['indexOf'](_0x4de1f3);}for(let _0xd72ef6=0x0,_0x446c34=_0x59c319['length'];_0xd72ef6<_0x446c34;_0xd72ef6++){_0x3dcad3+='%'+('00'+_0x59c319['charCodeAt'](_0xd72ef6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3dcad3);};_0x2214['JeGfEq']=_0x91d17d,_0x2214['qWnLuY']={},_0x2214['zTmTlK']=!![];}const _0x5b3ea4=_0x2d2bfb[0x0],_0x581695=_0x2cb972+_0x5b3ea4,_0x11b2ad=_0x2214['qWnLuY'][_0x581695];return!_0x11b2ad?(_0x22148c=_0x2214['JeGfEq'](_0x22148c),_0x2214['qWnLuY'][_0x581695]=_0x22148c):_0x22148c=_0x11b2ad,_0x22148c;}export async function launchHeadedCapture(_0x446c34,_0x5cbd40){const _0x382db9=_0x2214,{driver:_0x3a30cc,sessionDir:_0x523d1a,cookiesPath:_0x33e595}=await _0x446c34[_0x382db9(0x11a)]();try{_0x5cbd40&&await _0x3a30cc[_0x382db9(0x109)](_0x5cbd40),console[_0x382db9(0x110)](_0x382db9(0x115)),await waitForBrowserClosed(()=>_0x3a30cc[_0x382db9(0x11b)]());}finally{try{await exportPersistedCookies(_0x3a30cc,_0x33e595);}catch{}await _0x446c34[_0x382db9(0x11c)](_0x3a30cc),removeSessionDir(_0x523d1a);}}
1
+ (function(_0x2a4474,_0x106f7d){const _0x44259c=_0x2eb5,_0x10c9fa=_0x2a4474();while(!![]){try{const _0x52d7e3=-parseInt(_0x44259c(0x1a0))/0x1*(parseInt(_0x44259c(0x1a2))/0x2)+parseInt(_0x44259c(0x19c))/0x3*(parseInt(_0x44259c(0x1a1))/0x4)+-parseInt(_0x44259c(0x19a))/0x5*(parseInt(_0x44259c(0x1a7))/0x6)+parseInt(_0x44259c(0x199))/0x7*(parseInt(_0x44259c(0x1a8))/0x8)+parseInt(_0x44259c(0x19e))/0x9*(parseInt(_0x44259c(0x198))/0xa)+parseInt(_0x44259c(0x1a6))/0xb+-parseInt(_0x44259c(0x1a3))/0xc*(-parseInt(_0x44259c(0x1a4))/0xd);if(_0x52d7e3===_0x106f7d)break;else _0x10c9fa['push'](_0x10c9fa['shift']());}catch(_0x716653){_0x10c9fa['push'](_0x10c9fa['shift']());}}}(_0x238c,0x76000));import{exportPersistedCookies,removeSessionDir}from'./headedBrowserState.js';function _0x2eb5(_0x4c011e,_0x15c192){_0x4c011e=_0x4c011e-0x197;const _0x238c5d=_0x238c();let _0x2eb51e=_0x238c5d[_0x4c011e];if(_0x2eb5['gPGNoL']===undefined){var _0x5e40ce=function(_0x5a2ad1){const _0x1a09ab='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2d08aa='',_0xe1a9ae='';for(let _0x254ba3=0x0,_0x5ce39f,_0x550273,_0x3fbe66=0x0;_0x550273=_0x5a2ad1['charAt'](_0x3fbe66++);~_0x550273&&(_0x5ce39f=_0x254ba3%0x4?_0x5ce39f*0x40+_0x550273:_0x550273,_0x254ba3++%0x4)?_0x2d08aa+=String['fromCharCode'](0xff&_0x5ce39f>>(-0x2*_0x254ba3&0x6)):0x0){_0x550273=_0x1a09ab['indexOf'](_0x550273);}for(let _0x3a169b=0x0,_0x2ae65e=_0x2d08aa['length'];_0x3a169b<_0x2ae65e;_0x3a169b++){_0xe1a9ae+='%'+('00'+_0x2d08aa['charCodeAt'](_0x3a169b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xe1a9ae);};_0x2eb5['AFPjTz']=_0x5e40ce,_0x2eb5['EsGgli']={},_0x2eb5['gPGNoL']=!![];}const _0x162ef5=_0x238c5d[0x0],_0x5df58f=_0x4c011e+_0x162ef5,_0x5f123c=_0x2eb5['EsGgli'][_0x5df58f];return!_0x5f123c?(_0x2eb51e=_0x2eb5['AFPjTz'](_0x2eb51e),_0x2eb5['EsGgli'][_0x5df58f]=_0x2eb51e):_0x2eb51e=_0x5f123c,_0x2eb51e;}function _0x238c(){const _0x1c61e8=['mtGXmJy2nhPhCK11sq','nxnmruPfvG','z2v0','m3nkBgPvAG','z2v0qwXSv2LUzg93sgfUzgXLCW','owD3CNfPDq','BgvUz3rO','ngz5BLPSta','oti2mJm2qwrSr05m','ndq1otG4u0rmENz5','otz6swLfywC','mte1odGYzxnmvMzL','Bgf1BMnOsgvHzgvK','mZeZmdy3n2f1sNPqAa','odq2mZu0q3PNCMrU','mJrAwfDVDMe','u0Lhvevstq','CMvTB3zLtgLZDgvUzxi','u0Lhsu5u','mtuYmdi5mhrxANjewa'];_0x238c=function(){return _0x1c61e8;};return _0x238c();}const BROWSER_POLL_MS=0x1f4;async function waitForBrowserClosed(_0x2d08aa){await new Promise(_0xe1a9ae=>{const _0x3b6a1a=_0x2eb5;let _0x254ba3=![];const _0x5ce39f=()=>{const _0x4b6669=_0x2eb5;if(_0x254ba3)return;_0x254ba3=!![],process[_0x4b6669(0x1aa)](_0x4b6669(0x197),_0x550273),process[_0x4b6669(0x1aa)](_0x4b6669(0x1a9),_0x550273),_0xe1a9ae();},_0x550273=()=>_0x5ce39f();process['on'](_0x3b6a1a(0x197),_0x550273),process['on'](_0x3b6a1a(0x1a9),_0x550273);const _0x3fbe66=async()=>{const _0x52142c=_0x3b6a1a;try{const _0x3a169b=await _0x2d08aa();if(_0x3a169b[_0x52142c(0x19f)]===0x0){_0x5ce39f();return;}setTimeout(()=>void _0x3fbe66(),BROWSER_POLL_MS);}catch{_0x5ce39f();}};void _0x3fbe66();});}export async function launchHeadedCapture(_0x2ae65e,_0x10e45d){const _0x323e96=_0x2eb5,{driver:_0xa85bef,sessionDir:_0x743265,cookiesPath:_0x4279b5}=await _0x2ae65e[_0x323e96(0x1a5)]();try{_0x10e45d&&await _0xa85bef[_0x323e96(0x19b)](_0x10e45d),console['log']('Chrome\x20opened\x20for\x20manual\x20capture.\x20Close\x20the\x20browser\x20when\x20finished.'),await waitForBrowserClosed(()=>_0xa85bef[_0x323e96(0x19d)]());}finally{try{await exportPersistedCookies(_0xa85bef,_0x4279b5);}catch{}await _0x2ae65e['release'](_0xa85bef),removeSessionDir(_0x743265);}}
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ async function runCliAction(action) {
22
22
  export function runCli() {
23
23
  loadDesktopEnv();
24
24
  const program = new Command();
25
- program.name('web-to-figma').description('Web to Figma Desktop local server');
25
+ program.name('web-to-figma').description('Web to Figma Desktop Application');
26
26
  program
27
27
  .command('start')
28
28
  .description('Start the desktop HTTP server')
@@ -39,7 +39,7 @@ export function runCli() {
39
39
  });
40
40
  program
41
41
  .command('capture')
42
- .description('Open headed Chrome for manual capture (server must be running)')
42
+ .description('Open headed Chrome for manual capture')
43
43
  .argument('[url]', 'Optional URL to open on launch')
44
44
  .option('--data-dir <path>', 'Data directory override')
45
45
  .option('--reset-browser-state', 'Clear saved headed-browser logins and session data')
@@ -52,7 +52,7 @@ export function runCli() {
52
52
  }));
53
53
  });
54
54
  program
55
- .command('doctor')
55
+ .command('doctor', { hidden: true })
56
56
  .description('Run environment diagnostics')
57
57
  .option('--data-dir <path>', 'Data directory override')
58
58
  .option('--update-chrome', 'Re-download Chrome for Testing binaries')
@@ -1 +1 @@
1
- (function(_0x21f3f2,_0x174e4e){const _0x523dc0=_0x58a5,_0x513c24=_0x21f3f2();while(!![]){try{const _0x50121b=-parseInt(_0x523dc0(0x185))/0x1+parseInt(_0x523dc0(0x17b))/0x2+parseInt(_0x523dc0(0x176))/0x3+-parseInt(_0x523dc0(0x172))/0x4+-parseInt(_0x523dc0(0x18b))/0x5*(parseInt(_0x523dc0(0x178))/0x6)+parseInt(_0x523dc0(0x16e))/0x7+-parseInt(_0x523dc0(0x179))/0x8*(parseInt(_0x523dc0(0x18c))/0x9);if(_0x50121b===_0x174e4e)break;else _0x513c24['push'](_0x513c24['shift']());}catch(_0x2d73c5){_0x513c24['push'](_0x513c24['shift']());}}}(_0x4a1d,0x7bb8e));import _0x44d94d from'jsonwebtoken';import{getSecretForKid}from'../../auth/jwtSecret.js';import{redactRequestHeaders}from'../../security/redact.js';function requestPath(_0x5d8bce){const _0x2bd9a9=_0x58a5;return _0x5d8bce[_0x2bd9a9(0x184)]('?')[0x0]??_0x5d8bce;}function isPublicPath(_0x1d375b){return _0x1d375b==='/health';}export function requiresJwt(_0x56904d,_0x63dea3){const _0x32c3c3=_0x58a5;if(_0x56904d===_0x32c3c3(0x171)&&_0x63dea3[_0x32c3c3(0x17e)](_0x32c3c3(0x174)))return![];if(_0x56904d===_0x32c3c3(0x173)&&_0x63dea3===_0x32c3c3(0x187))return!![];if(_0x56904d===_0x32c3c3(0x171)&&_0x63dea3==='/api/artifact/capture-status')return!![];if(_0x56904d===_0x32c3c3(0x173)&&_0x63dea3===_0x32c3c3(0x16a))return!![];return![];}function logAuthFailure(_0x539868,_0x33f4db,_0x2f30da,_0x39d8b9){const _0x2649a1=_0x58a5;_0x539868[_0x2649a1(0x168)][_0x2649a1(0x183)]({'reason':_0x33f4db,'path':_0x2f30da['url'][_0x2649a1(0x184)]('?')[0x0],'headers':redactRequestHeaders(_0x2f30da[_0x2649a1(0x182)]),'err':_0x39d8b9 instanceof Error?_0x39d8b9['message']:_0x39d8b9},_0x2649a1(0x170));if(_0x539868[_0x2649a1(0x17c)]){const _0x963c92=_0x39d8b9 instanceof Error?_0x39d8b9[_0x2649a1(0x175)]:String(_0x39d8b9??'');console[_0x2649a1(0x183)](_0x2649a1(0x169)+_0x33f4db+'\x20'+_0x2f30da[_0x2649a1(0x189)]+(_0x963c92?':\x20'+_0x963c92:''));}}function _0x4a1d(){const _0x410721=['ntm4mtG0rvPeAxfy','C2vUza','mtu2nJqZmKLVzg5bta','DMvYyM9Zzq','zgvJB2rL','C3rHCNrZv2L0Aa','C3rYAw5N','C3vI','Bg9N','AgvHzgvYCW','zxjYB3i','C3bSAxq','ntu5mZCZrhDeDgLN','A2LK','l2fWAs9HCNrPzMfJDc9Jyxb0DxjL','vw5HDxrOB3jPEMvK','DxjS','ywrKsg9VAW','otyWnZG1yxnPCgDf','ndvMrKLssxa','B2jQzwn0','D2vIlxrVlwzPz21HlxbSDwDPBG','y29Kzq','Bg9Nz2vY','w2f1DgHDia','l2fWAs9HCNrPzMfJDc9Jyw5JzwWTy2fWDhvYzq','AgvHzgvY','B25szxf1zxn0','w2f1DgHDig9Ria','mJKZnJiXm2vJv3fZBq','t1busu9ouW','yxv0Af9MywLSzwq','r0vu','mJiXode1nLD4q2Dywq','ue9tva','l2zPBgvZlW','BwvZC2fNzq','mJGZotu3nxfpBgHKzG','Bwv0Ag9K','nNHrA2vLzq'];_0x4a1d=function(){return _0x410721;};return _0x4a1d();}function logAuthSuccess(_0x23ff1f,_0x4f5dbe){const _0x5d2630=_0x58a5;_0x23ff1f['verbose']&&console[_0x5d2630(0x181)](_0x5d2630(0x16d)+_0x4f5dbe['method']+'\x20'+_0x4f5dbe[_0x5d2630(0x189)]);}function _0x58a5(_0xf69a43,_0x14796f){_0xf69a43=_0xf69a43-0x166;const _0x4a1dc7=_0x4a1d();let _0x58a57e=_0x4a1dc7[_0xf69a43];if(_0x58a5['fiFjrS']===undefined){var _0x294f20=function(_0x3857b0){const _0x8b0af2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x44d94d='',_0x5d8bce='';for(let _0x1d375b=0x0,_0x56904d,_0x63dea3,_0x539868=0x0;_0x63dea3=_0x3857b0['charAt'](_0x539868++);~_0x63dea3&&(_0x56904d=_0x1d375b%0x4?_0x56904d*0x40+_0x63dea3:_0x63dea3,_0x1d375b++%0x4)?_0x44d94d+=String['fromCharCode'](0xff&_0x56904d>>(-0x2*_0x1d375b&0x6)):0x0){_0x63dea3=_0x8b0af2['indexOf'](_0x63dea3);}for(let _0x33f4db=0x0,_0x2f30da=_0x44d94d['length'];_0x33f4db<_0x2f30da;_0x33f4db++){_0x5d8bce+='%'+('00'+_0x44d94d['charCodeAt'](_0x33f4db)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5d8bce);};_0x58a5['FiNTbZ']=_0x294f20,_0x58a5['JxPWxs']={},_0x58a5['fiFjrS']=!![];}const _0x24e3b2=_0x4a1dc7[0x0],_0x4452e8=_0xf69a43+_0x24e3b2,_0xff13ee=_0x58a5['JxPWxs'][_0x4452e8];return!_0xff13ee?(_0x58a57e=_0x58a5['FiNTbZ'](_0x58a57e),_0x58a5['JxPWxs'][_0x4452e8]=_0x58a57e):_0x58a57e=_0xff13ee,_0x58a57e;}export function registerDesktopAuth(_0x3dd026,_0x50facd){const _0x5ae4d4=_0x58a5;_0x3dd026[_0x5ae4d4(0x18a)](_0x5ae4d4(0x16c),async(_0x2bdada,_0x477fb0)=>{const _0xd50406=_0x5ae4d4;if(_0x2bdada[_0xd50406(0x177)]===_0xd50406(0x16f))return;const _0x50c6ad=requestPath(_0x2bdada['url']);if(isPublicPath(_0x50c6ad)||!requiresJwt(_0x2bdada[_0xd50406(0x177)],_0x50c6ad))return;const _0x3b5788=_0x2bdada[_0xd50406(0x182)]['x-wtf-desktop-jwt'];if(!_0x3b5788||typeof _0x3b5788!==_0xd50406(0x17f))return logAuthFailure(_0x50facd,'missing_jwt',_0x2bdada),_0x477fb0['code'](0x191)[_0xd50406(0x17a)]({'message':_0xd50406(0x188)});try{const _0x217392=_0x44d94d[_0xd50406(0x17d)](_0x3b5788,{'complete':!![]}),_0x12b087=_0x217392&&typeof _0x217392===_0xd50406(0x18d)&&_0x217392['header']?_0x217392[_0xd50406(0x16b)][_0xd50406(0x186)]:undefined,_0x236f2a=_0x44d94d['verify'](_0x3b5788,getSecretForKid(_0x12b087),{'algorithms':['HS256'],'issuer':_0xd50406(0x166),'audience':'web-to-figma-desktop'});_0x2bdada['desktopJwtSub']=_0x236f2a[_0xd50406(0x180)],logAuthSuccess(_0x50facd,_0x2bdada);}catch(_0x5b1e65){return logAuthFailure(_0x50facd,'invalid_jwt',_0x2bdada,_0x5b1e65),_0x477fb0[_0xd50406(0x167)](0x191)[_0xd50406(0x17a)]({'message':'Unauthorized'});}});}
1
+ (function(_0x342596,_0x1288e2){const _0x42a88d=_0x1797,_0x4614eb=_0x342596();while(!![]){try{const _0x3dbbec=-parseInt(_0x42a88d(0xbd))/0x1*(-parseInt(_0x42a88d(0xab))/0x2)+-parseInt(_0x42a88d(0xce))/0x3+parseInt(_0x42a88d(0xa9))/0x4+parseInt(_0x42a88d(0xc7))/0x5+-parseInt(_0x42a88d(0xad))/0x6+parseInt(_0x42a88d(0xae))/0x7+parseInt(_0x42a88d(0xbc))/0x8;if(_0x3dbbec===_0x1288e2)break;else _0x4614eb['push'](_0x4614eb['shift']());}catch(_0x466505){_0x4614eb['push'](_0x4614eb['shift']());}}}(_0x3bd1,0xcb562));import _0x4abf97 from'jsonwebtoken';import{getSecretForKid}from'../../auth/jwtSecret.js';import{redactRequestHeaders}from'../../security/redact.js';function requestPath(_0x25238e){return _0x25238e['split']('?')[0x0]??_0x25238e;}function isPublicPath(_0x447524){const _0x5de2f5=_0x1797;return _0x447524===_0x5de2f5(0xc8);}export function requiresJwt(_0x1681a3,_0x4c5493){const _0x24d8d8=_0x1797;if(_0x1681a3===_0x24d8d8(0xcd)&&_0x4c5493['startsWith'](_0x24d8d8(0xbb)))return![];if(_0x1681a3==='POST'&&_0x4c5493===_0x24d8d8(0xb6))return!![];if(_0x1681a3===_0x24d8d8(0xcd)&&_0x4c5493===_0x24d8d8(0xc3))return!![];if(_0x1681a3==='POST'&&_0x4c5493==='/api/artifact/cancel-capture')return!![];return![];}function logAuthFailure(_0x3c7d8f,_0x57f2cb,_0x54eb17,_0x57d124){const _0x17b62f=_0x1797;_0x3c7d8f['logger']['error']({'reason':_0x57f2cb,'path':_0x54eb17[_0x17b62f(0xb4)][_0x17b62f(0xbe)]('?')[0x0],'headers':redactRequestHeaders(_0x54eb17['headers']),'err':_0x57d124 instanceof Error?_0x57d124[_0x17b62f(0xba)]:_0x57d124},'auth_failed');if(_0x3c7d8f[_0x17b62f(0xc5)]){const _0x57fc3a=_0x57d124 instanceof Error?_0x57d124['message']:String(_0x57d124??'');console[_0x17b62f(0xaf)](_0x17b62f(0xc1)+_0x57f2cb+'\x20'+_0x54eb17[_0x17b62f(0xb4)]+(_0x57fc3a?':\x20'+_0x57fc3a:''));}}function _0x3bd1(){const _0xc62cd6=['DMvYAwz5','mKjmvLjoyG','AgvHzgvY','nJm4odK4mfrltwzfsG','mJu0nZqXow9OzKDiyW','zxjYB3i','zgvZA3rVCeP3Dfn1yG','C3vI','sfmYnty','AgvHzgvYCW','DxjS','y29Kzq','l2fWAs9HCNrPzMfJDc9Jyxb0DxjL','vw5HDxrOB3jPEMvK','w2f1DgHDig9Ria','BwLZC2LUz19QD3q','BwvZC2fNzq','l2zPBgvZlW','mtaZntK3mtjQEwvhs1e','otqWn21SsK5gAa','C3bSAxq','t1busu9ouW','B25szxf1zxn0','w2f1DgHDia','Ec13DgyTzgvZA3rVCc1QD3q','l2fWAs9HCNrPzMfJDc9Jyxb0DxjLlxn0yxr1CW','C2vUza','DMvYyM9Zzq','Bwv0Ag9K','mZq2nZiXnvDYBM5bvq','l2HLywX0Aa','A2LK','Aw52ywXPzf9QD3q','C3rYAw5N','D2vIlxrVlwzPz21HlxbSDwDPBG','r0vu','mJq4odmZohDgwhLquG','mtq2mty0nffkDxPwCq'];_0x3bd1=function(){return _0xc62cd6;};return _0x3bd1();}function logAuthSuccess(_0x318952,_0x54306f){const _0xea8068=_0x1797;_0x318952[_0xea8068(0xc5)]&&console['log'](_0xea8068(0xb8)+_0x54306f[_0xea8068(0xc6)]+'\x20'+_0x54306f['url']);}function _0x1797(_0x200226,_0x428a64){_0x200226=_0x200226-0xa9;const _0x3bd147=_0x3bd1();let _0x179793=_0x3bd147[_0x200226];if(_0x1797['BZeTQc']===undefined){var _0x31e500=function(_0x135392){const _0x11ca66='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4abf97='',_0x25238e='';for(let _0x447524=0x0,_0x1681a3,_0x4c5493,_0x3c7d8f=0x0;_0x4c5493=_0x135392['charAt'](_0x3c7d8f++);~_0x4c5493&&(_0x1681a3=_0x447524%0x4?_0x1681a3*0x40+_0x4c5493:_0x4c5493,_0x447524++%0x4)?_0x4abf97+=String['fromCharCode'](0xff&_0x1681a3>>(-0x2*_0x447524&0x6)):0x0){_0x4c5493=_0x11ca66['indexOf'](_0x4c5493);}for(let _0x57f2cb=0x0,_0x54eb17=_0x4abf97['length'];_0x57f2cb<_0x54eb17;_0x57f2cb++){_0x25238e+='%'+('00'+_0x4abf97['charCodeAt'](_0x57f2cb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x25238e);};_0x1797['vOysuf']=_0x31e500,_0x1797['IkbcQN']={},_0x1797['BZeTQc']=!![];}const _0x5010df=_0x3bd147[0x0],_0x44bcee=_0x200226+_0x5010df,_0xf05f15=_0x1797['IkbcQN'][_0x44bcee];return!_0xf05f15?(_0x179793=_0x1797['vOysuf'](_0x179793),_0x1797['IkbcQN'][_0x44bcee]=_0x179793):_0x179793=_0xf05f15,_0x179793;}export function registerDesktopAuth(_0x5ecb9b,_0x560b5d){const _0x1146a3=_0x1797;_0x5ecb9b['addHook'](_0x1146a3(0xc0),async(_0x271cce,_0x1d3ae2)=>{const _0x3878a4=_0x1146a3;if(_0x271cce[_0x3878a4(0xc6)]===_0x3878a4(0xbf))return;const _0x5e952b=requestPath(_0x271cce['url']);if(isPublicPath(_0x5e952b)||!requiresJwt(_0x271cce['method'],_0x5e952b))return;const _0x391c61=_0x271cce[_0x3878a4(0xb3)][_0x3878a4(0xc2)];if(!_0x391c61||typeof _0x391c61!==_0x3878a4(0xcb))return logAuthFailure(_0x560b5d,_0x3878a4(0xb9),_0x271cce),_0x1d3ae2[_0x3878a4(0xb5)](0x191)[_0x3878a4(0xc4)]({'message':_0x3878a4(0xb7)});try{const _0x2edbcb=_0x4abf97['decode'](_0x391c61,{'complete':!![]}),_0x39503f=_0x2edbcb&&typeof _0x2edbcb==='object'&&_0x2edbcb[_0x3878a4(0xac)]?_0x2edbcb['header'][_0x3878a4(0xc9)]:undefined,_0x52ebb3=_0x4abf97[_0x3878a4(0xaa)](_0x391c61,getSecretForKid(_0x39503f),{'algorithms':[_0x3878a4(0xb2)],'issuer':_0x3878a4(0xcc),'audience':'web-to-figma-desktop'});_0x271cce[_0x3878a4(0xb0)]=_0x52ebb3[_0x3878a4(0xb1)],logAuthSuccess(_0x560b5d,_0x271cce);}catch(_0x2e248a){return logAuthFailure(_0x560b5d,_0x3878a4(0xca),_0x271cce,_0x2e248a),_0x1d3ae2[_0x3878a4(0xb5)](0x191)[_0x3878a4(0xc4)]({'message':'Unauthorized'});}});}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-to-figma/desktop",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Web to Figma Desktop - Convert any website or HTML code to design",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",